Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.text Subject: MC-TeX beta release, patches Message-ID: <19371@mimsy.UUCP> Date: 1 Sep 89 15:26:30 GMT Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 133 The beta release of MC-TeX had two fairly serious bugs, for which fixes are given here. The first is that PostScript fonts caused `postscript' to crash (due to a trashed variable); the second is that almost no GF fonts worked. The following patches correct these problems. RCS file: RCS/postscript.c,v retrieving revision 3.1 diff -c2 -r3.1 postscript.c *** /tmp/,RCSt1a16687 Fri Sep 1 11:21:58 1989 --- postscript.c Fri Sep 1 11:20:35 1989 *************** *** 52,56 **** #ifndef lint ! static char RCSid[] = "$Header: /usr/src/local/tex/local/mctex/postscript/RCS/postscript.c,v 3.1 89/08/22 21:23:41 chris Exp $"; #endif --- 52,56 ---- #ifndef lint ! static char RCSid[] = "$Header: /usr/src/local/tex/local/mctex/postscript/RCS/postscript.c,v 3.2 89/09/01 11:19:48 chris Exp $"; #endif *************** *** 764,773 **** advance = 1; do_char: if ((f->f_flags & FF_POSTSCRIPT) == 0) { - g = GLYPH(f, p); - if (!GVALID(g)) { - GripeBadGlyph(p, f); - goto loop; - } if ((g->g_flags & GF_SEEN) == 0) panic("glyph %ld of %s not loaded in pass 0", --- 764,773 ---- advance = 1; do_char: + g = GLYPH(f, p); + if (!GVALID(g)) { + GripeBadGlyph(p, f); + goto loop; + } if ((f->f_flags & FF_POSTSCRIPT) == 0) { if ((g->g_flags & GF_SEEN) == 0) panic("glyph %ld of %s not loaded in pass 0", RCS file: RCS/gffont.c,v retrieving revision 2.7 diff -c2 -r2.7 gffont.c *** /tmp/,RCSt1a16715 Fri Sep 1 11:24:35 1989 --- gffont.c Fri Sep 1 11:24:19 1989 *************** *** 7,11 **** #ifndef lint ! static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/gffont.c,v 2.7 89/08/22 21:52:58 chris Exp $"; #endif --- 7,11 ---- #ifndef lint ! static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/gffont.c,v 2.8 89/09/01 11:23:39 chris Exp $"; #endif *************** *** 119,122 **** --- 119,123 ---- if (UnSign8(*p) != GF_ID) return (-1); /* not a GF file */ + offset += i; /* this is the offset of *p */ *postpostp = offset - 5;/* POSTPOST should be here */ /* we need 4 bytes for the pointer */ *************** *** 124,128 **** p -= 4; else { ! offset -= 4 - i; if (offset < 0L) return (-1); /* tsk */ --- 125,129 ---- p -= 4; else { ! offset -= 4; if (offset < 0L) return (-1); /* tsk */ *************** *** 215,218 **** --- 216,223 ---- goto fail; } + if (UnSign8(postamble[postsize - 1]) != GF_POSTPOST) { + problem = "no GF_POSTPOST after postamble"; + goto fail; + } /* *************** *** 305,309 **** gd->gd_base = gd->gd_body - presize; ! f->f_details = (char *) gd; if (FontHasGlyphs(f, firstc, lastc)) goto fail2; --- 310,314 ---- gd->gd_base = gd->gd_body - presize; ! f->f_details = (char *)gd; if (FontHasGlyphs(f, firstc, lastc)) goto fail2; *************** *** 314,320 **** if (problem == NULL) error(0, errno, "trouble reading \"%s\"", f->f_path); ! else ! error(0, 0, "%s\n\t(are you sure \"%s\" is a GF file?)", ! problem, f->f_path); errno = 0; fail2: --- 319,326 ---- if (problem == NULL) error(0, errno, "trouble reading \"%s\"", f->f_path); ! else { ! error(0, 0, "%s", problem); ! error(0, 0, "(are you sure \"%s\" is a GF file?)", f->f_path); ! } errno = 0; fail2: -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris