home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / pascal2c / readme.os2 < prev    next >
Text File  |  1992-08-05  |  6KB  |  143 lines

  1. p2c - PASCAL to C translator - OS/2 2.0 version
  2. ===============================================
  3.  
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation (any version).
  8.  
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. GNU General Public License (.\src\copying) for more details.
  13.  
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. The GNU License Agreement restrictions do _not_ apply to code generated
  19. by p2c, nor to the p2c run-time files "p2clib.c" and "p2c.h".
  20.  
  21.  
  22. 1. Introduction
  23. ===============
  24.  
  25. This package contains p2c, a PASCAL to C translator, compiled for OS/2 v 2.0
  26. using the GNU gcc v 2.1 compiler, which was ported to OS/2 by
  27. Eberhard Mattes (gcc/emx). Support library for this GNU gcc port is provided.
  28.  
  29. Original source code for p2c is available from aix370.rrz.uni-koeln.de
  30. in file /.disk2/programming/languages/pascal/p2c-1.20.tar.Z.
  31.  
  32. gcc/emx is available from rusmv1.rus.uni-stuttgart.de in directory
  33. /soft/os2/emx-0.8d.
  34.  
  35. Using p2c, a PASCAL program can be translated into C and can then be compiled
  36. using gcc/emx. Information about supported PASCAL dialects is contained in
  37. file .\os2\p2c.doc.
  38.  
  39. This package contains, in addition to this file, the following files:
  40.  
  41. readme              -- general information about p2c
  42. .\hp\import\*.imp   -- for HP PASCAL Workstation System users only:
  43.                        import files for p2c; place in \emx\p2c
  44. .\hp\include\*.h    -- for HP PASCAL Workstation System users only:
  45.                        include files; place in \emx\include
  46. .\examples\*.*      -- sample PASCAL programs, see .\examples\readme
  47. .\examples\c\*.c    -- pre-translated sample programs
  48. .\src\*.*           -- source code for OS/2 port of p2c
  49. .\os2\copying       -- GNU General Public license
  50. .\os2\emx.dll       -- emx dynamic link library
  51. .\os2\libp2c.a      -- p2c library for gcc/emx C compilation
  52. .\os2\loc.p2c       -- local configuration file for p2c
  53. .\os2\p2c.doc       -- human readable UNIX manual page
  54. .\os2\p2c.exe       -- PASCAL to C translator
  55. .\os2\p2c.h         -- C header file needed for C compilation
  56. .\os2\p2crc         -- configuration file for p2c
  57. .\os2\readme        -- general information about p2c
  58. .\os2\string.pas    -- Oregon Software Pascal dynamic string package
  59. .\os2\system.imp    -- declarations for Pascal built-in objects
  60. .\os2\system.m2     -- declarations for Modula-2 built-in objects
  61. .\os2\turbo.imp     -- INCOMPLETE Turbo Pascal standard units
  62.  
  63.  
  64. 2. Installation
  65. ===============
  66.  
  67. After unpacking the archive in any convenient subdirectory, the various 
  68. files should be installed as follows:
  69.  
  70. .\os2\copying       -- place in directory \emx\p2c
  71. .\os2\emx.dll       -- must be accessible via LIBPATH (LIBPATH-statement in
  72.                        CONFIG.SYS); normally in directory \emx\dll
  73. .\os2\libp2c.a      -- place in directory \emx\lib
  74. .\os2\loc.p2c       -- place in directory \emx\p2c
  75. .\os2\p2c.doc       -- place in directory \emx\p2c
  76. .\os2\p2c.exe       -- place in directory \emx\bin
  77. .\os2\p2c.h         -- place in directory \emx\include
  78. .\os2\p2crc         -- place in directory \emx\p2c
  79. .\os2\readme        -- place in directory \emx\p2c
  80. .\os2\string.pas    -- place in directory \emx\p2c
  81. .\os2\system.imp    -- place in directory \emx\p2c
  82. .\os2\system.m2     -- place in directory \emx\p2c,
  83.                        rename to system.imp for Modula-2
  84. .\os2\turbo.imp     -- place in directory \emx\p2c
  85.  
  86. ------------------------------------------------------
  87. for HP PASCAL Workstation System users only:
  88.  
  89. .\hp\import\*.imp   -- place in directory \emx\p2c
  90. .\hp\include\*.h    -- place in directory \emx\include
  91. ------------------------------------------------------
  92.  
  93. All other files may be deleted --- they are provided only in order to
  94. fulfill the conditions imposed by the GNU General Public License.
  95.  
  96.  
  97. 3. Use
  98. ======
  99.  
  100. A file <name> is translated into a file <name> with added or substituted
  101. suffix .c.
  102.  
  103. The C file(s) are then compiled using gcc/emx, and linked to the library
  104. libp2c.a. For compilation of the C files, the file p2c.h should be
  105. accessible to the compiler.
  106.  
  107. Example
  108. ---------------------------------------------------------
  109. Compile a Turbo-Pascal program prog.pas:
  110.  
  111. At command line...                      Comments...    
  112.  
  113. p2c -LTURBO prog.pas                    produces prog.c
  114.  
  115. gcc -o prog.exe -O2 prog.c -lp2c        produces prog.exe
  116. ---------------------------------------------------------
  117.  
  118. For further information refer to .\os2\p2c.doc.
  119.  
  120.  
  121. 4. Notes
  122. ========
  123.  
  124. -H option of p2c does not work. May be a bug in my OS/2 port or in p2c itself.
  125. Use environment variable P2C_HOME instead.
  126.  
  127. If you suspect a problem with p2c itself, report it to the author of p2c.
  128.  
  129.  
  130. 5. Comments, complaints, etc. to:
  131. =================================
  132.  
  133. Bernt Karasch
  134.  
  135. Address:  Ruhr-Universitaet Bochum
  136.           Institut fuer Mineralogie
  137.           Herrn Bernt Karasch
  138.           Universitaetsstrasse 150
  139.           W-4630 Bochum 1
  140.           Federal Republic of Germany
  141.  
  142. Internet: hermann.gies@ruba.rz.ruhr-uni-bochum.dbp.de
  143.