mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-02 20:50:57 +01:00
+ SourceDir that stores directories for sources that the
compiler should not know about
Automatically asked for addition when a new file that
needed filedialog to be found is in an unknown directory
Stored and retrieved from INIFile
+ Breakpoints conditions added to INIFile
* Breakpoints insterted and removed at debin and end of debug session
This commit is contained in:
parent
253b5b7cfd
commit
d4b1c07d9a
@ -139,6 +139,8 @@ end;
|
||||
procedure TDebugController.DoSelectSourceLine(const fn:string;line:longint);
|
||||
var
|
||||
W: PSourceWindow;
|
||||
Found : boolean;
|
||||
|
||||
begin
|
||||
Desktop^.Lock;
|
||||
if Line>0 then
|
||||
@ -149,6 +151,7 @@ begin
|
||||
if assigned(W) then
|
||||
begin
|
||||
W^.Editor^.SetCurPtr(0,Line);
|
||||
W^.Editor^.TrackCursor(true);
|
||||
W^.Editor^.SetHighlightRow(Line);
|
||||
W^.Select;
|
||||
Invalid_line:=false;
|
||||
@ -162,6 +165,7 @@ begin
|
||||
if assigned(W) then
|
||||
begin
|
||||
W^.Editor^.SetHighlightRow(Line);
|
||||
W^.Editor^.TrackCursor(true);
|
||||
W^.Select;
|
||||
LastSource:=W;
|
||||
Invalid_line:=false;
|
||||
@ -169,7 +173,10 @@ begin
|
||||
{ only search a file once }
|
||||
else
|
||||
begin
|
||||
if not MyApp.OpenSearch(fn+'*') then
|
||||
Desktop^.UnLock;
|
||||
Found:=MyApp.OpenSearch(fn);
|
||||
Desktop^.Lock;
|
||||
if not Found then
|
||||
begin
|
||||
Invalid_line:=true;
|
||||
LastSource:=Nil;
|
||||
@ -179,6 +186,7 @@ begin
|
||||
{ should now be open }
|
||||
W:=TryToOpenFile(nil,fn,0,Line);
|
||||
W^.Editor^.SetHighlightRow(Line);
|
||||
W^.Editor^.TrackCursor(true);
|
||||
W^.Select;
|
||||
LastSource:=W;
|
||||
Invalid_line:=false;
|
||||
@ -216,8 +224,7 @@ begin
|
||||
typ:=bt_function;
|
||||
state:=bs_enabled;
|
||||
GDBState:=bs_deleted;
|
||||
GetMem(Name,Length(AFunc)+1);
|
||||
Name^:=AFunc;
|
||||
Name:=NewStr(AFunc);
|
||||
Conditions:=nil;
|
||||
end;
|
||||
|
||||
@ -226,8 +233,7 @@ begin
|
||||
typ:=bt_file_line;
|
||||
state:=bs_enabled;
|
||||
GDBState:=bs_deleted;
|
||||
GetMem(Name,Length(AFile)+1);
|
||||
Name^:=AFile;
|
||||
Name:=NewStr(AFile);
|
||||
Line:=ALine;
|
||||
Conditions:=nil;
|
||||
end;
|
||||
@ -291,9 +297,9 @@ end;
|
||||
destructor TBreakpoint.Done;
|
||||
begin
|
||||
if assigned(Name) then
|
||||
FreeMem(Name,Length(Name^)+1);
|
||||
DisposeStr(Name);
|
||||
if assigned(Conditions) then
|
||||
FreeMem(Conditions,Length(Conditions^)+1);
|
||||
DisposeStr(Conditions);
|
||||
inherited Done;
|
||||
end;
|
||||
|
||||
@ -370,8 +376,9 @@ procedure DoneDebugger;
|
||||
begin
|
||||
if assigned(Debugger) then
|
||||
dispose(Debugger,Done);
|
||||
If Use_gdb_file then
|
||||
Close(GDB_file);
|
||||
Use_gdb_file:=false;
|
||||
Close(GDB_file);
|
||||
end;
|
||||
|
||||
begin
|
||||
@ -380,7 +387,16 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.5 1999-02-04 17:54:22 pierre
|
||||
Revision 1.6 1999-02-05 12:11:53 pierre
|
||||
+ SourceDir that stores directories for sources that the
|
||||
compiler should not know about
|
||||
Automatically asked for addition when a new file that
|
||||
needed filedialog to be found is in an unknown directory
|
||||
Stored and retrieved from INIFile
|
||||
+ Breakpoints conditions added to INIFile
|
||||
* Breakpoints insterted and removed at debin and end of debug session
|
||||
|
||||
Revision 1.5 1999/02/04 17:54:22 pierre
|
||||
+ several commands added
|
||||
|
||||
Revision 1.4 1999/02/04 13:32:02 pierre
|
||||
|
||||
@ -636,6 +636,8 @@ end;
|
||||
|
||||
destructor TIDEApp.Done;
|
||||
begin
|
||||
{ Close debugging session if active }
|
||||
DoResetDebugger;
|
||||
inherited Done;
|
||||
DoneHelpSystem;
|
||||
DoneTemplates;
|
||||
@ -644,7 +646,16 @@ end;
|
||||
END.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.7 1999-02-04 13:32:03 pierre
|
||||
Revision 1.8 1999-02-05 12:11:54 pierre
|
||||
+ SourceDir that stores directories for sources that the
|
||||
compiler should not know about
|
||||
Automatically asked for addition when a new file that
|
||||
needed filedialog to be found is in an unknown directory
|
||||
Stored and retrieved from INIFile
|
||||
+ Breakpoints conditions added to INIFile
|
||||
* Breakpoints insterted and removed at debin and end of debug session
|
||||
|
||||
Revision 1.7 1999/02/04 13:32:03 pierre
|
||||
* Several things added (I cannot commit them independently !)
|
||||
+ added TBreakpoint and TBreakpointCollection
|
||||
+ added cmResetDebugger,cmGrep,CmToggleBreakpoint
|
||||
|
||||
@ -52,6 +52,7 @@ const
|
||||
secMouse = 'Mouse';
|
||||
secSearch = 'Search';
|
||||
secTools = 'Tools';
|
||||
secSourcePath = 'SourcePath';
|
||||
|
||||
{ INI file tags }
|
||||
ieRecentFile = 'RecentFile';
|
||||
@ -79,6 +80,8 @@ const
|
||||
ieBreakpointFunc = 'Function';
|
||||
ieBreakpointFile = 'FileName';
|
||||
ieBreakpointLine = 'LineNumber';
|
||||
ieBreakpointCond = 'Condition';
|
||||
ieSourceList = 'SourceList';
|
||||
|
||||
const
|
||||
BreakpointTypeStr : Array[BreakpointType] of String[9]
|
||||
@ -156,12 +159,14 @@ begin
|
||||
INIFile^.SetIntEntry(secBreakpoint,ieBreakpointLine+S,Line);
|
||||
end;
|
||||
end;
|
||||
if assigned(Conditions) then
|
||||
INIFile^.SetEntry(secBreakpoint,ieBreakpointCond+S,Conditions^);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ReadOneBreakPointEntry(i : longint;INIFile : PINIFile);
|
||||
var PB : PBreakpoint;
|
||||
S,S2 : string;
|
||||
S,S2,SC : string;
|
||||
Line : longint;
|
||||
typ : BreakpointType;
|
||||
state : BreakpointState;
|
||||
@ -188,14 +193,18 @@ begin
|
||||
Line:=INIFile^.GetIntEntry(secBreakpoint,ieBreakpointLine+S2,0);
|
||||
end;
|
||||
end;
|
||||
SC:=INIFile^.GetEntry(secBreakpoint,ieBreakpointCond+S,'');
|
||||
if (typ=bt_function) and (S<>'') then
|
||||
new(PB,init_function(S))
|
||||
else if (typ=bt_file_line) and (S<>'') then
|
||||
new(PB,init_file_line(S,Line));
|
||||
If assigned(PB) then
|
||||
PB^.state:=state;
|
||||
If assigned(PB) then
|
||||
BreakpointCollection^.Insert(PB);
|
||||
begin
|
||||
PB^.state:=state;
|
||||
If SC<>'' then
|
||||
PB^.conditions:=NewStr(SC);
|
||||
BreakpointCollection^.Insert(PB);
|
||||
end;
|
||||
end;
|
||||
|
||||
function ReadINIFile: boolean;
|
||||
@ -251,6 +260,7 @@ begin
|
||||
{$endif}
|
||||
HighlightExts:=INIFile^.GetEntry(secHighlight,ieHighlightExts,HighlightExts);
|
||||
TabsPattern:=INIFile^.GetEntry(secHighlight,ieTabsPattern,TabsPattern);
|
||||
SourceDirs:=INIFile^.GetEntry(secSourcePath,ieSourceList,SourceDirs);
|
||||
DoubleDelay:=INIFile^.GetIntEntry(secMouse,ieDoubleClickDelay,DoubleDelay);
|
||||
MouseReverse:=boolean(INIFile^.GetIntEntry(secMouse,ieReverseButtons,byte(MouseReverse)));
|
||||
AltMouseAction:=INIFile^.GetIntEntry(secMouse,ieAltClickAction,AltMouseAction);
|
||||
@ -319,6 +329,7 @@ begin
|
||||
{$endif}
|
||||
INIFile^.SetEntry(secHighlight,ieHighlightExts,'"'+HighlightExts+'"');
|
||||
INIFile^.SetEntry(secHighlight,ieTabsPattern,'"'+TabsPattern+'"');
|
||||
INIFile^.SetEntry(secSourcePath,ieSourceList,'"'+SourceDirs+'"');
|
||||
INIFile^.SetIntEntry(secMouse,ieDoubleClickDelay,DoubleDelay);
|
||||
INIFile^.SetIntEntry(secMouse,ieReverseButtons,byte(MouseReverse));
|
||||
INIFile^.SetIntEntry(secMouse,ieAltClickAction,AltMouseAction);
|
||||
@ -363,7 +374,16 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.8 1999-02-04 17:52:38 pierre
|
||||
Revision 1.9 1999-02-05 12:11:55 pierre
|
||||
+ SourceDir that stores directories for sources that the
|
||||
compiler should not know about
|
||||
Automatically asked for addition when a new file that
|
||||
needed filedialog to be found is in an unknown directory
|
||||
Stored and retrieved from INIFile
|
||||
+ Breakpoints conditions added to INIFile
|
||||
* Breakpoints insterted and removed at debin and end of debug session
|
||||
|
||||
Revision 1.8 1999/02/04 17:52:38 pierre
|
||||
* bs_invalid renamed bs_deleted
|
||||
|
||||
Revision 1.7 1999/02/04 17:19:24 peter
|
||||
|
||||
@ -99,11 +99,13 @@ end;
|
||||
function TIDEApp.OpenSearch(FileName: string) : boolean;
|
||||
var D: PFileDialog;
|
||||
OpenIt: boolean;
|
||||
P : PString;
|
||||
Dir : String;
|
||||
begin
|
||||
OpenIt:=False;
|
||||
if not OpenIt then
|
||||
begin
|
||||
New(D, Init(FileName,'Open a file','File to open',fdOpenButton,0));
|
||||
New(D, Init(FileName+'*','Open a file','Looking for '+FileName,fdOpenButton,0));
|
||||
OpenIt:=Desktop^.ExecView(D)<>cmCancel;
|
||||
if OpenIt then
|
||||
Begin
|
||||
@ -114,6 +116,13 @@ begin
|
||||
if OpenIt then
|
||||
begin
|
||||
FileName:=FExpand(LocatePasFile(FileName));
|
||||
Dir:=DirOf(FileName);
|
||||
P:=@Dir;
|
||||
If Pos(Dir+';',GetSourceDirectories)=0 then
|
||||
if ConfirmBox(#3'Directory %s is not in list'#13#3+
|
||||
'Should we add it ?',@P,false)=cmYes then
|
||||
SourceDirs:=SourceDirs+';'+Dir;
|
||||
|
||||
OpenEditorWindow(nil,FileName,0,0);
|
||||
end;
|
||||
OpenSearch:=OpenIt;
|
||||
@ -147,7 +156,16 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.7 1999-02-04 13:32:05 pierre
|
||||
Revision 1.8 1999-02-05 12:11:57 pierre
|
||||
+ SourceDir that stores directories for sources that the
|
||||
compiler should not know about
|
||||
Automatically asked for addition when a new file that
|
||||
needed filedialog to be found is in an unknown directory
|
||||
Stored and retrieved from INIFile
|
||||
+ Breakpoints conditions added to INIFile
|
||||
* Breakpoints insterted and removed at debin and end of debug session
|
||||
|
||||
Revision 1.7 1999/02/04 13:32:05 pierre
|
||||
* Several things added (I cannot commit them independently !)
|
||||
+ added TBreakpoint and TBreakpointCollection
|
||||
+ added cmResetDebugger,cmGrep,CmToggleBreakpoint
|
||||
|
||||
@ -376,8 +376,22 @@ var R,R2: TRect;
|
||||
Count,I : integer;
|
||||
const
|
||||
LW = 25;
|
||||
procedure Add(i : integer;Data,Name : string);
|
||||
begin
|
||||
R2.Copy(R);
|
||||
R2.A.X:=LW;
|
||||
New(IL[i], Init(R2, 255));
|
||||
IL[i]^.Data^:=Data;
|
||||
D^.Insert(IL[i]);
|
||||
R2.Copy(R);
|
||||
R2.B.X:=LW;
|
||||
D^.Insert(New(PLabel, Init(R2, Name, IL[i])));
|
||||
R.Move(0,2);
|
||||
end;
|
||||
|
||||
begin
|
||||
Count:=DirectorySwitches^.ItemCount;
|
||||
{ add SourceDirs }
|
||||
Count:=DirectorySwitches^.ItemCount+1;
|
||||
R.Assign(0,0,64,2+Count*2);
|
||||
New(D, Init(R, 'Directories'));
|
||||
with D^ do
|
||||
@ -386,25 +400,17 @@ begin
|
||||
R.Grow(-2,-2);
|
||||
Dec(R.B.X);
|
||||
R.B.Y:=R.A.Y+1;
|
||||
for i:=Count-1 downto 0 do
|
||||
begin
|
||||
R2.Copy(R);
|
||||
R2.A.X:=LW;
|
||||
New(IL[i], Init(R2, 255));
|
||||
IL[i]^.Data^:=DirectorySwitches^.GetStringItem(i);
|
||||
Insert(IL[i]);
|
||||
R2.Copy(R);
|
||||
R2.B.X:=LW;
|
||||
Insert(New(PLabel, Init(R2, DirectorySwitches^.ItemName(i), IL[i])));
|
||||
R.Move(0,2);
|
||||
end;
|
||||
Add(Count-1,SourceDirs,'Path to ~S~ources');
|
||||
for i:=Count-2 downto 0 do
|
||||
Add(i,DirectorySwitches^.GetStringItem(i),DirectorySwitches^.ItemName(i));
|
||||
end;
|
||||
InsertButtons(D);
|
||||
IL[Count-1]^.Select;
|
||||
if Desktop^.ExecView(D)=cmOK then
|
||||
begin
|
||||
for i:=Count-1 downto 0 do
|
||||
for i:=Count-2 downto 0 do
|
||||
DirectorySwitches^.SetStringItem(i,IL[i]^.Data^);
|
||||
SourceDirs:=IL[Count-1]^.Data^;
|
||||
end;
|
||||
Dispose(D, Done);
|
||||
end;
|
||||
@ -681,7 +687,16 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.8 1999-02-04 13:32:06 pierre
|
||||
Revision 1.9 1999-02-05 12:11:58 pierre
|
||||
+ SourceDir that stores directories for sources that the
|
||||
compiler should not know about
|
||||
Automatically asked for addition when a new file that
|
||||
needed filedialog to be found is in an unknown directory
|
||||
Stored and retrieved from INIFile
|
||||
+ Breakpoints conditions added to INIFile
|
||||
* Breakpoints insterted and removed at debin and end of debug session
|
||||
|
||||
Revision 1.8 1999/02/04 13:32:06 pierre
|
||||
* Several things added (I cannot commit them independently !)
|
||||
+ added TBreakpoint and TBreakpointCollection
|
||||
+ added cmResetDebugger,cmGrep,CmToggleBreakpoint
|
||||
|
||||
@ -48,7 +48,7 @@ procedure TIDEApp.Grep;
|
||||
IL : PInputLine;
|
||||
p,lineNb : longint;
|
||||
error : word;
|
||||
GrepArgs,Line,ModuleName : String;
|
||||
GrepExe,GrepArgs,Line,ModuleName : String;
|
||||
GrepOut : text;
|
||||
Params : Array[0..4] of longint;
|
||||
|
||||
@ -56,9 +56,15 @@ procedure TIDEApp.Grep;
|
||||
{$ifdef linux}
|
||||
GrepExeName = 'grep';
|
||||
{$else linux}
|
||||
GrepExeName = 'c:\djgpp\bin\grep.exe';
|
||||
GrepExeName = 'grep.exe';
|
||||
{$endif linux}
|
||||
begin
|
||||
GrepExe:=GrepExeName;
|
||||
If not LocateExeFile(GrepExe) then
|
||||
Begin
|
||||
ErrorBox('Grep program not found',nil);
|
||||
Exit;
|
||||
End;
|
||||
R.Assign(0,0,45,6);
|
||||
new(PGrepDialog,Init(R,'Grep arguments'));
|
||||
with PGrepDialog^ do
|
||||
@ -80,12 +86,12 @@ begin
|
||||
Insert(New(PLabel, Init(R2, '~G~rep arguments', IL)));
|
||||
end;
|
||||
|
||||
InsertButtons(PGrepDialog);
|
||||
InsertButtons(PGrepDialog);
|
||||
if Desktop^.ExecView(PGrepDialog)=cmOK then
|
||||
begin
|
||||
GrepArgs:=IL^.Data^;
|
||||
{ Linux ? }
|
||||
if not ExecuteRedir(GrepExeName,GrepArgs,GrepOutName,'grep$$.err') then
|
||||
if not ExecuteRedir(GrepExe,GrepArgs,GrepOutName,'grep$$.err') then
|
||||
Begin
|
||||
{ 2 as exit code just means that
|
||||
some file vwere not found ! }
|
||||
@ -121,7 +127,16 @@ begin
|
||||
end;
|
||||
{
|
||||
$Log$
|
||||
Revision 1.4 1999-02-04 15:59:08 pierre
|
||||
Revision 1.5 1999-02-05 12:11:59 pierre
|
||||
+ SourceDir that stores directories for sources that the
|
||||
compiler should not know about
|
||||
Automatically asked for addition when a new file that
|
||||
needed filedialog to be found is in an unknown directory
|
||||
Stored and retrieved from INIFile
|
||||
+ Breakpoints conditions added to INIFile
|
||||
* Breakpoints insterted and removed at debin and end of debug session
|
||||
|
||||
Revision 1.4 1999/02/04 15:59:08 pierre
|
||||
* grep$$$.out was not closed
|
||||
|
||||
Revision 1.3 1999/02/04 13:32:09 pierre
|
||||
|
||||
@ -137,7 +137,7 @@ procedure ReadSwitches(const fn:string);
|
||||
{ initialize }
|
||||
procedure InitSwitches;
|
||||
procedure DoneSwitches;
|
||||
function GetUnitDirectories : string;
|
||||
function GetSourceDirectories : string;
|
||||
|
||||
|
||||
implementation
|
||||
@ -616,21 +616,30 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function GetUnitDirectories : string;
|
||||
function GetSourceDirectories : string;
|
||||
var
|
||||
P : PStringItem;
|
||||
S : String;
|
||||
c : char;
|
||||
function checkitem(P:PSwitchItem):boolean;{$ifndef FPC}far;{$endif}
|
||||
begin
|
||||
CheckItem:=(P^.Typ=ot_string) and (P^.Param='u');
|
||||
end;
|
||||
begin
|
||||
GetUnitDirectories:='';
|
||||
GetSourceDirectories:='';
|
||||
c:='u';
|
||||
P:=DirectorySwitches^.Items^.FirstThat(@CheckItem);
|
||||
S:='';
|
||||
if assigned(P) then
|
||||
S:=P^.Str[SwitchesMode];
|
||||
c:='i';
|
||||
P:=DirectorySwitches^.Items^.FirstThat(@CheckItem);
|
||||
if assigned(P) then
|
||||
Begin
|
||||
GetUnitDirectories:=P^.Str[SwitchesMode];
|
||||
exit;
|
||||
End;
|
||||
S:=P^.Str[SwitchesMode]+';'+S;
|
||||
if S='' then
|
||||
GetSourceDirectories:=SourceDirs+';'
|
||||
else
|
||||
GetSourceDirectories:=SourceDirs+';'+S+';';
|
||||
end;
|
||||
|
||||
{*****************************************************************************
|
||||
@ -724,6 +733,7 @@ begin
|
||||
AddStringItem('~O~bject directories','o',true);
|
||||
AddStringItem('~E~XE & PPU directories','E',true);
|
||||
end;
|
||||
|
||||
New(LibLinkerSwitches,InitSelect('X'));
|
||||
with LibLinkerSwitches^ do
|
||||
begin
|
||||
@ -775,7 +785,16 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.4 1999-02-04 13:32:10 pierre
|
||||
Revision 1.5 1999-02-05 12:12:00 pierre
|
||||
+ SourceDir that stores directories for sources that the
|
||||
compiler should not know about
|
||||
Automatically asked for addition when a new file that
|
||||
needed filedialog to be found is in an unknown directory
|
||||
Stored and retrieved from INIFile
|
||||
+ Breakpoints conditions added to INIFile
|
||||
* Breakpoints insterted and removed at debin and end of debug session
|
||||
|
||||
Revision 1.4 1999/02/04 13:32:10 pierre
|
||||
* Several things added (I cannot commit them independently !)
|
||||
+ added TBreakpoint and TBreakpointCollection
|
||||
+ added cmResetDebugger,cmGrep,CmToggleBreakpoint
|
||||
|
||||
@ -22,11 +22,13 @@ uses Objects;
|
||||
const
|
||||
{$ifdef linux}
|
||||
dirsep = '/';
|
||||
listsep = [';',':'];
|
||||
exeext = '';
|
||||
pasext = '.pas';
|
||||
ppext = '.pp';
|
||||
{$else}
|
||||
dirsep = '\';
|
||||
listsep = [';'];
|
||||
exeext = '.exe';
|
||||
pasext = '.pas';
|
||||
ppext = '.pp';
|
||||
@ -70,6 +72,7 @@ function ExistsFile(const FileName: string): boolean;
|
||||
function CompleteDir(const Path: string): string;
|
||||
function LocateFile(FileList: string): string;
|
||||
function LocatePasFile(const FileName:string):string;
|
||||
function LocateExeFile(var FileName:string): boolean;
|
||||
function GetStr(P: PString): string;
|
||||
|
||||
const LastStrToIntResult : integer = 0;
|
||||
@ -436,7 +439,9 @@ end;
|
||||
|
||||
function CompleteDir(const Path: string): string;
|
||||
begin
|
||||
if (Path<>'') and (Path[Length(Path)]<>DirSep) then
|
||||
{ keep c: untouched PM }
|
||||
if (Path<>'') and (Path[Length(Path)]<>DirSep) and
|
||||
(Path[Length(Path)]<>':') then
|
||||
CompleteDir:=Path+DirSep
|
||||
else
|
||||
CompleteDir:=Path;
|
||||
@ -494,6 +499,37 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function LocateExeFile(var FileName:string): boolean;
|
||||
var
|
||||
dir,s : string;
|
||||
i : longint;
|
||||
begin
|
||||
LocateExeFile:=False;
|
||||
if ExistsFile(FileName) then
|
||||
begin
|
||||
LocateExeFile:=true;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
S:=GetEnv('PATH');
|
||||
i:=1;
|
||||
While Length(S)>0 do
|
||||
begin
|
||||
While (i<=Length(S)) and not (S[i] in ListSep) do
|
||||
Inc(i);
|
||||
Dir:=CompleteDir(Copy(S,1,i-1));
|
||||
if i<Length(S) then
|
||||
S:=Copy(S,i+1,255)
|
||||
else
|
||||
S:='';
|
||||
if ExistsFile(Dir+FileName) then
|
||||
Begin
|
||||
FileName:=Dir+FileName;
|
||||
LocateExeFile:=true;
|
||||
Exit;
|
||||
End;
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetStr(P: PString): string;
|
||||
begin
|
||||
@ -505,7 +541,16 @@ end;
|
||||
END.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.5 1999-02-02 16:41:43 peter
|
||||
Revision 1.6 1999-02-05 12:12:01 pierre
|
||||
+ SourceDir that stores directories for sources that the
|
||||
compiler should not know about
|
||||
Automatically asked for addition when a new file that
|
||||
needed filedialog to be found is in an unknown directory
|
||||
Stored and retrieved from INIFile
|
||||
+ Breakpoints conditions added to INIFile
|
||||
* Breakpoints insterted and removed at debin and end of debug session
|
||||
|
||||
Revision 1.5 1999/02/02 16:41:43 peter
|
||||
+ automatic .pas/.pp adding by opening of file
|
||||
* better debuggerscreen changes
|
||||
|
||||
|
||||
@ -2352,14 +2352,14 @@ begin
|
||||
|
||||
HelpCtx:=hcInfoWindow;
|
||||
|
||||
GetExtent(R); R.Grow(-1,-1); R.B.Y:=R.A.Y+4;
|
||||
GetExtent(R); R.Grow(-1,-1); R.B.Y:=R.A.Y+3;
|
||||
C:=((Desktop^.GetColor(32+6) and $f0) or White)*256+Desktop^.GetColor(32+6);
|
||||
New(InfoST, Init(R,'', C)); InfoST^.GrowMode:=gfGrowHiX;
|
||||
InfoST^.DontWrap:=true;
|
||||
Insert(InfoST);
|
||||
GetExtent(R); R.Grow(-1,-1); Inc(R.A.Y,4); R.B.Y:=R.A.Y+1;
|
||||
GetExtent(R); R.Grow(-1,-1); Inc(R.A.Y,3); R.B.Y:=R.A.Y+1;
|
||||
New(ST, Init(R, CharStr('Ä', MaxViewWidth))); ST^.GrowMode:=gfGrowHiX; Insert(ST);
|
||||
GetExtent(R); R.Grow(-1,-1); Inc(R.A.Y,5);
|
||||
GetExtent(R); R.Grow(-1,-1); Inc(R.A.Y,4);
|
||||
R2.Copy(R); Inc(R2.B.Y); R2.A.Y:=R2.B.Y-1;
|
||||
New(HSB, Init(R2)); HSB^.GrowMode:=gfGrowLoY+gfGrowHiY+gfGrowHiX; Insert(HSB);
|
||||
R2.Copy(R); Inc(R2.B.X); R2.A.X:=R2.B.X-1;
|
||||
@ -2403,7 +2403,7 @@ end;
|
||||
procedure TProgramInfoWindow.Update;
|
||||
begin
|
||||
InfoST^.SetText(
|
||||
#13+
|
||||
{#13+ }
|
||||
' Current module : '+MainFile+#13+
|
||||
' Last exit code : '+IntToStr(LastExitCode)+#13+
|
||||
' Available memory : '+IntToStrL(MemAvail div 1024,5)+'K'+#13+
|
||||
@ -2992,7 +2992,7 @@ function TryToOpen(const DD : dirstr): PSourceWindow;
|
||||
var Found: boolean;
|
||||
W : PSourceWindow;
|
||||
begin
|
||||
D:=DD;
|
||||
D:=CompleteDir(DD);
|
||||
Found:=true;
|
||||
if E<>'' then Found:=CheckExt(E) else
|
||||
if CheckExt('.pp') then Found:=true else
|
||||
@ -3049,11 +3049,13 @@ begin
|
||||
if W<>nil then
|
||||
begin
|
||||
NewEditorOpened:=false;
|
||||
if assigned(Bounds) then
|
||||
W^.ChangeBounds(Bounds^);
|
||||
W^.Editor^.SetCurPtr(CurX,CurY);
|
||||
end
|
||||
else
|
||||
begin
|
||||
DrStr:=GetUnitDirectories;
|
||||
DrStr:=GetSourceDirectories;
|
||||
While pos(';',DrStr)>0 do
|
||||
Begin
|
||||
W:=TryToOpen(Copy(DrStr,1,pos(';',DrStr)-1));
|
||||
@ -3074,7 +3076,16 @@ end;
|
||||
END.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.8 1999-02-04 17:45:23 pierre
|
||||
Revision 1.9 1999-02-05 12:12:02 pierre
|
||||
+ SourceDir that stores directories for sources that the
|
||||
compiler should not know about
|
||||
Automatically asked for addition when a new file that
|
||||
needed filedialog to be found is in an unknown directory
|
||||
Stored and retrieved from INIFile
|
||||
+ Breakpoints conditions added to INIFile
|
||||
* Breakpoints insterted and removed at debin and end of debug session
|
||||
|
||||
Revision 1.8 1999/02/04 17:45:23 pierre
|
||||
+ BrowserAtCursor started
|
||||
* bug in TryToOpenFile removed
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user