|
@@ -35,18 +35,20 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+{ declaring this breaks delphi compatibility and e.g. tw3721.pp
|
|
|
FUNCTION NewStr (Const S: ShortString): PShortString;
|
|
|
VAR P: PShortString;
|
|
|
BEGIN
|
|
|
- If (S = '') Then
|
|
|
- P := Nil
|
|
|
- Else
|
|
|
+ If (S = '') Then
|
|
|
+ P := Nil
|
|
|
+ Else
|
|
|
Begin { Return nil }
|
|
|
GetMem(P, Length(S) + 1); { Allocate memory }
|
|
|
If (P<>Nil) Then P^ := S; { Hold string }
|
|
|
End;
|
|
|
NewStr := P; { Return result }
|
|
|
END;
|
|
|
+}
|
|
|
|
|
|
{ DisposeStr frees the memory occupied by S }
|
|
|
|
|
@@ -251,7 +253,7 @@ end;
|
|
|
|
|
|
type
|
|
|
TCaseTranslationTable = array[0..255] of char;
|
|
|
-
|
|
|
+
|
|
|
var
|
|
|
{ Tables with upper and lowercase forms of character sets.
|
|
|
MUST be initialized with the correct code-pages }
|
|
@@ -333,7 +335,7 @@ begin
|
|
|
Result:=Ord(S1^)-Ord(S2^); //!! Must be replaced by ansi characters !!
|
|
|
Inc(S1);
|
|
|
Inc(S2);
|
|
|
- end;
|
|
|
+ end;
|
|
|
if (Result=0) and (S1^<>S2^) then // loop ended because exactly one has #0
|
|
|
if S1^=#0 then // shorter string is smaller
|
|
|
result:=-1
|
|
@@ -1759,7 +1761,7 @@ begin
|
|
|
end;
|
|
|
|
|
|
// from textmode IDE util funcs.
|
|
|
-function BoolToStr(B: boolean; const TrueS, FalseS: string): string;
|
|
|
+function BoolToStr(B: boolean; const TrueS, FalseS: string): string;
|
|
|
begin
|
|
|
if B then Result:=TrueS else BoolToStr:=FalseS;
|
|
|
end;
|
|
@@ -2048,7 +2050,7 @@ Var
|
|
|
places, remove decimal point. }
|
|
|
If (DecimalPoint < len) And (Digits[DecimalPoint + 1] = ' ') Then
|
|
|
Digits[DecimalPoint] := ' ';
|
|
|
- { Convert spaces left from obligatory decimal point to zeroes.
|
|
|
+ { Convert spaces left from obligatory decimal point to zeroes.
|
|
|
MVC : If - sign is encountered, replace it too, and put at position 1}
|
|
|
I:=DecimalPoint-Placehold[2];
|
|
|
J:=0;
|
|
@@ -2085,7 +2087,7 @@ Var
|
|
|
|
|
|
{ Find and cut out exponent. Always the
|
|
|
last 6 characters in the string.
|
|
|
- -> 0000E+0000
|
|
|
+ -> 0000E+0000
|
|
|
*** No, not always the last 6 characters, this depends on
|
|
|
the maximally supported precision (JM)}
|
|
|
I:=Pos('E',Digits);
|