systemh.inc 24 KB

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