From ddfa0bd1dd2dc5a2e222492a8c8a68703c9de062 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 19 Mar 2006 21:16:32 +0000 Subject: [PATCH] * use resourcstring table again git-svn-id: trunk@2979 - --- rtl/objpas/objpas.pp | 58 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/rtl/objpas/objpas.pp b/rtl/objpas/objpas.pp index ff862832d9..7ab8d8e2d6 100644 --- a/rtl/objpas/objpas.pp +++ b/rtl/objpas/objpas.pp @@ -240,20 +240,38 @@ Type CurrentValue, DefaultValue : AnsiString; HashValue : LongWord; +{$ifdef cpu64} + Dummy : LongWord; // alignment +{$endif cpu64} + end; + + TResourceStringTableList = Packed Record + Count : ptrint; + Tables : Array[Word] of record + TableStart, + TableEnd : PResourceStringRecord; + end; end; Var - ResourceStrings : TResourceStringRecord; External Name 'FPC_RESOURCESTRINGS'; + ResourceStringTable : TResourceStringTableList; External Name 'FPC_RESOURCESTRINGTABLES'; Procedure SetResourceStrings (SetFunction : TResourceIterator;arg:pointer); Var ResStr : PResourceStringRecord; + i : Longint; begin - ResStr:=@ResourceStrings; - while ResStr^.Name<>'' do + With ResourceStringTable do begin - ResStr^.CurrentValue:=SetFunction(ResStr^.Name,ResStr^.DefaultValue,ResStr^.HashValue,arg); - inc(ResStr); + For i:=0 to Count-1 do + begin + ResStr:=Tables[I].TableStart; + while ResStr'' do + With ResourceStringTable do begin - ResStr^.CurrentValue:=ResStr^.DefaultValue; - inc(ResStr); + For i:=0 to Count-1 do + begin + ResStr:=Tables[I].TableStart; + while ResStr'' do + With ResourceStringTable do begin - ResStr^.CurrentValue:=''; - inc(ResStr); + For i:=0 to Count-1 do + begin + ResStr:=Tables[I].TableStart; + while ResStr