Add units required for wide strings support for go32v2 target

git-svn-id: trunk@38743 -
This commit is contained in:
pierre 2018-04-12 14:37:16 +00:00
parent bd18d947bd
commit 823bb7bd07
23 changed files with 427 additions and 42 deletions

View File

@ -12,6 +12,15 @@ program talign2;
{$ifdef fpc} {$ifdef fpc}
{$mode objfpc} {$mode objfpc}
{$define haswidestring} {$define haswidestring}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
{$else} {$else}
{$ifndef ver70} {$ifndef ver70}
{$define haswidestring} {$define haswidestring}
@ -19,10 +28,23 @@ program talign2;
{$endif} {$endif}
{$ifdef fpc} {$ifdef fpc}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
uses uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$endif} {$endif unix}
{$else USE_INTERNAL_UNICODE}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall;
{$endif}
{$endif USE_INTERNAL_UNICODE}
{$endif} {$endif}
{$ifdef CPUI8086} {$ifdef CPUI8086}

View File

@ -7,10 +7,12 @@
{$define USE_UNICODEDUCET_UNIT} {$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT} {$define USE_CPALL_UNIT}
{$endif} {$endif}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
uses uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$else} {$endif}
{$else def USE_INTERNAL_UNICODE}
uses uses
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
@ -25,7 +27,7 @@ uses
but simpifies the conditional construction but simpifies the conditional construction
for fpwidestring and unicodeducet use } for fpwidestring and unicodeducet use }
strings; strings;
{$endif} {$endif def USE_INTERNAL_UNICODE}
type type
tcpstr1 = type AnsiString(1253); tcpstr1 = type AnsiString(1253);

View File

@ -13,10 +13,12 @@ program tcpstr13;
{$endif} {$endif}
{$mode delphi} {$mode delphi}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
uses uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$else} {$endif unix}
{$else def USE_INTERNAL_UNICODE}
uses uses
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
@ -31,7 +33,7 @@ uses
but simpifies the conditional construction but simpifies the conditional construction
for fpwidestring and unicodeducet use } for fpwidestring and unicodeducet use }
strings; strings;
{$endif} {$endif def USE_INTERNAL_UNICODE}
type type

View File

@ -16,10 +16,12 @@ program tcpstr17;
{$endif} {$endif}
{$apptype console} {$apptype console}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
uses uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$else} {$endif unix}
{$else def USE_INTERNAL_UNICODE}
uses uses
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
@ -34,7 +36,7 @@ uses
but simpifies the conditional construction but simpifies the conditional construction
for fpwidestring and unicodeducet use } for fpwidestring and unicodeducet use }
strings; strings;
{$endif} {$endif def USE_INTERNAL_UNICODE}
const const
{$ifdef android} {$ifdef android}

View File

@ -1,14 +1,41 @@
// to have correct test result with delphi set codepage option to 866 // to have correct test result with delphi set codepage option to 866
program tcpstr17; program tcpstr18;
{$apptype console} {$apptype console}
{$ifdef fpc} {$ifdef fpc}
{$mode delphi} {$mode delphi}
{$codepage cp866} {$codepage cp866}
{$endif} {$endif}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
uses uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$endif unix}
{$else USE_INTERNAL_UNICODE}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
{ The unit strings is not really used here,
but simpifies the conditional construction
for fpwidestring and unicodeducet use }
strings;
{$endif def USE_INTERNAL_UNICODE}
{$endif} {$endif}
procedure TestRawByte(const Source: RawByteString; cp: word; const reason: integer); procedure TestRawByte(const Source: RawByteString; cp: word; const reason: integer);

View File

@ -22,9 +22,11 @@ program tcpstr19;
{$endif} {$endif}
uses uses
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif} {$endif}
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
{$endif} {$endif}

View File

@ -8,10 +8,12 @@
{$define USE_CPALL_UNIT} {$define USE_CPALL_UNIT}
{$endif} {$endif}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
uses uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$else} {$endif unix}
{$else def USE_INTERNAL_UNICODE}
uses uses
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
@ -26,7 +28,7 @@ uses
but simpifies the conditional construction but simpifies the conditional construction
for fpwidestring and unicodeducet use } for fpwidestring and unicodeducet use }
strings; strings;
{$endif} {$endif def USE_INTERNAL_UNICODE}
var var

View File

@ -11,10 +11,12 @@
program tcpstr9; program tcpstr9;
{$mode delphiunicode} {$mode delphiunicode}
{$apptype console} {$apptype console}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
uses uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$else} {$endif unix}
{$else def USE_INTERNAL_UNICODE}
uses uses
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
@ -29,7 +31,7 @@ uses
but simpifies the conditional construction but simpifies the conditional construction
for fpwidestring and unicodeducet use } for fpwidestring and unicodeducet use }
strings; strings;
{$endif} {$endif def USE_INTERNAL_UNICODE}
begin begin
// this test can be only run with the compiler built right now on the // this test can be only run with the compiler built right now on the

View File

