repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / tests / system / libroot / posix / setjmp_test.c
blob711e49911bfee453a22097980e4a38e2cca712df
1 /*
2 * Copyright 2005-2006, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <setjmp.h>
8 #include <stdio.h>
11 int
12 main(int argc, char **argv)
14 jmp_buf state;
15 int value;
17 if ((value = setjmp(state)) != 0) {
18 printf("failed with: %d!\n", value);
19 } else {
20 printf("here I am: %d\n", value);
21 longjmp(state, 42);
22 printf("you won't see me!\n");
25 puts("done.");
26 return 0;