home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 2.ddi / INCLUDE.ZIP / SETJMP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-13  |  1.0 KB  |  61 lines

  1. /*  setjmp.h
  2.  
  3.     Defines typedef and functions for setjmp/longjmp.
  4.  
  5.         Copyright (c) Borland International 1987,1988,1990,1991
  6.     All Rights Reserved.
  7. */
  8.  
  9. #ifndef __SETJMP_H
  10. #define __SETJMP_H
  11.  
  12. #ifdef __DLL__
  13. #define _FAR far
  14. #else
  15. #define _FAR
  16. #endif
  17.  
  18. #if __STDC__
  19. #define _Cdecl
  20. #else
  21. #define _Cdecl  cdecl
  22. #endif
  23.  
  24. #ifndef __PAS__
  25. #define _CType _Cdecl
  26. #else
  27. #define _CType pascal
  28. #endif
  29.  
  30. typedef struct __jmp_buf {
  31.     unsigned    j_sp;
  32.     unsigned    j_ss;
  33.     unsigned    j_flag;
  34.     unsigned    j_cs;
  35.     unsigned    j_ip;
  36.     unsigned    j_bp;
  37.     unsigned    j_di;
  38.     unsigned    j_es;
  39.     unsigned    j_si;
  40.     unsigned    j_ds;
  41. }   jmp_buf[1];
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if !defined( _Windows )
  48. void    _CType longjmp(jmp_buf __jmpb, int __retval);
  49. int     _CType setjmp(jmp_buf __jmpb);
  50. #else
  51. void far pascal longjmp( struct __jmp_buf far *__jmpb, int __retval );
  52. int far pascal setjmp( struct __jmp_buf far *__jmpb);
  53. #endif
  54.  
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58.  
  59. #endif
  60.  
  61.