|
@@ -53,6 +53,7 @@ var
|
|
|
|
|
|
msgidxmax : array[1..msgparts] of longint;
|
|
msgidxmax : array[1..msgparts] of longint;
|
|
msgs : array[0..msgparts,0..999] of boolean;
|
|
msgs : array[0..msgparts,0..999] of boolean;
|
|
|
|
+ msgcodepage: TSystemCodePage;
|
|
|
|
|
|
procedure LoadMsgFile(const fn:string);
|
|
procedure LoadMsgFile(const fn:string);
|
|
var
|
|
var
|
|
@@ -75,6 +76,7 @@ var
|
|
|
|
|
|
begin
|
|
begin
|
|
Writeln('Loading messagefile ',fn);
|
|
Writeln('Loading messagefile ',fn);
|
|
|
|
+ msgcodepage:=CP_ACP;
|
|
{Read the message file}
|
|
{Read the message file}
|
|
assign(f,fn);
|
|
assign(f,fn);
|
|
{$push} {$I-}
|
|
{$push} {$I-}
|
|
@@ -150,6 +152,12 @@ begin
|
|
end
|
|
end
|
|
else
|
|
else
|
|
err('no = found');
|
|
err('no = found');
|
|
|
|
+ end
|
|
|
|
+ else if (Length(s)>11) and (Copy(s,1,11)='# CodePage ') then
|
|
|
|
+ begin
|
|
|
|
+ val(Copy(s,12,Length(s)-11),msgcodepage,code);
|
|
|
|
+ if code<>0 then
|
|
|
|
+ err('illegal code page number: '+s);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -329,6 +337,7 @@ begin
|
|
{Open textfile}
|
|
{Open textfile}
|
|
assign(t,fn);
|
|
assign(t,fn);
|
|
rewrite(t);
|
|
rewrite(t);
|
|
|
|
+ writeln(t,'const '+constname+'_codepage=',msgcodepage:5,';');
|
|
writeln(t,'{$ifdef Delphi}');
|
|
writeln(t,'{$ifdef Delphi}');
|
|
writeln(t,'const '+constname+' : array[0..000000] of string[',maxslen,']=(');
|
|
writeln(t,'const '+constname+' : array[0..000000] of string[',maxslen,']=(');
|
|
writeln(t,'{$else Delphi}');
|
|
writeln(t,'{$else Delphi}');
|
|
@@ -405,9 +414,9 @@ begin
|
|
s:=l0(msgsize div maxslen); { we start with 0 }
|
|
s:=l0(msgsize div maxslen); { we start with 0 }
|
|
assign(f,fn);
|
|
assign(f,fn);
|
|
reset(f,1);
|
|
reset(f,1);
|
|
- seek(f,34+eollen+length(constname));
|
|
|
|
|
|
+ seek(f,22+34+2*eollen+2*length(constname));
|
|
blockwrite(f,s[1],5);
|
|
blockwrite(f,s[1],5);
|
|
- seek(f,90+3*eollen+2*length(constname));
|
|
|
|
|
|
+ seek(f,22+90+4*eollen+3*length(constname));
|
|
blockwrite(f,s[1],5);
|
|
blockwrite(f,s[1],5);
|
|
close(f);
|
|
close(f);
|
|
end;
|
|
end;
|