$Id: README,v 1.14 1991/04/17 12:47:24 tml Exp $

PtC-TeX
=======

This directory tree contains the change files, Makefiles, etc for a
POSIX implementation of TeX and METAFONT using the PtC Pascal-to-C
translator (with small but important enhancements).

I assume you have your TeX sources structured as the pub/tex anonymous
ftp directory on labrea.stanford.edu.  You should place the ptc-tex
directory as a subdirectory to the directory corresponding to pub/tex
(which has subdirectories web, tex, texware, mf, mfware and etc
containing the TeX programs WEB source straight from DEK).

The RCS revision number of this README file ($Revision: 1.14 $) serves
as a version identifier for the whole package.  The RCS Log is
included below.

I know that there is also at least one another Pascal-to-C translator
freely available, called p2c.  It was posted on USENET in March 1990.
I haven't had time to look into it yet.  It is possible that it
generates better C code than PtC, or that it would otherwise be better
to use, but I don't know.

This POSIX implementation uses change files based on the ones found on
labrea.stanford.edu for use with the SunOS pc compiler.  Here is a
list of the kind of changes I have made:

   o I have removed all the cruft related to pc lossage, for instance
     the use of byte variables with the value range -128..127.  C
     handles unsigned char (0..255) just fine.

   o With PtC there is no need to use separate closing routines.
     test_eof is unnecessary, too, we can use Pascal Eof tests, which
     get translated into correct C code for the PtC file structs.

   o I don't (yet) use a line_read routine.  The normal WEB input_ln
     translates into reasonably fast C code, I hope.  It would be easy
     to take the C coded line_read into use again, of course.

   o I keep all external C routines in a separate directory, and build
     a library from them.

   o I don't deduce the format or base file name from the program
     name.  It's simpler to use a one-line script called latex that
     does virtex '&lplain' etc.

   o I took out the switch-to-editor stuff.  It's rather useless in a
     modern windowing environment.

   o I don't change the program banner strings (This is x, Version
     n.n).  After all, all versions are supposed to work alike.

   o Read and Write translate into quite efficient buffered stdio calls.

   o PtC implements correct Pascal semantics for file I/O with regards
     to implicit Get at Reset.  There is no need to bypass any dummy
     Eoln present after the Reset of a file.

   o PtC implements "lazy I/O".  This means that you can code
     interactive Pascal programs without worrying about that the user
     has to enter her input before seeing the prompt...

   o I don't bother to squeeze efficiency out of format and base file
     dumping and reading.  I believe it is fast enough as it is.
     (Unexecing is also quite unnecessary with modern machines.)

   o I distribute the X11 version of METAFONT graphic output by
     rusty@garnet.berkeley.edu.  (Picked up from the imaketex
     distribution.)  If you don't have X11, the ext/Makefile will make
     a dummy mf_X11win.o.

   o The dvicopy and pktype programs are distributed separately.  The
     changefile for dvicopy is in ptc-tex/texware, and for pktype in
     mfware.

And here is the RCS log:

$Log: README,v $
Revision 1.14  1991/04/17  12:47:24  tml
Small changes to BLURB and Makefiles.  Fixed a bug in bibtex.ch and updated
it to correspond to the latest bibtex.web (without tab characters).

Revision 1.13  90/12/10  01:33:04  tml (Tor Lillqvist)
Added a -L /usr/local/lib to Makefile.generic (for -lptc).
Changed the paths in ext/ext.g to /usr/local/tex/...
If the making of inimf with X libs fail, try without.
Build a huge TeX (262000 memory_words).
I tested building on 386/ix with gcc.  No problems.  (Some small
adjustments to Makefiles were necessary, of course.  -z means something
else to the 386/ix ld.)

Revision 1.12  90/11/17  23:28:21  tml (Tor Lillqvist)
Updated to newest versions.  Included change file for Breitenlohner's
dvicopy program.

Revision 1.11  90/07/31  14:15:04  tml (Tor Lillqvist)
New X11 interface for METAFONT.
Small changes in Makefiles.
Exit status was wrong in some programs.

Revision 1.10  90/06/16  22:20:29  tml (Tor Lillqvist)
Made init_terminal and input_ln work the same way in MF as in TeX.
It was bogus, losing the first character of input sometime.

Revision 1.9  90/04/03  14:52:35  tml (Tor Lillqvist)
Easier for those without X11: ext/Makefile takes care of it.  Added
dependency on ext.h to ext/Makefile.  Renamed `remainder' to
`myremainder' in tex.

Revision 1.8  90/03/30  17:59:18  tml (Tor Lillqvist)
Argh, the last step of the tex/run-trip script was bogus (wrong
input to dvitype, and wrong filename to diff).

Revision 1.7  90/03/30  17:45:59  tml (Tor Lillqvist)
Removed the shell for loop from the Makefiles.  all now depends on
$(PROGS), and $(PROGS) depends on `always'.
Removed the .PHONY pseudo-target from the Makefles (not needed).
Some small changes in the BLURB file.

Revision 1.6  90/03/28  18:48:43  tml (Tor Lillqvist)
Argh, it seems impossible to use cc on VAX Ultrix...  Oh well,
gcc works fine.

Revision 1.5  90/03/28  01:03:48  tml (Tor Lillqvist)
Updated to TeX 3.0, MF 2.0 etc.  Tested a bit better on the VAX
with the Ultrix cc, and on the HP9000/300 with the HP-UX cc.

Revision 1.4  90/03/26  08:40:43  tml (Tor Lillqvist)
Compiled on Ultrix 3.1 Only minor changes were necessary: Had to put
in some @d index==myindex lines in some change files.  Should PtC
guard against the identifiers from <string.h> as well?  Maybe not, now
that PtC automatically puts in #includes of <stdio.h> and <string.h>
we can't possibly know all identifiers that might be declared in them.
Or can we, on ANSI C and POSIX systems?

Added to inimf.ch a removal of the test that printed ``glue set ?.?''.
It didn't work on the VAX (it fired every time, all glue ratios came
out in the log file as ?.?).

Added a few missing files to the DISTFILES in some Makefiles.

Revision 1.3  90/03/18  13:48:05  tml (Tor Lillqvist)
Changes to the README file.


Tor Lillqvist
tml@tik.vtt.fi
