systemh.inc 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Run time library.
  4. Copyright (c) 1999-2000 by the Free Pascal development team
  5. This File contains the OS independent declarations of the system unit
  6. See the File COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {****************************************************************************
  13. Needed switches
  14. ****************************************************************************}
  15. {$I-,Q-,H-,R-,V-}
  16. {$mode objfpc}
  17. { Using inlining for small system functions/wrappers }
  18. {$ifdef HASINLINE}
  19. {$inline on}
  20. {$define SYSTEMINLINE}
  21. {$endif}
  22. { don't use FPU registervariables on the i386 }
  23. {$ifdef i386}
  24. {$maxfpuregisters 0}
  25. {$endif i386}
  26. { needed for insert,delete,readln }
  27. {$P+}
  28. {****************************************************************************
  29. Global Types and Constants
  30. ****************************************************************************}
  31. Type
  32. ShortInt = -128..127;
  33. SmallInt = -32768..32767;
  34. { can't use -2147483648 because of a bug in 1.0.2's val() procedure (JM) }
  35. Longint = +(-2147483647-1)..$7fffffff;
  36. Byte = 0..255;
  37. Word = 0..65535;
  38. {$ifndef ver1_0}
  39. DWord = LongWord;
  40. Cardinal = LongWord;
  41. {$else}
  42. Longword = cardinal;
  43. Dword = cardinal;
  44. {$endif}
  45. Integer = SmallInt;
  46. {$ifdef i386}
  47. StrLenInt = LongInt;
  48. {$define DEFAULT_EXTENDED}
  49. {$define SUPPORT_SINGLE}
  50. {$define SUPPORT_DOUBLE}
  51. {$define SUPPORT_EXTENDED}
  52. {$define SUPPORT_COMP}
  53. ValSInt = Longint;
  54. ValUInt = Cardinal;
  55. ValReal = Extended;
  56. {$endif i386}
  57. {$ifdef x86_64}
  58. StrLenInt = LongInt;
  59. {$define DEFAULT_EXTENDED}
  60. {$define SUPPORT_SINGLE}
  61. {$define SUPPORT_DOUBLE}
  62. {$define SUPPORT_EXTENDED}
  63. {$define SUPPORT_COMP}
  64. ValSInt = Longint;
  65. ValUInt = Cardinal;
  66. ValReal = Extended;
  67. {$endif x86_64}
  68. {$ifdef m68k}
  69. StrLenInt = Longint;
  70. ValSInt = Longint;
  71. ValUInt = Cardinal;
  72. ValReal = Real;
  73. { Comp type does not exist on fpu }
  74. Comp = int64;
  75. {$define SUPPORT_SINGLE}
  76. {$IFDEF Unix}
  77. { Linux FPU emulator will be used }
  78. {$define SUPPORT_DOUBLE}
  79. {$ENDIF}
  80. {$IFOPT E-}
  81. { If not compiling with emulation }
  82. { then support double type. }
  83. {$define SUPPORT_DOUBLE}
  84. {$ENDIF}
  85. {$endif}
  86. {$ifdef powerpc}
  87. StrLenInt = LongInt;
  88. {$define DEFAULT_DOUBLE}
  89. {$define SUPPORT_SINGLE}
  90. {$define SUPPORT_DOUBLE}
  91. ValSInt = Longint;
  92. ValUInt = Cardinal;
  93. ValReal = Double;
  94. {$endif powerpc}
  95. { Zero - terminated strings }
  96. PChar = ^Char;
  97. PPChar = ^PChar;
  98. TAnsiChar = Char;
  99. AnsiChar = TAnsiChar;
  100. PAnsiChar = ^TAnsiChar;
  101. PPAnsiChar = ^PAnsiChar;
  102. UCS4Char = Cardinal;
  103. PUCS4Char = ^UCS4Char;
  104. {$ifndef HASCURRENCY}
  105. Currency = Int64;
  106. {$endif HASCURRENCY}
  107. HRESULT = Longint;
  108. TDateTime = Double;
  109. Error = Longint;
  110. PSingle = ^Single;
  111. PDouble = ^Double;
  112. PCurrency = ^Currency;
  113. {$ifdef SUPPORT_COMP}
  114. PComp = ^Comp;
  115. {$endif SUPPORT_COMP}
  116. PExtended = ^Extended;
  117. PSmallInt = ^Smallint;
  118. PShortInt = ^Shortint;
  119. PInteger = ^Longint;
  120. PByte = ^Byte;
  121. PWord = ^word;
  122. PDWord = ^DWord;
  123. PLongWord = ^LongWord;
  124. PLongint = ^Longint;
  125. PCardinal = ^Cardinal;
  126. PQWord = ^QWord;
  127. PInt64 = ^Int64;
  128. PPointer = ^Pointer;
  129. PPPointer = ^PPointer;
  130. PBoolean = ^Boolean;
  131. PWordBool = ^WordBool;
  132. PLongBool = ^LongBool;
  133. PShortString = ^ShortString;
  134. PAnsiString = ^AnsiString;
  135. PDate = ^TDateTime;
  136. PError = ^Error;
  137. {$ifdef HASVARIANT}
  138. PVariant = ^Variant;
  139. {$endif HASVARIANT}
  140. {$ifdef HASWIDECHAR}
  141. PWideChar = ^WideChar;
  142. PPWideChar = ^PWideChar;
  143. { 1.0.x also has HASWIDECHAR defined, but doesn't support it
  144. fully, setting WChar to Word as fallback (PFV) }
  145. {$ifndef VER1_0}
  146. WChar = Widechar;
  147. {$else}
  148. WChar = Word;
  149. {$endif}
  150. {$else}
  151. WChar = Word;
  152. {$endif HASWIDECHAR}
  153. {$ifdef HASWIDESTRING}
  154. PWideString = ^WideString;
  155. {$endif HASWIDESTRING}
  156. TTextLineBreakStyle = (tlbsLF,tlbsCRLF,tlbsCR);
  157. { procedure type }
  158. TProcedure = Procedure;
  159. const
  160. { Maximum value of the biggest signed and unsigned integer type available}
  161. MaxSIntValue = High(ValSInt);
  162. MaxUIntValue = High(ValUInt);
  163. { max. values for longint and int}
  164. maxLongint = $7fffffff;
  165. maxSmallint = 32767;
  166. const
  167. maxint = maxsmallint;
  168. { Compatibility With TP }
  169. const
  170. {$ifdef i386}
  171. Test8086 : byte = 2; { Always i386 or newer }
  172. Test8087 : byte = 3; { Always 387 or newer. Emulated if needed. }
  173. {$endif i386}
  174. {$ifdef m68k}
  175. Test68000 : byte = 0; { Must be determined at startup for both }
  176. Test68881 : byte = 0;
  177. {$endif}
  178. { max level in dumping on error }
  179. Max_Frame_Dump : Word = 8;
  180. { Exit Procedure handling consts and types }
  181. ExitProc : pointer = nil;
  182. Erroraddr: pointer = nil;
  183. Errorcode: Word = 0;
  184. { file input modes }
  185. fmClosed = $D7B0;
  186. fmInput = $D7B1;
  187. fmOutput = $D7B2;
  188. fmInOut = $D7B3;
  189. fmAppend = $D7B4;
  190. Filemode : byte = 2;
  191. CmdLine : PChar = nil;
  192. { Delphi Compatibility }
  193. { assume that this program will not spawn other threads. }
  194. IsMultiThread : boolean = FALSE;
  195. { Indicates if there was an error }
  196. StackError : boolean = FALSE;
  197. var
  198. { Standard In- and Output }
  199. Output,
  200. Input,
  201. StdOut,
  202. StdErr : Text;
  203. ExitCode : Word;
  204. StackBottom,
  205. RandSeed : Cardinal;
  206. { Delphi compatibility }
  207. IsLibrary : boolean;
  208. IsConsole : boolean;
  209. {$ifdef MT}
  210. ThreadVar
  211. {$else MT}
  212. Var
  213. {$endif MT}
  214. InOutRes : Word;
  215. {****************************************************************************
  216. Processor specific routines
  217. ****************************************************************************}
  218. Procedure Move(const source;var dest;count:Longint);
  219. Procedure FillChar(Var x;count:Longint;Value:Boolean);{$ifdef SYSTEMINLINE}inline;{$endif}
  220. Procedure FillChar(Var x;count:Longint;Value:Char);{$ifdef SYSTEMINLINE}inline;{$endif}
  221. Procedure FillChar(Var x;count:Longint;Value:Byte);
  222. procedure FillByte(var x;count:longint;value:byte);
  223. Procedure FillWord(Var x;count:Longint;Value:Word);
  224. procedure FillDWord(var x;count:longint;value:DWord);
  225. function IndexChar(const buf;len:longint;b:char):longint;
  226. function IndexByte(const buf;len:longint;b:byte):longint;
  227. function Indexword(const buf;len:longint;b:word):longint;
  228. function IndexDWord(const buf;len:longint;b:DWord):longint;
  229. function CompareChar(const buf1,buf2;len:longint):longint;
  230. function CompareByte(const buf1,buf2;len:longint):longint;
  231. function CompareWord(const buf1,buf2;len:longint):longint;
  232. function CompareDWord(const buf1,buf2;len:longint):longint;
  233. procedure MoveChar0(const buf1;var buf2;len:longint);
  234. function IndexChar0(const buf;len:longint;b:char):longint;
  235. function CompareChar0(const buf1,buf2;len:longint):longint;
  236. {****************************************************************************
  237. Math Routines
  238. ****************************************************************************}
  239. Function lo(w:Word):byte;
  240. Function lo(l:Longint):Word;
  241. Function lo(l:DWord):Word;
  242. Function lo(i:Integer):byte;
  243. Function lo(B: Byte):Byte;{$ifdef SYSTEMINLINE}inline;{$endif}
  244. Function hi(w:Word):byte;
  245. Function hi(i:Integer):byte;
  246. Function hi(l:Longint):Word;
  247. Function hi(b : Byte) : Byte;{$ifdef SYSTEMINLINE}inline;{$endif}
  248. Function hi(l: DWord): Word;
  249. Function lo(q : QWord) : DWord;
  250. Function lo(i : Int64) : DWord;
  251. Function hi(q : QWord) : DWord;
  252. Function hi(i : Int64) : DWord;
  253. Function Swap (X:Word):Word;{$ifdef SYSTEMINLINE}inline;{$endif}
  254. Function Swap (X:Integer):Integer;{$ifdef SYSTEMINLINE}inline;{$endif}
  255. Function Swap (X:Cardinal):Cardinal;{$ifdef SYSTEMINLINE}inline;{$endif}
  256. Function Swap (X:LongInt):LongInt;{$ifdef SYSTEMINLINE}inline;{$endif}
  257. Function Swap (X:QWord):QWord;{$ifdef SYSTEMINLINE}inline;{$endif}
  258. Function Swap (X:Int64):Int64;{$ifdef SYSTEMINLINE}inline;{$endif}
  259. Function Random(l:cardinal):cardinal;
  260. Function Random(l:longint):longint;
  261. Function Random: extended;
  262. Procedure Randomize;
  263. Function abs(l:Longint):Longint;{$ifdef SYSTEMINLINE}inline;{$endif}
  264. Function abs(l:Int64):Int64;{$ifdef SYSTEMINLINE}inline;{$endif}
  265. Function sqr(l:Longint):Longint;{$ifdef SYSTEMINLINE}inline;{$endif}
  266. Function sqr(l:Int64):Int64;{$ifdef SYSTEMINLINE}inline;{$endif}
  267. Function sqr(l:QWord):QWord;{$ifdef SYSTEMINLINE}inline;{$endif}
  268. Function odd(l:Longint):Boolean;{$ifdef SYSTEMINLINE}inline;{$endif}
  269. Function odd(l:Longword):Boolean;{$ifdef SYSTEMINLINE}inline;{$endif}
  270. Function odd(l:Int64):Boolean;{$ifdef SYSTEMINLINE}inline;{$endif}
  271. Function odd(l:QWord):Boolean;{$ifdef SYSTEMINLINE}inline;{$endif}
  272. { float math routines }
  273. {$I mathh.inc}
  274. {****************************************************************************
  275. Addr/Pointer Handling
  276. ****************************************************************************}
  277. Function ptr(sel,off:Longint):farpointer;{$ifdef SYSTEMINLINE}inline;{$endif}
  278. Function Cseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
  279. Function Dseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
  280. Function Sseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
  281. {****************************************************************************
  282. PChar and String Handling
  283. ****************************************************************************}
  284. function strpas(p:pchar):shortstring;
  285. function strlen(p:pchar):longint;
  286. { Shortstring functions }
  287. {$ifndef INTERNSETLENGTH}
  288. Procedure SetLength (Var S:ShortString;len:StrLenInt);
  289. {$endif INTERNSETLENGTH}
  290. Function Copy(const s:shortstring;index:StrLenInt;count:StrLenInt):shortstring;
  291. Procedure Delete(Var s:shortstring;index:StrLenInt;count:StrLenInt);
  292. Procedure Insert(const source:shortstring;Var s:shortstring;index:StrLenInt);
  293. Procedure Insert(source:Char;Var s:shortstring;index:StrLenInt);
  294. Function Pos(const substr:shortstring;const s:shortstring):StrLenInt;
  295. Function Pos(C:Char;const s:shortstring):StrLenInt;
  296. Procedure SetString (Var S : Shortstring; Buf : PChar; Len : Longint);
  297. Procedure SetString (Var S : AnsiString; Buf : PChar; Len : Longint);
  298. {$ifndef INTERNLENGTH}
  299. Function Length(s:string):byte;
  300. {$endif INTERNLENGTH}
  301. Function upCase(const s:shortstring):shortstring;
  302. Function lowerCase(const s:shortstring):shortstring; overload;
  303. Function Space(b:byte):shortstring;
  304. Function hexStr(Val:Longint;cnt:byte):shortstring;
  305. Function OctStr(Val:Longint;cnt:byte):shortstring;
  306. Function binStr(Val:Longint;cnt:byte):shortstring;
  307. Function hexStr(Val:int64;cnt:byte):shortstring;
  308. Function OctStr(Val:int64;cnt:byte):shortstring;
  309. Function binStr(Val:int64;cnt:byte):shortstring;
  310. { Char functions }
  311. Function Chr(b:byte):Char;
  312. Function upCase(c:Char):Char;
  313. Function lowerCase(c:Char):Char; overload;
  314. function copy(c:char;index : StrLenInt;count : StrLenInt): shortstring;
  315. function pos(const substr : shortstring;c:char): StrLenInt;
  316. {$ifndef INTERNLENGTH}
  317. function length(c:char):byte;
  318. {$endif INTERNLENGTH}
  319. {****************************************************************************
  320. AnsiString Handling
  321. ****************************************************************************}
  322. {$ifndef INTERNSETLENGTH}
  323. Procedure SetLength (Var S : AnsiString; l : Longint);
  324. {$endif INTERNSETLENGTH}
  325. Procedure UniqueString (Var S : AnsiString);
  326. {$ifndef INTERNLENGTH}
  327. Function Length (Const S : AnsiString) : Longint;
  328. {$endif INTERNLENGTH}
  329. Function Copy (Const S : AnsiString; Index,Size : Longint) : AnsiString;
  330. Function Pos (Const Substr : AnsiString; Const Source : AnsiString) : Longint;
  331. Function Pos (c : Char; Const s : AnsiString) : Longint;
  332. Procedure Insert (Const Source : AnsiString; Var S : AnsiString; Index : Longint);
  333. Procedure Delete (Var S : AnsiString; Index,Size: Longint);
  334. Function StringOfChar(c : char;l : longint) : AnsiString;
  335. function upcase(const s : ansistring) : ansistring;
  336. function lowercase(const s : ansistring) : ansistring;
  337. {****************************************************************************
  338. WideString Handling
  339. ****************************************************************************}
  340. {$ifdef HASWIDESTRING}
  341. {$ifndef INTERNSETLENGTH}
  342. Procedure SetLength (Var S : WideString; l : Longint);
  343. {$endif INTERNSETLENGTH}
  344. Procedure UniqueString (Var S : WideString);
  345. {$ifndef INTERNLENGTH}
  346. Function Length (Const S : WideString) : Longint;
  347. {$endif INTERNLENGTH}
  348. Function Copy (Const S : WideString; Index,Size : Longint) : WideString;
  349. Function Pos (Const Substr : WideString; Const Source : WideString) : Longint;
  350. Function Pos (c : Char; Const s : WideString) : Longint;
  351. Function Pos (c : WideChar; Const s : WideString) : Longint;
  352. Procedure Insert (Const Source : WideString; Var S : WideString; Index : Longint);
  353. Procedure Delete (Var S : WideString; Index,Size: Longint);
  354. {$endif HASWIDESTRING}
  355. {****************************************************************************
  356. Untyped File Management
  357. ****************************************************************************}
  358. Procedure Assign(Var f:File;const Name:string);
  359. Procedure Assign(Var f:File;p:pchar);
  360. Procedure Assign(Var f:File;c:char);
  361. Procedure Rewrite(Var f:File;l:Longint);
  362. Procedure Rewrite(Var f:File);
  363. Procedure Reset(Var f:File;l:Longint);
  364. Procedure Reset(Var f:File);
  365. Procedure Close(Var f:File);
  366. Procedure BlockWrite(Var f:File;Const Buf;Count:Longint;Var Result:Longint);
  367. Procedure BlockWrite(Var f:File;Const Buf;Count:Cardinal;var Result:Cardinal);
  368. Procedure BlockWrite(Var f:File;Const Buf;Count:Word;Var Result:Word);
  369. Procedure BlockWrite(Var f:File;Const Buf;Count:Word;Var Result:Integer);
  370. Procedure BlockWrite(Var f:File;Const Buf;Count:Longint);
  371. Procedure BlockRead(Var f:File;Var Buf;count:Longint;Var Result:Longint);
  372. Procedure BlockRead(Var f:File;Var Buf;count:Cardinal;Var Result:Cardinal);
  373. Procedure BlockRead(Var f:File;Var Buf;count:Word;Var Result:Word);
  374. Procedure BlockRead(Var f:File;Var Buf;count:Word;Var Result:Integer);
  375. Procedure BlockRead(Var f:File;Var Buf;count:Longint);
  376. Function FilePos(Var f:File):Longint;
  377. Function FileSize(Var f:File):Longint;
  378. Procedure Seek(Var f:File;Pos:Longint);
  379. Function EOF(Var f:File):Boolean;
  380. Procedure Erase(Var f:File);
  381. Procedure Rename(Var f:File;const s:string);
  382. Procedure Rename(Var f:File;p:pchar);
  383. Procedure Rename(Var f:File;c:char);
  384. Procedure Truncate (Var F:File);
  385. {****************************************************************************
  386. Typed File Management
  387. ****************************************************************************}
  388. Procedure Assign(Var f:TypedFile;const Name:string);
  389. Procedure Assign(Var f:TypedFile;p:pchar);
  390. Procedure Assign(Var f:TypedFile;c:char);
  391. Procedure Rewrite(Var f:TypedFile);
  392. Procedure Reset(Var f:TypedFile);
  393. {****************************************************************************
  394. Text File Management
  395. ****************************************************************************}
  396. Procedure Assign(Var t:Text;const s:string);
  397. Procedure Assign(Var t:Text;p:pchar);
  398. Procedure Assign(Var t:Text;c:char);
  399. Procedure Close(Var t:Text);
  400. Procedure Rewrite(Var t:Text);
  401. Procedure Reset(Var t:Text);
  402. Procedure Append(Var t:Text);
  403. Procedure Flush(Var t:Text);
  404. Procedure Erase(Var t:Text);
  405. Procedure Rename(Var t:Text;const s:string);
  406. Procedure Rename(Var t:Text;p:pchar);
  407. Procedure Rename(Var t:Text;c:char);
  408. Function EOF(Var t:Text):Boolean;
  409. Function EOF:Boolean;
  410. Function EOLn(Var t:Text):Boolean;
  411. Function EOLn:Boolean;
  412. Function SeekEOLn (Var t:Text):Boolean;
  413. Function SeekEOF (Var t:Text):Boolean;
  414. Function SeekEOLn:Boolean;
  415. Function SeekEOF:Boolean;
  416. Procedure SetTextBuf(Var f:Text; Var Buf);
  417. Procedure SetTextBuf(Var f:Text; Var Buf; Size:Longint);
  418. {****************************************************************************
  419. Directory Management
  420. ****************************************************************************}
  421. Procedure chdir(const s:string);
  422. Procedure mkdir(const s:string);
  423. Procedure rmdir(const s:string);
  424. Procedure getdir(drivenr:byte;Var dir:shortstring);
  425. Procedure getdir(drivenr:byte;Var dir:ansistring);
  426. {*****************************************************************************
  427. Miscelleaous
  428. *****************************************************************************}
  429. { os independent calls to allow backtraces }
  430. function get_frame:longint;{$ifdef SYSTEMINLINE}inline;{$endif}
  431. function get_caller_addr(framebp:longint):longint;{$ifdef SYSTEMINLINE}inline;{$endif}
  432. function get_caller_frame(framebp:longint):longint;{$ifdef SYSTEMINLINE}inline;{$endif}
  433. Function IOResult:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
  434. Function Sptr:Longint;{$ifdef SYSTEMINLINE}inline;{$endif}
  435. {*****************************************************************************
  436. Init / Exit / ExitProc
  437. *****************************************************************************}
  438. Function Paramcount:Longint;
  439. Function ParamStr(l:Longint):string;
  440. Procedure Dump_Stack(var f : text;bp:Longint);
  441. Procedure RunError(w:Word);
  442. Procedure RunError;{$ifdef SYSTEMINLINE}inline;{$endif}
  443. Procedure halt(errnum:byte);
  444. Procedure AddExitProc(Proc:TProcedure);
  445. Procedure halt;{$ifdef SYSTEMINLINE}inline;{$endif}
  446. {*****************************************************************************
  447. Abstract/Assert/Error Handling
  448. *****************************************************************************}
  449. procedure AbstractError;
  450. Function SysBackTraceStr(Addr: Longint): ShortString;
  451. Procedure SysAssert(Const Msg,FName:ShortString;LineNo,ErrorAddr:Longint);
  452. { Error handlers }
  453. Type
  454. TBackTraceStrFunc = Function (Addr: Longint): ShortString;
  455. TErrorProc = Procedure (ErrNo : Longint; Address,Frame : Pointer);
  456. TAbstractErrorProc = Procedure;
  457. TAssertErrorProc = Procedure(const msg,fname:ShortString;lineno,erroraddr:longint);
  458. const
  459. BackTraceStrFunc : TBackTraceStrFunc = @SysBackTraceStr;
  460. ErrorProc : TErrorProc = nil;
  461. AbstractErrorProc : TAbstractErrorProc = nil;
  462. AssertErrorProc : TAssertErrorProc = @SysAssert;
  463. {*****************************************************************************
  464. SetJmp/LongJmp
  465. *****************************************************************************}
  466. {$i setjumph.inc}
  467. {*****************************************************************************
  468. Object Pascal support
  469. *****************************************************************************}
  470. {$i objpash.inc}
  471. {*****************************************************************************
  472. Variant support
  473. *****************************************************************************}
  474. {$ifdef HASVARIANT}
  475. {$i varianth.inc}
  476. {$endif HASVARIANT}
  477. {*****************************************************************************
  478. Internal helper routines support
  479. *****************************************************************************}
  480. {$i dynarrh.inc}
  481. {$i compproc.inc}
  482. {
  483. $Log$
  484. Revision 1.54 2002-09-07 21:20:50 carl
  485. * cardinal -> longword
  486. - remove FPUInt64 variable
  487. Revision 1.53 2002/09/07 15:07:46 peter
  488. * old logs removed and tabs fixed
  489. Revision 1.52 2002/08/19 19:34:02 peter
  490. * SYSTEMINLINE define that will add inline directives for small
  491. functions and wrappers. This will be defined automaticly when
  492. the compiler defines the HASINLINE directive
  493. Revision 1.51 2002/08/06 20:53:38 michael
  494. + Added support for octal strings (using &)
  495. Revision 1.50 2002/07/26 22:46:06 florian
  496. * interface of system unit for Linux/PowerPC compiles
  497. Revision 1.49 2002/07/26 21:29:03 florian
  498. + powerpc type support
  499. Revision 1.48 2002/07/04 20:40:09 florian
  500. + some x86-64 support added
  501. Revision 1.47 2002/07/01 16:29:05 peter
  502. * sLineBreak changed to normal constant like Kylix
  503. Revision 1.46 2002/06/02 10:49:30 marco
  504. * Renamefest supports_double for FreeBSD too
  505. Revision 1.45 2002/04/21 15:51:51 carl
  506. * StackError is now a typed constant
  507. + $S can be used under unix
  508. Revision 1.44 2002/04/12 17:35:24 carl
  509. - removed unused variable
  510. Revision 1.43 2002/01/25 17:41:05 peter
  511. * moved array types to objpas unit
  512. Revision 1.42 2002/01/25 17:39:35 peter
  513. * array types added
  514. Revision 1.41 2002/01/24 18:27:06 peter
  515. * lowercase() overloaded
  516. Revision 1.40 2002/01/24 12:33:53 jonas
  517. * adapted ranges of native types to int64 (e.g. high cardinal is no
  518. longer longint($ffffffff), but just $fffffff in psystem)
  519. * small additional fix in 64bit rangecheck code generation for 32 bit
  520. processors
  521. * adaption of ranges required the matching talgorithm used for selecting
  522. which overloaded procedure to call to be adapted. It should now always
  523. select the closest match for ordinal parameters.
  524. + inttostr(qword) in sysstr.inc/sysstrh.inc
  525. + abs(int64), sqr(int64), sqr(qword) in systemh.inc/generic.inc (previous
  526. fixes were required to be able to add them)
  527. * is_in_limit() moved from ncal to types unit, should always be used
  528. instead of direct comparisons of low/high values of orddefs because
  529. qword is a special case
  530. }