mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 20:49:26 +02:00
* Added HasResourceStrings check
This commit is contained in:
parent
62273909ca
commit
f2243fa982
@ -54,11 +54,13 @@ unit objpas;
|
|||||||
{ ParamStr should return also an ansistring }
|
{ ParamStr should return also an ansistring }
|
||||||
Function ParamStr(Param : Integer) : Ansistring;
|
Function ParamStr(Param : Integer) : Ansistring;
|
||||||
|
|
||||||
|
|
||||||
|
{$ifdef HasResourceStrings}
|
||||||
{ Resourcestring support }
|
{ Resourcestring support }
|
||||||
Function GetResourceString(Hash : Longint) : AnsiString;
|
Function GetResourceString(Hash : Longint) : AnsiString;
|
||||||
Procedure ResetResourceTables;
|
Procedure ResetResourceTables;
|
||||||
Function SetResourceString(Hash : longint; Const Value : AnsiString) : Boolean;
|
Function SetResourceString(Hash : longint; Const Value : AnsiString) : Boolean;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -156,19 +158,21 @@ begin
|
|||||||
else
|
else
|
||||||
paramstr:='';
|
paramstr:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF HasResourceStrings}
|
||||||
|
|
||||||
{ ---------------------------------------------------------------------
|
{ ---------------------------------------------------------------------
|
||||||
ResourceString support
|
ResourceString support
|
||||||
---------------------------------------------------------------------}
|
---------------------------------------------------------------------}
|
||||||
|
|
||||||
Type
|
Type
|
||||||
|
|
||||||
TResourceStringRecord = Record
|
TResourceStringRecord = Packed Record
|
||||||
DefaultValue,
|
DefaultValue,
|
||||||
CurrentValue : AnsiString;
|
CurrentValue : AnsiString;
|
||||||
HashValue : longint;
|
HashValue : longint;
|
||||||
end;
|
end;
|
||||||
TResourceStringTable = Record
|
|
||||||
|
TResourceStringTable = Packed Record
|
||||||
Count : longint;
|
Count : longint;
|
||||||
Resrec : Array[Cardinal] of TResourceStringRecord;
|
Resrec : Array[Cardinal] of TResourceStringRecord;
|
||||||
end;
|
end;
|
||||||
@ -216,19 +220,23 @@ Procedure ResetResourceTables;
|
|||||||
Var I : longint;
|
Var I : longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
With ResourceStringTable do
|
For I:=0 to ResourceStringTable.Count-1 do
|
||||||
For I:=0 to Count-1 do
|
ResourceStringTable.ResRec[i].CurrentValue:=
|
||||||
With ResRec[i] do
|
ResourceStringTable.ResRec[i].DefaultValue;
|
||||||
CurrentValue:=DefaultValue;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Initialization
|
Initialization
|
||||||
ResetResourceTables;
|
ResetResourceTables;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.27 1999-07-22 20:30:13 michael
|
Revision 1.28 1999-07-23 22:51:11 michael
|
||||||
|
* Added HasResourceStrings check
|
||||||
|
|
||||||
|
Revision 1.27 1999/07/22 20:30:13 michael
|
||||||
+ Implemented resource stuff
|
+ Implemented resource stuff
|
||||||
|
|
||||||
Revision 1.26 1999/07/07 10:04:04 michael
|
Revision 1.26 1999/07/07 10:04:04 michael
|
||||||
|
Loading…
Reference in New Issue
Block a user