home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Languages / Quick C 2.0 / INCLUDE / SIGNAL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1988-12-07  |  1.8 KB  |  60 lines

  1. /***
  2. *signal.h - defines signal values and routines
  3. *
  4. *    Copyright (c) 1985-1989, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *    This file defines the signal values and declares the signal functions.
  8. *    [ANSI/System V]
  9. *
  10. ****/
  11.  
  12.  
  13. #ifndef NO_EXT_KEYS    /* extensions enabled */
  14.     #define _CDECL    cdecl
  15. #else /* extensions not enabled */
  16.     #define _CDECL
  17. #endif /* NO_EXT_KEYS */
  18.  
  19. #ifndef _SIG_ATOMIC_T_DEFINED
  20. typedef int sig_atomic_t;
  21. #define _SIG_ATOMIC_T_DEFINED
  22. #endif
  23.  
  24.  
  25. #define NSIG 23        /* maximum signal number + 1 */
  26.  
  27. /* signal types */
  28. /* SIGINT, SIGFPE, SIGILL, SIGSEGV, and SIGABRT are recognized on DOS 3.x */
  29.  
  30. #define SIGINT        2    /* interrupt - corresponds to DOS 3.x int 23H */
  31. #define SIGILL        4    /* illegal instruction - invalid function image */
  32. #define SIGFPE        8    /* floating point exception */
  33. #define SIGSEGV        11    /* segment violation */
  34. #define SIGTERM        15    /* Software termination signal from kill */
  35. #define SIGUSR1        16    /* User defined signal 1 */
  36. #define SIGUSR2        17    /* User defined signal 2 */
  37. #define SIGUSR3        20    /* User defined signal 3 */
  38. #define SIGBREAK    21    /* Ctrl-Break sequence */
  39. #define SIGABRT        22    /* abnormal termination triggered by abort call */
  40.  
  41.  
  42. /* signal action codes */
  43. /* SIG_DFL and SIG_IGN are recognized on DOS 3.x */
  44.  
  45. #define SIG_DFL (void (_CDECL *)())0    /* default signal action */
  46. #define SIG_IGN (void (_CDECL *)())1    /* ignore */
  47. #define SIG_SGE (void (_CDECL *)())3    /* signal gets error */
  48. #define SIG_ACK (void (_CDECL *)())4    /* error if handler not setup */
  49.  
  50.  
  51. /* signal error value (returned by signal call on error) */
  52.  
  53. #define SIG_ERR (void (_CDECL *)())-1    /* signal error value */
  54.  
  55.  
  56. /* function prototypes */
  57.  
  58. void (_CDECL * _CDECL signal(int, void (_CDECL *)()))();
  59. int _CDECL raise(int);
  60.