mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-08 06:26:04 +02:00
+ changes for resourcestrings
This commit is contained in:
parent
87847fac70
commit
85ff3e15db
@ -151,7 +151,7 @@ unit hcodegen;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
systems,globals,files,strings;
|
systems,globals,files,strings,cresstr;
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
override the message calls to set codegenerror
|
override the message calls to set codegenerror
|
||||||
@ -253,7 +253,7 @@ implementation
|
|||||||
asmsymbollist:=new(pasmsymbollist,init);
|
asmsymbollist:=new(pasmsymbollist,init);
|
||||||
asmsymbollist^.usehash;
|
asmsymbollist^.usehash;
|
||||||
{ resourcestrings }
|
{ resourcestrings }
|
||||||
resourcestringlist:=nil;
|
ResetResourceStrings;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -276,8 +276,8 @@ implementation
|
|||||||
{ assembler symbols }
|
{ assembler symbols }
|
||||||
dispose(asmsymbollist,done);
|
dispose(asmsymbollist,done);
|
||||||
{ resource strings }
|
{ resource strings }
|
||||||
if assigned(resourcestringlist) then
|
{ if assigned(resourcestringlist) then
|
||||||
dispose(resourcestringlist,done);
|
dispose(resourcestringlist,done); }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -296,7 +296,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.39 1999-08-19 13:10:18 pierre
|
Revision 1.40 1999-08-24 12:01:32 michael
|
||||||
|
+ changes for resourcestrings
|
||||||
|
|
||||||
|
Revision 1.39 1999/08/19 13:10:18 pierre
|
||||||
+ faillabel for _FAIL
|
+ faillabel for _FAIL
|
||||||
|
|
||||||
Revision 1.38 1999/08/16 18:23:56 peter
|
Revision 1.38 1999/08/16 18:23:56 peter
|
||||||
|
@ -111,6 +111,39 @@ unit pmodules;
|
|||||||
{$endif GDB}
|
{$endif GDB}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Procedure InsertResourceTablesTable;
|
||||||
|
|
||||||
|
var
|
||||||
|
hp : pused_unit;
|
||||||
|
ResourceStringTables : taasmoutput;
|
||||||
|
count : longint;
|
||||||
|
begin
|
||||||
|
ResourceStringTables.init;
|
||||||
|
count:=0;
|
||||||
|
hp:=pused_unit(usedunits.first);
|
||||||
|
while assigned(hp) do
|
||||||
|
begin
|
||||||
|
If (hp^.u^.flags and uf_has_resources)=uf_has_resources then
|
||||||
|
ResourceStringTables.concat(new(pai_const_symbol,initname(hp^.u^.modulename^+'_RESOURCESTRINGTABLE')));
|
||||||
|
hp:=Pused_unit(hp^.next);
|
||||||
|
inc(count);
|
||||||
|
end;
|
||||||
|
{ TableCount }
|
||||||
|
With ResourceStringTables do
|
||||||
|
begin
|
||||||
|
insert(new(pai_const,init_32bit(count)));
|
||||||
|
insert(new(pai_symbol,initname_global('FPC_RESOURCESTRINGTABLES',0)));
|
||||||
|
concat(new(pai_symbol_end,initname('FPC_RESOURCESTRINGTABLES')));
|
||||||
|
end;
|
||||||
|
{ insert in data segment }
|
||||||
|
if (cs_smartlink in aktmoduleswitches) then
|
||||||
|
datasegment^.concat(new(pai_cut,init));
|
||||||
|
datasegment^.concatlist(@ResourceStringTables);
|
||||||
|
ResourceStringTables.done;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure InsertInitFinalTable;
|
procedure InsertInitFinalTable;
|
||||||
var
|
var
|
||||||
hp : pused_unit;
|
hp : pused_unit;
|
||||||
@ -1068,6 +1101,12 @@ unit pmodules;
|
|||||||
|
|
||||||
{ the last char should always be a point }
|
{ the last char should always be a point }
|
||||||
consume(_POINT);
|
consume(_POINT);
|
||||||
|
|
||||||
|
If ResourceStringList<>Nil then
|
||||||
|
begin
|
||||||
|
insertresourcestrings;
|
||||||
|
current_module^.flags:=current_module^.flags or uf_has_resources;
|
||||||
|
end;
|
||||||
|
|
||||||
{ avoid self recursive destructor call !! PM }
|
{ avoid self recursive destructor call !! PM }
|
||||||
aktprocsym^.definition^.localst:=nil;
|
aktprocsym^.definition^.localst:=nil;
|
||||||
@ -1324,10 +1363,11 @@ unit pmodules;
|
|||||||
|
|
||||||
{ insert heap }
|
{ insert heap }
|
||||||
insertresourcestrings;
|
insertresourcestrings;
|
||||||
|
insertResourceTablesTable;
|
||||||
insertinitfinaltable;
|
insertinitfinaltable;
|
||||||
insertheap;
|
insertheap;
|
||||||
inserttargetspecific;
|
inserttargetspecific;
|
||||||
|
|
||||||
datasize:=symtablestack^.datasize;
|
datasize:=symtablestack^.datasize;
|
||||||
|
|
||||||
{ finish asmlist by adding segment starts }
|
{ finish asmlist by adding segment starts }
|
||||||
@ -1369,7 +1409,10 @@ unit pmodules;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.142 1999-08-16 15:35:27 pierre
|
Revision 1.143 1999-08-24 12:01:34 michael
|
||||||
|
+ changes for resourcestrings
|
||||||
|
|
||||||
|
Revision 1.142 1999/08/16 15:35:27 pierre
|
||||||
* fix for DLL relocation problems
|
* fix for DLL relocation problems
|
||||||
* external bss vars had wrong stabs for pecoff
|
* external bss vars had wrong stabs for pecoff
|
||||||
+ -WB11000000 to specify default image base, allows to
|
+ -WB11000000 to specify default image base, allows to
|
||||||
|
@ -126,6 +126,7 @@ const
|
|||||||
uf_local_browser = $200;
|
uf_local_browser = $200;
|
||||||
uf_no_link = $400; { unit has no .o generated, but can still have
|
uf_no_link = $400; { unit has no .o generated, but can still have
|
||||||
external linking! }
|
external linking! }
|
||||||
|
uf_has_resources = $800; { unit has resource section }
|
||||||
|
|
||||||
type
|
type
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
@ -903,7 +904,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.38 1999-08-15 10:47:48 peter
|
Revision 1.39 1999-08-24 12:01:36 michael
|
||||||
|
+ changes for resourcestrings
|
||||||
|
|
||||||
|
Revision 1.38 1999/08/15 10:47:48 peter
|
||||||
+ normalset,smallset writing
|
+ normalset,smallset writing
|
||||||
|
|
||||||
Revision 1.37 1999/08/02 23:13:20 florian
|
Revision 1.37 1999/08/02 23:13:20 florian
|
||||||
|
Loading…
Reference in New Issue
Block a user