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

dev/c/CLib37x.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Example.library in 100% C
Author:Andreas R. Kleinert (and a lot of other people - see below)
Uploader:info ar-kleinert de
Type:dev/c
Architecture:m68k-amigaos
Date:2000-04-22
Download:http://aminet.net/dev/c/CLib37x.lha - View contents
Readme:http://aminet.net/dev/c/CLib37x.readme
Downloads:1485

  example.library V37.34 (22.4.2000)

  An Amiga shared library in 100 % C language - coming with sources.

  Compiler Checklist:        Compiler             Support
                             -------------------------------
   (see README.<compiler>    SAS/C 6.5x           yes
    for more information)    MaxonC 3.x           yes
                             StormC 2.x           yes
                             DICE 3.x             yes
                             GCC 2.7.2.1          yes
                             vbcc 0.5+            yes
                             AztecC               (not tested)

  OS Checklist:              Operating System     Support
                             -------------------------------
                             Amiga OS 37-40       yes
                             AROS 1.x             yes (AROS source tree)
                             MorphOS 0.x 68k emu  yes (68k emulation)
                             MorphOS 0.x PPC nat  (not yet adjusted)

  Original SAS/C and StormC version (C) 1996-2000 by Andreas R. Kleinert.
  StormC rework/additions done 1999 by Fredrik Rambris.
  MaxonC version changes done 1996 by Helmut Hummel and Stephan Rupprecht.
  GCC version changes done 1997 by Stefan Fuchs and Gunter Nikl.
  AROS source tree done 1997 by Aaron Digulla.
  VBCC version changes done 1997 by Patrizio Biancalani and Patrick Burnand.
  DICE adaptation done 1998 by Patrick Burnand.
  All rights reserved.
  ----------------------------------------------------------------------
  This sample library intends to make Amiga shared library sources
  compileable with any available Amiga C compiler - without any
  changes to the source code.

  And maybe in the future also running under any Amiga compatible
  operating system with any CPU (e.g. AROS <http://www.aros.org>
  or MorphOS <http://www.morphos.de).

  The first goal seams to be easily done: nearly any noticeable compiler
  for the Amiga does support generation of libraries by special
  linker commands and pre-generated object files.

  But when looking into the details, one will find out, that these
  linker functionality just reduces the influence of the programmer
  on how his sources are handled, that the pre-generated object
  files just originally were done in Assembler, and that each compiler
  does define its own interface definitions and usage rules.

  But as a programmer, it is important to have control over the _complete_
  source code and to be able to compile it _anywhere_ with only
  minor changes, even better without any changes.

  Since most Amiga system modules - noticeable Libraries, Devices and
  Resources - do have startup-modules and other larger parts completely
  written in Assembler language, the most important task for getting
  inter-compiler and operating system independant sources in my opinion
  is, to completely migrate the interfaces to C language (but different
  to AROS, for example, it is most important, to keep the sources running
  under the current 68k AmigaOS in the _first_ place - with MorphOS
  two aspects are to consider: keep 68k libraries compatible with the
  emulation (any which aren't broken will run) and keep the sources
  capable of being compiled PPC-native as well).

  This goal basically has been reached already, still missing of
  course are some of the less Amiga-native compilers and also
  tests with any kind of "AmigaOS for PowerPC" or other CPUs.

  But since Assembler is nearly as portability-hostile as BCPL _today_
  we may come quite close to the goal defined above by just moving
  towards C and making some smart inter-compiler #defines.

  Translate your 68k-assembler library startup-codes easily
  to C by simply using this source-code as an advice how to do it.

  For testing: install the (re)compiled example.library to LIBS: and
  start the test program - it should pop up a requester, then.

  If you can submit adjustments for the other compilers as mentioned
  above: feel free to send these.
  ---
  Feel free to use this source for own projects.

  It is allowed to be spread and distributed anywhere, as far
  as my consent is concerned.

  Amiga International, or the current owner of the technologie,
  is allowed to always put this source on their newest
  Developer CD-ROM.

  Any form of credits will be greatly appreciated.

  ** General PerSuaSiVe SoftWorX WWW Support Site is http://www.ar-kleinert.de
**
   _________________________________________________________
  |      You may reach me the following way.                |
  |    Send bug-reports, money or whatever to:              |
  |---------------------------------------------------------|
  |        * SuperView Development & Registration *         |
  |          * DRAFU Development & Registration *           |
  |       * Image Engineer Registration Site Europe *       |
  |                                                         |
  |                                                         |
  |                  PerSuaSiVe SoftWorX                    |
  |                                                         |
  |                  Andreas R. Kleinert                    |
  |                  Am Kornberg 48                         |
  |                  D-57076 Siegen                         |
  |                  Germany, Europe                        |
  |                                                         |
  |                  +49-271-22869                          |
  |                  (also FAX + AM)                        |
  |                                                         |
  |                  Weekdays after 18.00h.                 |
  |                                                         |
  |         When calling via phone you may leave a message, |
  |         if I'm not available - but don't expect me      |
  |         calling back to USA, Australia, ... since       |
  |         german phone rates are HIGHLY expensive.        |
  |_________________________________________________________|

  EMail:

        Please ask before sending binaries!
        And please think twice before asking - my postbox
        is not unlimited in size.

        * Do not send binaries via Fido or Fido-Gates ! *

           - Fido   Andreas Kleinert 2:2457/350.18
           - Usenet
              >>>   info at ar-kleinert.de
                    Andreas_Kleinert at gmx.de
                    ARK at News.wwbnet.de

           - If nothing else works, try one of these public
             Fido-Usenet gateways:

               In Germany:
                 Andreas_Kleinert at p18.f350.n2457.z2.fido.sub.org

               From USA or elsewhere:
                 Andreas_Kleinert at p18.f350.n2457.z2.fidonet.org


 History:

 V37.34 (22.04.00): - bumped date, updated contact information,
                      added early MorphOS comments

 V37.33 (14.03.99): - added revised StormC project file by
                      Fredrik Rambris <fredrik.rambris at amiga.nu>
                    - small changes to the docs

 V37.32 (02.03.99): - finally fixed version problem by adding
                      additional $VER string
                    - updated docs and email addresses

 V37.31 (18.03.98): - changed SEGLISTPTR type definition for VBCC
                      (-> Patrick Burnand)
                    - fixed some typos and improved style in several
                      source modules and headers

 V37.30 (07.03.98): - added DICE support, done by Patrick Burnand
                      <pburnand at hotmail.com>
                      He modified LibInit.c and StartUp.c to avoid a possible
                      bug in DICE.  The 'extern' keyword might not always be
                      supported well.  (extern struct ExampleBase*...)
                    - added some typecasts to InitTable definition
                      (so that the other compilers can't complain about the
                       changes done for DICE)
                    - simplified sample program
                    - again fixed type definition of "seglist" pointer;
                      it's now a global typedef-inition/#define in compiler.h
                      (SEGLISTPTR) so everyone should be happy again
                      (-> Sven Drieling)

 V37.22 (29.12.97): - fixed TestExampleLib.c
                      (-> Stephan Rupprecht)
                    - updated Stephan's email address
                      (now is: stephan.rupprecht at metronet.de)
                    - renamed "c_lib" directory and "ReadMe_First"
                      to CLib37x#?

 V37.21 (19.12.97): - adjusted "compiler.h" as suggested by Volker Barthelmann
                      (VBCC), done by Patrizio Biancalani
                    - updated Patrizio's email address (-> ReadMe.VBCC)
                    - fixed my email, too (how did that COB.wwbnet.de make
                      it into this readme again ?)
                    - "compiler.h" now protected from multiple #inclusion

 V37.20 (02.12.97): - added VBCC support, done by Patrizio Biancalani
                      <P.Biancalani at agora.stm.it>

 V37.17 (24.10.97): - updated "ReadMe_MAXON" and added a bug-description
                      (plus workaround) as supplied by Stephan Rupprecht
                      <Rupprecht_Verwertung at t-online.de>
                      [ 29/12/97: stephan.rupprecht at metronet.de ]

 V37.16 (23.8.97) : - V37.15 - frozen AROS spin-off
                    - AROS-Version now included with AROS package, separately
                    - added comments about Forbid/Permit/Wait/single-threading
                      to the Library access functions
                    - also commented the rest a little bit
                      (-> maybe some certain people from
comp.sys.amiga.programmer
                          now feel better - but then again... maybe not ;)

 V37.14 (13.8.97) : - AROS: - the LH1_ to LH2_ macro replacements in
                              "compiler.h" had been wrongly defined
                            - "BPTR" type only was available under AROS,
                              now using "struct SegList *"
                            - AROS version now does compile under AmigaOS
                              with SAS/C 6.58, too
                    - "APTR seglist" now "struct SegList *"

 V37.13 (19.7.97) : - GNU makefile had lost its TABs
                      (-> Gunter Nikl)

 V37.12 (29.6.97) : - fixed memory bug-fix (argh)
                      (-> Gunter Nikl)
                    - changed/applied GCC adjustments
                      (-> diffs by Gunter Nikl)

 V37.11 (24.6.97) : - added "known bugs" section
                    - LibInit now delocates library base on error
                      (NULL return)
                      (-> Gunter Nikl)
                    - added AROS version, and created an additional
                      source tree for it, since I did not get it compiled
                      with SAS/C 6.57 and there's perhaps additional
                      #ifdef stuf to be done. Anyone likes to merge these ?
                      (-> Aaron Digulla)

 V37.10 (6.4.97) :  - added GCC version by Stefan Fuchs,
snfuchs at sokrates.franken.de.
                      Thanks !
                    - some small changes to docs, includes and comments
                    - still missing: DICE, Aztec, vbcc. Who does it ?
                    - fixed ftn email address

 V37.6 (27.3.97) :  - finetuning

 V37.5 (24.1.97) :  - rewrote docs
                    - added basic support for compiler independent
                      register naming and SAS/C keyword replacements
                      (compiler.h). Thus sources now should be easily
                      adaptable for GCC as well.

 V37.4 (8.1.97) :   - added FD file
                    - added new pragma file (and dir) as
                      include/pragma/example_lib.h
                      which works with Aztec, Maxon, Storm,
                      DICE and SAS C compilers.
                      Thanks to fd2pragma and Dirk Stoecker.
                    - some fixes to the readme files
                    - updated eMail list

 V37.3 (3.1.97) :   - slightly changed SCOPTIONS
                    - fixed some style things (APTR and library casts)
                    - changed note about library opening at L_OpenLibs()
                    - now compileable with StormC 2.0 as well
                      (not tested with 1.1) - see readme file for StormC
                    - added project file for StormC 2.0, smakefile still
                      present - select, which one you'd like to use

 V37.2 (12.12.96) : - applied some more changes and fixes
                      (-> suggested by Helmut Hummel)
                    - added icons
                      (-> from Helmut Hummel)

 V37.1 (4.12.96) : - bumped version to V37
                   - added MaxonC 3.x version by applying changes
                     to the SAS/C sources and adding Maxon
                     specific make and configuration files
                     (-> all done by Helmut Hummel, see Readme.MAXON)
                   - added StormC support
                   - yet missing: DICE, Aztec, GNU. Who does it ?

 V1.4 (30.11.96) : - added SAS/C specific Ctrl-C disabling code
                   - made some workarounds compiler sensitive
                   - redone all with SAS/C V6.57
                   - 944 Bytes ;-)

 V1.3 (13.9.96) :  - when starting lib as executable, -1 must be returned
                   - now caching SysBase
                   - added some comments, where changes should not
                     be applied
                   - added note about sharing library bases
                   - documented and modified sample function,
                     so that correct a0/a1/d0/d1 and a6 usage becomes
                     more obviously and verbose
                   - still 940 bytes ;-)

 V1.2 (5.9.96)  :  - fixed some things resulting out of a
                     discussion in Z-Netz

 V1.1 (1.9.96)  :  - small changes in style
                     (only bumped versions of changed modules):
                       o moved "examplebase.h" to include/example/
                         (so also adjusted LibInit.c, StartUp.c
                          and SCOPTIONS for reflecting that)
                       o SampleFuncs.h did contain wrong prototype
                         (did not matter, since only used for
                          ULONG function table within StartUp.c)
                       o explicitely __aligned ROMTag structure

 V1.0 (14.8.96) : - first release


 ---
 All mentioned trademarks are subject to their owners.


