astrings.pp 18 KB

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