Something like this:
#include <stdio.h>
#include <setjmp.h>
jmp_buf errorhandler;
#define FAIL(why) fprintf(stderr, why); longjmp(errorhandler, 1)
void main()
{
/* prepare for error handling */
if (setjmp(errorhandler)) {
exit( 1);
}
/* do stuff */
bar();
exit;
}
void bar()
{
FAIL("I'm long jumping!\n");
}
Now, how does this relate to linux-net?
-Erik
--
Erik B. Andersen Web: http://www.xmission.com/~andersen/
email: andersee@debian.org
--This message was written using 73% post-consumer electrons--
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu