home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 14.ddi / GENINC.PAK / SETJMP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  1.6 KB  |  81 lines

  1. /*  setjmp.h
  2.  
  3.     Defines typedef and functions for setjmp/longjmp.
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 6.0
  9.  *
  10.  *      Copyright (c) 1987, 1993 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14.  
  15. #ifndef __SETJMP_H
  16. #define __SETJMP_H
  17.  
  18. #if !defined(___DEFS_H)
  19. #include <_defs.h>
  20. #endif
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. #pragma option -a-
  27.  
  28. #if !defined(__FLAT__)
  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.     unsigned    j_excep;
  42.     unsigned    j_context;
  43. }   jmp_buf[1];
  44.  
  45. #if !defined( _Windows ) || defined(_LFOOT)
  46. void    _CType longjmp(jmp_buf __jmpb, int __retval);
  47. int     _CType setjmp(jmp_buf __jmpb);
  48. #else
  49. void far pascal longjmp( struct __jmp_buf far *__jmpb, int __retval );
  50. int far pascal setjmp( struct __jmp_buf far *__jmpb);
  51. #endif
  52.  
  53. #else    /* defined __FLAT__ */
  54.  
  55. typedef struct __jmp_buf {
  56.     unsigned    j_ebp;
  57.     unsigned    j_ebx;
  58.     unsigned    j_edi;
  59.     unsigned    j_esi;
  60.     unsigned    j_esp;
  61.     unsigned    j_ret;
  62. #if defined(__FLAT__)
  63.     unsigned    j_excep;
  64.     unsigned    j_context;
  65. #endif
  66. }   jmp_buf[1];
  67.  
  68. void    _RTLENTRYF _EXPFUNC longjmp(jmp_buf __jmpb, int __retval);
  69. int     _RTLENTRYF _EXPFUNC setjmp(jmp_buf __jmpb);
  70.  
  71. #endif  /* __FLAT__ */
  72.  
  73. #pragma option -a.  /* restore default packing */
  74.  
  75. #ifdef __cplusplus
  76. }
  77. #endif
  78.  
  79. #endif  /* __SETJMP_H */
  80.  
  81.