mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 11:59:19 +02:00
* very basic widestring support
This commit is contained in:
parent
a5ad88d254
commit
89c403c529
@ -95,7 +95,7 @@ implementation
|
|||||||
(bvoid,bvoid,bchar,
|
(bvoid,bvoid,bchar,
|
||||||
bint,bint,bint,
|
bint,bint,bint,
|
||||||
bint,bint,bint,
|
bint,bint,bint,
|
||||||
bbool,bbool,bbool,bint,bint);
|
bbool,bbool,bbool,bint,bint,bchar);
|
||||||
|
|
||||||
basedefconverts : array[tbasedef,tbasedef] of tconverttype =
|
basedefconverts : array[tbasedef,tbasedef] of tconverttype =
|
||||||
((tc_not_possible,tc_not_possible,tc_not_possible,tc_not_possible),
|
((tc_not_possible,tc_not_possible,tc_not_possible,tc_not_possible),
|
||||||
@ -847,7 +847,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.52 1999-12-16 19:12:04 peter
|
Revision 1.53 1999-12-18 14:55:21 florian
|
||||||
|
* very basic widestring support
|
||||||
|
|
||||||
|
Revision 1.52 1999/12/16 19:12:04 peter
|
||||||
* allow constant pointer^ also for assignment
|
* allow constant pointer^ also for assignment
|
||||||
|
|
||||||
Revision 1.51 1999/12/09 09:35:54 peter
|
Revision 1.51 1999/12/09 09:35:54 peter
|
||||||
|
@ -1131,6 +1131,7 @@ begin
|
|||||||
def_symbol('SYSTEMTVARREC');
|
def_symbol('SYSTEMTVARREC');
|
||||||
def_symbol('INCLUDEOK');
|
def_symbol('INCLUDEOK');
|
||||||
def_symbol('NEWMM');
|
def_symbol('NEWMM');
|
||||||
|
def_symbol('HASWIDECHAR');
|
||||||
{$ifdef FPC_USE_CPREFIX}
|
{$ifdef FPC_USE_CPREFIX}
|
||||||
{ default on next round }
|
{ default on next round }
|
||||||
def_symbol('FPC_USE_CPREFIX');
|
def_symbol('FPC_USE_CPREFIX');
|
||||||
@ -1338,7 +1339,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.42 1999-12-11 18:53:31 jonas
|
Revision 1.43 1999-12-18 14:55:21 florian
|
||||||
|
* very basic widestring support
|
||||||
|
|
||||||
|
Revision 1.42 1999/12/11 18:53:31 jonas
|
||||||
* fixed type conversions of results of operations with cardinals
|
* fixed type conversions of results of operations with cardinals
|
||||||
(between -dcardinalmulfix)
|
(between -dcardinalmulfix)
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ begin
|
|||||||
p^.insert(new(ptypesym,initdef('qword',cu64bitdef)));
|
p^.insert(new(ptypesym,initdef('qword',cu64bitdef)));
|
||||||
p^.insert(new(ptypesym,initdef('int64',cs64bitdef)));
|
p^.insert(new(ptypesym,initdef('int64',cs64bitdef)));
|
||||||
p^.insert(new(ptypesym,initdef('char',cchardef)));
|
p^.insert(new(ptypesym,initdef('char',cchardef)));
|
||||||
|
p^.insert(new(ptypesym,initdef('widechar',cwidechardef)));
|
||||||
p^.insert(new(ptypesym,initdef('shortstring',cshortstringdef)));
|
p^.insert(new(ptypesym,initdef('shortstring',cshortstringdef)));
|
||||||
p^.insert(new(ptypesym,initdef('longstring',clongstringdef)));
|
p^.insert(new(ptypesym,initdef('longstring',clongstringdef)));
|
||||||
p^.insert(new(ptypesym,initdef('ansistring',cansistringdef)));
|
p^.insert(new(ptypesym,initdef('ansistring',cansistringdef)));
|
||||||
@ -139,6 +140,7 @@ begin
|
|||||||
p^.insert(new(ptypesym,initdef('WORDBOOL',new(porddef,init(bool16bit,0,1)))));
|
p^.insert(new(ptypesym,initdef('WORDBOOL',new(porddef,init(bool16bit,0,1)))));
|
||||||
p^.insert(new(ptypesym,initdef('LONGBOOL',new(porddef,init(bool32bit,0,1)))));
|
p^.insert(new(ptypesym,initdef('LONGBOOL',new(porddef,init(bool32bit,0,1)))));
|
||||||
p^.insert(new(ptypesym,initdef('CHAR',cchardef)));
|
p^.insert(new(ptypesym,initdef('CHAR',cchardef)));
|
||||||
|
p^.insert(new(ptypesym,initdef('WIDECHAR',cwidechardef)));
|
||||||
p^.insert(new(ptypesym,initdef('TEXT',new(pfiledef,inittext))));
|
p^.insert(new(ptypesym,initdef('TEXT',new(pfiledef,inittext))));
|
||||||
p^.insert(new(ptypesym,initdef('CARDINAL',u32bitdef)));
|
p^.insert(new(ptypesym,initdef('CARDINAL',u32bitdef)));
|
||||||
p^.insert(new(ptypesym,initdef('FIXED',new(pfloatdef,init(f32bit)))));
|
p^.insert(new(ptypesym,initdef('FIXED',new(pfloatdef,init(f32bit)))));
|
||||||
@ -163,6 +165,7 @@ begin
|
|||||||
cformaldef:=pformaldef(globaldef('formal'));
|
cformaldef:=pformaldef(globaldef('formal'));
|
||||||
voiddef:=porddef(globaldef('void'));
|
voiddef:=porddef(globaldef('void'));
|
||||||
cchardef:=porddef(globaldef('char'));
|
cchardef:=porddef(globaldef('char'));
|
||||||
|
cwidechardef:=porddef(globaldef('char'));
|
||||||
cshortstringdef:=pstringdef(globaldef('shortstring'));
|
cshortstringdef:=pstringdef(globaldef('shortstring'));
|
||||||
clongstringdef:=pstringdef(globaldef('longstring'));
|
clongstringdef:=pstringdef(globaldef('longstring'));
|
||||||
cansistringdef:=pstringdef(globaldef('ansistring'));
|
cansistringdef:=pstringdef(globaldef('ansistring'));
|
||||||
@ -202,6 +205,7 @@ begin
|
|||||||
cs64bitdef:=new(porddef,init(s64bit,0,0));
|
cs64bitdef:=new(porddef,init(s64bit,0,0));
|
||||||
booldef:=new(porddef,init(bool8bit,0,1));
|
booldef:=new(porddef,init(bool8bit,0,1));
|
||||||
cchardef:=new(porddef,init(uchar,0,255));
|
cchardef:=new(porddef,init(uchar,0,255));
|
||||||
|
cwidechardef:=new(porddef,init(uwidechar,0,65535));
|
||||||
cshortstringdef:=new(pstringdef,shortinit(255));
|
cshortstringdef:=new(pstringdef,shortinit(255));
|
||||||
{ should we give a length to the default long and ansi string definition ?? }
|
{ should we give a length to the default long and ansi string definition ?? }
|
||||||
clongstringdef:=new(pstringdef,longinit(-1));
|
clongstringdef:=new(pstringdef,longinit(-1));
|
||||||
@ -237,7 +241,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.30 1999-11-30 10:40:51 peter
|
Revision 1.31 1999-12-18 14:55:21 florian
|
||||||
|
* very basic widestring support
|
||||||
|
|
||||||
|
Revision 1.30 1999/11/30 10:40:51 peter
|
||||||
+ ttype, tsymlist
|
+ ttype, tsymlist
|
||||||
|
|
||||||
Revision 1.29 1999/11/06 14:34:23 peter
|
Revision 1.29 1999/11/06 14:34:23 peter
|
||||||
|
@ -148,6 +148,11 @@ unit ptconst;
|
|||||||
Message(cg_e_illegal_expression);
|
Message(cg_e_illegal_expression);
|
||||||
curconstsegment^.concat(new(pai_const,init_8bit(p^.value)));
|
curconstsegment^.concat(new(pai_const,init_8bit(p^.value)));
|
||||||
end;
|
end;
|
||||||
|
uwidechar : begin
|
||||||
|
if not is_constcharnode(p) then
|
||||||
|
Message(cg_e_illegal_expression);
|
||||||
|
curconstsegment^.concat(new(pai_const,init_16bit(p^.value)));
|
||||||
|
end;
|
||||||
u16bit,
|
u16bit,
|
||||||
s16bit : begin
|
s16bit : begin
|
||||||
if not is_constintnode(p) then
|
if not is_constintnode(p) then
|
||||||
@ -764,7 +769,10 @@ unit ptconst;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.59 1999-11-30 10:40:51 peter
|
Revision 1.60 1999-12-18 14:55:21 florian
|
||||||
|
* very basic widestring support
|
||||||
|
|
||||||
|
Revision 1.59 1999/11/30 10:40:51 peter
|
||||||
+ ttype, tsymlist
|
+ ttype, tsymlist
|
||||||
|
|
||||||
Revision 1.58 1999/11/08 18:50:11 florian
|
Revision 1.58 1999/11/08 18:50:11 florian
|
||||||
|
@ -50,7 +50,7 @@ type
|
|||||||
u8bit,u16bit,u32bit,
|
u8bit,u16bit,u32bit,
|
||||||
s8bit,s16bit,s32bit,
|
s8bit,s16bit,s32bit,
|
||||||
bool8bit,bool16bit,bool32bit,
|
bool8bit,bool16bit,bool32bit,
|
||||||
u64bit,s64bit
|
u64bit,s64bit,uwidechar
|
||||||
);
|
);
|
||||||
|
|
||||||
{ float types }
|
{ float types }
|
||||||
@ -212,7 +212,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 1999-11-30 10:40:54 peter
|
Revision 1.8 1999-12-18 14:55:21 florian
|
||||||
|
* very basic widestring support
|
||||||
|
|
||||||
|
Revision 1.7 1999/11/30 10:40:54 peter
|
||||||
+ ttype, tsymlist
|
+ ttype, tsymlist
|
||||||
|
|
||||||
Revision 1.6 1999/11/17 17:05:04 pierre
|
Revision 1.6 1999/11/17 17:05:04 pierre
|
||||||
|
@ -1026,7 +1026,7 @@
|
|||||||
savesize:=1;
|
savesize:=1;
|
||||||
|
|
||||||
u16bit,s16bit,
|
u16bit,s16bit,
|
||||||
bool16bit:
|
bool16bit,uwidechar:
|
||||||
savesize:=2;
|
savesize:=2;
|
||||||
|
|
||||||
s32bit,u32bit,
|
s32bit,u32bit,
|
||||||
@ -1130,6 +1130,8 @@
|
|||||||
bool8bit:
|
bool8bit:
|
||||||
rttilist^.concat(new(pai_const,init_8bit(tkBool)));
|
rttilist^.concat(new(pai_const,init_8bit(tkBool)));
|
||||||
uchar:
|
uchar:
|
||||||
|
rttilist^.concat(new(pai_const,init_8bit(tkWChar)));
|
||||||
|
uwidechar:
|
||||||
rttilist^.concat(new(pai_const,init_8bit(tkChar)));
|
rttilist^.concat(new(pai_const,init_8bit(tkChar)));
|
||||||
else
|
else
|
||||||
rttilist^.concat(new(pai_const,init_8bit(tkInteger)));
|
rttilist^.concat(new(pai_const,init_8bit(tkInteger)));
|
||||||
@ -1152,7 +1154,7 @@
|
|||||||
names : array[tbasetype] of string[20] = ('<unknown type>',
|
names : array[tbasetype] of string[20] = ('<unknown type>',
|
||||||
'untyped','Char','Byte','Word','DWord','ShortInt',
|
'untyped','Char','Byte','Word','DWord','ShortInt',
|
||||||
'SmallInt','LongInt','Boolean','WordBool',
|
'SmallInt','LongInt','Boolean','WordBool',
|
||||||
'LongBool','QWord','Int64');
|
'LongBool','QWord','Int64','WideChar');
|
||||||
|
|
||||||
begin
|
begin
|
||||||
gettypename:=names[typ];
|
gettypename:=names[typ];
|
||||||
@ -3841,7 +3843,10 @@ Const local_symtable_index : longint = $8001;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.180 1999-12-06 18:21:03 peter
|
Revision 1.181 1999-12-18 14:55:21 florian
|
||||||
|
* very basic widestring support
|
||||||
|
|
||||||
|
Revision 1.180 1999/12/06 18:21:03 peter
|
||||||
* support !ENVVAR for long commandlines
|
* support !ENVVAR for long commandlines
|
||||||
* win32/go32v2 write short pathnames to link.res so c:\Program Files\ is
|
* win32/go32v2 write short pathnames to link.res so c:\Program Files\ is
|
||||||
finally supported as installdir.
|
finally supported as installdir.
|
||||||
|
@ -300,6 +300,7 @@ unit symtable;
|
|||||||
cformaldef : pformaldef; { unique formal definition }
|
cformaldef : pformaldef; { unique formal definition }
|
||||||
voiddef : porddef; { Pointer to Void (procedure) }
|
voiddef : porddef; { Pointer to Void (procedure) }
|
||||||
cchardef : porddef; { Pointer to Char }
|
cchardef : porddef; { Pointer to Char }
|
||||||
|
cwidechardef : porddef; { Pointer to WideChar }
|
||||||
booldef : porddef; { pointer to boolean type }
|
booldef : porddef; { pointer to boolean type }
|
||||||
u8bitdef : porddef; { Pointer to 8-Bit unsigned }
|
u8bitdef : porddef; { Pointer to 8-Bit unsigned }
|
||||||
u16bitdef : porddef; { Pointer to 16-Bit unsigned }
|
u16bitdef : porddef; { Pointer to 16-Bit unsigned }
|
||||||
@ -2791,7 +2792,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.70 1999-12-02 11:28:27 peter
|
Revision 1.71 1999-12-18 14:55:21 florian
|
||||||
|
* very basic widestring support
|
||||||
|
|
||||||
|
Revision 1.70 1999/12/02 11:28:27 peter
|
||||||
* moved verbose to implementation uses
|
* moved verbose to implementation uses
|
||||||
|
|
||||||
Revision 1.69 1999/12/01 22:32:35 pierre
|
Revision 1.69 1999/12/01 22:32:35 pierre
|
||||||
|
@ -116,6 +116,9 @@ Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile];
|
|||||||
|
|
||||||
{$i astrings.inc}
|
{$i astrings.inc}
|
||||||
|
|
||||||
|
{$ifdef haswidechar}
|
||||||
|
{$i wstrings.inc}
|
||||||
|
{$endif haswidechar}
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Run-Time Type Information (RTTI)
|
Run-Time Type Information (RTTI)
|
||||||
@ -590,7 +593,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.75 1999-12-12 13:29:34 jonas
|
Revision 1.76 1999-12-18 14:54:34 florian
|
||||||
|
* very basic widestring support
|
||||||
|
|
||||||
|
Revision 1.75 1999/12/12 13:29:34 jonas
|
||||||
* remove "random(longint): longint" if cardinalmulfixed is defined
|
* remove "random(longint): longint" if cardinalmulfixed is defined
|
||||||
|
|
||||||
Revision 1.74 1999/12/01 12:37:13 jonas
|
Revision 1.74 1999/12/01 12:37:13 jonas
|
||||||
|
@ -81,6 +81,9 @@ Type
|
|||||||
{ Zero - terminated strings }
|
{ Zero - terminated strings }
|
||||||
PChar = ^Char;
|
PChar = ^Char;
|
||||||
PPChar = ^PChar;
|
PPChar = ^PChar;
|
||||||
|
{$ifdef HASWIDECHAR}
|
||||||
|
PWideChar = ^WideChar;
|
||||||
|
{$endif HASWIDECHAR}
|
||||||
|
|
||||||
{ procedure type }
|
{ procedure type }
|
||||||
TProcedure = Procedure;
|
TProcedure = Procedure;
|
||||||
@ -402,7 +405,10 @@ const
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.70 1999-12-12 13:29:34 jonas
|
Revision 1.71 1999-12-18 14:55:05 florian
|
||||||
|
* very basic widestring support
|
||||||
|
|
||||||
|
Revision 1.70 1999/12/12 13:29:34 jonas
|
||||||
* remove "random(longint): longint" if cardinalmulfixed is defined
|
* remove "random(longint): longint" if cardinalmulfixed is defined
|
||||||
|
|
||||||
Revision 1.69 1999/12/01 12:37:13 jonas
|
Revision 1.69 1999/12/01 12:37:13 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user