home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / setjmp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  1.4 KB  |  86 lines

  1. /***
  2. *setjmp.h - definitions/declarations for setjmp/longjmp routines
  3. *
  4. *    Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *    This file defines the machine-dependent buffer used by
  8. *    setjmp/longjmp to save and restore the program state, and
  9. *    declarations for those routines.
  10. *    [ANSI/System V]
  11. *
  12. ****/
  13.  
  14. #ifndef _INC_SETJMP
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19.  
  20.  
  21. #ifndef _CRTIMP
  22. #ifdef _DLL
  23. #define _CRTIMP __declspec(dllimport)
  24. #else
  25. #define _CRTIMP
  26. #endif
  27. #endif
  28.  
  29.  
  30. /*
  31.  * Definitions specific to particular setjmp implementations.
  32.  */
  33. #ifdef    _M_IX86
  34.  
  35. #define setjmp    _setjmp
  36. #if defined(_WIN32_WCE_EMULATION)
  37. #define _JBLEN  16
  38. #else
  39. #define _JBLEN    8
  40.  
  41. #endif
  42.  
  43. #endif
  44.  
  45. #if defined(_M_SH) || defined(_M_MRX000)
  46.  
  47. #define setjmp        _setjmp
  48. #define _JBLEN        0x30
  49.  
  50. #endif
  51.  
  52.  
  53. #if defined(_M_PPC)
  54.  
  55. #define setjmp  _setjmp
  56.  
  57. #define _JBLEN  32  // NOTE: 32 doubles (see below)
  58.  
  59. #endif
  60.  
  61.  
  62. /* define the buffer type for holding the state information */
  63.  
  64. #ifndef _JMP_BUF_DEFINED
  65. #if defined(_M_PPC)
  66. typedef  double jmp_buf[_JBLEN];
  67. #else
  68. typedef  int    jmp_buf[_JBLEN];
  69. #endif
  70. #define _JMP_BUF_DEFINED
  71. #endif
  72.  
  73.  
  74. /* function prototypes */
  75.  
  76. int __cdecl _setjmp(jmp_buf);
  77. _CRTIMP void __cdecl longjmp(jmp_buf, int);
  78.  
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82.  
  83. #define _INC_SETJMP
  84.  
  85. #endif    /* _INC_SETJMP */
  86.