From 2cd8e80bfe2792ce8999a26b34384598f58e3889 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Tue, 27 Apr 2004 20:26:05 -0400 Subject: snapshot of project "lynx", label v2-8-6dev_2 --- src/LYexit.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'src/LYexit.c') diff --git a/src/LYexit.c b/src/LYexit.c index 87071ffc..1e49ba9c 100644 --- a/src/LYexit.c +++ b/src/LYexit.c @@ -16,14 +16,14 @@ /* * Flag for outofmem macro. - FM */ -PUBLIC BOOL LYOutOfMemory = FALSE; +BOOL LYOutOfMemory = FALSE; /* * Stack of functions to call upon exit. */ -PRIVATE void (*callstack[ATEXITSIZE]) NOPARAMS; -PRIVATE int topOfStack = 0; +static void (*callstack[ATEXITSIZE]) (void); +static int topOfStack = 0; /* * Purpose: Registers termination function. @@ -35,12 +35,7 @@ PRIVATE int topOfStack = 0; * 06-15-94 created Lynx 2-3-1 Garrett Arch Blythe */ -#ifdef __STDC__ -PUBLIC int LYatexit(void (*function) NOPARAMS) -#else /* Not ANSI, ugh! */ -PUBLIC int LYatexit(function) -void (*function) NOPARAMS; -#endif /* __STDC__ */ +int LYatexit(void (*function) (void)) { /* * Check for available space. @@ -66,7 +61,7 @@ void (*function) NOPARAMS; * Revision History: * 06-15-94 created Lynx 2-3-1 Garrett Arch Blythe */ -PRIVATE void LYCompleteExit NOPARAMS +static void LYCompleteExit (void) { /* * Just loop through registered functions. @@ -86,8 +81,8 @@ PRIVATE void LYCompleteExit NOPARAMS * Revision History: * 06-15-94 created Lynx 2-3-1 Garrett Arch Blythe */ -PUBLIC void LYexit ARGS1( - int, status) +void LYexit ( + int status) { #ifndef VMS /* On VMS, the VMSexit() handler does these. - FM */ #ifdef _WINDOWS @@ -174,9 +169,9 @@ PUBLIC void LYexit ARGS1( exit(status); } -PUBLIC void outofmem ARGS2( - CONST char *, fname, - CONST char *, func) +void outofmem ( + const char * fname, + const char * func) { fprintf(stderr, "\n\n\n%s %s: %s\n", fname, func, MEMORY_EXHAUSTED_ABORTING); LYOutOfMemory = TRUE; -- cgit 1.4.1-2-gfad0