Browse Source

* updates with the compiler browcol

peter 26 năm trước cách đây
mục cha
commit
44e895a1a3
2 tập tin đã thay đổi với 84 bổ sung7 xóa
  1. 75 1
      ide/fake/compiler/browcol.pas
  2. 9 6
      ide/fake/gdb/gdbint.pas

+ 75 - 1
ide/fake/compiler/browcol.pas

@@ -126,11 +126,29 @@ type
        function At(Index: Sw_Integer): PReference;
     end;
 
+    PSourceFile = ^TSourceFile;
+    TSourceFile = object(TObject)
+      SourceFileName: PString;
+      ObjFileName: PString;
+      PPUFileName: PString;
+      constructor Init(ASourceFileName, AObjFileName, APPUFileName: string);
+      destructor  Done; virtual;
+      function    GetSourceFilename: string;
+      function    GetObjFileName: string;
+      function    GetPPUFileName: string;
+    end;
+
+    PSourceFileCollection = ^TSourceFileCollection;
+    TSourceFileCollection = object(TCollection)
+      function At(Index: sw_Integer): PSourceFile;
+    end;
+
 const
   Modules     : PSymbolCollection = nil;
   ModuleNames : PModuleNameCollection = nil;
   TypeNames   : PTypeNameCollection = nil;
   ObjectTree  : PObjectSymbol = nil;
+  SourceFiles : PSourceFileCollection = nil;
 
 function SearchObjectForSymbol(O: PSymbol): PObjectSymbol;
 
@@ -143,6 +161,20 @@ procedure RegisterSymbols;
 
 implementation
 
+
+{****************************************************************************
+                                   Helpers
+****************************************************************************}
+
+function GetStr(P: PString): string;
+begin
+  if P=nil then
+    GetStr:=''
+  else
+    GetStr:=P^;
+end;
+
+
 {****************************************************************************
                                 TStoreCollection
 ****************************************************************************}
@@ -347,6 +379,45 @@ destructor TObjectSymbol.Done;
 begin
 end;
 
+{****************************************************************************
+                                TSourceFile
+****************************************************************************}
+
+constructor TSourceFile.Init(ASourceFileName, AObjFileName, APPUFileName: string);
+begin
+  inherited Init;
+  SourceFileName:=NewStr(ASourceFileName);
+  ObjFileName:=NewStr(AObjFileName);
+  PPUFileName:=NewStr(APPUFileName);
+end;
+
+destructor TSourceFile.Done;
+begin
+  inherited Done;
+  if assigned(SourceFileName) then DisposeStr(SourceFileName);
+  if assigned(ObjFileName) then DisposeStr(ObjFileName);
+  if assigned(PPUFileName) then DisposeStr(PPUFileName);
+end;
+
+function TSourceFile.GetSourceFilename: string;
+begin
+  GetSourceFilename:=GetStr(SourceFileName);
+end;
+
+function TSourceFile.GetObjFileName: string;
+begin
+  GetObjFilename:=GetStr(ObjFileName);
+end;
+
+function TSourceFile.GetPPUFileName: string;
+begin
+  GetPPUFilename:=GetStr(PPUFileName);
+end;
+
+function TSourceFileCollection.At(Index: sw_Integer): PSourceFile;
+begin
+  At:=inherited At(Index);
+end;
 
 {*****************************************************************************
                               Main Routines
@@ -429,7 +500,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.3  1999-08-05 16:54:35  peter
+  Revision 1.4  1999-08-17 13:25:16  peter
+    * updates with the compiler browcol
+
+  Revision 1.3  1999/08/05 16:54:35  peter
     * win32 fixes
 
   Revision 1.2  1999/04/07 21:55:39  peter

+ 9 - 6
ide/fake/gdb/gdbint.pas

@@ -159,11 +159,11 @@ procedure TGDBInterface.DoUserScreen;
 begin
 end;
 
-function  tgdbinterface.AllowQuit : boolean;                                                                                                                                                                                                                   
-begin                                                                                                                                                                                                                                                          
-  AllowQuit:=true;                                                                                                                                                                                                                                             
-end;                                                                                                                                                                                                                                                           
-                                                                                                                                                                                                                                                               
+function  tgdbinterface.AllowQuit : boolean;
+begin
+  AllowQuit:=true;
+end;
+
 function  GDBVersion : string;
 begin
   GDBVersion:='Fake GDB';
@@ -266,7 +266,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.3  1999-07-13 11:25:57  peter
+  Revision 1.4  1999-08-17 13:25:17  peter
+    * updates with the compiler browcol
+
+  Revision 1.3  1999/07/13 11:25:57  peter
     * fixed typo in gdbversion
 
   Revision 1.2  1999/07/12 13:08:20  pierre