astrings.pp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1993,97 by Michael Van Canneyt,
  5. member of the Free Pascal development team.
  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. This file implements AnsiStrings for FPC
  14. ---------------------------------------------------------------------}
  15. {
  16. This file contains the implementation of the LongString type,
  17. and all things that are needed for it.
  18. AnsiSTring is defined as a 'silent' pchar :
  19. a pchar that points to :
  20. @-12 : Longint for maximum size;
  21. @-8 : Longint for size;
  22. @-4 : Longint for reference count;
  23. @ : String + Terminating #0;
  24. Pchar(Ansistring) is a valid typecast.
  25. So AS[i] is converted to the address @AS+i-1.
  26. Constants should be assigned a reference count of -1
  27. Meaning that they can't be disposed of.
  28. }
  29. Type shortstring=string;
  30. Function NewAnsiString (Len : Longint) : AnsiString; forward;
  31. Procedure DisposeAnsiString (Var P : Pointer); forward;
  32. Procedure Decr_Ansi_Ref (Var S : Pointer); forward;
  33. Procedure Incr_Ansi_Ref (Var S : Pointer); forward;
  34. Procedure AssignAnsiString (Var S1 : Pointer; S2 : Pointer); forward;
  35. Procedure Ansi_String_Concat (Var S1 : AnsiString; Var S2 : AnsiString); forward;
  36. Procedure Ansi_ShortString_Concat (Var S1: AnsiString; Var S2 : ShortString); forward;
  37. Procedure Ansi_To_ShortString (Var S1 : ShortString; S2 : Pointer; maxlen : longint); forward;
  38. Procedure Short_To_AnsiString (Var S1 : AnsiString; Const S2 : ShortString); forward;
  39. Function AnsiCompare (Var S1,S2 : AnsiString): Longint; forward;
  40. Function AnsiCompare (var S1 : AnsiString; Var S2 : ShortString): Longint; forward;
  41. Procedure SetCharAtIndex (Var S : AnsiString; Index : Longint; C : CHar); forward;
  42. {$PACKRECORDS 1}
  43. Type TAnsiRec = Record
  44. Maxlen, len, ref : Longint;
  45. First : Char;
  46. end;
  47. PAnsiRec = ^TAnsiRec;
  48. Const AnsiRecLen = SizeOf(TAnsiRec);
  49. FirstOff = SizeOf(TAnsiRec)-1;
  50. { ---------------------------------------------------------------------
  51. Internal functions, not in interface.
  52. ---------------------------------------------------------------------}
  53. Procedure DumpAnsiRec(S : Pointer);
  54. begin
  55. If S=Nil then
  56. Writeln ('String is nil')
  57. Else
  58. Begin
  59. With PAnsiRec(S-Firstoff)^ do
  60. begin
  61. Writeln ('Maxlen : ',maxlen);
  62. Writeln ('Len : ',len);
  63. Writeln ('Ref : ',ref);
  64. end;
  65. end;
  66. end;
  67. Function NewAnsiString(Len : Longint) : Pointer;
  68. {
  69. Allocate a new AnsiString on the heap.
  70. initialize it to zero length and reference count 1.
  71. }
  72. Var P : Pointer;
  73. begin
  74. GetMem(P,Len+AnsiRecLen);
  75. If P<>Nil then
  76. begin
  77. PAnsiRec(P)^.Maxlen:=Len; { Maximal length }
  78. PAnsiRec(P)^.Len:=0; { Initial length }
  79. PAnsiRec(P)^.Ref:=1; { Set reference count }
  80. PAnsiRec(P)^.First:=#0; { Terminating #0 }
  81. P:=P+FirstOff; { Points to string now }
  82. end;
  83. NewAnsiString:=P;
  84. end;
  85. Procedure DisposeAnsiString(Var S : Pointer);
  86. {
  87. Deallocates a AnsiString From the heap.
  88. }
  89. begin
  90. // Writeln ('In disposeAnsiSTring');
  91. If S=Nil
  92. then exit;
  93. Dec (Longint(S),FirstOff);
  94. FreeMem (S,PAnsiRec(S)^.Maxlen+AnsiRecLen);
  95. S:=Nil;
  96. end;
  97. Procedure Decr_Ansi_Ref (Var P : Pointer);[Alias : 'FPC_DECR_ANSI_REF'];
  98. {
  99. Decreases the ReferenceCount of a non constant ansistring;
  100. If the reference count is zero, deallocate the string;
  101. }
  102. Type plongint = ^longint;
  103. Var l : plongint;
  104. Begin
  105. // dumpansirec(s);
  106. { Zero string }
  107. If S=Nil then
  108. exit;
  109. { check for constant strings ...}
  110. l:=S-FirstOff+8;
  111. If l^<0 then exit;
  112. Dec(l^);
  113. // dumpansirec(s);
  114. If l^=0 then
  115. { Ref count dropped to zero }
  116. begin
  117. // Writeln ('Calling disposestring');
  118. DisposeAnsiString (S); { Remove...}
  119. end
  120. end;
  121. Procedure Incr_Ansi_Ref (Var S : Pointer);[Alias : 'FPC_INCR_ANSI_REF'];
  122. Begin
  123. If S=Nil then
  124. exit;
  125. { Let's be paranoid : Constant string ??}
  126. If PAnsiRec(S-FirstOff)^.Ref<0 then exit;
  127. Inc(PAnsiRec(S-FirstOff)^.Ref);
  128. end;
  129. Procedure UniqueAnsiString (Var S : Pointer);
  130. {
  131. Make sure reference count of S is 1,
  132. using copy-on-write semantics.
  133. }
  134. Var SNew : Pointer;
  135. begin
  136. If S=Nil
  137. then exit;
  138. if PAnsiRec(S-Firstoff)^.Ref>1 then
  139. begin
  140. SNew:=Pointer(NewAnsiString (PAnsiRec(S-FirstOff)^.len));
  141. Move (Pointer(S)^,SNew^,PAnsiRec(S-FirstOff)^.len+1);
  142. PAnsiRec(SNew-8)^.len:=PAnsiRec(S-FirstOff)^.len;
  143. Decr_Ansi_Ref (S); { Thread safe }
  144. S:=SNew;
  145. end;
  146. end;
  147. Procedure AssignAnsiString (Var S1 : Pointer;S2 : Pointer); [Public, Alias : 'FPC_ASSIGN_ANSI_STRING'];
  148. {
  149. Assigns S2 to S1 (S1:=S2), taking in account reference counts.
  150. If S2 is a constant string, a new S1 is allocated on the heap.
  151. }
  152. Var Temp : Pointer;
  153. begin
  154. If S2<>nil then
  155. begin
  156. If PAnsiRec(S2-FirstOff)^.Ref<0 then
  157. begin
  158. { S2 is a constant string, Create new string with copy. }
  159. Temp:=Pointer(NewAnsiString(PansiRec(S2-FirstOff)^.Len));
  160. Move (S2^,Temp^,PAnsiRec(S2-FirstOff)^.len+1);
  161. PAnsiRec(Temp-FirstOff)^.Len:=PAnsiRec(S2-FirstOff)^.len;
  162. end
  163. else
  164. begin
  165. Inc(PAnsiRec(S2-FirstOff)^.ref);
  166. Temp:=S2;
  167. end;
  168. end;
  169. { Decrease the reference count on the old S1 }
  170. Decr_Ansi_Ref (S1);
  171. { And finally, have S1 pointing to S2 (or its copy) }
  172. S1:=Temp;
  173. end;
  174. Procedure Ansi_String_Concat (Var S1 : AnsiString; Var S2 : AnsiString);
  175. {
  176. Concatenates 2 AnsiStrings : S1+S2.
  177. Result Goes to S1;
  178. }
  179. Var Size,Location : Longint;
  180. begin
  181. if Pointer(S2)=Nil then exit;
  182. if (Pointer(S1)=Nil) then
  183. AssignAnsiString(S1,S2)
  184. else
  185. begin
  186. Size:=PAnsiRec(Pointer(S2)-FirstOff)^.Len;
  187. Location:=Length(S1);
  188. { Setlength takes case of uniqueness
  189. and allocated memory. We need to use length,
  190. to take into account possibility of S1=Nil }
  191. //!! SetLength (S1,Size+Location);
  192. Move (Pointer(S2)^,Pointer(Pointer(S1)+location)^,Size+1);
  193. end;
  194. end;
  195. Procedure Ansi_ShortString_Concat (Var S1: AnsiString; Var S2 : ShortString);
  196. {
  197. Concatenates a Ansi with a short string; : S2 + S2
  198. }
  199. Var Size,Location : Longint;
  200. begin
  201. Size:=byte(S2[0]);
  202. Location:=Length(S1);
  203. If Size=0 then exit;
  204. { Setlength takes case of uniqueness
  205. and alllocated memory. We need to use length,
  206. to take into account possibility of S1=Nil }
  207. SetLength (S1,Size+Length(S1));
  208. Move (S2[1],Pointer(Pointer(S1)+Location)^,Size);
  209. PByte( Pointer(S1)+length(S1) )^:=0; { Terminating Zero }
  210. end;
  211. Procedure Ansi_To_ShortString (Var S1 : ShortString;S2 : Pointer; Maxlen : Longint);
  212. [Public, alias: 'FPC_ANSI2SHORT'];
  213. {
  214. Converts a AnsiString to a ShortString;
  215. }
  216. Var Size : Longint;
  217. begin
  218. Size:=PAnsiRec(S2-FirstOff)^.Len;
  219. If Size>maxlen then Size:=maxlen;
  220. Move (S2^,S1[1],Size);
  221. byte(S1[0]):=Size;
  222. end;
  223. Procedure Short_To_AnsiString (Var S1 : Pointer; Const S2 : ShortString);
  224. [Public, alias: 'FPC_SHORT2ANSI'];
  225. {
  226. Converts a ShortString to a AnsiString;
  227. }
  228. Var Size : Longint;
  229. begin
  230. Size:=Byte(S2[0]);
  231. Setlength (S1,Size);
  232. Move (S2[1],Pointer(S1)^,Size);
  233. { Terminating Zero }
  234. PByte(Pointer(S1)+Size)^:=0;
  235. end;
  236. Function PChar2Ansi(p : pchar) : pointer;[Public,Alias : 'FPC_ANSI2PCHAR'];
  237. begin
  238. if p^=#0
  239. PChar2Ansi:=nil
  240. else
  241. end;
  242. { the compiler generates inline code for that
  243. Const EmptyChar : char = #0;
  244. Function Ansi2pchar (S : Pointer) : Pchar; [Alias : 'FPC_ANSI2PCHAR'];
  245. begin
  246. If S<>Nil then
  247. Ansi2Pchar:=S
  248. else
  249. Ansi2Pchar:=@emptychar;
  250. end;
  251. }
  252. { stupid solution, could be done with public,name in later versions }
  253. procedure dummy;assembler;
  254. asm
  255. .globl FPC_EMPTYCHAR
  256. FPC_EMPTYCHAR:
  257. .byte 0
  258. end;
  259. Function AnsiCompare (Var S1,S2 : AnsiString): Longint;
  260. {
  261. Compares 2 AnsiStrings;
  262. The result is
  263. <0 if S1<S2
  264. 0 if S1=S2
  265. >0 if S1>S2
  266. }
  267. Var i,MaxI,Temp : Longint;
  268. begin
  269. Temp:=0;
  270. i:=0;
  271. MaxI:=Length(S1);
  272. if MaxI>Length(S2) then MaxI:=Length(S2);
  273. While (i<MaxI) and (Temp=0) do
  274. begin
  275. Temp:= PByte(Pointer(S1)+I)^ - PByte(Pointer(S2)+i)^;
  276. inc(i);
  277. end;
  278. if temp=0 then temp:=Length(S1)-Length(S2);
  279. AnsiCompare:=Temp;
  280. end;
  281. Function AnsiCompare (Var S1 : AnsiString; Var S2 : ShortString): Longint;
  282. {
  283. Compares a AnsiString with a ShortString;
  284. The result is
  285. <0 if S1<S2
  286. 0 if S1=S2
  287. >0 if S1>S2
  288. }
  289. Var i,MaxI,Temp : Longint;
  290. begin
  291. Temp:=0;
  292. i:=0;
  293. MaxI:=Length(S1);
  294. if MaxI>byte(S2[0]) then MaxI:=Byte(S2[0]);
  295. While (i<MaxI) and (Temp=0) do
  296. begin
  297. Temp:= PByte(Pointer(S1)+I)^ - Byte(S2[i+1]);
  298. inc(i);
  299. end;
  300. AnsiCompare:=Temp;
  301. end;
  302. Procedure SetCharAtIndex (Var S : AnsiString; Index : Longint; C : CHar);
  303. begin
  304. if Index<=Length(S) then
  305. begin
  306. UniqueAnsiString(S);
  307. Pbyte(Pointer(S)+index-1)^:=Byte(C);
  308. end;
  309. end;
  310. { ---------------------------------------------------------------------
  311. Public functions, In interface.
  312. ---------------------------------------------------------------------}
  313. Function Length (Const S : AnsiString) : Longint;
  314. {
  315. Returns the length of an AnsiString.
  316. Takes in acount that zero strings are NIL;
  317. }
  318. begin
  319. If Pointer(S)=Nil then
  320. Length:=0
  321. else
  322. Length:=PAnsiRec(Pointer(S)-FirstOff)^.Len;
  323. end;
  324. Procedure SetLength (Var S : AnsiString; l : Longint);
  325. {
  326. Sets The length of string S to L.
  327. Makes sure S is unique, and contains enough room.
  328. }
  329. Var Temp : Pointer;
  330. begin
  331. If (Pointer(S)=Nil) and (l>0) then
  332. begin
  333. { Need a complete new string...}
  334. // S:=NewAnsiString(l);
  335. PAnsiRec(Pointer(S)-FirstOff)^.Len:=l;
  336. PAnsiRec(Pointer(S)-FirstOff)^.Len:=l;
  337. PByte (Pointer(S)+l)^:=0;
  338. end
  339. else if l>0 then
  340. begin
  341. If (PAnsiRec(Pointer(S)-FirstOff)^.Maxlen < L) or
  342. (PAnsiRec(Pointer(S)-FirstOff)^.Ref <> 1) then
  343. begin
  344. { Reallocation is needed... }
  345. Temp:=Pointer(NewAnsiString(L));
  346. if Length(S)>0 then
  347. Move (Pointer(S)^,Temp^,Length(S)+1);
  348. Decr_Ansi_ref (S);
  349. Pointer(S):=Temp;
  350. end;
  351. PAnsiRec(Pointer(S)-FirstOff)^.Len:=l
  352. end
  353. else
  354. { Length=0 }
  355. begin
  356. Decr_Ansi_Ref (S);
  357. S:=Nil;
  358. end;
  359. end;
  360. Function Copy (Const S : AnsiString; Index,Size : Longint) : AnsiString;
  361. var ResultAddress : Pointer;
  362. begin
  363. ResultAddress:=Nil;
  364. dec(index);
  365. { Check Size. Accounts for Zero-length S }
  366. if Length(S)<Index+Size then
  367. Size:=Length(S)-Index;
  368. If Size>0 then
  369. begin
  370. ResultAddress:=Pointer(NewAnsiString (Size));
  371. if ResultAddress<>Nil then
  372. begin
  373. Move (Pointer(Pointer(S)+index)^,ResultAddress^,Size);
  374. PAnsiRec(ResultAddress-FirstOff)^.Len:=Size;
  375. PByte(ResultAddress+Size)^:=0;
  376. end;
  377. end;
  378. Copy:=AnsiString(ResultAddress);
  379. end;
  380. Function Pos (Const Substr : AnsiString; Const Source : AnsiString) : Longint;
  381. var i,j : longint;
  382. e : boolean;
  383. s : Pointer;
  384. begin
  385. i := 0;
  386. j := 0;
  387. e := true;
  388. if Plongint(substr)^=0 then e := false;
  389. while (e) and (i <= length (Source) - length (substr)) do
  390. begin
  391. inc (i);
  392. S:=Pointer(copy(Source,i,length(Substr)));
  393. if AnsiCompare(substr,AnsiString(s))=0 then
  394. begin
  395. j := i;
  396. e := false;
  397. end;
  398. DisposeAnsiString(AnsiString(S));
  399. end;
  400. pos := j;
  401. end;
  402. Procedure Val (Const S : AnsiString; var R : real; Var Code : Integer);
  403. Var SS : String;
  404. begin
  405. Ansi_To_ShortString (SS,S,255);
  406. Val(SS,R,Code);
  407. end;
  408. {
  409. Procedure Val (var S : AnsiString; var D : Double; Var Code : Integer);
  410. Var SS : ShortString;
  411. begin
  412. Ansi_To_ShortString (SS,S,255);
  413. Val(SS,D,Code);
  414. end;
  415. }
  416. Procedure Val (Const S : AnsiString; var E : Extended; Code : Integer);
  417. Var SS : ShortString;
  418. begin
  419. Ansi_To_ShortString (SS,S,255);
  420. Val(SS,E,Code);
  421. end;
  422. Procedure Val (Const S : AnsiString; var C : Cardinal; Code : Integer);
  423. Var SS : ShortString;
  424. begin
  425. Ansi_To_ShortString (SS,S,255);
  426. Val(SS,C,Code);
  427. end;
  428. Procedure Val (Const S : AnsiString; var L : Longint; Var Code : Integer);
  429. Var SS : ShortString;
  430. begin
  431. Ansi_To_ShortString (SS,S,255);
  432. Val(SS,L,Code);
  433. end;
  434. Procedure Val (Const S : AnsiString; var W : Word; Var Code : Integer);
  435. Var SS : ShortString;
  436. begin
  437. Ansi_To_ShortString (SS,S,255);
  438. Val(SS,W,Code);
  439. end;
  440. Procedure Val (Const S : AnsiString; var I : Integer; Var Code : Integer);
  441. Var SS : ShortString;
  442. begin
  443. Ansi_To_ShortString (SS,S,255);
  444. Val(SS,I,Code);
  445. end;
  446. Procedure Val (Const S : AnsiString; var B : Byte; Var Code : Integer);
  447. Var SS : ShortString;
  448. begin
  449. Ansi_To_ShortString (SS,S,255);
  450. Val(SS,B,Code);
  451. end;
  452. Procedure Val (Const S : AnsiString; var SI : ShortInt; Var Code : Integer);
  453. Var SS : ShortString;
  454. begin
  455. Ansi_To_ShortString (SS,S,255);
  456. Val(SS,SI,Code);
  457. end;
  458. {
  459. Procedure Str (Const R : Real;Len,fr : Longint; Const S : AnsiString);
  460. Var SS : ShortString;
  461. begin
  462. {int_Str_Real (R,Len,fr,SS);}
  463. Short_To_AnsiString (S,SS);
  464. end;
  465. {
  466. Procedure Str (Var D : Double;Len,fr: Longint; Var S : AnsiString);
  467. Var SS : ShortString;
  468. begin
  469. {int_Str_Double (D,Len,fr,SS);}
  470. Short_To_AnsiString (S,SS);
  471. end;
  472. }
  473. Procedure Str (E : Extended;Lenf,Fr: Longint; Var S : AnsiString);
  474. Var SS : ShortString;
  475. begin
  476. {int_Str_Extended (E,Len,fr,SS);}
  477. Short_To_AnsiString (S,SS);
  478. end;
  479. Procedure Str (C : Cardinal;Len : Longint; Var S : AnsiString);
  480. begin
  481. end;
  482. Procedure Str (L : Longint; Len : Longint; Var S : AnsiString);
  483. Var SS : ShortString;
  484. begin
  485. {int_Str_Longint (L,Len,fr,SS);}
  486. Short_To_AnsiString (S,SS);
  487. end;
  488. Procedure Str (Var W : Word;Len : Longint; Var S : AnsiString);
  489. begin
  490. end;
  491. Procedure Str (Var I : Integer;Len : Longint; Var S : AnsiString);
  492. begin
  493. end;
  494. Procedure Str (Var B : Byte; Len : Longint; Var S : AnsiString);
  495. begin
  496. end;
  497. Procedure Str (Var SI : ShortInt; Len : Longint; Var S : AnsiString);
  498. begin
  499. end;
  500. }
  501. Procedure Delete (Var S : AnsiString; Index,Size: Longint);
  502. begin
  503. if index<=0 then
  504. begin
  505. Size:=Size+index-1;
  506. index:=1;
  507. end;
  508. if (Index<=length(s)) and (Size>0) then
  509. begin
  510. UniqueAnsiString (S);
  511. if Size+Index>Length(S) then
  512. Size:=Length(s)-Index+1;
  513. Setlength(s,Length(s)-Size);
  514. if Index<=Length(s) then
  515. Move(Pointer(Pointer(S)+Index+Size-1)^,
  516. Pointer(Pointer(s)+Index-1)^,Length(s)-Index+2)
  517. else
  518. Pbyte(Pointer(S)+Length(S))^:=0;
  519. end;
  520. end;
  521. Procedure Insert (Const Source : AnsiString; Var S : AnsiString; Index : Longint);
  522. var s3,s4 : Pointer;
  523. begin
  524. If Length(Source)=0 then exit;
  525. if index <= 0 then index := 1;
  526. s3 := Pointer(copy(s,index,length(s)));
  527. if index > Length(s) then
  528. index := Length(S)+1;
  529. SetLength(s,index - 1);
  530. s4 := Pointer ( NewAnsiString(PansiRec(Pointer(Source)-Firstoff)^.len) );
  531. Ansi_String_Concat(AnsiString(s4),Source);
  532. if S4<>Nil then
  533. Ansi_String_Concat(AnsiString(S4),AnsiString(s3));
  534. Ansi_String_Concat(S,AnsiString(S4));
  535. Decr_ansi_ref (AnsiString(S3));
  536. Decr_ansi_ref (AnsiString(S4));
  537. end;
  538. {
  539. $Log$
  540. Revision 1.16 1998-09-20 17:49:08 florian
  541. * some ansistring fixes
  542. Revision 1.15 1998/09/19 08:33:17 florian
  543. * some internal procedures take now an pointer instead of a
  544. ansistring
  545. Revision 1.14 1998/09/14 10:48:14 peter
  546. * FPC_ names
  547. * Heap manager is now system independent
  548. Revision 1.13 1998/08/23 20:58:51 florian
  549. + rtti for objects and classes
  550. + TObject.GetClassName implemented
  551. Revision 1.12 1998/08/22 09:32:12 michael
  552. + minor fixes typos, and ansi2pchar
  553. Revision 1.11 1998/08/08 12:28:10 florian
  554. * a lot small fixes to the extended data type work
  555. Revision 1.10 1998/07/29 21:44:34 michael
  556. + Implemented reading/writing of ansistrings
  557. Revision 1.9 1998/07/20 23:36:56 michael
  558. changes for ansistrings
  559. Revision 1.8 1998/07/13 21:19:09 florian
  560. * some problems with ansi string support fixed
  561. Revision 1.7 1998/07/06 14:29:08 michael
  562. + Added Public,Alias directives for some calls
  563. Revision 1.6 1998/06/25 08:41:44 florian
  564. * better rtti
  565. Revision 1.5 1998/06/12 07:39:13 michael
  566. + Added aliases for Incr/Decr ref.
  567. Revision 1.4 1998/06/08 19:35:02 michael
  568. Some changes to integrate in system unit
  569. Revision 1.3 1998/06/08 12:38:22 michael
  570. Implemented rtti, inserted ansistrings again
  571. Revision 1.2 1998/05/12 10:42:44 peter
  572. * moved getopts to inc/, all supported OS's need argc,argv exported
  573. + strpas, strlen are now exported in the systemunit
  574. * removed logs
  575. * removed $ifdef ver_above
  576. }