AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/misc/EasyLibs.lha

Mirror:Random
Showing: ppc-morphos icongeneric icon
No screenshot available
Short:Tools to simplify shared libraries
Author: wiedmann at zdv.uni-tuebingen.de
Uploader:wiedmann zdv uni-tuebingen de
Type:dev/misc
Architecture:m68k-amigaos
Date:1994-07-09
Download:dev/misc/EasyLibs.lha - View contents
Readme:dev/misc/EasyLibs.readme
Downloads:803


This is EasyLibs 1.0, a package of tools and sources to create a shared
library.

Programming shared libraries is often somewhat nasty: You have to create
the library header which is done in Assembler (until now :-), you
have to maintain FD files, prototypes, pragmas, autodocs and all that
kind of stuff. EasyLibs is my try to do this with less work, even more:
Most parts are created automatically.

EasyLibs consists of the following parts:

  - LibHeader.c 1.0, a complete and universal library header which can
    be used for any type of library you want. Never again edit the
    header, just change some preprocessor symbols! LibHeader.c is
    written in C completely.

    LibHeader.c, however, can be used by the Dice compiler only. To be
    precise: You need a possibility to put the resident structure into
    the code segment.  Dice allows this by declaring the struct as
    "const".

  - Xtract 1.1, a small tool which extracts prototypes, FD files and
    Autodocs from source files. (I personally prefer "autodoc" from the
    NDU for the latter purpose, however.)

  - fd2pragma 2.2, a program which can read FD files and convert them
    into either pragma files for different compilers (Aztec, SAS, Dice,
    Maxon), LVO files to be read by assemblers or function tables to
    be read by LibHeader.c.

  - HelloWorld.library 40.1, a small shared library which shows how to
    use these tools.


Some notes on using LibHeader.c. (Some of them hold true for any library
regardless of using LibHeader.c)

  - You might well use global data; either initialized or uninitialized,
    but keep in mind that this is a *shared* library: Your data will be
    shared by different tasks. In general one uses only things like
    library base pointers or similar stuff in global data.

  - The startup code of LibHeader.c does *not* zero the BSS segment.
    Unlike usual C programming you can not expect that variables are
    0 or NULL, respectively, except if you force this by using something
    like
	struct IntuitionBase *IntuitionBase = NULL;

  - It is possible to use the small data model. However, you need to
    setup the a4 register when entering the library. Best way to ensure
    this is declaring all library functions which are visible to the
    outside world as SAVEDS. (See HelloWorldLib.c)

  - Dice has the peculiarity to precede function names with an '@' instead
    of the usual '_', if they expect arguments in registers. If they don't
    expect arguments, however, Dice will use the '_' too. So always let
    your library functions expect at least one argument, (The library base
    pointer in a6 is a good choice.) even if you don't need it. The linker
    will claim missing symbols otherwise.


EasyLibs is in the public domain, use it as you want, but WITHOUT ANY
WARRANTY. Bugs, suggestions, notes and beer bottles to

	Jochen Wiedmann
	Am Eisteich 9
	72555 Metzingen
	Germany

	Phone: 07123 / 14881
	Internet: wiedmann@zdv.uni-tuebingen.de


Contents of dev/misc/EasyLibs.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  791    2858  27.7% -lh5- 2dc0 Jul  4  1994 EasyLibs/DMakefile
[generic]                 1526    3129  48.8% -lh5- fb93 Jul  5  1994 EasyLibs/EasyLibs.readme
[generic]                 7152   28897  24.7% -lh5- 7805 Jul  4  1994 EasyLibs/fd2pragma.c
[generic]                 1375    2988  46.0% -lh5- b8b1 Jul  5  1994 EasyLibs/fd2pragma.readme
[generic]                  315     675  46.7% -lh5- 1ca6 Jul  4  1994 EasyLibs/HelloWorld.c
[generic]                  955    2243  42.6% -lh5- 32c2 Jul  4  1994 EasyLibs/HelloWorldLib.c
[generic]                  537    1120  47.9% -lh5- 6372 Mar 23  1994 EasyLibs/iprintf.a
[generic]                 3956   11849  33.4% -lh5- bd4a Jul  4  1994 EasyLibs/LibHeader.c
[generic]                 2355    6202  38.0% -lh5- 7b1b Apr 18  1994 EasyLibs/Xtract.c
[generic]                   81      85  95.3% -lh5- 70d2 Jul  6  1994 EasyLibs/include/clib/HelloWorld_protos.h
[generic]                  111     122  91.0% -lh5- 8d79 Jul  6  1994 EasyLibs/include/fd/HelloWorld_lib.fd
[generic]                  184     326  56.4% -lh5- d77d Jul  6  1994 EasyLibs/include/pragmas/HelloWorld_pragmas.h
[generic]                  433     684  63.3% -lh5- 3d32 Jul  6  1994 EasyLibs/libs/HelloWorld.library
[generic]                11204   19880  56.4% -lh5- 6322 Jul  6  1994 EasyLibs/fd2pragma
[generic]                 4150    6428  64.6% -lh5- c94e Jul  6  1994 EasyLibs/HelloWorld
[generic]                  168     228  73.7% -lh5- f34f Jul  6  1994 EasyLibs/LibFuncTable.c
[generic]                 6694   10592  63.2% -lh5- c805 Jul  6  1994 EasyLibs/Xtract
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        17 files   41987   98306  42.7%            Jul  9  1994
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>