home *** CD-ROM | disk | FTP | other *** search
-
- This directory contains "p2c" version 1.20, a Pascal to C translator.
-
- "p2c" Copyright 1989, 1990, 1991 Free Software Foundation, Inc.
-
- Written and maintained by: Dave Gillespie
- 256-80 Caltech
- Pasadena CA 91125
- daveg@csvax.cs.caltech.edu, cit-vax!daveg
-
-
- This program is distributed under the terms of the GNU License Agreement.
- See the file src/COPYING for details.
-
- The GNU License Agreement restrictions do _not_ apply to code generated
- by p2c, nor to the p2c run-time files "p2clib.c" and "p2c.h".
-
- The "examples" subdirectory contains a few sample Pascal programs and
- a Makefile to translate and compile them.
-
- HP Pascal Workstation System users will want to copy all of .\hp\include
- into the p2c include directory (\emx\include), and copy all of .\HP\import
- into the p2c home directory (\emx\p2c). You will have to write emulations
- for the functions you use out of these modules.
-
-
- !!! Incomplete interface texts for standard Turbo units are !!!
- !!! included in turbo.imp. Turbo users will have to flesh these !!!
- !!! out and write emulations for whatever parts of the Turbo runtime !!!
- !!! library they need. !!!
-
-
- If you wish to edit various system-wide configuration parameters, it is
- better to put them in \emx\p2c\loc.p2c than in \emx\p2c\p2crc. As an
- example, on a Turbo-oriented environment you may wish to add
-
- Language Turbo
-
- to the \emx\p2c\loc.p2c file to replace the normal default (HP Pascal).
-
-
-
- PORTABILITY
-
- P2c was originally developed on a homebrew C compiler on the HP Pascal
- Workstation operating system. Current development takes place on HP-UX,
- which is System V based. The translator has also been compiled and used
- on Sun-3's, so presumably it is fairly portable among 32-bit Unix machines.
-
- Many parts of the code will have to be adjusted in order for p2c to work
- on a machine with 16-bit ints. I have never had reason or opportunity to
- track these down since I don't have access to such a machine. Please note
- that code _generated_ by p2c works with either size of int even though p2c
- itself does not.
-
- If your compiler supports ANSI prototypes, most of the 16-bit portability
- problems will go away except for possible %d/%ld sloppiness in sprintf control
- strings. There may be places where p2c tries to cast a pointer into an
- int, but I believe all such cases use longs consistently. You will have
- a problem if your long type is not large enough to store a pointer.
-
- Because p2c was developed to run under Unix, it is sloppy about memory
- allocation. Some data structures are allocated but never freed. Profiles
- show that the waste is not too great in most cases, but if it is a problem
- you may have to write a garbage collector (this shouldn't be too hard if you
- only run the collector after translating each procedure).
-
-