2
0

setjmp.c 228 B

1234567891011121314
  1. #include <stdio.h>
  2. #include <setjmp.h>
  3. #include "test_helpers.h"
  4. int main(void) {
  5. jmp_buf buf;
  6. if (setjmp(buf)) {
  7. puts("hi from jump");
  8. } else {
  9. puts("jumping...");
  10. longjmp(buf, 0);
  11. }
  12. }