[comp.bugs.sys5] ToolChest "anim" 630 bug

gwyn@smoke.BRL.MIL (Doug Gwyn) (07/31/90)

For those of you who are wondering why the "backward" option doesn't work on
the AT&T/Teletype 630 MTG terminal (in the Bentley/Kernighan "anim" package
distributed by the AT&T UNIX System ToolChest), I tracked down the problem
and have a fix for it.

The basic problem is that whoever wrote the code assumed that the difference
of two pointers would be an int.  Unfortunately this is not true for the 630
CCS, where an int is 2 bytes.  There is a quick fix, however; in source file
"term.c", function read_obj(), change all
		savect(inp-p);
statements to
		savect((int)(inp-p));	/* DAG -- cast needed on 630 */
the rebuild animterm.630 (e.g. "make -f 630.make animterm.630") and
reinstall it (e.g. "cp animterm.630 /usr/lib/movie/animterm.630").

I haven't yet tracked down other int/long confusion, which is probably what
really led them to limit the 630 data pool size to under 64Kb (rather than
actual compiler bugs, as claimed).