+ Hopefuly last fixes for resourcestrings

This commit is contained in:
michael 1999-08-26 20:24:37 +00:00
parent acc55a83c7
commit dc3cc78caa
5 changed files with 42 additions and 25 deletions

View File

@ -81,7 +81,7 @@ implementation
pushusedregisters(pushed,$ff);
emit_const(A_PUSH,S_L,
pconstsym(p^.symtableentry)^.resstrindex);
emit_sym(A_PUSH,S_L,newasmsymbol(current_module^.modulename^+'_RESOURCESTRINGLIST'));
emit_sym(A_PUSH,S_L,newasmsymbol(pconstsym(p^.symtableentry)^.owner^.name^+'_RESOURCESTRINGLIST'));
emitcall('FPC_GETRESOURCESTRING');
hregister:=getexplicitregister32(R_EAX);
@ -965,7 +965,10 @@ implementation
end.
{
$Log$
Revision 1.79 1999-08-25 16:41:05 peter
Revision 1.80 1999-08-26 20:24:37 michael
+ Hopefuly last fixes for resourcestrings
Revision 1.79 1999/08/25 16:41:05 peter
* resources are working again
Revision 1.78 1999/08/25 11:59:43 jonas

View File

@ -117,7 +117,8 @@ Procedure AppendToAsmResList (P : PResourceString);
Var
l1 : pasmlabel;
s : pchar;
l : longint;
begin
With P^ Do
begin
@ -142,16 +143,16 @@ begin
resourcestringlist^.concat(new(pai_const,init_32bit(hash)));
{ Append the name as a ansistring. }
getdatalabel(l1);
Len:=Length(Name);
L:=Length(Name);
resourcestringlist^.concat(new(pai_const_symbol,init(l1)));
consts^.concat(new(pai_const,init_32bit(len)));
consts^.concat(new(pai_const,init_32bit(len)));
consts^.concat(new(pai_const,init_32bit(l)));
consts^.concat(new(pai_const,init_32bit(l)));
consts^.concat(new(pai_const,init_32bit(-1)));
consts^.concat(new(pai_label,init(l1)));
getmem(s,len+1);
move(Name[1],s^,len);
s[len]:=#0;
consts^.concat(new(pai_string,init_length_pchar(s,len)));
getmem(s,l+1);
move(Name[1],s^,l);
s[l]:=#0;
consts^.concat(new(pai_string,init_length_pchar(s,l)));
consts^.concat(new(pai_const,init_8bit(0)));
end;
end;
@ -217,7 +218,7 @@ Var F : Text;
end;
begin
If resstrCount=0 then
If (ResourceListRoot=Nil) then
exit;
FileName:=ForceExtension(lower(FileName),'.rst');
message1 (general_i_writingresourcefile,filename);
@ -299,12 +300,16 @@ begin
R:=T;
end;
ResStrCount:=0;
ResourceListCurrent:=Nil;
end;
end.
{
$Log$
Revision 1.12 1999-08-25 16:41:07 peter
Revision 1.13 1999-08-26 20:24:39 michael
+ Hopefuly last fixes for resourcestrings
Revision 1.12 1999/08/25 16:41:07 peter
* resources are working again
Revision 1.11 1999/08/23 11:48:23 michael

View File

@ -252,8 +252,6 @@ implementation
{ assembler symbols }
asmsymbollist:=new(pasmsymbollist,init);
asmsymbollist^.usehash;
{ resourcestrings }
ResetResourceStrings;
end;
@ -291,9 +289,8 @@ implementation
{$ifdef MEMDEBUG}
d.done;
{$endif}
{ resource strings }
{ if assigned(resourcestringlist) then
dispose(resourcestringlist,done); }
{ resourcestrings }
ResetResourceStrings;
end;
@ -312,7 +309,10 @@ end.
{
$Log$
Revision 1.41 1999-08-24 13:14:03 peter
Revision 1.42 1999-08-26 20:24:40 michael
+ Hopefuly last fixes for resourcestrings
Revision 1.41 1999/08/24 13:14:03 peter
* MEMDEBUG to see the sizes of asmlist,asmsymbols,symtables
Revision 1.40 1999/08/24 12:01:32 michael

View File

@ -445,10 +445,6 @@ unit parser;
{ Write Browser Collections }
CreateBrowserCol;
{$endif}
{ Write resource stringtable file }
If not (Main_Module^.is_unit) then
WriteResourceFile(Current_module^.ModuleName^);
end;
(* Obsolete code aktprocsym
@ -475,7 +471,10 @@ unit parser;
end.
{
$Log$
Revision 1.81 1999-08-04 13:02:48 jonas
Revision 1.82 1999-08-26 20:24:41 michael
+ Hopefuly last fixes for resourcestrings
Revision 1.81 1999/08/04 13:02:48 jonas
* all tokens now start with an underscore
* PowerPC compiles!!

View File

@ -1114,6 +1114,7 @@ unit pmodules;
begin
insertresourcestrings;
current_module^.flags:=current_module^.flags or uf_has_resources;
WriteResourceFile(Current_module^.ModuleName^);
end;
{ avoid self recursive destructor call !! PM }
@ -1346,6 +1347,12 @@ unit pmodules;
current_module^.globalsymtable:=current_module^.localsymtable;
current_module^.localsymtable:=nil;
If ResourceStringList<>Nil then
begin
insertresourcestrings;
WriteResourceFile(Current_module^.ModuleName^);
end;
codegen_doneprocedure;
{ consume the last point }
@ -1369,8 +1376,8 @@ unit pmodules;
if islibrary then
exportlib^.generatelib;
{ insert heap }
insertresourcestrings;
insertResourceTablesTable;
insertinitfinaltable;
insertheap;
@ -1417,7 +1424,10 @@ unit pmodules;
end.
{
$Log$
Revision 1.144 1999-08-24 22:38:53 michael
Revision 1.145 1999-08-26 20:24:44 michael
+ Hopefuly last fixes for resourcestrings
Revision 1.144 1999/08/24 22:38:53 michael
* more resourcestring changes
Revision 1.143 1999/08/24 12:01:34 michael