Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!tektronix!ogcvax!omsvax!hplabs!sri-unix!dan@bbncd From: dan%bbncd@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: Re: setexit() Message-ID: <12826@sri-arpa.UUCP> Date: Thu, 20-Oct-83 17:32:39 EDT Article-I.D.: sri-arpa.12826 Posted: Thu Oct 20 17:32:39 1983 Date-Received: Tue, 25-Oct-83 02:46:56 EDT Lines: 19 From: Dan Franklin setexit() and reset() were the crude V6 primitives that were later generalized to setjmp and longjmp. They take no arguments, and can be simulated with #include jmp_buf label; #define setexit() setjmp(label) #define reset() longjmp(label, 0) at the beginning of any program using them. In other words, setexit() was like setjmp of a built-in fixed "jmp_buf"; reset() was like a longjmp to that "jmp_buf". Unlike setjmp(), however, you could not find out from the return value of setexit() whether you were setting it up or returning from a reset() (in standard V6, that is; we changed ours to return nonzero on reset(), and probably other people did the same thing). Dan Franklin (dan@bbn-unix)