system.inc 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  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. 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. {****************************************************************************
  12. Local types
  13. ****************************************************************************}
  14. {
  15. TextRec and FileRec are put in a separate file to make it available to other
  16. units without putting it explicitly in systemh.
  17. This way we keep TP compatibility, and the TextRec definition is available
  18. for everyone who needs it.
  19. }
  20. {$i filerec.inc}
  21. {$i textrec.inc}
  22. Procedure HandleError (Errno : Longint); forward;
  23. Procedure HandleErrorFrame (Errno : longint;frame : longint); forward;
  24. type
  25. FileFunc = Procedure(var t : TextRec);
  26. const
  27. STACK_MARGIN = 16384; { Stack size margin for stack checking }
  28. { Random / Randomize constants }
  29. OldRandSeed : Cardinal = 0;
  30. InitialSeed : Boolean = TRUE;
  31. Seed2 : Cardinal = 0;
  32. Seed3 : Cardinal = 0;
  33. { For Error Handling.}
  34. ErrorBase : Longint = 0;
  35. { Used by the ansistrings and maybe also other things in the future }
  36. var
  37. emptychar : char;public name 'FPC_EMPTYCHAR';
  38. {****************************************************************************
  39. Routines which have compiler magic
  40. ****************************************************************************}
  41. {$I innr.inc}
  42. Function lo(i : Integer) : byte; [INTERNPROC: In_lo_Word];
  43. Function lo(w : Word) : byte; [INTERNPROC: In_lo_Word];
  44. Function lo(l : Longint) : Word; [INTERNPROC: In_lo_long];
  45. Function lo(l : DWord) : Word; [INTERNPROC: In_lo_long];
  46. Function hi(i : Integer) : byte; [INTERNPROC: In_hi_Word];
  47. Function hi(w : Word) : byte; [INTERNPROC: In_hi_Word];
  48. Function hi(l : Longint) : Word; [INTERNPROC: In_hi_long];
  49. Function hi(l : DWord) : Word; [INTERNPROC: In_hi_long];
  50. Function lo(q : QWord) : DWord; [INTERNPROC: In_lo_qword];
  51. Function lo(i : Int64) : DWord; [INTERNPROC: In_lo_qword];
  52. Function hi(q : QWord) : DWord; [INTERNPROC: In_hi_qword];
  53. Function hi(i : Int64) : DWord; [INTERNPROC: In_hi_qword];
  54. Function chr(b : byte) : Char; [INTERNPROC: In_chr_byte];
  55. {$ifndef INTERNLENGTH}
  56. Function Length(s : string) : byte; [INTERNPROC: In_Length_string];
  57. Function Length(c : char) : byte; [INTERNPROC: In_Length_string];
  58. {$endif INTERNLENGTH}
  59. Procedure Reset(var f : TypedFile); [INTERNPROC: In_Reset_TypedFile];
  60. Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile];
  61. {****************************************************************************
  62. Include processor specific routines
  63. ****************************************************************************}
  64. {$IFDEF I386}
  65. {$IFNDEF ENDIAN_LITTLE}
  66. {$DEFINE ENDIAN_LITTLE}
  67. {$ENDIF}
  68. {$IFDEF M68K}
  69. {$Error Can't determine processor type !}
  70. {$ENDIF}
  71. {$I i386.inc} { Case dependent, don't change }
  72. {$ELSE}
  73. {$IFDEF M68K}
  74. {$IFNDEF ENDIAN_BIG}
  75. {$DEFINE ENDIAN_BIG}
  76. {$ENDIF}
  77. {$I m68k.inc} { Case dependent, don't change }
  78. {$ELSE}
  79. {$Error Can't determine processor type !}
  80. {$ENDIF}
  81. {$ENDIF}
  82. { Include generic pascal only routines which are not defined in the processor
  83. specific include file }
  84. {$I generic.inc}
  85. {****************************************************************************
  86. Set Handling
  87. ****************************************************************************}
  88. { Include set support which is processor specific}
  89. {$I set.inc}
  90. { Include generic pascal routines for sets if the processor }
  91. { specific routines are not available. }
  92. {$I genset.inc}
  93. {****************************************************************************
  94. Math Routines
  95. ****************************************************************************}
  96. function Hi(b : byte): byte;
  97. begin
  98. Hi := b shr 4
  99. end;
  100. function Lo(b : byte): byte;
  101. begin
  102. Lo := b and $0f
  103. end;
  104. Function swap (X : Word) : Word;[internconst:in_const_swap_word];
  105. Begin
  106. swap:=(X and $ff) shl 8 + (X shr 8)
  107. End;
  108. Function Swap (X : Integer) : Integer;[internconst:in_const_swap_word];
  109. Begin
  110. swap:=(X and $ff) shl 8 + (X shr 8)
  111. End;
  112. Function swap (X : Longint) : Longint;[internconst:in_const_swap_long];
  113. Begin
  114. Swap:=(X and $ffff) shl 16 + (X shr 16)
  115. End;
  116. Function Swap (X : Cardinal) : Cardinal;[internconst:in_const_swap_long];
  117. Begin
  118. Swap:=(X and $ffff) shl 16 + (X shr 16)
  119. End;
  120. Function Swap (X : QWord) : QWord;
  121. Begin
  122. Swap:=(X and $ffffffff) shl 32 + (X shr 32);
  123. End;
  124. Function swap (X : Int64) : Int64;
  125. Begin
  126. Swap:=(X and $ffffffff) shl 32 + (X shr 32);
  127. End;
  128. operator := (b:real48) d:double;
  129. begin
  130. D:=real2double(b);
  131. end;
  132. operator := (b:real48) e:extended;
  133. begin
  134. e:=real2double(b);
  135. end;
  136. { Include processor specific routines }
  137. {$I math.inc}
  138. { Include generic version }
  139. {$I genmath.inc}
  140. {****************************************************************************
  141. Subroutines for String handling
  142. ****************************************************************************}
  143. { Needs to be before RTTI handling }
  144. {$i sstrings.inc}
  145. { requires sstrings.inc for initval }
  146. {$I int64.inc}
  147. {Requires int64.inc, since that contains the VAL functions for int64 and qword}
  148. {$i astrings.inc}
  149. {$ifdef HASWIDESTRING}
  150. {$i wstrings.inc}
  151. {$endif HASWIDESTRING}
  152. {$i aliases.inc}
  153. {*****************************************************************************
  154. Dynamic Array support
  155. *****************************************************************************}
  156. {$i dynarr.inc}
  157. {*****************************************************************************
  158. Object Pascal support
  159. *****************************************************************************}
  160. {$i objpas.inc}
  161. {*****************************************************************************
  162. Variant support
  163. *****************************************************************************}
  164. {$ifdef HASVARIANT}
  165. {$i variant.inc}
  166. {$endif HASVARIANT}
  167. {****************************************************************************
  168. Run-Time Type Information (RTTI)
  169. ****************************************************************************}
  170. {$i rtti.inc}
  171. {****************************************************************************
  172. Random function routines
  173. This implements a very long cycle random number generator by combining
  174. three independant generators. The technique was described in the March
  175. 1987 issue of Byte.
  176. Taken and modified with permission from the PCQ Pascal rtl code.
  177. ****************************************************************************}
  178. {$R-}
  179. {$Q-}
  180. Procedure NewSeed;Forward;
  181. Function Random : Extended;
  182. begin
  183. if (InitialSeed) OR (RandSeed <> OldRandSeed) then
  184. Begin
  185. { This is a pretty complicated affair }
  186. { Initially we must call NewSeed when RandSeed is initalized }
  187. { We must also call NewSeed each time RandSeed is reinitialized }
  188. { DO NOT CHANGE THE ORDER OF DECLARATIONS IN THIS BLOCK }
  189. { UNLESS YOU WANT RANDON TO CRASH OF COURSE (CEC) }
  190. InitialSeed:=FALSE;
  191. OldRandSeed:=RandSeed;
  192. NewSeed;
  193. end;
  194. Inc(RandSeed);
  195. RandSeed := (RandSeed * 706) mod 500009;
  196. OldRandSeed:=RandSeed;
  197. INC(Seed2);
  198. Seed2 := (Seed2 * 774) MOD 600011;
  199. INC(Seed3);
  200. Seed3 := (Seed3 * 871) MOD 765241;
  201. Random :=
  202. frac(RandSeed/500009.0 +
  203. Seed2/600011.0 +
  204. Seed3/765241.0);
  205. end;
  206. Function internRandom(l : Cardinal) : Cardinal;
  207. begin
  208. if (InitialSeed) OR (RandSeed <> OldRandSeed) then
  209. Begin
  210. { This is a pretty complicated affair }
  211. { Initially we must call NewSeed when RandSeed is initalized }
  212. { We must also call NewSeed each time RandSeed is reinitialized }
  213. { DO NOT CHANGE THE ORDER OF DECLARATIONS IN THIS BLOCK }
  214. { UNLESS YOU WANT RANDOM TO CRASH OF COURSE (CEC) }
  215. InitialSeed:=FALSE;
  216. OldRandSeed:=RandSeed;
  217. NewSeed;
  218. end;
  219. Inc(RandSeed);
  220. RandSeed := (RandSeed * 998) mod 1000003;
  221. OldRandSeed:=RandSeed;
  222. if l<>0 then
  223. begin
  224. internRandom := RandSeed mod l;
  225. end
  226. else internRandom:=0;
  227. end;
  228. function random(l:cardinal): cardinal;
  229. begin
  230. random := trunc(random()*l);
  231. end;
  232. function random(l:longint): longint;
  233. begin
  234. random := trunc(random()*l);
  235. end;
  236. Procedure NewSeed;
  237. begin
  238. randseed := randseed mod 1000003;
  239. Seed2 := (internRandom(65000) * internRandom(65000)) mod 600011;
  240. Seed3 := (internRandom(65000) * internRandom(65000)) mod 765241;
  241. end;
  242. {****************************************************************************
  243. Memory Management
  244. ****************************************************************************}
  245. Function Ptr(sel,off : Longint) : farpointer;[internconst:in_const_ptr];
  246. Begin
  247. ptr:=farpointer((sel shl 4)+off);
  248. End;
  249. Function CSeg : Word;
  250. Begin
  251. Cseg:=0;
  252. End;
  253. Function DSeg : Word;
  254. Begin
  255. Dseg:=0;
  256. End;
  257. Function SSeg : Word;
  258. Begin
  259. Sseg:=0;
  260. End;
  261. {*****************************************************************************
  262. Directory support.
  263. *****************************************************************************}
  264. Procedure getdir(drivenr:byte;Var dir:ansistring);
  265. { this is needed to also allow ansistrings, the shortstring version is
  266. OS dependent }
  267. var
  268. s : shortstring;
  269. begin
  270. getdir(drivenr,s);
  271. dir:=s;
  272. end;
  273. {$ifopt R+}
  274. {$define RangeCheckWasOn}
  275. {$R-}
  276. {$endif opt R+}
  277. {$ifopt I+}
  278. {$define IOCheckWasOn}
  279. {$I-}
  280. {$endif opt I+}
  281. {$ifopt Q+}
  282. {$define OverflowCheckWasOn}
  283. {$Q-}
  284. {$endif opt Q+}
  285. {*****************************************************************************
  286. Miscellaneous
  287. *****************************************************************************}
  288. procedure fpc_rangeerror;[public,alias:'FPC_RANGEERROR']; {$ifdef hascompilerproc} compilerproc; {$endif}
  289. begin
  290. HandleErrorFrame(201,get_frame);
  291. end;
  292. procedure fpc_overflow;[public,alias:'FPC_OVERFLOW']; {$ifdef hascompilerproc} compilerproc; {$endif}
  293. begin
  294. HandleErrorFrame(215,get_frame);
  295. end;
  296. procedure fpc_iocheck(addr : longint);[saveregisters,public,alias:'FPC_IOCHECK']; {$ifdef hascompilerproc} compilerproc; {$endif}
  297. var
  298. l : longint;
  299. begin
  300. if InOutRes<>0 then
  301. begin
  302. l:=InOutRes;
  303. InOutRes:=0;
  304. HandleErrorFrame(l,get_frame);
  305. end;
  306. end;
  307. Function IOResult:Word;
  308. Begin
  309. IOResult:=InOutRes;
  310. InOutRes:=0;
  311. End;
  312. procedure fillchar(var x;count : longint;value : boolean);
  313. begin
  314. fillchar(x,count,byte(value));
  315. end;
  316. procedure fillchar(var x;count : longint;value : char);
  317. begin
  318. fillchar(x,count,byte(value));
  319. end;
  320. {*****************************************************************************
  321. Initialization / Finalization
  322. *****************************************************************************}
  323. const
  324. maxunits=1024; { See also files.pas of the compiler source }
  325. type
  326. TInitFinalRec=record
  327. InitProc,
  328. FinalProc : TProcedure;
  329. end;
  330. TInitFinalTable=record
  331. TableCount,
  332. InitCount : longint;
  333. Procs : array[1..maxunits] of TInitFinalRec;
  334. end;
  335. var
  336. InitFinalTable : TInitFinalTable;external name 'INITFINAL';
  337. procedure fpc_InitializeUnits;[public,alias:'FPC_INITIALIZEUNITS']; {$ifdef hascompilerproc} compilerproc; {$endif}
  338. var
  339. i : longint;
  340. begin
  341. with InitFinalTable do
  342. begin
  343. for i:=1to TableCount do
  344. begin
  345. if assigned(Procs[i].InitProc) then
  346. Procs[i].InitProc();
  347. InitCount:=i;
  348. end;
  349. end;
  350. end;
  351. procedure FinalizeUnits;[public,alias:'FPC_FINALIZEUNITS'];
  352. begin
  353. with InitFinalTable do
  354. begin
  355. while (InitCount>0) do
  356. begin
  357. // we've to decrement the cound before calling the final. code
  358. // else a halt in the final. code leads to a endless loop
  359. dec(InitCount);
  360. if assigned(Procs[InitCount+1].FinalProc) then
  361. Procs[InitCount+1].FinalProc();
  362. end;
  363. end;
  364. end;
  365. {*****************************************************************************
  366. Error / Exit / ExitProc
  367. *****************************************************************************}
  368. Procedure system_exit;forward;
  369. Procedure InternalExit;
  370. var
  371. current_exit : Procedure;
  372. Begin
  373. while exitProc<>nil Do
  374. Begin
  375. InOutRes:=0;
  376. current_exit:=tProcedure(exitProc);
  377. exitProc:=nil;
  378. current_exit();
  379. End;
  380. { Finalize units }
  381. FinalizeUnits;
  382. { Show runtime error and exit }
  383. If erroraddr<>nil Then
  384. Begin
  385. Writeln(stdout,'Runtime error ',Errorcode,' at 0x',hexstr(Longint(Erroraddr),8));
  386. { to get a nice symify }
  387. Writeln(stdout,BackTraceStrFunc(Longint(Erroraddr)));
  388. dump_stack(stdout,ErrorBase);
  389. Writeln(stdout,'');
  390. End;
  391. End;
  392. Procedure do_exit;[Public,Alias:'FPC_DO_EXIT'];
  393. begin
  394. InternalExit;
  395. System_exit;
  396. end;
  397. Procedure lib_exit;saveregisters;[Public,Alias:'FPC_LIB_EXIT'];
  398. begin
  399. InternalExit;
  400. end;
  401. Procedure Halt(ErrNum: Byte);
  402. Begin
  403. ExitCode:=Errnum;
  404. Do_Exit;
  405. end;
  406. function SysBackTraceStr (Addr: longint): ShortString;
  407. begin
  408. SysBackTraceStr:=' 0x'+HexStr(addr,8);
  409. end;
  410. Procedure HandleErrorAddrFrame (Errno : longint;addr,frame : longint);[public,alias:'FPC_BREAK_ERROR'];
  411. begin
  412. If pointer(ErrorProc)<>Nil then
  413. ErrorProc(Errno,pointer(addr),pointer(frame));
  414. errorcode:=Errno;
  415. exitcode:=Errno;
  416. erroraddr:=pointer(addr);
  417. errorbase:=frame;
  418. halt(errorcode);
  419. end;
  420. Procedure HandleErrorFrame (Errno : longint;frame : longint);
  421. {
  422. Procedure to handle internal errors, i.e. not user-invoked errors
  423. Internal function should ALWAYS call HandleError instead of RunError.
  424. Can be used for exception handlers to specify the frame
  425. }
  426. begin
  427. HandleErrorAddrFrame(Errno,get_caller_addr(frame),get_caller_frame(frame));
  428. end;
  429. Procedure HandleError (Errno : longint);[public,alias : 'FPC_HANDLEERROR'];
  430. {
  431. Procedure to handle internal errors, i.e. not user-invoked errors
  432. Internal function should ALWAYS call HandleError instead of RunError.
  433. }
  434. begin
  435. HandleErrorFrame(Errno,get_frame);
  436. end;
  437. procedure runerror(w : word);[alias: 'FPC_RUNERROR'];
  438. begin
  439. errorcode:=w;
  440. exitcode:=w;
  441. erroraddr:=pointer(get_caller_addr(get_frame));
  442. errorbase:=get_caller_frame(get_frame);
  443. halt(errorcode);
  444. end;
  445. Procedure RunError;
  446. Begin
  447. RunError (0);
  448. End;
  449. Procedure Halt;
  450. Begin
  451. Halt(0);
  452. End;
  453. function do_isdevice(handle:longint):boolean;forward;
  454. Procedure dump_stack(var f : text;bp : Longint);
  455. var
  456. i, prevbp : Longint;
  457. is_dev : boolean;
  458. caller_addr : longint;
  459. Begin
  460. prevbp:=bp-1;
  461. i:=0;
  462. is_dev:=do_isdevice(textrec(f).Handle);
  463. while bp > prevbp Do
  464. Begin
  465. caller_addr := get_caller_addr(bp);
  466. if caller_addr <> 0 then
  467. Writeln(f,BackTraceStrFunc(caller_addr));
  468. Inc(i);
  469. If ((i>max_frame_dump) and is_dev) or (i>256) Then
  470. exit;
  471. prevbp:=bp;
  472. bp:=get_caller_frame(bp);
  473. End;
  474. End;
  475. Type
  476. PExitProcInfo = ^TExitProcInfo;
  477. TExitProcInfo = Record
  478. Next : PExitProcInfo;
  479. SaveExit : Pointer;
  480. Proc : TProcedure;
  481. End;
  482. const
  483. ExitProcList: PExitProcInfo = nil;
  484. Procedure DoExitProc;
  485. var
  486. P : PExitProcInfo;
  487. Proc : TProcedure;
  488. Begin
  489. P:=ExitProcList;
  490. ExitProcList:=P^.Next;
  491. ExitProc:=P^.SaveExit;
  492. Proc:=P^.Proc;
  493. DisPose(P);
  494. Proc();
  495. End;
  496. Procedure AddExitProc(Proc: TProcedure);
  497. var
  498. P : PExitProcInfo;
  499. Begin
  500. New(P);
  501. P^.Next:=ExitProcList;
  502. P^.SaveExit:=ExitProc;
  503. P^.Proc:=Proc;
  504. ExitProcList:=P;
  505. ExitProc:=@DoExitProc;
  506. End;
  507. {*****************************************************************************
  508. Abstract/Assert support.
  509. *****************************************************************************}
  510. procedure AbstractError;[public,alias : 'FPC_ABSTRACTERROR'];
  511. begin
  512. If pointer(AbstractErrorProc)<>nil then
  513. AbstractErrorProc();
  514. HandleErrorFrame(211,get_frame);
  515. end;
  516. {$ifdef hascompilerproc}
  517. { alias for internal usage in the compiler }
  518. procedure fpc_AbstractErrorIntern; compilerproc; external name 'FPC_ABSTRACTERROR';
  519. {$endif hascompilerproc}
  520. Procedure fpc_assert(Const Msg,FName:Shortstring;LineNo,ErrorAddr:Longint); [SaveRegisters,Public,Alias : 'FPC_ASSERT']; {$ifdef hascompilerproc} compilerproc; {$endif}
  521. begin
  522. if pointer(AssertErrorProc)<>nil then
  523. AssertErrorProc(Msg,FName,LineNo,ErrorAddr)
  524. else
  525. HandleErrorFrame(227,get_frame);
  526. end;
  527. Procedure SysAssert(Const Msg,FName:Shortstring;LineNo,ErrorAddr:Longint);
  528. begin
  529. If msg='' then
  530. write(stderr,'Assertion failed')
  531. else
  532. write(stderr,msg);
  533. Writeln(stderr,' (',FName,', line ',LineNo,').');
  534. Writeln(stderr,'');
  535. end;
  536. {*****************************************************************************
  537. SetJmp/LongJmp support.
  538. *****************************************************************************}
  539. {$i setjump.inc}
  540. {$ifdef IOCheckWasOn}
  541. {$I+}
  542. {$endif}
  543. {$ifdef RangeCheckWasOn}
  544. {$R+}
  545. {$endif}
  546. {$ifdef OverflowCheckWasOn}
  547. {$Q+}
  548. {$endif}
  549. {
  550. $Log$
  551. Revision 1.24 2001-12-13 20:23:19 michael
  552. + Added double2real function from main branch
  553. Revision 1.23 2001/11/19 02:40:24 carl
  554. + don't print stack information if previous frame = 0
  555. Revision 1.22 2001/08/19 21:02:01 florian
  556. * fixed and added a lot of stuff to get the Jedi DX( headers
  557. compiled
  558. Revision 1.21 2001/08/01 15:00:10 jonas
  559. + "compproc" helpers
  560. * renamed several helpers so that their name is the same as their
  561. "public alias", which should facilitate the conversion of processor
  562. specific code in the code generator to processor independent code
  563. * some small fixes to the val_ansistring and val_widestring helpers
  564. (always immediately exit if the source string is longer than 255
  565. chars)
  566. * fixed fpc_dynarray_high and fpc_dynarray_length if the dynarray is
  567. still nil (used to crash, now return resp -1 and 0)
  568. Revision 1.20 2001/07/30 21:38:55 peter
  569. * m68k updates merged
  570. Revision 1.19 2001/07/29 14:05:55 peter
  571. * include lowmath for m68k (merged)
  572. Revision 1.18 2001/07/29 13:49:15 peter
  573. * m68k updates merged
  574. Revision 1.17 2001/07/09 21:15:41 peter
  575. * Length made internal
  576. * Add array support for Length
  577. Revision 1.16 2001/07/08 21:00:18 peter
  578. * various widestring updates, it works now mostly without charset
  579. mapping supported
  580. Revision 1.15 2001/06/13 18:32:05 peter
  581. * big endian updates (merged)
  582. Revision 1.14 2001/06/03 15:15:58 peter
  583. * lib_exit added
  584. Revision 1.13 2001/05/09 19:57:07 peter
  585. *** empty log message ***
  586. Revision 1.12 2001/04/13 18:06:28 peter
  587. * removed rtllite define
  588. Revision 1.11 2000/12/16 15:56:19 jonas
  589. - removed all ifdef cardinalmulfix code
  590. Revision 1.10 2000/11/13 14:47:46 jonas
  591. * support for range checking when converting from 64bit to something
  592. smaller (32bit, 16bit, 8bit)
  593. * fixed range checking between longint/cardinal and for array indexing
  594. with cardinal (values > $7fffffff were considered negative)
  595. Revision 1.9 2000/11/11 16:12:01 peter
  596. * ptr returns farpointer
  597. Revision 1.8 2000/11/06 21:35:59 peter
  598. * removed some warnings
  599. Revision 1.7 2000/11/04 17:52:46 florian
  600. * fixed linker errors
  601. Revision 1.6 2000/10/13 12:04:03 peter
  602. * FPC_BREAK_ERROR added
  603. Revision 1.5 2000/08/13 17:55:14 michael
  604. + Added some delphi compatibility types
  605. Revision 1.4 2000/08/09 19:31:18 marco
  606. * fixes for val(int64 or qword) to ansistring
  607. Revision 1.3 2000/07/14 10:33:10 michael
  608. + Conditionals fixed
  609. Revision 1.2 2000/07/13 11:33:45 michael
  610. + removed logs
  611. }