From 9776b3400080a53347b2d45de16617342d4c7794 Mon Sep 17 00:00:00 2001 From: solar Date: Mon, 30 Jan 2006 18:08:34 +0000 Subject: [PATCH] Moved struct definition to internal header. --- functions/stdlib/atexit.c | 7 ------- functions/stdlib/exit.c | 7 ------- internals/_PDCLIB_aux.h | 11 +++++++++++ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/functions/stdlib/atexit.c b/functions/stdlib/atexit.c index 573e4ba..1ca1e7f 100644 --- a/functions/stdlib/atexit.c +++ b/functions/stdlib/atexit.c @@ -12,13 +12,6 @@ #ifndef REGTEST -/* TODO: Required by both atexit() and exit(). */ -struct _PDCLIB_exitfunc_t -{ - struct _PDCLIB_exitfunc_t * next; - void (*func)( void ); -}; - extern struct _PDCLIB_exitfunc_t * regstack; int atexit( void (*func)( void ) ) diff --git a/functions/stdlib/exit.c b/functions/stdlib/exit.c index f093fe0..520757d 100644 --- a/functions/stdlib/exit.c +++ b/functions/stdlib/exit.c @@ -12,13 +12,6 @@ #ifndef REGTEST -/* TODO: Required by both atexit() and exit(). */ -struct _PDCLIB_exitfunc_t -{ - struct _PDCLIB_exitfunc_t * next; - void (*func)( void ); -}; - struct _PDCLIB_exitfunc_t * regstack = NULL; void exit( int status ) diff --git a/internals/_PDCLIB_aux.h b/internals/_PDCLIB_aux.h index be39eb2..a4e7a62 100644 --- a/internals/_PDCLIB_aux.h +++ b/internals/_PDCLIB_aux.h @@ -60,3 +60,14 @@ #define _PDCLIB_symbol2value( x ) #x #define _PDCLIB_symbol2string( x ) _PDCLIB_symbol2value( x ) #define _PDCLIB_symbol2identity( x ) x + +/* -------------------------------------------------------------------------- */ +/* Internal data types */ +/* -------------------------------------------------------------------------- */ + +/* Structure required by both atexit() and exit() for handling atexit functions */ +struct _PDCLIB_exitfunc_t +{ + struct _PDCLIB_exitfunc_t * next; + void (*func)( void ); +}; -- 2.40.0