X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=includes%2Fsignal.h;h=170851c17e2a77616ad3ea085afda31b938edb8a;hp=bfc9888276e14d2426d810049e5dab110de38cc2;hb=1d9d92ba957a0b8307c9a65c35867fde68e6533b;hpb=ac3f809c3c10347c110fac3db93af0954eda98bb diff --git a/includes/signal.h b/includes/signal.h index bfc9888..170851c 100644 --- a/includes/signal.h +++ b/includes/signal.h @@ -1,37 +1,49 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- -// Signal handling -// ---------------------------------------------------------------------------- - -#ifndef __SIGNAL_H -#define __SIGNAL_H __SIGNAL_H - -// ---------------------------------------------------------------------------- -// MACROS - -#define SIGABRT // TODO -#define SIGFPE // TODO -#define SIGILL // TODO -#define SIGINT // TODO -#define SIGSEGV // TODO -#define SIGTERM // TODO -#define SIG_DFL // TODO -#define SIG_ERR // TODO -#define SIG_IGN // TODO - -// ---------------------------------------------------------------------------- -// TYPEDEFS - -typedef sig_atomic_t; // TODO - -// ---------------------------------------------------------------------------- -// FUNCTIONS - -int raise( int sig ); // TODO -void ( * signal( int sig, void ( *func )( int ) ) ) ( int ); // TODO - -#endif // __SIGNAL_H +/* ---------------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------------- + * Public Domain C Library - http://pdclib.sourceforge.net + * This code is Public Domain. Use, modify, and redistribute at will. + * ---------------------------------------------------------------------------- + * Signal handling + * --------------------------------------------------------------------------*/ + +#ifndef _SIGNAL_H +#define _SIGNAL_H _SIGNAL_H + +#ifndef _NULL +#include "__intern.h" +#endif + +/* TODO: Documentation */ + +/* ---------------------------------------------------------------------------- + * MACROS + * --------------------------------------------------------------------------*/ + +#define SIGABRT _SIGABRT +#define SIGFPE _SIGFPE +#define SIGILL _SIGILL +#define SIGINT _SIGINT +#define SIGSEGV _SIGSEGV +#define SIGTERM _SIGTERM +#define SIG_DFL _SIG_DFL +#define SIG_ERR _SIG_ERR +#define SIG_IGN _SIG_IGN + +/* ---------------------------------------------------------------------------- + * TYPEDEFS + * --------------------------------------------------------------------------*/ + +#ifndef _SIG_ATOMIC_T +#define _SIG_ATOMIC_T _SIG_ATOMIC_T +typedef __sig_atomic_t sig_atomic_t; +#endif /* _SIG_ATOMIC_T + +/* ---------------------------------------------------------------------------- + * FUNCTIONS + * --------------------------------------------------------------------------*/ + +int raise( int sig ); /* TODO */ +void ( * signal( int sig, void ( *func )( int ) ) ) ( int ); /* TODO */ + +#endif /* _SIGNAL_H */