Behaviour of setjmp/longjmp and registers
Paul E. Black
paul at sun505.UUCP
Fri Feb 3 10:51:24 AEST 1989
In article <26109 at cci632.UUCP> jf at ccird3.UUCP (Jens Fiederer) writes:
>
>While I have never used setjmp/longjmp myself, ... [m]y feeling is
>that setjmp/longjmp have their legitimate uses, be they ever so few.
I agree. I helped write an IC design editor. The structuring seemed
better to put a setjmp in the top loop of the "command interpreter"
(the code which reads the keyboard & mouse and decides which function
should be dispatched). Then any command which needs to terminate can
easily do a longjmp.
In about 75 000 lines of code, there are less than 40 uses of setjmp and
longjmp. Those are confined to just three usage areas.
Paul E. Black | UUCP: ...{pyramid,amdahl,ames}!oliveb!cirrusl!paul
CIRRUS LOGIC, Inc. | Internet: cirrusl!paul at olivetti.com
1463 Centre Pointe Dr. | Voice: (408) 945-8305 x 210
Milpitas, CA 95035 USA
More information about the Comp.lang.c
mailing list