Browse Source

* o2s -> ord2str, s2o -> str2ord

git-svn-id: branches/fpc_2_3@6571 -
daniel 18 years ago
parent
commit
56d69a42d0
4 changed files with 22 additions and 22 deletions
  1. 2 2
      rtl/inc/astrings.inc
  2. 10 10
      rtl/inc/sstrings.inc
  3. 7 7
      rtl/inc/text.inc
  4. 3 3
      rtl/inc/wstrings.inc

+ 2 - 2
rtl/inc/astrings.inc

@@ -863,12 +863,12 @@ begin
   s:=ss;
 end;
 
-procedure fpc_ansistr_enum(ordinal,len:sizeint;typinfo,o2sindex:pointer;out s:shortstring);[public,alias:'FPC_ANSISTR_ENUM'];compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
+procedure fpc_ansistr_enum(ordinal,len:sizeint;typinfo,ord2strindex:pointer;out s:shortstring);[public,alias:'FPC_ANSISTR_ENUM'];compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
 
 var ss:shortstring;
 
 begin
-  fpc_shortstr_enum(ordinal,len,typinfo,o2sindex,ss);
+  fpc_shortstr_enum(ordinal,len,typinfo,ord2strindex,ss);
   s:=ss;
 end;
 

+ 10 - 10
rtl/inc/sstrings.inc

@@ -385,7 +385,7 @@ begin
   str_real(len,fr,d,treal_type(rt),s);
 end;
 
-procedure fpc_shortstr_enum(ordinal,len:sizeint;typinfo,o2sindex:pointer;out s:shortstring);[public,alias:'FPC_SHORTSTR_ENUM'];compilerproc;
+procedure fpc_shortstr_enum(ordinal,len:sizeint;typinfo,ord2strindex:pointer;out s:shortstring);[public,alias:'FPC_SHORTSTR_ENUM'];compilerproc;
 
 type  Ptypeinfo=^Ttypeinfo;
       Ttypeinfo=record
@@ -415,7 +415,7 @@ var e:Penuminfo;
 label error;
 
 begin
-  if Pcardinal(o2sindex)^=0 then
+  if Pcardinal(ord2strindex)^=0 then
     begin
       {The compiler did generate a lookup table.}
       with Penuminfo(Pbyte(typinfo)+2+length(Ptypeinfo(typinfo)^.name))^ do 
@@ -425,7 +425,7 @@ begin
           dec(ordinal,minvalue);
         end;
       {Get the address of the string.}
-      p:=Pshortstring((PPpointer(o2sindex)+1+ordinal)^);
+      p:=Pshortstring((PPpointer(ord2strindex)+1+ordinal)^);
       if p=nil then
         goto error;      {Invalid ordinal value for this enum.}
       s:=p^;
@@ -433,10 +433,10 @@ begin
   else
     begin
       {The compiler did generate a sorted array of (ordvalue,Pstring) tuples.}
-      sorted_array:=pointer(Pcardinal(o2sindex)+2);
+      sorted_array:=pointer(Pcardinal(ord2strindex)+2);
       {Use a binary search to get the string.}
       l:=0;
-      h:=(Pcardinal(o2sindex)+1)^-1;
+      h:=(Pcardinal(ord2strindex)+1)^-1;
       repeat
         m:=(l+h) div 2;
         if ordinal>sorted_array[m].o then
@@ -465,7 +465,7 @@ error:
 end;
 
 { also define alias for internal use in the system unit }
-procedure fpc_shortstr_enum(ordinal,len:sizeint;typinfo,o2sindex:pointer;out s:shortstring);external name 'FPC_SHORTSTR_ENUM';
+procedure fpc_shortstr_enum(ordinal,len:sizeint;typinfo,ord2strindex:pointer;out s:shortstring);external name 'FPC_SHORTSTR_ENUM';
 
 procedure fpc_shortstr_currency(c : currency; len,f : SizeInt; out s : shortstring);[public,alias:'FPC_SHORTSTR_CURRENCY']; compilerproc;
 const
@@ -1088,7 +1088,7 @@ begin
   code:=0;
 end;
 
-function fpc_val_enum_shortstr(s2oindex:pointer;const s:shortstring;out code:valsint):longint; [public, alias:'FPC_VAL_ENUM_SHORTSTR']; compilerproc;
+function fpc_val_enum_shortstr(str2ordindex:pointer;const s:shortstring;out code:valsint):longint; [public, alias:'FPC_VAL_ENUM_SHORTSTR']; compilerproc;
 
 type  Tsorted_array={$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}packed{$endif}record
         o:longint;
@@ -1109,10 +1109,10 @@ begin
   while (spaces<=length(s)) and (s[spaces]=' ')  do
     inc(spaces);
   t:=upcase(copy(s,spaces,255));
-  sorted_array:=pointer(Pcardinal(s2oindex)+1);
+  sorted_array:=pointer(Pcardinal(str2ordindex)+1);
   {Use a binary search to get the string.}
   l:=1;
