home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c034 / 4.ddi / INCLUDE / SIGNAL.H$ / SIGNAL.bin
Encoding:
Text File  |  1990-01-08  |  2.0 KB  |  72 lines

  1. /***
  2. *signal.h - defines signal values and routines
  3. *
  4. *    Copyright (c) 1985-1990, 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. #if defined(_DLL) && !defined(_MT)
  13. #error Cannot define _DLL without _MT
  14. #endif
  15.  
  16. #ifdef _MT
  17. #define _FAR_ _far
  18. #else
  19. #define _FAR_
  20. #endif
  21.  
  22. #ifdef    _DLL
  23. #define _LOADDS_ _loadds
  24. #else
  25. #define _LOADDS_
  26. #endif
  27.  
  28. #ifndef _SIG_ATOMIC_T_DEFINED
  29. typedef int sig_atomic_t;
  30. #define _SIG_ATOMIC_T_DEFINED
  31. #endif
  32.  
  33.  
  34. #define NSIG 23     /* maximum signal number + 1 */
  35.  
  36. /* signal types */
  37. /* SIGINT, SIGFPE, SIGILL, SIGSEGV, and SIGABRT are recognized on DOS 3.x */
  38.  
  39. #define SIGINT        2    /* interrupt - corresponds to DOS 3.x int 23H */
  40. #define SIGILL        4    /* illegal instruction - invalid function image */
  41. #define SIGFPE        8    /* floating point exception */
  42. #define SIGSEGV     11    /* segment violation */
  43. #define SIGTERM     15    /* Software termination signal from kill */
  44. #define SIGUSR1     16    /* User defined signal 1 */
  45. #define SIGUSR2     17    /* User defined signal 2 */
  46. #define SIGUSR3     20    /* User defined signal 3 */
  47. #define SIGBREAK    21    /* Ctrl-Break sequence */
  48. #define SIGABRT     22    /* abnormal termination triggered by abort call */
  49.  
  50.  
  51. /* signal action codes */
  52. /* SIG_DFL and SIG_IGN are recognized on DOS 3.x */
  53.  
  54. #define SIG_DFL (void (_FAR_ _cdecl _LOADDS_ *)())0     /* default signal action */
  55. #define SIG_IGN (void (_FAR_ _cdecl _LOADDS_ *)())1     /* ignore */
  56. #define SIG_SGE (void (_FAR_ _cdecl _LOADDS_ *)())3     /* signal gets error */
  57. #define SIG_ACK (void (_FAR_ _cdecl _LOADDS_ *)())4     /* error if handler not setup */
  58.  
  59.  
  60. /* signal error value (returned by signal call on error) */
  61.  
  62. #define SIG_ERR (void (_FAR_ _cdecl _LOADDS_ *)())-1     /* signal error value */
  63.  
  64.  
  65. /* function prototypes */
  66.  
  67. void (_FAR_ _cdecl _LOADDS_ * _FAR_ _cdecl signal(int,
  68.     void (_FAR_ _cdecl _LOADDS_ *)()))();
  69. #ifndef _MT
  70. int _FAR_ _cdecl raise(int);
  71. #endif
  72.