Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!umich!umeecs!msi-s0.msi.umn.edu!cs.umn.edu!kirchner From: kirchner@umn-cs.cs.umn.edu (Roger B. Kirchner) Newsgroups: comp.sys.next Subject: p2c for NeXT Message-ID: <1990Jul29.191015.15604@cs.umn.edu> Date: 29 Jul 90 19:10:15 GMT Sender: kirchner@cs.umn.edu (Roger B. Kirchner) Distribution: usa Organization: University of Minnesota, Minneapolis - CSCI Dept. Lines: 32 p2c, the Pascal to C translator by David Gillespie available from csvax.cs.caltech.edu (as pub/p2c-1.18.tar.Z), can be compiled on a NeXT by making one change to one file. Scott Hess from Gustavus Adolphus located the problem and David Gillespie suggested a more general fix. The change may be incorporated in p2c-1.19. The change (for p2c-1.18) is this: In src/trans.h, change line 80 from #ifdef BSD to #if defined(BSD) && !defined(__STDC__) The C code generated by p2c is quite readable, and either old style or ANSI C code can be generated. p2c is not designed to be a Pascal compiler, but it is sufficient for nonproduction programs. Several dialects of Pascal can be translated, including HP, Turbo 5.0, UCSD, DEC VAX, Oregon Software Pascal/2, Macintosh Programmer's Workshop and Sun/Berkeley Pascal. Modula-2 syntax is also supported. The command 'p2c prog.xxx' translates a Pascal program prog.xxx to prog.c. Then 'cc prog.c -lp2c -lsys_s -o prog' translates prog.c to the executable prog using the p2c library and the NeXT shared library. One of the test programs is a neat little BASIC which Gillespie calls Chipmunk BASIC! Roger Kirchner rkirchne@mathcs.carleton.edu