systemh.inc 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  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. { don't use FPU registervariables on the i386 }
  18. {$ifdef i386}
  19. {$maxfpuregisters 0}
  20. {$endif i386}
  21. { needed for insert,delete,readln }
  22. {$P+}
  23. {****************************************************************************
  24. Global Types and Constants
  25. ****************************************************************************}
  26. Type
  27. ShortInt = -128..127;
  28. SmallInt = -32768..32767;
  29. { can't use -2147483648 because of a bug in 1.0.2's val() procedure (JM) }
  30. Longint = +(-2147483647-1)..$7fffffff;
  31. Byte = 0..255;
  32. Word = 0..65535;
  33. DWord = Cardinal;
  34. LongWord = Cardinal;
  35. Integer = SmallInt;
  36. {$ifdef i386}
  37. StrLenInt = LongInt;
  38. {$define DEFAULT_EXTENDED}
  39. {$define SUPPORT_SINGLE}
  40. {$define SUPPORT_DOUBLE}
  41. {$define SUPPORT_EXTENDED}
  42. {$define SUPPORT_COMP}
  43. ValSInt = Longint;
  44. ValUInt = Cardinal;
  45. ValReal = Extended;
  46. {$endif}
  47. {$ifdef x86_64}
  48. StrLenInt = LongInt;
  49. {$define DEFAULT_EXTENDED}
  50. {$define SUPPORT_SINGLE}
  51. {$define SUPPORT_DOUBLE}
  52. {$define SUPPORT_EXTENDED}
  53. {$define SUPPORT_COMP}
  54. ValSInt = Longint;
  55. ValUInt = Cardinal;
  56. ValReal = Extended;
  57. {$endif x86_64}
  58. {$ifdef m68k}
  59. StrLenInt = Longint;
  60. {$define SUPPORT_ANSISTRING}
  61. ValSInt = Longint;
  62. ValUInt = Cardinal;
  63. ValReal = Real;
  64. { Comp type does not exist on fpu }
  65. Comp = int64;
  66. {$define SUPPORT_SINGLE}
  67. {$IFDEF Unix}
  68. { Linux FPU emulator will be used }
  69. {$define SUPPORT_DOUBLE}
  70. {$ENDIF}
  71. {$IFOPT E-}
  72. { If not compiling with emulation }
  73. { then support double type. }
  74. {$define SUPPORT_DOUBLE}
  75. {$ENDIF}
  76. {$endif}
  77. { Zero - terminated strings }
  78. PChar = ^Char;
  79. PPChar = ^PChar;
  80. TAnsiChar = Char;
  81. AnsiChar = TAnsiChar;
  82. PAnsiChar = ^TAnsiChar;
  83. PPAnsiChar = ^PAnsiChar;
  84. UCS4Char = Cardinal;
  85. PUCS4Char = ^UCS4Char;
  86. {$ifndef HASCURRENCY}
  87. Currency = Int64;
  88. {$endif HASCURRENCY}
  89. HRESULT = Longint;
  90. TDateTime = Double;
  91. Error = Longint;
  92. PSingle = ^Single;
  93. PDouble = ^Double;
  94. PCurrency = ^Currency;
  95. {$ifdef SUPPORT_COMP}
  96. PComp = ^Comp;
  97. {$endif SUPPORT_COMP}
  98. {$ifdef SUPPORT_EXTENDED}
  99. PExtended = ^Extended;
  100. {$endif SUPPORT_EXTENDED}
  101. PSmallInt = ^Smallint;
  102. PShortInt = ^Shortint;
  103. PInteger = ^Longint;
  104. PByte = ^Byte;
  105. PWord = ^word;
  106. PDWord = ^DWord;
  107. PLongWord = ^LongWord;
  108. PLongint = ^Longint;
  109. PCardinal = ^Cardinal;
  110. PQWord = ^QWord;
  111. PInt64 = ^Int64;
  112. PPointer = ^Pointer;
  113. PPPointer = ^PPointer;
  114. PBoolean = ^Boolean;
  115. PWordBool = ^WordBool;
  116. PLongBool = ^LongBool;
  117. PShortString = ^ShortString;
  118. PAnsiString = ^AnsiString;
  119. PDate = ^TDateTime;
  120. PError = ^Error;
  121. {$ifdef HASVARIANT}
  122. PVariant = ^Variant;
  123. {$endif HASVARIANT}
  124. {$ifdef HASWIDECHAR}
  125. PWideChar = ^WideChar;
  126. PPWideChar = ^PWideChar;
  127. { 1.0.x also has HASWIDECHAR defined, but doesn't support it
  128. fully, setting WChar to Word as fallback (PFV) }
  129. {$ifndef VER1_0}
  130. WChar = Widechar;
  131. {$else}
  132. WChar = Word;
  133. {$endif}
  134. {$else}
  135. WChar = Word;
  136. {$endif HASWIDECHAR}
  137. {$ifdef HASWIDESTRING}
  138. PWideString = ^WideString;
  139. {$endif HASWIDESTRING}
  140. TTextLineBreakStyle = (tlbsLF,tlbsCRLF,tlbsCR);
  141. { procedure type }
  142. TProcedure = Procedure;
  143. const
  144. { Maximum value of the biggest signed and unsigned integer type available}
  145. MaxSIntValue = High(ValSInt);
  146. MaxUIntValue = High(ValUInt);
  147. { max. values for longint and int}
  148. maxLongint = $7fffffff;
  149. maxSmallint = 32767;
  150. const
  151. maxint = maxsmallint;
  152. { Compatibility With TP }
  153. const
  154. { code to use comps in int64mul and div code is commented out! (JM) }
  155. FPUInt64 : boolean = false; { set this to false if you don't want that }
  156. { the fpu does int64*int64 and }
  157. { int64 div int64, if the * is overflow }
  158. { checked, it is done in software }
  159. {$ifdef i386}
  160. Test8086 : byte = 2; { Always i386 or newer }
  161. Test8087 : byte = 3; { Always 387 or newer. Emulated if needed. }
  162. {$endif i386}
  163. {$ifdef m68k}
  164. Test68000 : byte = 0; { Must be determined at startup for both }
  165. Test68881 : byte = 0;
  166. {$endif}
  167. { max level in dumping on error }
  168. Max_Frame_Dump : Word = 8;
  169. { Exit Procedure handling consts and types }
  170. ExitProc : pointer = nil;
  171. Erroraddr: pointer = nil;
  172. Errorcode: Word = 0;
  173. { file input modes }
  174. fmClosed = $D7B0;
  175. fmInput = $D7B1;
  176. fmOutput = $D7B2;
  177. fmInOut = $D7B3;
  178. fmAppend = $D7B4;
  179. Filemode : byte = 2;
  180. CmdLine : PChar = nil;
  181. { Delphi Compatibility }
  182. { assume that this program will not spawn other threads. }
  183. IsMultiThread : boolean = FALSE;
  184. { Indicates if there was an error }
  185. StackError : boolean = FALSE;
  186. var
  187. { Standard In- and Output }
  188. Output,
  189. Input,
  190. StdOut,
  191. StdErr : Text;
  192. ExitCode : Word;
  193. StackBottom,
  194. RandSeed : Cardinal;
  195. { Delphi compatibility }
  196. IsLibrary : boolean;
  197. IsConsole : boolean;
  198. {$ifdef MT}
  199. ThreadVar
  200. {$else MT}
  201. Var
  202. {$endif MT}
  203. InOutRes : Word;
  204. {****************************************************************************
  205. Processor specific routines
  206. ****************************************************************************}
  207. Procedure Move(const source;var dest;count:Longint);
  208. Procedure FillChar(Var x;count:Longint;Value:Boolean);
  209. Procedure FillChar(Var x;count:Longint;Value:Char);
  210. Procedure FillChar(Var x;count:Longint;Value:Byte);
  211. procedure FillByte(var x;count:longint;value:byte);
  212. Procedure FillWord(Var x;count:Longint;Value:Word);
  213. procedure FillDWord(var x;count:longint;value:DWord);
  214. function IndexChar(const buf;len:longint;b:char):longint;
  215. function IndexByte(const buf;len:longint;b:byte):longint;
  216. function Indexword(const buf;len:longint;b:word):longint;
  217. function IndexDWord(const buf;len:longint;b:DWord):longint;
  218. function CompareChar(const buf1,buf2;len:longint):longint;
  219. function CompareByte(const buf1,buf2;len:longint):longint;
  220. function CompareWord(const buf1,buf2;len:longint):longint;
  221. function CompareDWord(const buf1,buf2;len:longint):longint;
  222. procedure MoveChar0(const buf1;var buf2;len:longint);
  223. function IndexChar0(const buf;len:longint;b:char):longint;
  224. function CompareChar0(const buf1,buf2;len:longint):longint;
  225. {****************************************************************************
  226. Math Routines
  227. ****************************************************************************}
  228. Function lo(w:Word):byte;
  229. Function lo(l:Longint):Word;
  230. Function lo(l:DWord):Word;
  231. Function lo(i:Integer):byte;
  232. Function lo(B: Byte):Byte;
  233. Function hi(w:Word):byte;
  234. Function hi(i:Integer):byte;
  235. Function hi(l:Longint):Word;
  236. Function hi(b : Byte) : Byte;
  237. Function hi(l: DWord): Word;
  238. Function Swap (X:Word):Word;
  239. Function Swap (X:Integer):Integer;
  240. Function Swap (X:Cardinal):Cardinal;
  241. Function Swap (X:LongInt):LongInt;
  242. Function lo(q : QWord) : DWord;
  243. Function lo(i : Int64) : DWord;
  244. Function hi(q : QWord) : DWord;
  245. Function hi(i : Int64) : DWord;
  246. Function Swap (X:QWord):QWord;
  247. Function Swap (X:Int64):Int64;
  248. Function Random(l:cardinal):cardinal;
  249. Function Random(l:longint):longint;
  250. Function Random: extended;
  251. Procedure Randomize;
  252. Function abs(l:Longint):Longint;
  253. Function abs(l:Int64):Int64;
  254. Function sqr(l:Longint):Longint;
  255. Function sqr(l:Int64):Int64;
  256. Function sqr(l:QWord):QWord;
  257. Function odd(l:Longint):Boolean;
  258. Function odd(l:Cardinal):Boolean;
  259. Function odd(l:Int64):Boolean;
  260. Function odd(l:QWord):Boolean;
  261. { float math routines }
  262. {$I mathh.inc}
  263. {****************************************************************************
  264. Addr/Pointer Handling
  265. ****************************************************************************}
  266. Function ptr(sel,off:Longint):farpointer;
  267. Function Cseg:Word;
  268. Function Dseg:Word;
  269. Function Sseg:Word;
  270. {****************************************************************************
  271. PChar and String Handling
  272. ****************************************************************************}
  273. function strpas(p:pchar):shortstring;
  274. function strlen(p:pchar):longint;
  275. { Shortstring functions }
  276. {$ifndef INTERNSETLENGTH}
  277. Procedure SetLength (Var S:ShortString;len:StrLenInt);
  278. {$endif INTERNSETLENGTH}
  279. Function Copy(const s:shortstring;index:StrLenInt;count:StrLenInt):shortstring;
  280. Procedure Delete(Var s:shortstring;index:StrLenInt;count:StrLenInt);
  281. Procedure Insert(const source:shortstring;Var s:shortstring;index:StrLenInt);
  282. Procedure Insert(source:Char;Var s:shortstring;index:StrLenInt);
  283. Function Pos(const substr:shortstring;const s:shortstring):StrLenInt;
  284. Function Pos(C:Char;const s:shortstring):StrLenInt;
  285. Procedure SetString (Var S : Shortstring; Buf : PChar; Len : Longint);
  286. Procedure SetString (Var S : AnsiString; Buf : PChar; Len : Longint);
  287. {$ifndef INTERNLENGTH}
  288. Function Length(s:string):byte;
  289. {$endif INTERNLENGTH}
  290. Function upCase(const s:shortstring):shortstring;
  291. Function lowerCase(const s:shortstring):shortstring; overload;
  292. Function Space(b:byte):shortstring;
  293. Function hexStr(Val:Longint;cnt:byte):shortstring;
  294. Function binStr(Val:Longint;cnt:byte):shortstring;
  295. Function hexStr(Val:int64;cnt:byte):shortstring;
  296. Function binStr(Val:int64;cnt:byte):shortstring;
  297. { Char functions }
  298. Function Chr(b:byte):Char;
  299. Function upCase(c:Char):Char;
  300. Function lowerCase(c:Char):Char; overload;
  301. function copy(c:char;index : StrLenInt;count : StrLenInt): shortstring;
  302. function pos(const substr : shortstring;c:char): StrLenInt;
  303. {$ifndef INTERNLENGTH}
  304. function length(c:char):byte;
  305. {$endif INTERNLENGTH}
  306. {****************************************************************************
  307. AnsiString Handling
  308. ****************************************************************************}
  309. {$ifndef INTERNSETLENGTH}
  310. Procedure SetLength (Var S : AnsiString; l : Longint);
  311. {$endif INTERNSETLENGTH}
  312. Procedure UniqueString (Var S : AnsiString);
  313. {$ifndef INTERNLENGTH}
  314. Function Length (Const S : AnsiString) : Longint;
  315. {$endif INTERNLENGTH}
  316. Function Copy (Const S : AnsiString; Index,Size : Longint) : AnsiString;
  317. Function Pos (Const Substr : AnsiString; Const Source : AnsiString) : Longint;
  318. Function Pos (c : Char; Const s : AnsiString) : Longint;
  319. Procedure Insert (Const Source : AnsiString; Var S : AnsiString; Index : Longint);
  320. Procedure Delete (Var S : AnsiString; Index,Size: Longint);
  321. Function StringOfChar(c : char;l : longint) : AnsiString;
  322. function upcase(const s : ansistring) : ansistring;
  323. function lowercase(const s : ansistring) : ansistring;
  324. {****************************************************************************
  325. WideString Handling
  326. ****************************************************************************}
  327. {$ifdef HASWIDESTRING}
  328. {$ifndef INTERNSETLENGTH}
  329. Procedure SetLength (Var S : WideString; l : Longint);
  330. {$endif INTERNSETLENGTH}
  331. Procedure UniqueString (Var S : WideString);
  332. {$ifndef INTERNLENGTH}
  333. Function Length (Const S : WideString) : Longint;
  334. {$endif INTERNLENGTH}
  335. Function Copy (Const S : WideString; Index,Size : Longint) : WideString;
  336. Function Pos (Const Substr : WideString; Const Source : WideString) : Longint;
  337. Function Pos (c : Char; Const s : WideString) : Longint;
  338. Function Pos (c : WideChar; Const s : WideString) : Longint;
  339. Procedure Insert (Const Source : WideString; Var S : WideString; Index : Longint);
  340. Procedure Delete (Var S : WideString; Index,Size: Longint);
  341. {$endif HASWIDESTRING}
  342. {****************************************************************************
  343. Untyped File Management
  344. ****************************************************************************}
  345. Procedure Assign(Var f:File;const Name:string);
  346. Procedure Assign(Var f:File;p:pchar);
  347. Procedure Assign(Var f:File;c:char);
  348. Procedure Rewrite(Var f:File;l:Longint);
  349. Procedure Rewrite(Var f:File);
  350. Procedure Reset(Var f:File;l:Longint);
  351. Procedure Reset(Var f:File);
  352. Procedure Close(Var f:File);
  353. Procedure BlockWrite(Var f:File;Const Buf;Count:Longint;Var Result:Longint);
  354. Procedure BlockWrite(Var f:File;Const Buf;Count:Cardinal;var Result:Cardinal);
  355. Procedure BlockWrite(Var f:File;Const Buf;Count:Word;Var Result:Word);
  356. Procedure BlockWrite(Var f:File;Const Buf;Count:Word;Var Result:Integer);
  357. Procedure BlockWrite(Var f:File;Const Buf;Count:Longint);
  358. Procedure BlockRead(Var f:File;Var Buf;count:Longint;Var Result:Longint);
  359. Procedure BlockRead(Var f:File;Var Buf;count:Cardinal;Var Result:Cardinal);
  360. Procedure BlockRead(Var f:File;Var Buf;count:Word;Var Result:Word);
  361. Procedure BlockRead(Var f:File;Var Buf;count:Word;Var Result:Integer);
  362. Procedure BlockRead(Var f:File;Var Buf;count:Longint);
  363. Function FilePos(Var f:File):Longint;
  364. Function FileSize(Var f:File):Longint;
  365. Procedure Seek(Var f:File;Pos:Longint);
  366. Function EOF(Var f:File):Boolean;
  367. Procedure Erase(Var f:File);
  368. Procedure Rename(Var f:File;const s:string);
  369. Procedure Rename(Var f:File;p:pchar);
  370. Procedure Rename(Var f:File;c:char);
  371. Procedure Truncate (Var F:File);
  372. {****************************************************************************
  373. Typed File Management
  374. ****************************************************************************}
  375. Procedure Assign(Var f:TypedFile;const Name:string);
  376. Procedure Assign(Var f:TypedFile;p:pchar);
  377. Procedure Assign(Var f:TypedFile;c:char);
  378. Procedure Rewrite(Var f:TypedFile);
  379. Procedure Reset(Var f:TypedFile);
  380. {****************************************************************************
  381. Text File Management
  382. ****************************************************************************}
  383. Procedure Assign(Var t:Text;const s:string);
  384. Procedure Assign(Var t:Text;p:pchar);
  385. Procedure Assign(Var t:Text;c:char);
  386. Procedure Close(Var t:Text);
  387. Procedure Rewrite(Var t:Text);
  388. Procedure Reset(Var t:Text);
  389. Procedure Append(Var t:Text);
  390. Procedure Flush(Var t:Text);
  391. Procedure Erase(Var t:Text);
  392. Procedure Rename(Var t:Text;const s:string);
  393. Procedure Rename(Var t:Text;p:pchar);
  394. Procedure Rename(Var t:Text;c:char);
  395. Function EOF(Var t:Text):Boolean;
  396. Function EOF:Boolean;
  397. Function EOLn(Var t:Text):Boolean;
  398. Function EOLn:Boolean;
  399. Function SeekEOLn (Var t:Text):Boolean;
  400. Function SeekEOF (Var t:Text):Boolean;
  401. Function SeekEOLn:Boolean;
  402. Function SeekEOF:Boolean;
  403. Procedure SetTextBuf(Var f:Text; Var Buf);
  404. Procedure SetTextBuf(Var f:Text; Var Buf; Size:Longint);
  405. {****************************************************************************
  406. Directory Management
  407. ****************************************************************************}
  408. Procedure chdir(const s:string);
  409. Procedure mkdir(const s:string);
  410. Procedure rmdir(const s:string);
  411. Procedure getdir(drivenr:byte;Var dir:shortstring);
  412. Procedure getdir(drivenr:byte;Var dir:ansistring);
  413. {*****************************************************************************
  414. Miscelleaous
  415. *****************************************************************************}
  416. { os independent calls to allow backtraces }
  417. function get_frame:longint;
  418. function get_caller_addr(framebp:longint):longint;
  419. function get_caller_frame(framebp:longint):longint;
  420. Function IOResult:Word;
  421. Function Sptr:Longint;
  422. {*****************************************************************************
  423. Init / Exit / ExitProc
  424. *****************************************************************************}
  425. Function Paramcount:Longint;
  426. Function ParamStr(l:Longint):string;
  427. Procedure Dump_Stack(var f : text;bp:Longint);
  428. Procedure RunError(w:Word);
  429. Procedure RunError;
  430. Procedure halt(errnum:byte);
  431. Procedure AddExitProc(Proc:TProcedure);
  432. Procedure halt;
  433. {*****************************************************************************
  434. Abstract/Assert/Error Handling
  435. *****************************************************************************}
  436. procedure AbstractError;
  437. Function SysBackTraceStr(Addr: Longint): ShortString;
  438. Procedure SysAssert(Const Msg,FName:ShortString;LineNo,ErrorAddr:Longint);
  439. { Error handlers }
  440. Type
  441. TBackTraceStrFunc = Function (Addr: Longint): ShortString;
  442. TErrorProc = Procedure (ErrNo : Longint; Address,Frame : Pointer);
  443. TAbstractErrorProc = Procedure;
  444. TAssertErrorProc = Procedure(const msg,fname:ShortString;lineno,erroraddr:longint);
  445. const
  446. BackTraceStrFunc : TBackTraceStrFunc = @SysBackTraceStr;
  447. ErrorProc : TErrorProc = nil;
  448. AbstractErrorProc : TAbstractErrorProc = nil;
  449. AssertErrorProc : TAssertErrorProc = @SysAssert;
  450. {*****************************************************************************
  451. SetJmp/LongJmp
  452. *****************************************************************************}
  453. {$i setjumph.inc}
  454. {*****************************************************************************
  455. Object Pascal support
  456. *****************************************************************************}
  457. {$i objpash.inc}
  458. {*****************************************************************************
  459. Variant support
  460. *****************************************************************************}
  461. {$ifdef HASVARIANT}
  462. {$i varianth.inc}
  463. {$endif HASVARIANT}
  464. {*****************************************************************************
  465. Internal helper routines support
  466. *****************************************************************************}
  467. {$i dynarrh.inc}
  468. {$i compproc.inc}
  469. {
  470. $Log$
  471. Revision 1.48 2002-07-04 20:40:09 florian
  472. + some x86-64 support added
  473. Revision 1.47 2002/07/01 16:29:05 peter
  474. * sLineBreak changed to normal constant like Kylix
  475. Revision 1.46 2002/06/02 10:49:30 marco
  476. * Renamefest supports_double for FreeBSD too
  477. Revision 1.45 2002/04/21 15:51:51 carl
  478. * StackError is now a typed constant
  479. + $S can be used under unix
  480. Revision 1.44 2002/04/12 17:35:24 carl
  481. - removed unused variable
  482. Revision 1.43 2002/01/25 17:41:05 peter
  483. * moved array types to objpas unit
  484. Revision 1.42 2002/01/25 17:39:35 peter
  485. * array types added
  486. Revision 1.41 2002/01/24 18:27:06 peter
  487. * lowercase() overloaded
  488. Revision 1.40 2002/01/24 12:33:53 jonas
  489. * adapted ranges of native types to int64 (e.g. high cardinal is no
  490. longer longint($ffffffff), but just $fffffff in psystem)
  491. * small additional fix in 64bit rangecheck code generation for 32 bit
  492. processors
  493. * adaption of ranges required the matching talgorithm used for selecting
  494. which overloaded procedure to call to be adapted. It should now always
  495. select the closest match for ordinal parameters.
  496. + inttostr(qword) in sysstr.inc/sysstrh.inc
  497. + abs(int64), sqr(int64), sqr(qword) in systemh.inc/generic.inc (previous
  498. fixes were required to be able to add them)
  499. * is_in_limit() moved from ncal to types unit, should always be used
  500. instead of direct comparisons of low/high values of orddefs because
  501. qword is a special case
  502. Revision 1.39 2001/11/14 22:59:11 michael
  503. + Initial variant support
  504. Revision 1.38 2001/11/07 14:59:20 michael
  505. + Moved PathDelim,DriveDelim,PathSep to sysutilh
  506. Revision 1.37 2001/11/07 13:52:37 michael
  507. + Added PathDelim,DriveDelim,PathSep
  508. Revision 1.36 2001/10/09 02:32:51 carl
  509. * bugfix #1639 (IsMultiThread varialbe setting)
  510. Revision 1.35 2001/08/19 21:02:01 florian
  511. * fixed and added a lot of stuff to get the Jedi DX8 headers
  512. compiled
  513. Revision 1.34 2001/08/01 18:01:20 peter
  514. * WChar fix to compile also with 1.0.x
  515. Revision 1.33 2001/08/01 15:00:11 jonas
  516. + "compproc" helpers
  517. * renamed several helpers so that their name is the same as their
  518. "public alias", which should facilitate the conversion of processor
  519. specific code in the code generator to processor independent code
  520. * some small fixes to the val_ansistring and val_widestring helpers
  521. (always immediately exit if the source string is longer than 255
  522. chars)
  523. * fixed fpc_dynarray_high and fpc_dynarray_length if the dynarray is
  524. still nil (used to crash, now return resp -1 and 0)
  525. Revision 1.32 2001/07/31 08:57:22 marco
  526. * Either I did something wrong, or Peter's merge killed wchar decl. Fixed.
  527. Revision 1.31 2001/07/30 21:38:55 peter
  528. * m68k updates merged
  529. Revision 1.29 2001/07/29 13:49:15 peter
  530. * m68k updates merged
  531. Revision 1.28 2001/07/15 11:57:16 peter
  532. * merged m68k updates
  533. Revision 1.27 2001/07/10 18:04:37 peter
  534. * merged textfile, readlink and concat ansistring fixes
  535. Revision 1.26 2001/07/09 21:15:41 peter
  536. * Length made internal
  537. * Add array support for Length
  538. Revision 1.25 2001/07/08 21:00:18 peter
  539. * various widestring updates, it works now mostly without charset
  540. mapping supported
  541. Revision 1.24 2001/06/04 11:43:51 peter
  542. * Formal const to var fixes
  543. * Hexstr(int64) added
  544. Revision 1.23 2001/06/03 20:17:06 peter
  545. * ucs4char added
  546. Revision 1.22 2001/05/16 17:44:25 jonas
  547. + odd() for cardinal, int64 and qword (merged)
  548. Revision 1.21 2001/05/09 19:57:07 peter
  549. *** empty log message ***
  550. Revision 1.20 2001/04/23 18:25:45 peter
  551. * m68k updates
  552. Revision 1.19 2001/04/13 18:06:07 peter
  553. * upcase, lowercase for ansistring
  554. Revision 1.18 2001/03/22 23:26:05 florian
  555. * some new types added like PBoolean
  556. Revision 1.17 2001/03/21 23:29:40 florian
  557. + sLineBreak and misc. stuff for Kylix compatiblity
  558. Revision 1.16 2001/01/24 21:47:18 florian
  559. + more MT stuff added
  560. Revision 1.15 2000/12/16 15:56:19 jonas
  561. - removed all ifdef cardinalmulfix code
  562. Revision 1.14 2000/12/08 14:04:43 jonas
  563. + added pos(char,ansistring), because there is also a pos(char,shortstring)
  564. and without the ansistring version, the shortstring version is always
  565. called when calling pos(char,pchar), even when using $h+ (because the
  566. first parameter matches exactly) (merged)
  567. Revision 1.13 2000/12/07 17:19:47 jonas
  568. * new constant handling: from now on, hex constants >$7fffffff are
  569. parsed as unsigned constants (otherwise, $80000000 got sign extended
  570. and became $ffffffff80000000), all constants in the longint range
  571. become longints, all constants >$7fffffff and <=cardinal($ffffffff)
  572. are cardinals and the rest are int64's.
  573. * added lots of longint typecast to prevent range check errors in the
  574. compiler and rtl
  575. * type casts of symbolic ordinal constants are now preserved
  576. * fixed bug where the original resulttype wasn't restored correctly
  577. after doing a 64bit rangecheck
  578. Revision 1.12 2000/11/13 13:40:04 marco
  579. * Renamefest
  580. Revision 1.11 2000/11/11 16:12:01 peter
  581. * ptr returns farpointer
  582. Revision 1.10 2000/11/06 21:35:59 peter
  583. * removed some warnings
  584. Revision 1.9 2000/11/06 20:34:24 peter
  585. * changed ver1_0 defines to temporary defs
  586. Revision 1.8 2000/10/23 16:15:40 jonas
  587. * renamed strlenint to longint since 1.0 doesn't know that type
  588. Revision 1.7 2000/10/23 14:00:59 florian
  589. * setlength export declaration for 1.0.2 fixed
  590. Revision 1.6 2000/10/21 18:20:17 florian
  591. * a lot of small changes:
  592. - setlength is internal
  593. - win32 graph unit extended
  594. ....
  595. Revision 1.5 2000/08/13 17:55:15 michael
  596. + Added some delphi compatibility types
  597. Revision 1.4 2000/08/08 22:11:45 sg
  598. * Added declarations for WideString utility functions
  599. Revision 1.3 2000/07/14 10:33:10 michael
  600. + Conditionals fixed
  601. Revision 1.2 2000/07/13 11:33:45 michael
  602. + removed logs
  603. }