home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c045 / 2.ddi / INCLUDE / SIGNAL.H$ / SIGNAL.bin
Encoding:
Text File  |  1992-01-01  |  2.3 KB  |  100 lines

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