Browse Source

+ Changed to ansistrings

michael 26 years ago
parent
commit
8200498fbb
4 changed files with 25 additions and 12 deletions
  1. 8 5
      rtl/objpas/dati.inc
  2. 6 3
      rtl/objpas/syspch.inc
  3. 5 2
      rtl/objpas/sysstr.inc
  4. 6 2
      rtl/objpas/sysutils.pp

+ 8 - 5
rtl/objpas/dati.inc

@@ -430,11 +430,11 @@ var
    begin
    Len := Length(Str);
    if ResultLen + Len < SizeOf(ResultBuffer) then begin
-      StrMove(ResultCurrent, pchar(@Str[1]), Len);
+      StrMove(ResultCurrent, pchar(Str), Len);
       ResultCurrent := ResultCurrent + Len;
       ResultLen := ResultLen + Len;
-      end ;
-   end ;
+      end;
+   end;
 
    procedure StoreInt(Value, Digits: integer);
    var S: string; Len: integer;
@@ -461,7 +461,7 @@ var
       P: pchar;
 
    begin
-   FormatCurrent := @FormatStr[1];
+   FormatCurrent := Pchar(FormatStr);
    FormatEnd := FormatCurrent + Length(FormatStr);
    Clock12 := false;
    P := FormatCurrent;
@@ -625,7 +625,10 @@ end;
 
 {
   $Log$
-  Revision 1.6  1999-02-09 12:38:42  michael
+  Revision 1.7  1999-02-10 22:15:10  michael
+  + Changed to ansistrings
+
+  Revision 1.6  1999/02/09 12:38:42  michael
   * Fixed INt() proble. Defined THandle, included Filemode constants
 
   Revision 1.5  1998/10/15 09:39:12  michael

+ 6 - 3
rtl/objpas/syspch.inc

@@ -92,7 +92,7 @@ end ;
 
 function StrPCopy(Dest: PChar; Source: string): PChar;
 begin
-result := StrMove(Dest, PChar(@Source[1]), length(Source));
+result := StrMove(Dest, PChar(Source), length(Source));
 end ;
 
 {  StrPLCopy copies MaxLen or less characters from the pascal string
@@ -106,7 +106,7 @@ if (Result <> Nil) and (MaxLen <> 0) then begin
    Count := Length(Source);
    if Count > MaxLen then
       Count := MaxLen;
-   StrMove(Dest, PChar(@Source[1]), Count);
+   StrMove(Dest, PChar(Source), Count);
    CharArray(result^)[Count] := #0;  { terminate ! }
    end ;
 end ;
@@ -357,7 +357,10 @@ end ;
 
 {
   $Log$
-  Revision 1.2  1998-09-16 08:28:40  michael
+  Revision 1.3  1999-02-10 22:15:11  michael
+  + Changed to ansistrings
+
+  Revision 1.2  1998/09/16 08:28:40  michael
   Update from gertjan Schouten, plus small fix for linux
 
 

+ 5 - 2
rtl/objpas/sysstr.inc

@@ -104,7 +104,7 @@ Count1 := Length(S1);
 Count2 := Length(S2);
 if Count1 > Count2 then Count := Count2
 else Count := Count1;
-result := CompareMem(@S1[1], @S2[1], Count);
+result := CompareMem(Pointer(S1),Pointer(S2), Count);
 if (result = 0) and (Count1 <> Count2) then begin
    if Count1 > Count2 then result := ord(s1[Count1 + 1])
    else result := -ord(s2[Count2 + 1]);
@@ -880,7 +880,10 @@ end ;
 
 {
   $Log$
-  Revision 1.10  1998-12-15 22:43:09  peter
+  Revision 1.11  1999-02-10 22:15:12  michael
+  + Changed to ansistrings
+
+  Revision 1.10  1998/12/15 22:43:09  peter
     * removed temp symbols
 
   Revision 1.9  1998/11/04 10:20:52  peter

+ 6 - 2
rtl/objpas/sysutils.pp

@@ -16,7 +16,8 @@ unit sysutils;
 interface
 
 {$MODE objfpc}
-
+{ force ansistrings }
+{$H+}
     uses
     {$ifdef linux}
        linux
@@ -271,7 +272,10 @@ begin
 end.
 {
     $Log$
-    Revision 1.21  1999-02-09 14:24:50  pierre
+    Revision 1.22  1999-02-10 22:15:13  michael
+    + Changed to ansistrings
+
+    Revision 1.21  1999/02/09 14:24:50  pierre
      * dos unit missing for go32v2 !!
 
     Revision 1.20  1999/02/09 12:38:44  michael