setjumph.inc 949 B

1234567891011121314151617181920212223242526272829303132
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2013 the Free Pascal development team
  4. SetJmp/Longjmp declarations
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. Type
  12. jmp_buf = packed record
  13. {$ifdef WIN16}
  14. catch_buf: array [0..8] of SmallInt;
  15. {$else WIN16}
  16. // bx,si,di: Word;
  17. bp,sp: Word;
  18. ip: Word;
  19. {$ifdef FPC_X86_CODE_FAR}
  20. cs: Word;
  21. {$endif FPC_X86_CODE_FAR}
  22. {$endif WIN16}
  23. end;
  24. PJmp_buf = ^jmp_buf;
  25. Function Setjmp (Var S : Jmp_buf) : smallint; [external name 'FPC_SETJMP'];
  26. Procedure longjmp (Var S : Jmp_buf; value : smallint); [external name 'FPC_LONGJMP'];