On Sun, Jul 27, 2003 at 03:33:00PM +0200, Frank Heckenbach wrote: [...]
I tried to compile Web and TeX and noticed a few more problems, though apparently all quite minor:
Compiler directives `{$C-,A+,D-}'
`WriteLn' applied to `packed file of Char' rather than `Text'
`others:' instead of `otherwise'
`Break (FileVar)' (perhaps the same as `Page'?)
No, it should flush the output buffer. AFAIK it is redundant in the current GPC I/O implementation.
3rd parameter to `Reset' and `Rewrite'
hard-coded 'TTY:' for terminal (VMS specific?; Unix has '/dev/tty', Dos 'con')
`erstat (FileVar)' (perhaps the same as BP's `IOResult' with `{$I-}')
`breakin (FileVar)' (input flushing?)
a lot of warnings which all seem to be harmless, but point to unniceties in the code
Most of these are not unniceties, but results of heavy WEB macro usage and Knuth's coding style. In particular, `if <.....> then do_nothing;' is a common idiom to ignore a function result using Pascal's standard syntax (`do_nothing' is a macro with empty expansion).
Some more subtle (but important) differencies:
- `packed file of 0..255' doesn't actually pack anything in GPC, hence the definition of `eight_bits' has to be changed to `byte'
- the code assumes non-lazy I/O. The `bypass_eoln' stuff in `input_ln' is a work around for this problem, and it has to be removed for GPC
Anyway, I have a functional GPC port of TeX (with some extra hacks). If anybody is interested in the change file, I can send it by email. Disclaimer: it is _not_ intended as a standalone production version: e.g., it is TeX only (no MF/tangle/dvitype/etc.), and it relies on Web2C's libkpathsea for path searching. (IMHO, developing a yet-another full TeX implementation which aims for everyday use is a _wrong_ idea, because it would be a major duplication of effort, wasting time and money. If anybody wants to do that, it would be much better to join the Web2C team.)
Emil