Browse Source

* fpc_pchar_length compilerproc and strlen alias

peter 23 years ago
parent
commit
ea8118b37c
4 changed files with 28 additions and 11 deletions
  1. 6 3
      rtl/i386/i386.inc
  2. 6 1
      rtl/inc/compproc.inc
  3. 10 4
      rtl/inc/generic.inc
  4. 6 3
      rtl/powerpc/powerpc.inc

+ 6 - 3
rtl/i386/i386.inc

@@ -918,8 +918,8 @@ end;
 function fpc_pchar_to_shortstr(p:pchar):shortstring;[public,alias:'FPC_PCHAR_TO_SHORTSTR']; {$ifdef hascompilerproc} compilerproc; {$endif}
 {$include strpas.inc}
 
-{$define FPC_SYSTEM_HAS_STRLEN}
-function strlen(p:pchar):longint;assembler;
+{$define FPC_SYSTEM_HAS_FPC_PCHAR_LENGTH}
+function fpc_pchar_length(p:pchar):longint;assembler;[public,alias:'FPC_PCHAR_LENGTH']; {$ifdef hascompilerproc} compilerproc; {$endif}
 {$include strlen.inc}
 
 {$define FPC_SYSTEM_HAS_FPC_CHARARRAY_TO_SHORTSTR}
@@ -1174,7 +1174,10 @@ procedure inclocked(var l : longint);assembler;
 
 {
   $Log$
-  Revision 1.31  2002-10-02 18:21:51  peter
+  Revision 1.32  2002-10-05 14:20:16  peter
+    * fpc_pchar_length compilerproc and strlen alias
+
+  Revision 1.31  2002/10/02 18:21:51  peter
     * Copy() changed to internal function calling compilerprocs
     * FPC_SHORTSTR_COPY renamed to FPC_SHORTSTR_ASSIGN because of the
       new copy functions

+ 6 - 1
rtl/inc/compproc.inc

@@ -42,7 +42,9 @@ procedure fpc_Shortstr_SetLength(var s:shortstring;len:StrLenInt); compilerproc;
 function fpc_shortstr_to_shortstr(len:longint; const sstr: shortstring): shortstring; compilerproc;
 function fpc_shortstr_concat(const s1,s2:shortstring): shortstring; compilerproc;
 function fpc_shortstr_compare(const dstr,sstr:shortstring) : longint; compilerproc;
+
 function fpc_pchar_to_shortstr(p:pchar):shortstring; compilerproc;
+function fpc_pchar_length(p:pchar):longint; compilerproc;
 
 function fpc_chararray_to_shortstr(const arr: array of char):shortstring; compilerproc;
 function fpc_shortstr_to_chararray(arraysize: longint; const src: ShortString): fpc_big_chararray; compilerproc;
@@ -265,7 +267,10 @@ function fpc_qword_to_double(q: qword): double; compilerproc;
 
 {
   $Log$
-  Revision 1.24  2002-10-02 18:21:51  peter
+  Revision 1.25  2002-10-05 14:20:16  peter
+    * fpc_pchar_length compilerproc and strlen alias
+
+  Revision 1.24  2002/10/02 18:21:51  peter
     * Copy() changed to internal function calling compilerprocs
     * FPC_SHORTSTR_COPY renamed to FPC_SHORTSTR_ASSIGN because of the
       new copy functions

+ 10 - 4
rtl/inc/generic.inc

@@ -642,6 +642,9 @@ end;
 { also add a strpas alias for internal use in the system unit (JM) }
 function strpas(p:pchar):shortstring; [external name 'FPC_PCHAR_TO_SHORTSTR'];
 
+{ also add a strlen alias for internal use in the system unit (JM) }
+function strlen(p:pchar):longint; [external name 'FPC_PCHAR_LENGTH'];
+
 {$ifndef FPC_SYSTEM_HAS_FPC_CHARARRAY_TO_SHORTSTR}
 
 {$ifdef hascompilerproc}
@@ -733,9 +736,9 @@ end;
 
 {$endif hascompilerproc}
 
-{$ifndef FPC_SYSTEM_HAS_STRLEN}
+{$ifndef FPC_SYSTEM_HAS_FPC_PCHAR_LENGTH}
 
-function strlen(p:pchar):longint;
+function fpc_pchar_length(p:pchar):longint;assembler;[public,alias:'FPC_PCHAR_LENGTH']; {$ifdef hascompilerproc} compilerproc; {$endif}
 var i : longint;
 begin
   i:=0;
@@ -743,7 +746,7 @@ begin
   exit(i);
 end;
 
-{$endif ndef FPC_SYSTEM_HAS_STRLEN}
+{$endif ndef FPC_SYSTEM_HAS_FPC_PCHAR_LENGTH}
 
 {****************************************************************************
                        Caller/StackFrame Helpers
@@ -924,7 +927,10 @@ end;
 {$endif ndef FPC_SYSTEM_HAS_INT_STR_LONGWORD}
 {
   $Log$
-  Revision 1.38  2002-10-02 18:21:51  peter
+  Revision 1.39  2002-10-05 14:20:16  peter
+    * fpc_pchar_length compilerproc and strlen alias
+
+  Revision 1.38  2002/10/02 18:21:51  peter
     * Copy() changed to internal function calling compilerprocs
     * FPC_SHORTSTR_COPY renamed to FPC_SHORTSTR_ASSIGN because of the
       new copy functions

+ 6 - 3
rtl/powerpc/powerpc.inc

@@ -853,8 +853,8 @@ assembler;
 {$include strpas.inc}
 
 
-{$define FPC_SYSTEM_HAS_STRLEN}
-function strlen(p:pchar):longint;assembler;
+{$define FPC_SYSTEM_HAS_FPC_PCHAR_LENGTH}
+function fpc_pchar_length(p:pchar):longint;assembler;[public,alias:'FPC_PCHAR_LENGTH']; {$ifdef hascompilerproc} compilerproc; {$endif}
 {$include strlen.inc}
 
 
@@ -964,7 +964,10 @@ end ['R3','R10'];
 
 {
   $Log$
-  Revision 1.21  2002-10-02 18:21:52  peter
+  Revision 1.22  2002-10-05 14:20:16  peter
+    * fpc_pchar_length compilerproc and strlen alias
+
+  Revision 1.21  2002/10/02 18:21:52  peter
     * Copy() changed to internal function calling compilerprocs
     * FPC_SHORTSTR_COPY renamed to FPC_SHORTSTR_ASSIGN because of the
       new copy functions