Contents of dev/c/CLib37x.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  433    1720  25.2% -lh5- 1313 Dec 11  1996 CLib37x/bin.info
[generic]                 3484    5252  66.3% -lh5- 2326 Mar  7  1998 CLib37x/bin/TestExampleLib
[generic]                  230     450  51.1% -lh5- d06c Dec 11  1996 CLib37x/bin/TestExampleLib.info
[generic]                  658    1209  54.4% -lh5- 522b Mar  7  1998 CLib37x/ReadMe.DICE
[generic]                  861    1884  45.7% -lh5- ba4d Apr  1  1997 CLib37x/ReadMe.GCC
[generic]                  424     778  54.5% -lh5- 9d74 Dec 19  1997 CLib37x/ReadMe.VBCC
[generic]                  433    1720  25.2% -lh5- 1313 Dec 11  1996 CLib37x/source.info
[generic]                  117     125  93.6% -lh5- 6f6d Jan  8  1997 CLib37x/source/fd/example.fd
[generic]                  247     425  58.1% -lh5- 29a5 Dec  5  1996 CLib37x/source/include/clib/example_protos.h
[generic]                  185     289  64.0% -lh5- 76ba Dec  5  1996 CLib37x/source/include/example/example.h
[generic]                  323     657  49.2% -lh5- c4b7 Mar  7  1998 CLib37x/source/include/example/examplebase.h
[generic]                  247     477  51.8% -lh5- 8ca8 Jan  8  1997 CLib37x/source/include/pragma/example_lib.h
[generic]                  207     311  66.6% -lh5- 5533 Dec  5  1996 CLib37x/source/include/pragmas/example_pragmas.h
[generic]                  207     330  62.7% -lh5- cead Dec  5  1996 CLib37x/source/include/proto/example.h
[generic]                  433    1720  25.2% -lh5- 8224 Dec 11  1996 CLib37x/source/lib_source.info
[generic]                   25      25 100.0% -lh0- 29c1 Dec  5  1996 CLib37x/source/lib_source/make_storm.bat
[generic]                  186     360  51.7% -lh5- 1619 Mar  7  1998 CLib37x/source/lib_source/makefile.dice
[generic]                  223     427  52.2% -lh5- 44a1 Jul 19  1997 CLib37x/source/lib_source/makefile.gcc
[generic]                  164     419  39.1% -lh5- 731d Dec 11  1996 CLib37x/source/lib_source/makefile.MAXON
[generic]                  232     347  66.9% -lh5- f3ec Dec  5  1996 CLib37x/source/lib_source/makefile.MAXON.info
[generic]                  181     347  52.2% -lh5- b025 Dec  2  1997 CLib37x/source/lib_source/makefile.vbcc
[generic]                  232     381  60.9% -lh5- 3d5e Dec  5  1996 CLib37x/source/lib_source/mcpp.SESSION
[generic]                  824    1591  51.8% -lh5- 30ce Dec  2  1997 CLib37x/source/lib_source/SampleFuncs.c
[generic]                  248     370  67.0% -lh5- 1d45 Dec  2  1997 CLib37x/source/lib_source/SampleFuncs.h
[generic]                  105     128  82.0% -lh5- 6014 Jan  3  1997 CLib37x/source/lib_source/SCOPTIONS
[generic]                  148     395  37.5% -lh5- 6d2b Dec  5  1996 CLib37x/source/lib_source/smakefile
[generic]                   85      95  89.5% -lh5- bd19 Dec  5  1996 CLib37x/source/lib_source/smakefile.wth
[generic]                  350     624  56.1% -lh5- 05bc Jan  3  1997 CLib37x/source/lib_source/storm_project.¶.info
[generic]                  269     622  43.2% -lh5- 2226 Jan  3  1997 CLib37x/source/lib_source/storm_smakefile
[generic]                  100     119  84.0% -lh5- 14a2 Dec  5  1996 CLib37x/source/test_prg/SCOPTIONS
[generic]                  105     256  41.0% -lh5- e65d Dec  5  1996 CLib37x/source/test_prg/smakefile
[generic]                 3484    5252  66.3% -lh5- 2326 Mar  7  1998 CLib37x/source/test_prg/TestExampleLib
[generic]                  410     762  53.8% -lh5- 8b87 Mar  7  1998 CLib37x/source/test_prg/TestExampleLib.c
[generic]                  394     835  47.2% -lh5- c5bf Dec  5  1996 CLib37x/source/test_prg/TestExampleLib.info
[generic]                  278     380  73.2% -lh5- a954 Mar  7  1998 CLib37x/source/test_prg/TestExampleLib.o
[generic]                 1664    5361  31.0% -lh5- 752f Mar 18  1998 CLib37x/source/lib_source/compiler.h
[generic]                  194     216  89.8% -lh5- 9c96 Mar 18  1998 CLib37x/source/lib_source/SampleFuncs.o
[generic]                 2527   10208  24.8% -lh5- 92bb Mar 18  1998 CLib37x/source/lib_source/StartUp.c
[generic]                  513     828  62.0% -lh5- bd21 Mar 18  1998 CLib37x/source/lib_source/StartUp.o
[generic]                  607     920  66.0% -lh5- 0263 Mar  2  1999 CLib37x/libs/example.library
[generic]                  607     920  66.0% -lh5- 0263 Mar  2  1999 CLib37x/source/lib_source/example.library
[generic]                 1939    5534  35.0% -lh5- 9be5 Mar  2  1999 CLib37x/source/lib_source/LibInit.c
[generic]                  554     920  60.2% -lh5- f00a Mar  2  1999 CLib37x/source/lib_source/LibInit.o
[generic]                  676    2687  25.2% -lh5- 2acd Mar 14  1999 CLib37x/source/lib_source/storm_project.¶
[generic]                 5281   14874  35.5% -lh5- 84df Apr 22  2000 CLib37x/CLib37x.readme
[generic]                 1083    2120  51.1% -lh5- 6943 Apr 22  2000 CLib37x/ReadMe.AROS
[generic]                  987    1835  53.8% -lh5- 7590 Apr 22  2000 CLib37x/ReadMe.MAXON
[generic]                  261     388  67.3% -lh5- e598 Apr 22  2000 CLib37x/ReadMe.MorphOS
[generic]                  285     494  57.7% -lh5- a470 Apr 22  2000 CLib37x/ReadMe.SAS
[generic]                  533    1001  53.2% -lh5- 66a0 Apr 22  2000 CLib37x/ReadMe.STORM
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        50 files   34243   79388  43.1%            Apr 22  2000

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>