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

  1. /***
  2. *setjmp.h - definitions/declarations for setjmp/longjmp routines
  3. *
  4. *    Copyright (c) 1985-1991, 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. #if defined(_DLL) && !defined(_MT)
  21. #error Cannot define _DLL without _MT
  22. #endif
  23.  
  24. #ifdef _MT
  25. #define _FAR_ __far
  26. #else
  27. #define _FAR_
  28. #endif
  29.  
  30. #if (_MSC_VER <= 600)
  31. #define __cdecl     _cdecl
  32. #define __far       _far
  33. #define __loadds    _loadds
  34. #endif
  35.  
  36. /* define the buffer type for holding the state information */
  37.  
  38. #define _JBLEN    9  /* bp, di, si, sp, ret addr, ds */
  39.  
  40. #ifndef _JMP_BUF_DEFINED
  41. typedef  int  jmp_buf[_JBLEN];
  42. #define _JMP_BUF_DEFINED
  43. #endif
  44.  
  45.  
  46. /* function prototypes */
  47.  
  48. int  _FAR_ __cdecl setjmp(jmp_buf);
  49. void _FAR_ __cdecl longjmp(jmp_buf, int);
  50.  
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54.  
  55. #define _INC_SETJMP
  56. #endif    /* _INC_SETJMP */
  57.