update for HEAD-2003021201
[reactos.git] / include / msvcrt / signal.h
index 05b2aac..344d4b2 100644 (file)
@@ -15,7 +15,7 @@
  *
  *  This code is distributed in the hope that it will be useful but
  *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- *  DISCLAMED. This includes but is not limited to warranties of
+ *  DISCLAIMED. This includes but is not limited to warranties of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  *
  * $Revision$
  *
  */
 /* added some extra signal constants */
-#ifndef        _SIGNAL_H_
-#define        _SIGNAL_H_
+#ifndef _SIGNAL_H_
+#define _SIGNAL_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The prototypes (below) are the easy part. The hard part is figuring
- * out what signals are available and what numbers they are assigned
- * along with appropriate values of SIG_DFL and SIG_IGN.
- */
-
-/*
- * A pointer to a signal handler function. A signal handler takes a
- * single int, which is the signal it handles.
- */
-typedef        void (*_p_sig_fn_t)(int nSig);
-
-/*
- * These are special values of signal handler pointers which are
- * used to send a signal to the default handler (SIG_DFL), ignore
- * the signal (SIG_IGN), or indicate an error return (SIG_ERR).
- */
-#define        SIG_DFL ((_p_sig_fn_t) 0)
-#define        SIG_IGN ((_p_sig_fn_t) 1)
-#define        SIG_ERR ((_p_sig_fn_t) -1)
 
 /*
  * The actual signal values. Using other values with signal
@@ -68,44 +44,70 @@ typedef     void (*_p_sig_fn_t)(int nSig);
  *       structured exception handling frame. Results may be better if I ever
  *       manage to get the SEH stuff down.
  */
-#define        SIGINT          2       /* Interactive attention */
-#define        SIGILL          4       /* Illegal instruction */
-#define        SIGFPE          8       /* Floating point error */
-#define        SIGSEGV         11      /* Segmentation violation */
-#define        SIGTERM         15      /* Termination request */
-#define SIGBREAK       21      /* Control-break */
-#define        SIGABRT         22      /* Abnormal termination (abort) */
+#define SIGINT      2   /* Interactive attention */
+#define SIGILL      4   /* Illegal instruction */
+#define SIGFPE      8   /* Floating point error */
+#define SIGSEGV     11  /* Segmentation violation */
+#define SIGTERM     15  /* Termination request */
+#define SIGBREAK    21  /* Control-break */
+#define SIGABRT     22  /* Abnormal termination (abort) */
 
-#define SIGALRM        293
-#define SIGHUP 294
+#define SIGALRM 293
+#define SIGHUP  294
 /* SIGINT is ansi */
-#define SIGKILL        296
-#define SIGPIPE        297
-#define SIGQUIT        298
-#define SIGUSR1        299
-#define SIGUSR2        300
+#define SIGKILL 296
+#define SIGPIPE 297
+#define SIGQUIT 298
+#define SIGUSR1 299
+#define SIGUSR2 300
 
 #define SIGNOFP 301
 #define SIGTRAP 302
-#define SIGTIMR 303    /* Internal for setitimer (SIGALRM, SIGPROF) */
+#define SIGTIMR 303 /* Internal for setitimer (SIGALRM, SIGPROF) */
 #define SIGPROF 304
 #define SIGMAX  320
 
 /*
+ * The prototypes (below) are the easy part. The hard part is figuring
+ * out what signals are available and what numbers they are assigned
+ * along with appropriate values of SIG_DFL and SIG_IGN.
+ */
+
+/*
+ * A pointer to a signal handler function. A signal handler takes a
+ * single int, which is the signal it handles.
+ */
+typedef void (*_p_sig_fn_t)(int);
+
+/*
+ * These are special values of signal handler pointers which are
+ * used to send a signal to the default handler (SIG_DFL), ignore
+ * the signal (SIG_IGN), or indicate an error return (SIG_ERR).
+ */
+#define SIG_DFL ((_p_sig_fn_t) 0)
+#define SIG_IGN ((_p_sig_fn_t) 1)
+#define SIG_ERR ((_p_sig_fn_t) -1)
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+
+/*
  * Call signal to set the signal handler for signal sig to the
  * function pointed to by handler. Returns a pointer to the
  * previous handler, or SIG_ERR if an error occurs. Initially
  * unhandled signals defined above will return SIG_DFL.
  */
-_p_sig_fn_t    signal(int sig, _p_sig_fn_t func);
+_p_sig_fn_t signal(int sig, _p_sig_fn_t func);
 
 /*
  * Raise the signal indicated by sig. Returns non-zero on success.
  */
-int    raise (int sig);
+int raise(int);
 
-#ifdef __cplusplus
+#ifdef  __cplusplus
 }
 #endif
 
-#endif
+#endif  /* Not _SIGNAL_H_ */