-  h:=Pcardinal(s2oindex)^;
+  h:=Pcardinal(str2ordindex)^;
   repeat
     m:=(l+h) div 2;
     if t>upcase(sorted_array[m-1].s^) then
@@ -1139,7 +1139,7 @@ error:
 end;
 
 {Redeclare fpc_val_enum_shortstr for internal use in the system unit.}
-function fpc_val_enum_shortstr(s2oindex:pointer;const s:shortstring;out code:valsint):longint;external name 'FPC_VAL_ENUM_SHORTSTR';
+function fpc_val_enum_shortstr(str2ordindex:pointer;const s:shortstring;out code:valsint):longint;external name 'FPC_VAL_ENUM_SHORTSTR';
 
 function fpc_Val_Currency_ShortStr(const s : shortstring; out Code : ValSInt): currency; [public, alias:'FPC_VAL_CURRENCY_SHORTSTR']; compilerproc;
 const

+ 7 - 7
rtl/inc/text.inc

@@ -696,7 +696,7 @@ Begin
   Write_Str(Len,t,s);
 End;
 
-procedure fpc_write_text_enum(typinfo,o2sindex:pointer;len:sizeint;var t:text;ordinal:longint); iocheck; [Public,Alias:'FPC_WRITE_TEXT_ENUM']; compilerproc;
+procedure fpc_write_text_enum(typinfo,ord2strindex:pointer;len:sizeint;var t:text;ordinal:longint); iocheck; [Public,Alias:'FPC_WRITE_TEXT_ENUM']; compilerproc;
 
 type  Ptypeinfo=^Ttypeinfo;
       Ttypeinfo=record
@@ -732,7 +732,7 @@ begin
         inoutres:=103;
       exit;
     end;
-  if Pcardinal(o2sindex)^=0 then
+  if Pcardinal(ord2strindex)^=0 then
     begin
       {The compiler did generate a lookup table.}
       with Penuminfo(Pbyte(typinfo)+2+length(Ptypeinfo(typinfo)^.name))^ do
@@ -745,7 +745,7 @@ begin
           dec(ordinal,minvalue);
         end;
       {Get the address of the string.}
-      p:=Pshortstring((PPpointer(o2sindex)+1+ordinal)^);
+      p:=Pshortstring((PPpointer(ord2strindex)+1+ordinal)^);
       if p=nil then
         begin
           inoutres:=107;      {Invalid ordinal value for this enum.}
@@ -756,10 +756,10 @@ begin
   else
     begin
       {The compiler did generate a sorted array of (ordvalue,Pstring) tuples.}
-      sorted_array:=pointer(Pcardinal(o2sindex)+2);
+      sorted_array:=pointer(Pcardinal(ord2strindex)+2);
       {Use a binary search to get the string.}
       l:=0;
-      h:=(Pcardinal(o2sindex)+1)^-1;
+      h:=(Pcardinal(ord2strindex)+1)^-1;
       repeat
         m:=(l+h) div 2;
         if ordinal>sorted_array[m].o then
@@ -1190,7 +1190,7 @@ begin
    InOutRes:=106;
 end;
 
-procedure fpc_read_text_enum(s2oindex:pointer;var t:text;out ordinal:longint); iocheck; [Public,Alias:'FPC_READ_TEXT_ENUM'];compilerproc;
+procedure fpc_read_text_enum(str2ordindex:pointer;var t:text;out ordinal:longint); iocheck; [Public,Alias:'FPC_READ_TEXT_ENUM'];compilerproc;
 
 var s:string;
     code:longint;
@@ -1206,7 +1206,7 @@ begin
         exit;
       ReadNumeric(t,s);
     end;
-  ordinal:=fpc_val_enum_shortstr(s2oindex,s,code);
+  ordinal:=fpc_val_enum_shortstr(str2ordindex,s,code);
   if code<>0 then
    InOutRes:=106;
 end;

+ 3 - 3
rtl/inc/wstrings.inc

@@ -1163,7 +1163,7 @@ begin
     end;
 end;
 
-function fpc_val_enum_widestr(s2oindex:pointer;const s:widestring;out code:valsint):longint;compilerproc;
+function fpc_val_enum_widestr(str2ordindex:pointer;const s:widestring;out code:valsint):longint;compilerproc;
 
 var ss:shortstring;
 
@@ -1266,12 +1266,12 @@ begin
   s:=ss;
 end;
 
-procedure fpc_widestr_enum(ordinal,len:sizeint;typinfo,o2sindex:pointer;out s:widestring);compilerproc;
+procedure fpc_widestr_enum(ordinal,len:sizeint;typinfo,ord2strindex:pointer;out s:widestring);compilerproc;
 
 var ss:shortstring;
 
 begin
-  fpc_shortstr_enum(ordinal,len,typinfo,o2sindex,ss);
+  fpc_shortstr_enum(ordinal,len,typinfo,ord2strindex,ss);
   s:=ss;
 end;