mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 19:49:12 +02:00
* patch by Evgeniy to overcome fp.ini line length limit for help files, resolves #36737
git-svn-id: trunk@44248 -
This commit is contained in:
parent
fb8f4ceca5
commit
9d7d146ddc
@ -117,7 +117,7 @@ const
|
|||||||
iePrimaryFile = 'PrimaryFile';
|
iePrimaryFile = 'PrimaryFile';
|
||||||
ieCompileMode = 'CompileMode';
|
ieCompileMode = 'CompileMode';
|
||||||
iePalette = 'Palette';
|
iePalette = 'Palette';
|
||||||
ieHelpFiles = 'Files';
|
ieHelpFile = 'File';
|
||||||
ieDefaultTabSize = 'DefaultTabSize';
|
ieDefaultTabSize = 'DefaultTabSize';
|
||||||
ieDefaultIndentSize = 'DefaultIndentSize';
|
ieDefaultIndentSize = 'DefaultIndentSize';
|
||||||
ieDefaultEditorFlags='DefaultFlags';
|
ieDefaultEditorFlags='DefaultFlags';
|
||||||
@ -456,12 +456,11 @@ begin
|
|||||||
SwitchesMode:=ts;
|
SwitchesMode:=ts;
|
||||||
end;
|
end;
|
||||||
{ Help }
|
{ Help }
|
||||||
S:=INIFile^.GetEntry(secHelp,ieHelpFiles,'');
|
I:=1;
|
||||||
repeat
|
repeat
|
||||||
P:=Pos(';',S); if P=0 then P:=length(S)+1;
|
S:=INIFile^.GetEntry(secHelp,ieHelpFile + IntToStr(I),'');
|
||||||
PS:=copy(S,1,P-1);
|
inc(I);
|
||||||
if PS<>'' then HelpFiles^.Insert(NewStr(PS));
|
if S<>'' then HelpFiles^.Insert(NewStr(S));
|
||||||
Delete(S,1,P);
|
|
||||||
until S='';
|
until S='';
|
||||||
{ Editor }
|
{ Editor }
|
||||||
DefaultTabSize:=INIFile^.GetIntEntry(secEditor,ieDefaultTabSize,DefaultTabSize);
|
DefaultTabSize:=INIFile^.GetIntEntry(secEditor,ieDefaultTabSize,DefaultTabSize);
|
||||||
@ -583,15 +582,9 @@ var INIFile: PINIFile;
|
|||||||
S: string;
|
S: string;
|
||||||
S1,S2,S3: string;
|
S1,S2,S3: string;
|
||||||
W: word;
|
W: word;
|
||||||
BreakPointCount,WatchesCount:longint;
|
HelpFileCount, BreakPointCount,WatchesCount:longint;
|
||||||
I(*,OpenFileCount*): integer;
|
I(*,OpenFileCount*): integer;
|
||||||
OK: boolean;
|
OK: boolean;
|
||||||
|
|
||||||
procedure ConcatName(P: PString);
|
|
||||||
begin
|
|
||||||
if (S<>'') then S:=S+';';
|
|
||||||
S:=S+P^;
|
|
||||||
end;
|
|
||||||
begin
|
begin
|
||||||
{$ifdef Unix}
|
{$ifdef Unix}
|
||||||
if not FromSaveAs and (DirOf(IniFileName)=DirOf(SystemIDEDir)) then
|
if not FromSaveAs and (DirOf(IniFileName)=DirOf(SystemIDEDir)) then
|
||||||
@ -680,9 +673,12 @@ begin
|
|||||||
INIFile^.SetEntry(secCompile,iePrimaryFile,PrimaryFile);
|
INIFile^.SetEntry(secCompile,iePrimaryFile,PrimaryFile);
|
||||||
INIFile^.SetEntry(secCompile,ieCompileMode,SwitchesModeStr[SwitchesMode]);
|
INIFile^.SetEntry(secCompile,ieCompileMode,SwitchesModeStr[SwitchesMode]);
|
||||||
{ Help }
|
{ Help }
|
||||||
S:='';
|
HelpFileCount:=HelpFiles^.Count;
|
||||||
HelpFiles^.ForEach(TCallbackProcParam(@ConcatName));
|
for I := 1 to HelpFileCount do
|
||||||
INIFile^.SetEntry(secHelp,ieHelpFiles,EscapeIniText(S));
|
begin
|
||||||
|
S:=HelpFiles^.At(I-1)^;
|
||||||
|
INIFile^.SetEntry(secHelp, ieHelpFile + IntToStr(I), EscapeIniText(S));
|
||||||
|
end;
|
||||||
{ Editor }
|
{ Editor }
|
||||||
INIFile^.SetIntEntry(secEditor,ieDefaultTabSize,DefaultTabSize);
|
INIFile^.SetIntEntry(secEditor,ieDefaultTabSize,DefaultTabSize);
|
||||||
INIFile^.SetIntEntry(secEditor,ieDefaultIndentSize,DefaultIndentSize);
|
INIFile^.SetIntEntry(secEditor,ieDefaultIndentSize,DefaultIndentSize);
|
||||||
|
Loading…
Reference in New Issue
Block a user