Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ longjmp(3C) — UTek 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

goto(1csh)

signal(3c)



SETJMP(3C)              COMMAND REFERENCE              SETJMP(3C)



NAME
     setjmp, longjmp - nonlocal goto

SYNOPSIS
     #include <setjmp.h>

     setjmp(env)
     jmpbuf env;

     longjmp(env, val)
     jmpbuf env;

DESCRIPTION
     These routines are useful for dealing with errors and
     interrupts encountered in a low-level subroutine of a
     program.

     Setjmp saves its stack environment in env for later use by
     longjmp.  It returns value 0.

     Longjmp restores the environment saved by the last call of
     setjmp.  It then returns in such a way that execution
     continues as if the call of setjmp had just returned the
     value val to the function that invoked setjmp, which must
     not itself have returned in the interim.  All accessible
     data have values as of the time longjmp was called, except
     for objects of storage class auto or register whose values
     have been changed between the setjmp and longjmp calls.
     These values are undefined.

SEE ALSO
     goto(1csh) and signal(3c).























Printed 5/12/88                                                 1





































































%%index%%
na:312,83;
sy:395,863;
de:1258,1480;
se:2738,163;
%%index%%000000000083

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026