mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 20:09:25 +02:00
IniPath removed and IniFileName moved to fpvars unit
This commit is contained in:
parent
bf8e55c916
commit
1cff383dcf
@ -19,13 +19,6 @@ interface
|
|||||||
uses
|
uses
|
||||||
FPUtils;
|
FPUtils;
|
||||||
|
|
||||||
const
|
|
||||||
ININame = 'fp.ini';
|
|
||||||
|
|
||||||
ConfigDir : string{$ifdef GABOR}[50]{$endif} = '.'+DirSep;
|
|
||||||
INIFileName: string{$ifdef GABOR}[50]{$endif} = ININame;
|
|
||||||
|
|
||||||
|
|
||||||
procedure InitINIFile;
|
procedure InitINIFile;
|
||||||
function ReadINIFile: boolean;
|
function ReadINIFile: boolean;
|
||||||
function WriteINIFile: boolean;
|
function WriteINIFile: boolean;
|
||||||
@ -100,10 +93,10 @@ const
|
|||||||
procedure InitINIFile;
|
procedure InitINIFile;
|
||||||
var S: string;
|
var S: string;
|
||||||
begin
|
begin
|
||||||
S:=LocateFile(ININame);
|
S:=LocateFile(INIFileName);
|
||||||
if S<>'' then
|
if S<>'' then
|
||||||
INIPath:=S;
|
IniFileName:=S;
|
||||||
INIPath:=FExpand(INIPath);
|
IniFileName:=FExpand(IniFileName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function PaletteToStr(S: string): string;
|
function PaletteToStr(S: string): string;
|
||||||
@ -251,10 +244,10 @@ var INIFile: PINIFile;
|
|||||||
W: word;
|
W: word;
|
||||||
R : TRect;
|
R : TRect;
|
||||||
begin
|
begin
|
||||||
OK:=ExistsFile(INIPath);
|
OK:=ExistsFile(IniFileName);
|
||||||
if OK then
|
if OK then
|
||||||
begin
|
begin
|
||||||
New(INIFile, Init(INIPath));
|
New(INIFile, Init(IniFileName));
|
||||||
{ Files }
|
{ Files }
|
||||||
OpenExts:=INIFile^.GetEntry(secFiles,ieOpenExts,OpenExts);
|
OpenExts:=INIFile^.GetEntry(secFiles,ieOpenExts,OpenExts);
|
||||||
RecentFileCount:=High(RecentFiles);
|
RecentFileCount:=High(RecentFiles);
|
||||||
@ -411,7 +404,7 @@ begin
|
|||||||
S:=S+P^;
|
S:=S+P^;
|
||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
New(INIFile, Init(INIPath));
|
New(INIFile, Init(IniFileName));
|
||||||
{ Files }
|
{ Files }
|
||||||
{ avoid keeping old files }
|
{ avoid keeping old files }
|
||||||
INIFile^.DeleteSection(secFiles);
|
INIFile^.DeleteSection(secFiles);
|
||||||
@ -533,7 +526,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.26 2000-02-04 00:08:35 pierre
|
Revision 1.27 2000-03-13 20:38:02 pierre
|
||||||
|
IniPath removed and IniFileName moved to fpvars unit
|
||||||
|
|
||||||
|
Revision 1.26 2000/02/04 00:08:35 pierre
|
||||||
+ IniCenterDebuggerRow
|
+ IniCenterDebuggerRow
|
||||||
|
|
||||||
Revision 1.25 1999/11/05 13:47:19 pierre
|
Revision 1.25 1999/11/05 13:47:19 pierre
|
||||||
|
Loading…
Reference in New Issue
Block a user