home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntlib32.zoo / purec / readme.pc < prev    next >
Text File  |  1993-06-17  |  8KB  |  182 lines

  1. MiNT Library for Turbo C / Pure C
  2. ported by:   Ulf Moeller (Ulf_Moeller@hh2.maus.de)
  3.              Michael Hohmuth (hohmuth@freia.inf.tu-dresden.de)
  4. ============================================================================
  5.  
  6. hohmuth 7 Mar 1993
  7.  
  8. This Michael Hohmuth's version of Ulf Moeller's port. The description of
  9. the installation follows after Ulf's opening words:
  10.  
  11. ----------------------------------------------------------------------------
  12. This is a port of Eric Smith's MiNT library for Turbo C and Pure C.
  13. The assembler files are partly based on Dave Gymer's Sozobon port. The
  14. MiNT library replaces the functions of PCSTDLIB. For floating point support,
  15. you must still use the Pure C libraries.
  16.  
  17. I have not fully tested the library, and of course there is no warranty
  18. for whatsoever. Since there is a number of major differences between GNU C
  19. and Pure C, bugs are not really improbable. What is true for the Sozobon
  20. version, applies to this one even more: "is very experimental and quite
  21. probably needs more work; caveat emptor."
  22. ----------------------------------------------------------------------------
  23.  
  24. INSTALLATION.
  25. -------------
  26.  
  27. The installation procedure is described in the file INSTALL.SRC (for the 
  28. MiNT library source distribution) resp. INSTALL.BIN (for the binary 
  29. distribution).
  30.  
  31.  
  32. USAGE.
  33. ------
  34.  
  35. If you want to use the MiNT library for your project, consider the 
  36. following:
  37.  
  38. General Usage.
  39.  
  40. o   Make sure that the include directory (Options/Compiler) is set to the 
  41.     directory where the include files of the MiNT library reside, and 
  42.     that the libraries directory is set to the directory you copied the 
  43.     objects to (step 10).
  44.     
  45. o   Use crt0.o as your startup code.
  46.  
  47. o   List mintlib.lib in your project file. This replaces the library     
  48.     pctoslib.lib (resp. tctoslib.lib).  You can still use pcextlib.lib 
  49.     (tcextlib.lib) for backward compatibelity, but you probably don't 
  50.     want to.  The pcstdlib.lib library you only need if you want to use 
  51.     floating point arithmetics in your program (see below).  For GEM and 
  52.     BGI graphics, you can still use pcgemlib.lib and pcbgilib.lib.  
  53.     (Be careful with the GEM library; I haven't yet checked whether the 
  54.     header files of the MiNT library conform with the library.)
  55.  
  56. o   Two simple project files are delivered with the library. You can 
  57.     use them as a reference when creating your own project files:
  58.  
  59.     default.prj  - compiles the topmost window with float support
  60.     tc-deflt.prj - dito, for Turbo C
  61.     idefault.prj - compiles the topmost window without float support
  62.     tc-idflt.prj - dito, for Turbo C
  63.  
  64. Float Support.
  65.  
  66. o   The library file mintlib.lib does not contain float support for 
  67.     Pure/Turbo C.  If you want to use floating point numbers in your 
  68.     program, you'll have to link mintflt.lib and pcstdlib.lib (which 
  69.     also contains some float support).  List mintflt.lib BEFORE 
  70.     mintlib.lib and pcstdlib.lib AFTER mintlib.lib in your project file 
  71.     (tc* versions respectively).
  72.  
  73. Turbo C Caveats.
  74.  
  75. o   When used with Turbo C, you'll always have to link tcstdlib.lib.  It 
  76.     contains the long arithmetics support for the compiler.  List 
  77.     tcstdlib.lib AFTER mintlib.lib in your project file.
  78.  
  79. FPU Support.
  80.  
  81. o   Pure C: For real (i.e. Line-F) FPU support, replace mintflt.lib by 
  82.     mint881.lib and use the appropriate compiler flag (-8) to compile 
  83.     your project.
  84.     If you want to use the assembler version of alloca() in your program 
  85.     (see below), replace alloca.o by falloca.o in your project file.
  86.  
  87. o   Turbo C: The Turbo C libraries don't support FPUs via Line-F.  You 
  88.     might want to try Peter Fiebelkorn's FPUPATCH:  Apply the patch to 
  89.     your original Turbo C libraries and use the resulting tcflt.lib 
  90.     instead of tcfltlib.lib in the library's mintflt.prj, and use 
  91.     tcstd.lib instead of tcstdlib.lib in your project file.
  92.  
  93. The Stack.
  94.  
  95. o   The Pure/Turbo Linker usually reserves stack space in the BSS.  If 
  96.     you set stack size 0 for the linker, the MiNT library will use the 
  97.     usual convention of setting the stack by _stksize (default: 8k); see 
  98.     crtinit.c for details.
  99.  
  100. o   The stack checking option does not work with threads, or with malloc 
  101.     from heap.
  102.  
  103. o   Implementation Note: crtinit.c and the parts of the MiNT library that 
  104.     are executed during abnormal program termination must not be compiled 
  105.     with stack checking set.  With the assembler option -D=STACKCH=0 or 1, 
  106.     you can control if alloca() checks whether there is enough stack space 
  107.     for it.
  108.  
  109. Using alloca().
  110.  
  111. o   The alloca() function is a certain problem for Turbo/Pure C. The 
  112.     library contains a slow-but-secure version of alloca().  You can 
  113.     also link the the (fast) assembler version of alloca() (by listing 
  114.     alloca.o [resp. falloca.o, see "FPU Support" above] BEFORE 
  115.     mintlib.lib in your project file).  This version only works if the 
  116.     caller was compiled with option -S (Options/Compiler/Standard Stack 
  117.     Frames).  Otherwise, it will destroy the stack and the program will 
  118.     crash.
  119.  
  120. Use Prototypes!
  121.  
  122. o   Giving prototypes is important for Pure C.  They are absolutely 
  123.     necessary for functions with a variable argument list (e.g. error() 
  124.     in the GNU file utilities).
  125.  
  126. How To Include Files From Subdirectories?
  127.  
  128. o   Turbo C and Pure C 1.0 do not understand e.g. #include <sys/dir.h>.  
  129.     They try to open a file 'sys/dir.h' in the current directory instead 
  130.     of the file 'dir.h' in the subdirectory 'sys'.  (This is fixed in 
  131.     Pure C 1.1.)
  132.     Therefore you either have to use #include <sys\dir.h>, or you use the 
  133.     program unixname.prg by Michael Schwingen that is shipped with this 
  134.     library:  Simply move it to your AUTO folder, or run it from the 
  135.     desktop before you start C.  When installed, it converts all slashes 
  136.     to backslashes automagically when accessing disk files.  When used 
  137.     with MiNT, unixname.prg can be run before or after starting MiNT.  
  138.     Note that it only works for TOS filesystems, and that it only 
  139.     converts file names that are passed as parameters to a standard 
  140.     GEMDOS call (see the documentation for more information); it does 
  141.     not convert file names passed to a MiNT system call.  (However, MiNT 
  142.     aware programs should be aware of slashes in any case.)  WARNING: 
  143.     This program modifies the file name in the caller's address space.  
  144.     With this program installed you cannot any longer use files that 
  145.     contain slashes in their base name.
  146.  
  147.     To make the library you don't nessecarily have to install unixname.prg.
  148.  
  149. Before...
  150.  
  151. ...you try the PS from the MiNT utilities, change this:
  152. 178c178
  153. <     printf("%03d  %03d %3d   %3d  %s  %8ld %02d:%02d.%02d  %s%s\n",
  154. ---
  155. >     printf("%03d  %03d %3d   %3d  %s  %8ld %02ld:%02ld.%02ld  %s%s\n",
  156.  
  157.  
  158. LEGAL NOTICE.
  159. -------------
  160.  
  161. The library binaries mintflt.lib and mint881.lib, when built with the 
  162. setup as shipped, will contain Turbo/Pure C's library binaries.  Don't 
  163. make these binaries available to the public.
  164.  
  165. However, you can build versions of the library which do not contain the 
  166. compiler's binaries.  The file INSTALL.SRC describes how to build these 
  167. versions, and the file INSTALL.BIN describes how to build the useable 
  168. MiNT lib binaries from these files.
  169.  
  170. ----------------------------------------------------------------------------
  171.  
  172. If you want to contact me, here are my addresses:
  173.  
  174. --
  175. Email:
  176.     Internet:   hohmuth@freia.inf.tu-dresden.de     [preferred]
  177.                 mh1@irz.inf.tu-dresden.de           [if the other one
  178.                                                      doesn't work]
  179. IRC:
  180.     Nickname:   Spell
  181.     You can drop me a note at NoteServ.
  182.