2
0
Эх сурвалжийг харах

* updated for auto objpas loading

peter 27 жил өмнө
parent
commit
5c40dd43d7

+ 6 - 24
rtl/objpas/math.pp

@@ -36,13 +36,12 @@
 }
 
 unit math;
+interface
 
-  interface
+{$MODE objfpc}
 
-{$ifdef USE_EXCEPTIONS}
     uses
        sysutils;
-{$endif}
 
     type
        { the original delphi functions use extended as argument, }
@@ -52,9 +51,7 @@ unit math;
 
        tpaymenttime = (ptendofperiod,ptstartofperiod);
 
-{$ifdef USE_EXCEPTIONS}
        einvalidargument = class(ematherror);
-{$endif}
 
 { angle conversion }
 
@@ -614,7 +611,10 @@ end.
 
 {
     $Log$
-    Revision 1.4  1998-09-18 23:57:27  michael
+    Revision 1.5  1998-09-24 23:45:26  peter
+      * updated for auto objpas loading
+
+    Revision 1.4  1998/09/18 23:57:27  michael
     * Changed use_excepions to useexceptions
 
     Revision 1.3  1998/09/09 15:29:05  peter
@@ -622,22 +622,4 @@ end.
 
     Revision 1.2  1998/07/29 15:44:34  michael
      included sysutils and math.pp as target. They compile now.
-
-    Revision 1.1.1.1  1998/03/25 11:18:49  root
-    * Restored version
-
-    Revision 1.2  1998/02/12 22:23:14  michael
-    + All functions implemented, but untested
-
-    Revision 1.1  1998/02/05 11:11:31  michael
-    + moved to objpas directory
-
-    Revision 1.3  1998/02/03 15:27:06  florian
-    *** empty log message ***
-
-    Revision 1.2  1998/02/01 23:32:37  florian
-      + some basic statistical functions
-
-    Revision 1.1  1998/02/01 22:38:31  florian
-      + initial revision
 }

+ 31 - 46
rtl/objpas/sysutils.pp

@@ -13,19 +13,23 @@
 
  **********************************************************************}
 unit sysutils;
-
 interface
 
+{$MODE objfpc}
+
     uses
     {$ifdef linux}
-       linux,
+       linux
     {$else}
-       dos,
-    {$ifdef go32v2}
-       go32,
-    {$endif go32v2}
+       dos
+      {$ifdef go32v2}
+         ,go32
+      {$endif go32v2}
     {$endif linux}
-       objpas;
+    {$ifndef AUTOOBJPAS}
+       ,objpas
+    {$endif}   
+       ;
 
 
     type
@@ -43,7 +47,6 @@ interface
           lo,hi : byte;
        end;
 
-{$ifdef USE_EXCEPTIONS}
        { exceptions }
        exception = class(TObject)
         private
@@ -68,7 +71,6 @@ interface
        eintoverflow = class(einterror);
        ematherror = class(exception);
 
-{$endif USE_EXCEPTIONS}
 
   { Read date & Time function declarations }
   {$i datih.inc}
@@ -103,7 +105,6 @@ interface
   { Read pchar handling functions implementation }
   {$i syspch.inc}
 
-{$ifdef USE_EXCEPTIONS}
     constructor exception.create(const msg : string);
 
       begin
@@ -126,48 +127,48 @@ interface
          inherited create;
          {!!!!!}
       end;
+
        
 Procedure CatchUnhandledException (Obj : TObject; Addr: Pointer);    
-
-Var Message : String;
-
+Var
+  Message : String;
 begin
 {$ifndef USE_WINDOWS}
-Writeln ('An unhandled exception occurred at ',HexStr(Longint(Addr),8),' : ');
-if Obj is exception then
-  begin
-  Message:=Exception(Obj).Message;
-  Writeln (Message);
-  end
-else
-  Writeln ('Exception object ',Obj.ClassName,' is not of class Exception.');
-Halt(217);
+  Writeln ('An unhandled exception occurred at ',HexStr(Longint(Addr),8),' : ');
+  if Obj is exception then
+   begin
+     Message:=Exception(Obj).Message;
+     Writeln (Message);
+   end
+  else
+   Writeln ('Exception object ',Obj.ClassName,' is not of class Exception.');
+  Halt(217);
 {$else}
 {$endif}  
 end;
 
-{$endif USE_EXCEPTIONS}
 
 Procedure InitExceptions;
 {
- Must install uncaught exception handler (ExceptProc)
- and install exceptions for system exceptions or signals.
- (e.g: SIGSEGV -> ESegFault or so.)
+  Must install uncaught exception handler (ExceptProc)
+  and install exceptions for system exceptions or signals.
+  (e.g: SIGSEGV -> ESegFault or so.)
 }
 begin
-{$ifdef USE_EXCEPTIONS}
   ExceptProc:=@CatchUnhandledException;   
-{$endif}
 end;
 
+
 {Initialization code.}
 begin
   InitExceptions;
 end.
-
 {
     $Log$
-    Revision 1.9  1998-09-24 16:13:49  michael
+    Revision 1.10  1998-09-24 23:45:27  peter
+      * updated for auto objpas loading
+
+    Revision 1.9  1998/09/24 16:13:49  michael
     Changes in exception and open array handling
 
     Revision 1.8  1998/09/18 23:57:26  michael
@@ -188,20 +189,4 @@ end.
 
     Revision 1.3  1998/07/29 15:44:32  michael
      included sysutils and math.pp as target. They compile now.
-
-    Revision 1.2  1998/04/10 15:18:21  michael
-    Added a lot of functions donated by GertJan Schouten
-
-    Revision 1.1.1.1  1998/03/25 11:18:49  root
-    * Restored version
-
-    Revision 1.1  1998/02/05 11:11:32  michael
-    + moved to objpas directory
-
-    Revision 1.2  1998/02/03 15:27:25  florian
-    *** empty log message ***
-
-    Revision 1.1  1998/02/01 23:32:01  florian
-      + initial revision
-
 }

+ 11 - 5
rtl/objpas/typinfo.pp

@@ -21,10 +21,13 @@ unit typinfo;
 
   interface
 
-    uses objpas;
-{
-       sysutils;
-}
+{$MODE objfpc}
+
+{$ifndef AUTOOBJPAS}
+    uses
+      objpas;
+{$endif}
+
 // temporary types:
 
     type
@@ -367,7 +370,10 @@ end.
 
 {
   $Log$
-  Revision 1.10  1998-09-20 08:25:34  florian
+  Revision 1.11  1998-09-24 23:45:28  peter
+    * updated for auto objpas loading
+
+  Revision 1.10  1998/09/20 08:25:34  florian
     + description of tpropinfo.propprocs bit 6 added
 
   Revision 1.9  1998/09/19 15:25:45  florian