Use USE_INTERNAL_UNICODE to be able to test fpwidestrings on different targets

git-svn-id: trunk@38758 -
This commit is contained in:
pierre 2018-04-12 20:51:13 +00:00
parent 52b830a434
commit 5ae4724a5b
8 changed files with 96 additions and 35 deletions

View File

@ -1,20 +1,27 @@
{%skiptarget=wince} {%skiptarget=wince}
{$codepage utf-8} {$codepage utf-8}
{$ifdef go32v2} {$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT} {$define USE_INTERNAL_UNICODE}
{$define USE_UNICODEDUCET_UNIT}
{$endif} {$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 darwin}iosxwstr{$else}cwstring{$endif},
{$endif} {$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
{$endif} {$endif}
{$ifdef USE_UNICODEDUCET_UNIT} {$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet, unicodeducet,
{$endif} {$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
sysutils; sysutils;
procedure doerror(i : integer); procedure doerror(i : integer);

View File

@ -1,19 +1,26 @@
{$codepage utf-8} {$codepage utf-8}
{$ifdef go32v2} {$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT} {$define USE_INTERNAL_UNICODE}
{$define USE_UNICODEDUCET_UNIT}
{$endif} {$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 darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix} {$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
{$endif} {$endif}
{$ifdef USE_UNICODEDUCET_UNIT} {$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet, unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif} {$endif}
sysutils; sysutils;

View File

@ -1,18 +1,26 @@
{$ifdef go32v2} {$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT} {$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT} {$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif} {$endif}
uses uses
{$ifdef unix} {$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif} {$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
{$endif} {$endif}
{$ifdef USE_UNICODEDUCET_UNIT} {$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet; unicodeducet,
{$endif} {$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
strings;
var var
w : widestring; w : widestring;

View File

@ -1,17 +1,26 @@
{$ifdef go32v2} {$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT} {$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT} {$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif} {$endif}
uses uses
{$ifdef unix} {$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif} {$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
{$endif} {$endif}
{$ifdef USE_UNICODEDUCET_UNIT} {$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet; unicodeducet,
{$endif} {$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
strings;
var var
i : longint; i : longint;

View File

@ -4,18 +4,26 @@
{$endif fpc} {$endif fpc}
{$ifdef go32v2} {$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT} {$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT} {$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif} {$endif}
uses uses
{$ifdef unix} {$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif} {$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
{$endif} {$endif}
{$ifdef USE_UNICODEDUCET_UNIT} {$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet, unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif} {$endif}
Classes, SysUtils; Classes, SysUtils;

View File

@ -2,18 +2,26 @@
{$codepage utf-8} {$codepage utf-8}
{$ifdef go32v2} {$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT} {$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT} {$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif} {$endif}
uses uses
{$ifdef unix} {$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif} {$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
{$endif} {$endif}
{$ifdef USE_UNICODEDUCET_UNIT} {$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet, unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif} {$endif}
sysutils; sysutils;

View File

@ -1,18 +1,26 @@
{$codepage utf-8} {$codepage utf-8}
{$ifdef go32v2} {$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT} {$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT} {$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif} {$endif}
uses uses
{$ifdef unix} {$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix} {$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
{$endif} {$endif}
{$ifdef USE_UNICODEDUCET_UNIT} {$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet, unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif} {$endif}
sysutils; sysutils;

View File

@ -1,21 +1,27 @@
{$codepage utf8} {$codepage utf8}
{$ifdef go32v2} {$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT} {$define USE_INTERNAL_UNICODE}
{$define USE_UNICODEDUCET_UNIT}
{$endif} {$endif}
{$ifdef unix} {$ifdef USE_INTERNAL_UNICODE}
uses {$define USE_FPWIDESTRING_UNIT}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif}; {$define USE_UNICODEDUCET_UNIT}
{$else} {$define USE_CPALL_UNIT}
{$endif}
uses uses
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT} {$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring, fpwidestring,
{$endif} {$endif}
{$ifdef USE_UNICODEDUCET_UNIT} {$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet, unicodeducet,
{$endif} {$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
{ The unit strings is not really used here, { The unit strings is not really used here,
but simpifies the conditional construction but simpifies the conditional construction
for fpwidestring and unicodeducet use } for fpwidestring and unicodeducet use }