@ -4,12 +4,33 @@ program tstrutils1;
{$mode objfpc} {$mode objfpc}
{$h+} {$h+}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses uses
{SysUtils, } {SysUtils, }
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix} {$endif unix}
{$else USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
{$endif def USE_INTERNAL_UNICODE}
StrUtils; StrUtils;
var var

View File

@ -1,6 +1,15 @@
{$codepage utf8} {$codepage utf8}
program tstrutils2; program tstrutils2;
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
// tests MBCS compatibility of strutils ansistartstext and -endstext. // tests MBCS compatibility of strutils ansistartstext and -endstext.
// (case-insensitive) // (case-insensitive)
@ -8,11 +17,22 @@ program tstrutils2;
{$h+} {$h+}
uses uses
StrUtils {$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
,{$ifdef darwin}iosxwstr{$else}cwstring{$endif} {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix} {$endif unix}
; {$else USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
{$endif def USE_INTERNAL_UNICODE}
StrUtils;
var var
ResultCounter: Integer = 0; ResultCounter: Integer = 0;

View File

@ -1,7 +1,34 @@
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
uses uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$endif unix} {$endif}
{$else USE_INTERNAL_UNICODE}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
{ The unit strings is not really used here,
but simpifies the conditional construction
for fpwidestring and unicodeducet use }
strings;
{$endif}
{$endif def USE_INTERNAL_UNICODE}
var var
w : unicodestring; w : unicodestring;

View File

@ -1,7 +1,34 @@
{$ifdef UNIX} {$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix}
uses uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$endif UNIX} {$endif}
{$else USE_INTERNAL_UNICODE}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
{ The unit strings is not really used here,
but simpifies the conditional construction
for fpwidestring and unicodeducet use }
strings;
{$endif}
{$endif def USE_INTERNAL_UNICODE}
var var
i : longint; i : longint;

View File

@ -3,10 +3,31 @@
{$mode objfpc} {$mode objfpc}
{$endif fpc} {$endif fpc}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses uses
{$ifdef unix} {$ifdef unix}
cthreads, {$ifdef darwin}iosxwstr{$else}cwstring{$endif}, cthreads,
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif ndef USE_INTERNAL_UNICODE}
{$endif} {$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
Classes, SysUtils; Classes, SysUtils;
type type

View File

@ -5,11 +5,31 @@
{$codepage utf-8} {$codepage utf-8}
{$mode objfpc} {$mode objfpc}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses uses
{$ifdef unix} {$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifdef unix}
{$endif} {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif}
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
SysUtils; SysUtils;
{$i+} {$i+}

View File

@ -13,10 +13,37 @@ Program tdir;
{$codepage utf-8} {$codepage utf-8}
{$I-} {$I-}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix} {$ifdef unix}
uses uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$endif unix}
{$else USE_INTERNAL_UNICODE}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
{ The unit strings is not really used here,
but simpifies the conditional construction
for fpwidestring and unicodeducet use }
strings;
{$endif} {$endif}
{$endif def USE_INTERNAL_UNICODE}
procedure test(value, required: longint); procedure test(value, required: longint);
begin begin

View File

@ -1,10 +1,31 @@
{$codepage utf8} {$codepage utf8}
{$mode objfpc}{$h+} {$mode objfpc}{$h+}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses uses
{$ifdef unix} {$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif ndef USE_INTERNAL_UNICODE}
{$endif} {$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
sysutils; sysutils;
const const

View File

@ -24,10 +24,30 @@
{$mode delphi} {$mode delphi}
{$endif fpc} {$endif fpc}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses uses
{$ifdef unix} {$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix} {$endif unix}
{$endif not USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
SysUtils; SysUtils;
var var

View File

@ -22,15 +22,34 @@ program TFExpand;
{$DEFINE DEBUG} {$DEFINE DEBUG}
(* Defining DEBUG causes all the source and target strings *) (* Defining DEBUG causes all the source and target strings *)
(* to be written to the console to make debugging easier. *) (* to be written to the console to make debugging easier. *)
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses uses
{$ifdef FPC} {$ifdef FPC}
PopupErr, PopupErr,
{$endif FPC} {$endif FPC}
{$ifdef unix} {$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifdef unix}
{$endif} {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
SysUtils; {$endif unix}
{$endif not USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
SysUtils;
{$IFDEF LINUX} {$IFDEF LINUX}
{$IFNDEF UNIX} {$IFNDEF UNIX}

View File

@ -2,10 +2,30 @@
{$codepage utf8} {$codepage utf8}
uses {$ifdef go32v2}
{$ifdef unix} {$define USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif} {$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix}
{$endif not USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
SysUtils; SysUtils;
procedure tffirstutf8; procedure tffirstutf8;
@ -233,4 +253,4 @@ end;
begin begin
tffirstutf8; tffirstutf8;
tffirstutf16; tffirstutf16;
end. end.

View File

@ -1,10 +1,32 @@
{ %interactive } { %interactive }
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses uses
{$ifdef unix} {$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
clocale, clocale,
{$endif} {$endif}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix}
{$endif not USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
SysUtils; SysUtils;
procedure PrintSettings; procedure PrintSettings;

View File

@ -23,11 +23,30 @@
{$ifdef fpc} {$ifdef fpc}
{$mode delphi} {$mode delphi}
{$endif fpc} {$endif fpc}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses uses
{$ifdef unix} {$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix} {$endif unix}
{$endif not USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
SysUtils; SysUtils;
var var

View File

@ -1,11 +1,31 @@
{$codepage utf8} {$codepage utf8}
{$mode objfpc}{$h+} {$mode objfpc}{$h+}
uses {$ifdef go32v2}
{$ifdef unix} {$define USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif} {$endif}
sysutils;
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix}
{$endif not USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
SysUtils;
type type
tcpstr866 = type ansistring(866); tcpstr866 = type ansistring(866);

View File

@ -25,10 +25,30 @@
{$modeswitch unicodestrings} {$modeswitch unicodestrings}
{$endif fpc} {$endif fpc}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses uses
{$ifdef unix} {$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix} {$endif unix}
{$endif not USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
SysUtils; SysUtils;
var var