home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / libraries / easylibs.lha / EasyLibs / EasyLibs.readme < prev    next >
Encoding:
Text File  |  1994-07-05  |  3.1 KB  |  78 lines

  1. short: Tools to simplify shared libraries
  2. type: dev/misc
  3. author: wiedmann@zdv.uni-tuebingen.de
  4. uploader: wiedmann@zdv.uni-tuebingen.de
  5.  
  6.  
  7. This is EasyLibs 1.0, a package of tools and sources to create a shared
  8. library.
  9.  
  10. Programming shared libraries is often somewhat nasty: You have to create
  11. the library header which is done in Assembler (until now :-), you
  12. have to maintain FD files, prototypes, pragmas, autodocs and all that
  13. kind of stuff. EasyLibs is my try to do this with less work, even more:
  14. Most parts are created automatically.
  15.  
  16. EasyLibs consists of the following parts:
  17.  
  18.   - LibHeader.c 1.0, a complete and universal library header which can
  19.     be used for any type of library you want. Never again edit the
  20.     header, just change some preprocessor symbols! LibHeader.c is
  21.     written in C completely.
  22.  
  23.     LibHeader.c, however, can be used by the Dice compiler only. To be
  24.     precise: You need a possibility to put the resident structure into
  25.     the code segment.  Dice allows this by declaring the struct as
  26.     "const".
  27.  
  28.   - Xtract 1.1, a small tool which extracts prototypes, FD files and
  29.     Autodocs from source files. (I personally prefer "autodoc" from the
  30.     NDU for the latter purpose, however.)
  31.  
  32.   - fd2pragma 2.2, a program which can read FD files and convert them
  33.     into either pragma files for different compilers (Aztec, SAS, Dice,
  34.     Maxon), LVO files to be read by assemblers or function tables to
  35.     be read by LibHeader.c.
  36.  
  37.   - HelloWorld.library 40.1, a small shared library which shows how to
  38.     use these tools.
  39.  
  40.  
  41. Some notes on using LibHeader.c. (Some of them hold true for any library
  42. regardless of using LibHeader.c)
  43.  
  44.   - You might well use global data; either initialized or uninitialized,
  45.     but keep in mind that this is a *shared* library: Your data will be
  46.     shared by different tasks. In general one uses only things like
  47.     library base pointers or similar stuff in global data.
  48.  
  49.   - The startup code of LibHeader.c does *not* zero the BSS segment.
  50.     Unlike usual C programming you can not expect that variables are
  51.     0 or NULL, respectively, except if you force this by using something
  52.     like
  53.     struct IntuitionBase *IntuitionBase = NULL;
  54.  
  55.   - It is possible to use the small data model. However, you need to
  56.     setup the a4 register when entering the library. Best way to ensure
  57.     this is declaring all library functions which are visible to the
  58.     outside world as SAVEDS. (See HelloWorldLib.c)
  59.  
  60.   - Dice has the peculiarity to precede function names with an '@' instead
  61.     of the usual '_', if they expect arguments in registers. If they don't
  62.     expect arguments, however, Dice will use the '_' too. So always let
  63.     your library functions expect at least one argument, (The library base
  64.     pointer in a6 is a good choice.) even if you don't need it. The linker
  65.     will claim missing symbols otherwise.
  66.  
  67.  
  68. EasyLibs is in the public domain, use it as you want, but WITHOUT ANY
  69. WARRANTY. Bugs, suggestions, notes and beer bottles to
  70.  
  71.     Jochen Wiedmann
  72.     Am Eisteich 9
  73.     72555 Metzingen
  74.     Germany
  75.  
  76.     Phone: 07123 / 14881
  77.     Internet: wiedmann@zdv.uni-tuebingen.de
  78.