Browse Source

* added more defines

nils 22 years ago
parent
commit
b41e4e52f0
1 changed files with 55 additions and 16 deletions
  1. 55 16
      packages/extra/amunits/inc/useautoopenlib.inc

+ 55 - 16
packages/extra/amunits/inc/useautoopenlib.inc

@@ -18,34 +18,73 @@
  **********************************************************************}
  **********************************************************************}
 
 
 {
 {
-   This includefile sets the define use_auto_openlib.
+   In this includefile you can set some defines on how
+   to compile amiga units.
    
    
-   It is set as standard and it means that all units 
-   you use in your program will open the library itself.
-   You don't have to worry about that.
-
-   If you don't like the idea of autoopening of libraries
-   or if you want to save on memoryuse cause some library
-   will get opened and never used then just put a space 
-   before $define use_auto_openlib.
+   use_auto_openlib.
+   If you use use_auto_openlib the unit will compile
+   with autoopening of the unit at startup. You don't
+   have to think about open and close the library, all
+   is done in the unit. One problem is that the library
+   will be loaded at startup so there can be a memory-
+   problem. As default I have compiled all amiga system
+   units as autoopened. Exec, intuition, amigados and
+   utility is all opened on startup by sysamiga.
    
    
-   Be aware of that you have to open the library yourself.
+
+   use_init_openlib.
+   If you compile with this define you get a procedure
+   in every unit as an example for asl.library you
+   have "procedure InitAslLibrary;". All you have to
+   do is 
+   InitAslLibrary in the beginning of your program.
+   You don't have to close the library the unit will
+   handle that.
    
    
-   You don't have to open exec, amigados, utility and
-   intuition they are opened by default.
+   dont_use_openlib.
+   This is the standard amiga way. You have to open
+   the library yourself and at the end close it.
+
+   When you compile a unit you will get warnings or
+   info on how the defines are set.
 
 
+   First version of this include.
    11 Jan 2003.
    11 Jan 2003.
 
 
+   Added use_init_openlib and dont_use_openlib.
+   21 Jan 2003.
+
    [email protected]
    [email protected]
 
 
 }
 }
 
 
-{$ifndef use_auto_openlib}
-   {$define use_auto_openlib}
-{$endif}
+{ 
+   Make sure that there is only one define set.
+   Just put a space before the define to undef
+}
+
+{$define use_auto_openlib}
+{ $define use_init_openlib}
+{ $define dont_use_openlib}
+
+{$ifdef use_auto_openlib}
+   {$undef use_init_openlib}
+   {$undef use_init_openlib}
+{$endif use_auto_openlib}
+
+{$ifdef use_init_openlib}
+   {$undef use_auto_openlib}
+   {$undef dont_use_openlib}
+{$endif use_init_openlib}
+
+{$ifdef dont_use_openlib}
+   {$undef use_auto_openlib}
+   {$undef use_init_openlib}
+{$endif dont_use_openlib}
+
 
 
 {
 {
   $Log
   $Log
 }
 }
 
 
-  
+