Debian Codegraph @

WWW/Library/Implementation/LYexit.h

raw
1 #ifndef __LYEXIT_H
2 /*
3 * Avoid include redundancy
4 */
5 #define __LYEXIT_H
6
7 /*
8 * Copyright (c) 1994, University of Kansas, All Rights Reserved
9 *
10 * Include File: LYexit.h
11 * Purpose: Provide an atexit function for libraries without such.
12 * Remarks/Portability/Dependencies/Restrictions:
13 * Include this header in every file that you have an exit or
14 * atexit statement.
15 * Revision History:
16 * 06-15-94 created Lynx 2-3-1 Garrett Arch Blythe
17 */
18
19 /*
20 * Required includes
21 */
22 #ifdef _WINDOWS
23 #include <process.h> /* declares exit() */
24 #endif
25
26 #ifndef HTUTILS_H
27 #include <HTUtils.h>
28 #endif
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 /*
34 * Constant defines
35 */
36 #ifdef exit
37 #undef exit
38 #endif
39 #define exit(code) LYexit(code)
40 #define atexit LYatexit
41 #define ATEXITSIZE 50
42
43 /*
44 * Data structures
45 */
46
47 /*
48 * Global variable declarations
49 */
50
51 /*
52 * Macros
53 */
54
55 /*
56 * Function declarations
57 */
58 extern GCC_NORETURN void outofmem(const char *fname, const char *func);
59 extern void reset_signals(void);
60 extern GCC_NORETURN void exit_immediately(int status);
61 extern GCC_NORETURN void LYexit(int status);
62 extern int LYatexit(void (*function) (void));
63
64 #ifdef __cplusplus
65 }
66 #endif
67 #endif /* __LYEXIT_H */