arosc.library: Centralized exit handling code in __arosc_startup.c
[AROS.git] / compiler / clib / include / sys / arosc.h
blobc55f8dc38eb5927c4079d9e11d2f4acbc62c5ae0
1 #ifndef _SYS_AROSC_H
2 #define _SYS_AROSC_H
4 #include <aros/system.h>
5 #include <setjmp.h>
7 struct __sFILE;
9 struct arosc_ctype {
10 const unsigned short int *b;
11 const unsigned char *toupper;
12 const unsigned char *tolower;
15 struct arosc_userdata
17 /* stdio.h */
18 struct __sFILE *acud_stdin;
19 struct __sFILE *acud_stdout;
20 struct __sFILE *acud_stderr;
22 /* errno.h */
23 int acud_errno;
25 struct arosc_ctype acud_ctype;
27 /* Used by multi-byte functions */
28 int acud_mb_cur_max;
31 __BEGIN_DECLS
33 struct arosc_userdata *__get_arosc_userdata(void) __pure;
34 const struct arosc_ctype *__get_arosc_ctype(void) __pure;
35 int __arosc_nixmain(int (*main)(int argc, char *argv[]), int argc, char *argv[]);
36 int __get_default_file(int file_descriptor, long* file_handle);
37 void __arosc_program_startup(jmp_buf exitjmp, int *error_ptr);
38 void __arosc_program_end(void);
39 int *__arosc_set_errorptr(int *errorptr);
40 void __arosc_set_exitjmp(jmp_buf exitjmp, jmp_buf previousjmp);
41 void __arosc_jmp2exit(int normal, int returncode) __noreturn;
43 __END_DECLS
45 #endif /* !_SYS_AROSC_H */