Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!icdoc!citycs!phil From: phil@cs.city.ac.uk (Phil Thompson) Newsgroups: comp.windows.x Subject: setjmp/longjmp in callbacks Message-ID: <1991Jan16.151843.11043@cs.city.ac.uk> Date: 16 Jan 91 15:18:43 GMT Organization: City University Lines: 13 I would like to set up a jmp_buf with setjmp(), create a widget and pass the jmp_buf to one of the widget's callbacks as client data. The callback will then longjmp() using it. Obviously I have to destroy the widget or remove the callback before the function containing the setjmp() returns, and that function must handle events somewhere. Is there anything in the nature of X that means that this technique is flawed? Is there a cleaner method? Thanks for any help, Phil Thompson (cs.city.ac.uk)