systemh.inc 25 KB

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