Browse Source

* widestring conversion routines takes a widechar so no
information is lost

mazen 21 years ago
parent
commit
b65cffcdef
2 changed files with 13 additions and 5 deletions
  1. 6 2
      rtl/inc/compproc.inc
  2. 7 3
      rtl/inc/wstrings.inc

+ 6 - 2
rtl/inc/compproc.inc

@@ -156,7 +156,7 @@ Function fpc_WideStr_To_AnsiStr (const S2 : WideString): AnsiString; compilerpro
 Function fpc_AnsiStr_To_WideStr (Const S2 : AnsiString): WideString; compilerproc;
 Function fpc_AnsiStr_To_WideStr (Const S2 : AnsiString): WideString; compilerproc;
 Procedure fpc_WideStr_Assign (Var S1 : Pointer;S2 : Pointer); compilerproc;
 Procedure fpc_WideStr_Assign (Var S1 : Pointer;S2 : Pointer); compilerproc;
 Function fpc_WideStr_Concat (const S1,S2 : WideString) : WideString; compilerproc;
 Function fpc_WideStr_Concat (const S1,S2 : WideString) : WideString; compilerproc;
-Function fpc_Char_To_WideStr(const c : Char): WideString; compilerproc;
+Function fpc_Char_To_WideStr(const c : WideChar): WideString; compilerproc;
 Function fpc_PChar_To_WideStr(const p : pchar): WideString; compilerproc;
 Function fpc_PChar_To_WideStr(const p : pchar): WideString; compilerproc;
 Function fpc_CharArray_To_WideStr(const arr: array of char): WideString; compilerproc;
 Function fpc_CharArray_To_WideStr(const arr: array of char): WideString; compilerproc;
 function fpc_widestr_to_chararray(arraysize: SizeInt; const src: WideString): fpc_big_chararray; compilerproc;
 function fpc_widestr_to_chararray(arraysize: SizeInt; const src: WideString): fpc_big_chararray; compilerproc;
@@ -330,7 +330,11 @@ function fpc_qword_to_double(q: qword): double; compilerproc;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.57  2004-05-31 14:31:57  peter
+  Revision 1.58  2004-09-29 14:55:49  mazen
+  * widestring conversion routines takes a widechar so no
+  information is lost
+
+  Revision 1.57  2004/05/31 14:31:57  peter
     * remove comment warnings
     * remove comment warnings
 
 
   Revision 1.56  2004/05/01 23:55:18  peter
   Revision 1.56  2004/05/01 23:55:18  peter

+ 7 - 3
rtl/inc/wstrings.inc

@@ -434,7 +434,7 @@ begin
 end;
 end;
 
 
 
 
-Function fpc_Char_To_WideStr(const c : Char): WideString; {$ifdef hascompilerproc} compilerproc; {$endif}
+Function fpc_Char_To_WideStr(const c : WideChar): WideString; {$ifdef hascompilerproc} compilerproc; {$endif}
 {
 {
   Converts a Char to a WideString;
   Converts a Char to a WideString;
 }
 }
@@ -450,7 +450,7 @@ end;
 
 
 { old style helper }
 { old style helper }
 {$ifndef hascompilerproc}
 {$ifndef hascompilerproc}
-Procedure fpc_Char_To_WideStr(var S1 : Pointer; c : Char);[Public, alias: 'FPC_CHAR_TO_WIDESTR'];
+Procedure fpc_Char_To_WideStr(var S1 : Pointer; c : WideChar);[Public, alias: 'FPC_CHAR_TO_WIDESTR'];
 begin
 begin
   s1 := pointer(fpc_Char_To_WideStr(c));
   s1 := pointer(fpc_Char_To_WideStr(c));
 end;
 end;
@@ -1237,7 +1237,11 @@ function Utf8ToAnsi(const s : UTF8String) : ansistring;{$ifdef SYSTEMINLINE}inli
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.43  2004-09-18 10:23:08  jonas
+  Revision 1.44  2004-09-29 14:55:49  mazen
+  * widestring conversion routines takes a widechar so no
+  information is lost
+
+  Revision 1.43  2004/09/18 10:23:08  jonas
     - removed unused local variable
     - removed unused local variable
     * fixed bug in Utf8ToUnicode (use of uninitialised variable)
     * fixed bug in Utf8ToUnicode (use of uninitialised variable)