mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 05:08:49 +02:00

functions, which provide the same functionality, but are safe to use in all windows modes (e.g. they include the magic for handling jumps to discarded or moved code segments in real mode) git-svn-id: trunk@31579 -
33 lines
949 B
PHP
33 lines
949 B
PHP
{
|
|
This file is part of the Free Pascal run time library.
|
|
Copyright (c) 2013 the Free Pascal development team
|
|
|
|
SetJmp/Longjmp declarations
|
|
|
|
See the file COPYING.FPC, included in this distribution,
|
|
for details about the copyright.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
**********************************************************************}
|
|
|
|
Type
|
|
jmp_buf = packed record
|
|
{$ifdef WIN16}
|
|
catch_buf: array [0..8] of SmallInt;
|
|
{$else WIN16}
|
|
// bx,si,di: Word;
|
|
bp,sp: Word;
|
|
ip: Word;
|
|
{$ifdef FPC_X86_CODE_FAR}
|
|
cs: Word;
|
|
{$endif FPC_X86_CODE_FAR}
|
|
{$endif WIN16}
|
|
end;
|
|
PJmp_buf = ^jmp_buf;
|
|
|
|
Function Setjmp (Var S : Jmp_buf) : smallint; [external name 'FPC_SETJMP'];
|
|
Procedure longjmp (Var S : Jmp_buf; value : smallint); [external name 'FPC_LONGJMP'];
|