Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!tymix!cirrusl!sun505!paul From: paul@sun505.UUCP (Paul E. Black) Newsgroups: comp.lang.c Subject: Re: Behaviour of setjmp/longjmp and registers Summary: We used them a few times Message-ID: <656@cirrusl.UUCP> Date: 3 Feb 89 00:51:24 GMT Sender: news@cirrusl.UUCP Lines: 18 In article <26109@cci632.UUCP> jf@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@olivetti.com 1463 Centre Pointe Dr. | Voice: (408) 945-8305 x 210 Milpitas, CA 95035 USA