Subject: Pascal to C converters 6. ***** Q: I'm looking for a program to convert Turbo Pascal code automatically to C. (Mother of all FAQs? :-) A: To find utilities for such a specific purpose the very first thing to do is to look through file lists. At garbo.uwasa.fi there are useful file lists such as /pc/INDEX.ZIP and INDEXTS.ZIP. Here is some old information as an example: From simibm file list -------------------------------------------- T2C.ARC Microsoft's Turbo Pascal to C translator TPTC17.ARC Turbo Pascal to C translator, 1of4 TPTC17SC.ARC Turbo Pascal to C - src for translator, 2of4 TPTC17TC.ARC Turbo Pascal to C - test cases, 3of4 TPTCINFO.ARC Info on Turbo Pascal to C translator, 4of4 From files-mm (Micro Maniacs Opus file list) --------------------- PTOC.ZIP 79789 Pascal To C Conversion Program. TPC.ZIP 26262 Converts TurboPascal to C. GLOCKEN.ZIP 112240 01/15/88 Glockenspiel Turbo Pascal to 'C' TPTOQC.ZIP 112062 12/01/87 Translate Turbo Pascal to Quick 'C' TPAS2MSC.ZIP 111884 12/10/89 MS Convert Turbo Pascal to MS C I've seen some positive comments on a P2C, and our system manager has installed it on our mainframe with very good results, but I do not know where it is publicly available. I have seen an ad on a Pascal to C translator in the Shareware Magazine, Vol V, No. 6, Nov.-Dec. 1990, p. 52, involving PC-Sig disk 1321. From: raymond@math.berkeley.edu (Raymond Chen) Two different Pascal-to-C converters are available from a comp.sources.unix archive near you. volume10: ptoc/part[01-02] Pascal to C translator volume13: pas2c.pch Patches for Pascal-to-C translator volume21: p2c/part[01-32] Pascal to C translator " p2c/patch1 Fix to incomplete shar files for p2c, Patch1 p2c is by Dave Gillespie. It understands several Pascal dialects (HP, partial Turbo, etc) and is very flexible and configurable. It has been compiled and used on Sun-3's, so presumably it is fairly portable among 32-bit Unix machines. The p2c package is also available for ftp from csvax.caltech.edu. Note, however, that although it can translate PC dialects of Pascal, the converter itself runs under UNIX. (Timo's note, it is also available on Garbo.) If you have the ftp://garbo.uwasa.fi/pc/ts/tsfaqn44.zip Frequently Asked Questions collection, also take a look at the old ftp://garbo.uwasa.fi/pc/pd2/faquote.zip for more information. --------------------------------------------------------------------