Johannes Sixt <J.Sixt@xxxxxxxxxxxxx> writes: > You could think about longjmp(3)ing out into main(), which would have to > setjmp(3). But in order to clean up intermediate frames, you would have > to have a stack of setjmp/longjmp buffers. > > Oh, well, how do I *love* them C++ exceptions! You can have exceptions in C too. I've used it a bit while contributing to Baz 1.x (the fork of tla). The library used was cexcept ( http://cexcept.sourceforge.net/ ). As you mention, jumping is the easy part, and cleaning up is the hard one. Baz was using talloc, hacked to somehow work with cexcept. The mini-library doesn't seem to be available as a tarball anymore, so I did the checkout+targz in case someone's curious to have a look, and lazy enough not to install baz to get it: http://www-verimag.imag.fr/~moy/tmp/talloc-except--2.0.1--patch-2.tar.gz This stuff is not supported anymore, but very small anyway. -- Matthieu - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html