]>
Commit | Line | Data |
---|---|---|
ccc6cda3 JA |
1 | /* bashjmp.h -- wrapper for setjmp.h with necessary bash definitions. */ |
2 | ||
3 | #ifndef _BASHJMP_H_ | |
4 | #define _BASHJMP_H_ | |
5 | ||
d166f048 | 6 | #include "posixjmp.h" |
ccc6cda3 JA |
7 | |
8 | extern procenv_t top_level; | |
9 | extern procenv_t subshell_top_level; | |
10 | extern procenv_t return_catch; /* used by `return' builtin */ | |
11 | ||
12 | #define SHFUNC_RETURN() longjmp (return_catch, 1) | |
13 | ||
14 | #define COPY_PROCENV(old, save) \ | |
15 | xbcopy ((char *)old, (char *)save, sizeof (procenv_t)); | |
16 | ||
17 | /* Values for the second argument to longjmp/siglongjmp. */ | |
18 | #define NOT_JUMPED 0 /* Not returning from a longjmp. */ | |
19 | #define FORCE_EOF 1 /* We want to stop parsing. */ | |
20 | #define DISCARD 2 /* Discard current command. */ | |
21 | #define EXITPROG 3 /* Unconditionally exit the program now. */ | |
22 | ||
23 | #endif /* _BASHJMP_H_ */ |