clewis@eci386.uucp (Chris Lewis) (11/23/89)
This and a companion posting are patches 2 and 3 for psroff. You will need both 2 and 3 before recompiling. When patching, please: cd <your psroff directory> unshar this patch patch -N -p < <this patch> #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 1 (of 1)." # Contents: Patch02 # Wrapped by clewis@eci386 on Wed Nov 22 14:26:49 1989 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'Patch02' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Patch02'\" else echo shar: Extracting \"'Patch02'\" \(44322 characters\) sed "s/^X//" >'Patch02' <<'END_OF_FILE' X*** /usr4/public/src/t2current/./t2conf.c Wed Nov 22 14:23:15 1989 X--- ./t2conf.c Wed Nov 22 14:24:24 1989 X*************** X*** 11,24 **** X Specs: Switch for alternate backends. X */ X X #include "defs.h" X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)t2conf.c: 1.7 Copyright 89/06/14 17:39:52 Chris Lewis"; X #endif X #else X! #ident "@(#)t2conf.c: 1.7 Copyright 89/06/14 17:39:52 Chris Lewis" X #endif X X #ifdef PS X--- 11,27 ---- X Specs: Switch for alternate backends. X */ X X+ /* Deskjet driver copyright 1989 Ronald Florence (ron@mlfarm) */ X+ /* 10/21/89 */ X+ X #include "defs.h" X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)t2conf.c: 1.8 Copyright 89/11/09 13:29:42 Chris Lewis"; X #endif X #else X! #ident "@(#)t2conf.c: 1.8 Copyright 89/11/09 13:29:42 Chris Lewis" X #endif X X #ifdef PS X*************** X*** 25,31 **** X #include "ps.h" X #endif X X! #if defined(LJ) || defined(LK) X #include "lj.h" X #endif X X--- 28,34 ---- X #include "ps.h" X #endif X X! #if defined(LJ) || defined(LK) || defined(DJ) X #include "lj.h" X #endif X X*************** X*** 55,61 **** X { LKNAME, ljProlog, ljEpilog, ljChar, ljPage, ljFontSel, X NULL, NULL, NULL, lkStdFont, lkSymFont }, X #endif X! X { NULL } X }; X X--- 58,67 ---- X { LKNAME, ljProlog, ljEpilog, ljChar, ljPage, ljFontSel, X NULL, NULL, NULL, lkStdFont, lkSymFont }, X #endif X! #ifdef DJ X! { DJNAME, ljProlog, ljEpilog, djChar, ljPage, ljFontSel, X! NULL, NULL, NULL, djStdFont, djSymFont }, X! #endif X { NULL } X }; X X*** /usr4/public/src/t2current/./gfnttab.sh Wed Nov 22 14:23:08 1989 X--- ./gfnttab.sh Wed Nov 22 14:24:24 1989 X*************** X*** 1,5 **** X : X! # 1.2 89/08/25 X trap "exit 1" 0 1 2 3 15 X if [ ! -d /usr/lib/oldfonts ] X then X--- 1,10 ---- X : X! #@(#)gfnttab.sh 1.3 89/11/09 X! # Set this to something non-null if you need a.out.h/COFF X! # headers on your width files, and the COFF/HEADERSIZE X! # defines cause dit2catwid to generate width tables that X! # troff screams about. X! COMPILE= X trap "exit 1" 0 1 2 3 15 X if [ ! -d /usr/lib/oldfonts ] X then X*************** X*** 21,34 **** X case $i in X font/S) X echo "Generating font S" X! ./dit2catwid -s /tmp/S font/R font/ftS X ;; X font/S2) X continue X ;; X *) X! echo "Generating font `basename $i`" X! ./dit2catwid /tmp/S $i font/ft`basename $i` X ;; X esac X done X--- 26,54 ---- X case $i in X font/S) X echo "Generating font S" X! if [ -n "$COMPILE" ] X! then X! ./dit2catwid -cs /tmp/S font/R font/ftS.c X! cc -c font/ftS.c X! mv ftS.o font/ftS X! else X! ./dit2catwid -s /tmp/S font/R font/ftS X! fi X ;; X font/S2) X continue X ;; X *) X! f=`basename $i` X! echo "Generating font $f" X! if [ -n "$COMPILE" ] X! then X! ./dit2catwid -c /tmp/S $i font/ft${f}.c X! cc -c font/ft${f}.c X! mv ft${f}.o font/ft${f} X! else X! ./dit2catwid /tmp/S $i font/ft${f} X! fi X ;; X esac X done X*** /usr4/public/src/t2current/./lj.c Wed Nov 22 14:23:56 1989 X--- ./lj.c Wed Nov 22 14:24:25 1989 X*************** X*** 12,19 **** X (Gosh, this is a lot simpler than lcat's stuff. X Thank PostScript for getting my brain in order.) X X- Font downloading is supported, but untested as X- yet. X Font downloading is not supported yet, however X all of the font selection stuff is. Therefore, X this stuff will actually work if all of the X--- 12,17 ---- X*************** X*** 22,28 **** X to be different fonts, so don't expect much.... X X Macro "DOWNLOAD" is used to denote places and X! some coding for font downloading. X X Without font downloading, this is LJ compatible. X Font downloading will require a LJ+, LJ500+ or X--- 20,27 ---- X to be different fonts, so don't expect much.... X X Macro "DOWNLOAD" is used to denote places and X! some coding for font downloading. It might X! even work! X X Without font downloading, this is LJ compatible. X Font downloading will require a LJ+, LJ500+ or X*************** X*** 42,50 **** X ljtables.c X */ X X #include "defs.h" X X! #if defined(LJ) || defined(LK) X #include "lj.h" X X #define MAXFONT 50 X--- 41,51 ---- X ljtables.c X */ X X+ /* Deskjet driver copyright 1989 Ronald Florence (ron@mlfarm, 10.21.89) */ X+ X #include "defs.h" X X! #if defined(LJ) || defined(LK) || defined(DJ) X #include "lj.h" X X #define MAXFONT 50 X*************** X*** 51,60 **** X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)lj.c: 1.7 Copyright 89/06/14 17:40:23 Chris Lewis"; X #endif X #else X! #ident "@(#)lj.c: 1.7 Copyright 89/06/14 17:40:23 Chris Lewis" /*(SVR3)*/ X #endif X X #define USED 1 X--- 52,61 ---- X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)lj.c: 1.9 Copyright 89/11/22 12:05:06 Chris Lewis"; X #endif X #else X! #ident "@(#)lj.c: 1.9 Copyright 89/11/22 12:05:06 Chris Lewis" /*(SVR3)*/ X #endif X X #define USED 1 X*************** X*** 68,78 **** X X struct ljFts *t2ljf[8]; X X- /* Used for characters not in Roman8 Character set */ X- #define NOPE "\0374" X ljPage() { X! printf("\033&l0H"); X! pagePending = 1; X } X X static X--- 69,77 ---- X X struct ljFts *t2ljf[8]; X X ljPage() { X! printf("\033&l0H"); X! pagePending = 1; X } X X static X*************** X*** 97,205 **** X ljSetFont(font, points) X int font, points; { X X! if (lastPoints != points || font != lastFont) { X! register char *p; X #ifdef DOWNLOAD X! if (!(ljFts[font].flags&(USED|BUILTIN))) { X! char buf[512]; X! FILE *fontfile; X! int count; X! sprintf(buf, "%s/%s.%s.%d", LIBDIR, be->bename, X! ljFts[font].troffName, points); X! if ((fontfile = fopen(buf, "r")) == NULL) { X! fprintf(stderr, "%s: Cannot open fontfile %s\n", progname, X! buf); X! } else { X! while(0 > (count = fread(buf, sizeof(char), 512, fontfile))) X! fwrite(buf, sizeof(char), count, stdout); X! fclose(fontfile); X! } X! } X! #endif X! ljFts[font].flags |= USED; X! for (p = ljFts[font].fontSeq; *p; p++) { X! if (*p == '\\') { X! putoct(p+1); X! p+=3; X! } else X! putchar(*p); X } X- printf("\033(s%dV", points); X- lastPoints = points; X- lastFont = font; X } X X } X X ljChar(x, y, font, points, troffChar) X! int x, y, font, points, troffChar; { X! static double lasty = (-1); X! register double nx = TROFF2LJX(x), ny = TROFF2LJY(y); X! register struct troff2befont *rp; X! register char *sequence = "a"; X! double xad, yad; X! if (pagePending) { X! lasty = lastFont = lastPoints = (-1); X! doPageStart(); X! } X! X! DEBUGPRINTF("x,y=%d,%d; font=%d, points=%d, tc=%d\n", X! x, y, font, points, troffChar); X! X! if (font == 3) { X! rp = &be->besymfont[troffChar]; X! } else { X! rp = &be->bestdfont[troffChar]; X! } X! X! switch(rp->t2b_font) { X! /* Only fonts with "U" are subject to font translation */ X! case U: X! if (font == 3) X! font = 0; /* Special chars are Courier */ X! else { X! DEBUGPRINTF("ljSetChar %d->%s (%s)\n", font, X! t2ljf[font]->troffName, X! t2ljf[font]->ascName); X! font = t2ljf[font] - ljFts; X! } X! break; X! case S: X! font = 3; X! break; X! case D: X! break; X! default: X! /* Typically used when the main fonts don't have the X! character desired. Eg: right-hand is in the X! ZapfDingbats font */ X! font = rp->t2b_font; X! break; X! } X X! sequence = rp->t2b_charseq; X X! if (!sequence) { X! fprintf(stderr, "No coding for %d\n", troffChar); X! return; X! } X! X! /* We're committed now */ X! X! points *= rp->t2b_scale; X! xad = points * rp->t2b_xc; X! yad = points * rp->t2b_yc; X! ljSetFont(font, points); X X /* We won't output fractions */ X #define XYS "\033&a%.0fh%.0fV%s" X #define XS "\033&a%.0fH%s" X X! if (lasty != ny) { X! printf(XYS, nx+xad, ny+yad, sequence); X! lasty = ny; X! } else X! printf(XS, nx+xad, sequence); X } X X static X--- 96,205 ---- X ljSetFont(font, points) X int font, points; { X X! if (lastPoints != points || font != lastFont) { X! register char *p; X #ifdef DOWNLOAD X! if (!(ljFts[font].flags&(USED|BUILTIN))) { X! char buf[512]; X! FILE *fontfile; X! int count; X! sprintf(buf, "%s/%s.%s.%d", LIBDIR, be->bename, X! ljFts[font].troffName, points); X! if ((fontfile = fopen(buf, "r")) == NULL) { X! fprintf(stderr, "%s: Cannot open fontfile %s\n", progname, X! buf); X! } else { X! while(0 > (count = fread(buf, sizeof(char), 512, fontfile))) X! fwrite(buf, sizeof(char), count, stdout); X! fclose(fontfile); X } X } X+ #endif X+ ljFts[font].flags |= USED; X+ for (p = ljFts[font].fontSeq; *p; p++) { X+ if (*p == '\\') { X+ putoct(p+1); X+ p+=3; X+ } else X+ putchar(*p); X+ } X+ printf("\033(s%dV", points); X+ lastPoints = points; X+ lastFont = font; X+ } X X } X X ljChar(x, y, font, points, troffChar) X! long x, y; X! int font, points, troffChar; { X! static double lasty = (-1); X! register double nx = TROFF2LJX(x), ny = TROFF2LJY(y); X! register struct troff2befont *rp; X! register char *sequence = "a"; X! double xad, yad; X! if (pagePending) { X! lasty = lastFont = lastPoints = (-1); X! doPageStart(); X! } X! X! DEBUGPRINTF("x,y=%d,%d; font=%d, points=%d, tc=%d\n", X! x, y, font, points, troffChar); X! X! if (font == 3) { X! rp = &be->besymfont[troffChar]; X! } else { X! rp = &be->bestdfont[troffChar]; X! } X! X! switch(rp->t2b_font) { X! /* Only fonts with "U" are subject to font translation */ X! case U: X! if (font == 3) X! font = 0; /* Special chars are Courier */ X! else { X! DEBUGPRINTF("ljSetChar %d->%s (%s)\n", font, X! t2ljf[font]->troffName, X! t2ljf[font]->ascName); X! font = t2ljf[font] - ljFts; X! } X! break; X! case S: X! font = 3; X! break; X! case D: X! break; X! default: X! /* Typically used when the main fonts don't have the X! character desired. Eg: right-hand is in the X! ZapfDingbats font */ X! font = rp->t2b_font; X! break; X! } X! X! sequence = rp->t2b_charseq; X! X! if (!sequence) { X! fprintf(stderr, "No coding for %d\n", troffChar); X! return; X! } X X! /* We're committed now */ X X! points *= rp->t2b_scale; X! xad = points * rp->t2b_xc; X! yad = points * rp->t2b_yc; X! ljSetFont(font, points); X X /* We won't output fractions */ X #define XYS "\033&a%.0fh%.0fV%s" X #define XS "\033&a%.0fH%s" X X! if (lasty != ny) { X! printf(XYS, nx+xad, ny+yad, sequence); X! lasty = ny; X! } else X! printf(XS, nx+xad, sequence); X } X X static X*************** X*** 278,288 **** X--- 278,294 ---- X } X } X X+ X printf("\033E\033&k2G"); /* reset printer, set CR=CR,LF=CRLF,FF=CRFF */ X printf("\033&l6d66p0o0e66f0L");/* letter size, portrait, no perf skip */ X printf("\0339"); /* reset side margins */ X printf("\033&a0r0C"); /* move cursor to 0,0 */ X X+ #ifdef DJ /* needed for DJ, won't hurt others */ X+ printf("\033(0U"); /* set US ascii font (ron@mlfarm, */ X+ /* 10.22.89) */ X+ #endif X+ X ljXlate(library); X fclose(library); X } X*************** X*** 302,307 **** X--- 308,314 ---- X return; X } X X+ X for (p = ljFts; p->troffName; p++) X if (strcmp(p->troffName, to) == 0) { X t2ljf[from - '1'] = p; X*************** X*** 399,402 **** X--- 406,483 ---- X c = getc(library); X } X } X+ #endif X+ X+ #ifdef DJ X+ X+ djChar(x, y, font, points, troffChar) X+ long x, y; X+ int font, points, troffChar; X+ { X+ static double lasty = (-1); X+ register double nx = TROFF2DJX(x), ny = TROFF2DJY(y); X+ register struct troff2befont *rp; X+ register char *sequence = "a"; X+ double xad, yad; X+ static int special = 0; X+ X+ if (pagePending) { X+ lasty = lastFont = lastPoints = (-1); X+ doPageStart(); X+ } X+ X+ DEBUGPRINTF("x,y=%d,%d; font=%d, points=%d, tc=%d\n", X+ x, y, font, points, troffChar); X+ X+ if (font == 3) X+ rp = &be->besymfont[troffChar]; X+ else X+ rp = &be->bestdfont[troffChar]; X+ X+ /* Because all of the expanded font */ X+ /* characters are available on the 16Q */ X+ /* font, we switch to the alternate */ X+ /* character set for S characters */ X+ /* ron@mlfarm 10.22.89 */ X+ X+ switch (rp->t2b_font) { X+ case U: X+ if (special) { X+ printf("\033(0U"); /* US ascii character set */ X+ special = 0; X+ } X+ break; X+ case S: X+ if (!special) { X+ printf("\033(16Q"); /* Deskjet International Font */ X+ special = 1; X+ } X+ break; X+ case D: X+ default: X+ break; X+ } X+ X+ DEBUGPRINTF("ljSetChar %d->%s (%s)\n", X+ font, t2ljf[font]->troffName, t2ljf[font]->ascName); X+ font = t2ljf[font] - ljFts; X+ X+ sequence = rp->t2b_charseq; X+ if (!sequence) { X+ fprintf(stderr, "No coding for %d\n", troffChar); X+ return; X+ } X+ X+ points *= rp->t2b_scale; X+ xad = points * rp->t2b_xc; X+ yad = points * rp->t2b_yc; X+ ljSetFont(font, points); X+ X+ if (lasty != ny) { X+ printf(XYS, nx + xad, ny + yad, sequence); X+ lasty = ny; X+ } else X+ printf(XS, nx + xad, sequence); X+ } X+ X #endif X*** /usr4/public/src/t2current/./dt.c Wed Nov 22 14:24:01 1989 X--- ./dt.c Wed Nov 22 14:24:29 1989 X*************** X*** 20,29 **** X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)dt.c: 1.5 Copyright 89/07/04 16:59:46 Chris Lewis"; X #endif X #else X! #ident "@(#)dt.c: 1.5 Copyright 89/07/04 16:59:46 Chris Lewis" /*(SVR3)*/ X #endif X X #define MAXFONT 50 X--- 20,29 ---- X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)dt.c: 1.6 Copyright 89/11/22 12:05:13 Chris Lewis"; X #endif X #else X! #ident "@(#)dt.c: 1.6 Copyright 89/11/22 12:05:13 Chris Lewis" /*(SVR3)*/ X #endif X X #define MAXFONT 50 X*************** X*** 330,336 **** X } X X dtChar(x, y, font, points, troffChar) X! int x, y, font, points, troffChar; { X static double lasty = (-1); X register double nx = TROFF2DTX(x), ny = TROFF2DTY(y); X register struct troff2befont *rp; X--- 330,337 ---- X } X X dtChar(x, y, font, points, troffChar) X! long x, y; X! int font, points, troffChar; { X static double lasty = (-1); X register double nx = TROFF2DTX(x), ny = TROFF2DTY(y); X register struct troff2befont *rp; X*** /usr4/public/src/t2current/./lib.ps Wed Nov 22 14:23:55 1989 X--- ./lib.ps Wed Nov 22 14:24:30 1989 X*************** X*** 9,15 **** X % Module: lib.ps X % Author: Chris Lewis X % Specs: Predefinitions for PostScript X! %ident @(#)lib.ps: 1.16 Copyright 89/07/04 16:59:33 Chris Lewis" X X /Y { 3 1 roll dup /CurY exch def moveto show } def X /X { exch CurY moveto show } def X--- 9,15 ---- X % Module: lib.ps X % Author: Chris Lewis X % Specs: Predefinitions for PostScript X! %ident @(#)lib.ps: 1.17 Copyright 89/11/07 14:51:24 Chris Lewis" X X /Y { 3 1 roll dup /CurY exch def moveto show } def X /X { exch CurY moveto show } def X*************** X*** 307,313 **** X } def X /Clk { X 300 setC X! 1 setlinewidth 220 -250 moveto 0 400 rlineto 0 50 -50 100 -100 100 rcurveto 50 0 100 50 100 100 rcurveto 0 400 rlineto 60 0 rlineto 0 -400 rlineto 0 -50 -50 -100 -100 -100 rcurveto 50 0 100 -50 100 -100 rcurveto 0 -400 rlineto closepath fill X } def X /Clb { X 300 setC X--- 307,316 ---- X } def X /Clk { X 300 setC X! 1 setlinewidth 220 -250 moveto 0 400 rlineto 0 50 -50 100 -100 100 rcurveto X! 50 0 100 50 100 100 rcurveto 0 400 rlineto 60 0 rlineto 0 -400 rlineto X! 0 -50 -50 -100 -100 -100 rcurveto 50 0 100 -50 100 -100 rcurveto X! 0 -400 rlineto closepath fill X } def X /Clb { X 300 setC X*************** X*** 319,325 **** X } def X /Crk { X 300 setC X! 1 setlinewidth 220 -250 moveto 0 400 rlineto 0 50 50 100 100 100 rcurveto -50 0 -100 50 -100 100 rcurveto 0 400 rlineto 60 0 rlineto 0 -400 rlineto 0 -50 50 -100 100 -100 rcurveto -50 0 -100 -50 -100 -100 rcurveto 0 -400 rlineto fill X } def X /Crb { X 300 setC X--- 322,331 ---- X } def X /Crk { X 300 setC X! 1 setlinewidth 220 -250 moveto 0 400 rlineto 0 50 50 100 100 100 rcurveto X! -50 0 -100 50 -100 100 rcurveto 0 400 rlineto 60 0 rlineto 0 -400 rlineto X! 0 -50 50 -100 100 -100 rcurveto -50 0 -100 -50 -100 -100 rcurveto X! 0 -400 rlineto fill X } def X /Crb { X 300 setC X*************** X*** 373,378 **** X--- 379,387 ---- X end end X } def end X /BracketFont BracketFontDict definefont pop X+ X+ /hits 0 def X+ /misses 0 def X X % This macro is invoked by ShowPage to display the current form. X % Usually redefined to point at a form loaded by an include X*** /usr4/public/src/t2current/./lj.h Wed Nov 22 14:23:11 1989 X--- ./lj.h Wed Nov 22 14:24:30 1989 X*************** X*** 12,23 **** X Hacked from ps.h X */ X X #ifndef SVR3 X #ifndef lint X! static char ljID[] = "@(#)lj.h: 1.4 Copyright 89/04/21 11:47:35 Chris Lewis"; X #endif X #else X! #ident "@(#)lj.h: 1.4 Copyright 89/04/21 11:47:35 Chris Lewis" X #endif X X /* We're using decipoints */ X--- 12,25 ---- X Hacked from ps.h X */ X X+ /* Deskjet driver copyright 1989 Ronald Florence (ron@mlfarm, 10.21.89) */ X+ X #ifndef SVR3 X #ifndef lint X! static char ljID[] = "@(#)lj.h: 1.5 Copyright 89/11/22 12:06:46 Chris Lewis"; X #endif X #else X! #ident "@(#)lj.h: 1.5 Copyright 89/11/22 12:06:46 Chris Lewis" X #endif X X /* We're using decipoints */ X*************** X*** 24,36 **** X--- 26,52 ---- X #define LJRESOLUTION 720 X /* Length scaling factor */ X #define LJSCALEFACTOR ((double) LJRESOLUTION / TROFFRESOLUTION) X+ X /* Troff assumes 7.5" paper width, most macro packages print in X 6.5" area within that. Sooo, we'll center the paperwidth on the X physical page - implying .5" inch physical margins.*/ X #define TROFF2LJX(x) ((x) * LJSCALEFACTOR + LJRESOLUTION / 2) X+ X /* 11" paper length */ X #define TROFF2LJY(y) ((y) * LJSCALEFACTOR) X X+ /* These won't work (ron@mlfarm, */ X+ /* 10.22.89) -- the offset of 1/2 inch */ X+ /* spoils it, and the length scaling */ X+ /* won't fit on a page. I'll only */ X+ /* change the DJ */ X+ #define TROFF2DJX(x) ((x) * LJSCALEFACTOR) X+ /* for length, we want .25 inch */ X+ /* margins top and bottom, so we'll */ X+ /* scale the requests and add .25 inch */ X+ #define TROFF2DJY(y) ((y) * LJSCALEFACTOR * (10.5/11.0) + (LJRESOLUTION/4)) X+ X+ X extern double pagelength; X X #define LASTLJFONT ('O') X*************** X*** 40,47 **** X--- 56,68 ---- X X extern int ljProlog(), ljEpilog(), ljChar(), ljPage(), ljFontSel(); X X+ #ifdef DJ X+ extern int djChar(); X+ #endif X+ X #define LJNAME "lj" X #define LKNAME "lk" X+ #define DJNAME "dj" X X #ifdef LJ X struct troff2befont ljSymFont[], ljStdFont[]; X*************** X*** 48,51 **** X--- 69,75 ---- X #endif X #ifdef LK X struct troff2befont lkSymFont[], lkStdFont[]; X+ #endif X+ #ifdef DJ X+ struct troff2befont djSymFont[], djStdFont[]; X #endif X*** /usr4/public/src/t2current/./troff2.c Wed Nov 22 14:24:13 1989 X--- ./troff2.c Wed Nov 22 14:24:31 1989 X*************** X*** 15,24 **** X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)troff2.c: 1.17 Copyright 89/10/10 16:03:38 Chris Lewis"; X #endif X #else X! #ident "@(#)troff2.c: 1.17 Copyright 89/10/10 16:03:38 Chris Lewis" X #endif X X #define ESC 0x80 X--- 15,24 ---- X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)troff2.c: 1.19 Copyright 89/11/22 12:05:18 Chris Lewis"; X #endif X #else X! #ident "@(#)troff2.c: 1.19 Copyright 89/11/22 12:05:18 Chris Lewis" X #endif X X #define ESC 0x80 X*************** X*** 34,39 **** X--- 34,43 ---- X #define FORWARD 4 X #define BACKWARD 5 X X+ #ifdef BSDHACK X+ int magnify_lead = 0; X+ #endif X+ X char ptab[15] = { 7, 8, 10, 11, 12, 14, 18, 9, 6, 16, 20, 22, 24, 28, 36}; X int points; X X*************** X*** 73,79 **** X extern int getopt(); X extern char *optarg; X X! progname = strrchr(argv[0], "/"); X if (progname) X progname++; X else X--- 77,83 ---- X extern int getopt(); X extern char *optarg; X X! progname = strrchr(argv[0], '/'); X if (progname) X progname++; X else X*************** X*** 157,163 **** X ypos -= pagelength; X DEBUGPRINTF("Page break\n", 0, 0); X if (be->bepage) X! (be->bepage) (); X } X c = c&0x3f; X /* Find the C/A/T code */ X--- 161,167 ---- X ypos -= pagelength; X DEBUGPRINTF("Page break\n", 0, 0); X if (be->bepage) X! (*be->bepage) (); X } X c = c&0x3f; X /* Find the C/A/T code */ X*************** X*** 268,273 **** X--- 272,283 ---- X progname, "special sequences are disabled"); X exit(1); X #endif X+ #ifdef BSDHACK X+ case 0x4e: X+ magnify_lead = 1; X+ break; X+ #endif X+ #ifdef FONT8 X case 0x4e: X DEBUGPRINTF("Tilt up\n"); X tilt = UP; X*************** X*** 278,283 **** X--- 288,294 ---- X tilt = DOWN; X calcfont; X break; X+ #endif X X /* Size changes */ X case 0x50: case 0x51: case 0x52: case 0x53: X*************** X*** 318,323 **** X--- 329,340 ---- X X DEBUGPRINTF("Lead(vertical) %02x\n", c&0x1f); X units = CTOINT(c,0x1f); X+ #ifdef BSDHACK X+ if (magnify_lead) { X+ units *= 64; X+ magnify_lead = 0; X+ } X+ #endif X if (lead == FORWARD) X ypos += 3*units; X else X*** /usr4/public/src/t2current/./defs.h Wed Nov 22 14:24:14 1989 X--- ./defs.h Wed Nov 22 14:24:34 1989 X*************** X*** 11,45 **** X Specs: Main header file - contains some customization X */ X X #ifndef LIBDIR X #define LIBDIR "/usr/lib/troff2" X #endif X X! #define T2VERSION "Release 1 Patchlevel 1 89/11/06" X X! /*#define BSD /* Define if you are a V7 or BSD machine */ X! #define ATT /* Define if you are some sort of SIII or SV system */ X #define SVR3 /* Define if you are System VR3 (ATT should also be X defined */ X X! #ifdef SVR3 X! #ifndef lint X! static char defid[] = "@(#)defs.h: 1.16 Copyright 89/11/06 16:14:49 Chris Lewis"; X! #endif X! #else X! #ident "@(#)defs.h: 1.16 Copyright 89/11/06 16:14:49 Chris Lewis" X! #endif X X X! /*#define UNSIGNEDCHAR /* define if chars are unsigned on your machine */ X X- /* Supported backends */ X #define PS /* Postscript */ X #define LJ /* Laserjet */ X #define LK /* Laserjet with K cartridge */ X #define DT /* ditroff */ X X- /* don't change anything below here */ X #include <stdio.h> X #include <ctype.h> X X--- 11,98 ---- X Specs: Main header file - contains some customization X */ X X+ /* Deskjet driver copyright 1989 Ronald Florence (ron@mlfarm, 10.21.89) */ X+ X #ifndef LIBDIR X #define LIBDIR "/usr/lib/troff2" X #endif X X! #define T2VERSION "Release 1 Patchlevel 2 89/11/09" X! X! /* Configuration parameters: X! */ X X! #undef BSD /* Define if you are a V7 or BSD machine */ X! /* strchr vs. index etc.... */ X! #define ATT /* Define if you are some sort of SIII or SV system */ X #define SVR3 /* Define if you are System VR3 (ATT should also be X defined */ X+ #undef UNSIGNEDCHAR /* define if chars are unsigned on your machine */ X X! /* Font width file configuration: X X+ - If HEADERSIZE defined, use that many bytes as a prefix to the X+ compiled font width table. HEADERSIZE 0 is the correct definition X+ for Xenix and most System V Troffs. X+ - If COFF is defined instead, use a COFF header on the beginning of X+ the file. I personally know of no machine that supports these. X+ - If neither are defined, use a BSD/V7 style a.out.h header, this X+ is appropriate for V7 and BSD troffs X+ X+ Configurations other than HEADERSIZE == 0 have *not* been tested. X+ The headers I write out do not have anything in them, so some X+ troff's may blow. Please let me know if they work for you... X+ If you do need the headers, and these doesn't work for you, enable X+ the COMPILE option in gfnttab. X+ X+ */ X+ X+ #define HEADERSIZE 0 /* size of header in bytes */ X+ #undef COFF /* systems using COFF headers */ X+ X+ /* What do you CAT codes look like? X+ X+ If BSDHACK defined, the code to magnify the next lead by 64 replaces the X+ codes to set the tilt (used only on 8-font CATs, which most CAT troff X+ programs don't support). X+ X+ Both FONT8 and BSDHACK code are *untested*. X+ */ X+ X+ #undef BSDHACK /* Has magnify lead opcode - untested */ X+ #undef FONT8 /* 8 Font device - untested */ X+ #define FONT4 /* Normal 4 font device */ X+ X X! /* The only advantage to commenting-out one of these is to make the X! binary executable of troff2?? smaller. X! */ X X #define PS /* Postscript */ X #define LJ /* Laserjet */ X #define LK /* Laserjet with K cartridge */ X #define DT /* ditroff */ X+ #define DJ /* Deskjet */ X+ X+ /* Edit no more .... */ X+ X+ /* configuration verification */ X+ X+ #if defined(BSDHACK) && defined(FONT8) X+ #include "BSDHACK and FONT8 cannot be defined at the same time" X+ #endif X+ #if defined(FONT4) && defined(FONT8) X+ #include "FONT4 and FONT8 cannot be defined at the same time" X+ #endif X+ X+ #ifndef SVR3 X+ #ifndef lint X+ static char defid[] = "@(#)defs.h: 1.18 Copyright 89/11/09 14:30:36 Chris Lewis"; X+ #endif X+ #else X+ #ident "@(#)defs.h: 1.18 Copyright 89/11/09 14:30:36 Chris Lewis" X+ #endif X X #include <stdio.h> X #include <ctype.h> X X*************** X*** 70,77 **** X #define BACKWARD 5 X X #define TROFFRESOLUTION 432 X- /*#define FONT8 /* 8 Font device */ X- #define FONT4 /* 4 font device - should be possible to leave FONT8*/ X #define DEBUGPRINTF if (diagFile) debugprintf X X #define SPECIAL /* define if you want to supports special directives */ X--- 123,128 ---- X*************** X*** 128,131 **** X X int currentPage; X int pagePending; X- X--- 179,181 ---- X*** /usr4/public/src/t2current/./ljtables.c Wed Nov 22 14:24:07 1989 X--- ./ljtables.c Wed Nov 22 14:24:34 1989 X*************** X*** 33,54 **** X * Orientation should be selected at initialization X */ X X #include "defs.h" X X! #if defined(LJ) || defined(LK) X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)ljtables.c: 1.2 Copyright 89/06/14 16:29:46 Chris Lewis"; X #endif X #else X! #ident "@(#)ljtables.c: 1.2 Copyright 89/06/14 16:29:46 Chris Lewis" /*(SVR3)*/ X #endif X X #include "lj.h" X X /* Used for characters not in Roman8 Character set */ X! #define NOPE "\377" X X #ifdef LJ X struct troff2befont ljStdFont[108] = { X--- 33,57 ---- X * Orientation should be selected at initialization X */ X X+ /* Deskjet driver copyright 1989 Ronald Florence (ron@mlfarm) */ X+ /* 10/21/89 */ X+ X #include "defs.h" X X! #if defined(LJ) || defined(LK) || defined(DJ) X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)ljtables.c: 1.3 Copyright 89/11/09 13:29:36 Chris Lewis"; X #endif X #else X! #ident "@(#)ljtables.c: 1.3 Copyright 89/11/09 13:29:36 Chris Lewis" /*(SVR3)*/ X #endif X X #include "lj.h" X X /* Used for characters not in Roman8 Character set */ X! #define NOPE "\000" X X #ifdef LJ X struct troff2befont ljStdFont[108] = { X*************** X*** 582,585 **** X--- 585,853 ---- X /*108*/ {S, 0, 0, 1, "=", "section"} X }; X #endif X+ X+ #ifdef DJ X+ X+ struct troff2befont djStdFont[108] = { X+ X+ /* +-------------------------------- Troff character number X+ | X+ | +--------------------------- U: standard fonts X+ | | S: symbol font X+ | | D: draw macro X+ | | n: new font X+ | | X+ | | +------------------------ X-shift (scaled by point) X+ | | | X+ | | | +--------------------- Y-shift (scaled by point) X+ | | | | X+ | | | | +------------------ Point-scale X+ | | | | | X+ | | | | | +-------------- Sequence X+ | | | | | | X+ | | | | | | Printable sequence title X+ | | | | | | | X+ | | | | | | | X+ v v v v v v v */ X+ /* 1*/ {U, 0, 0, 1, "h", "h"}, X+ /* 2*/ {U, 0, 0, 1, "t", "t"}, X+ /* 3*/ {U, 0, 0, 1, "n", "n"}, X+ /* 4*/ {U, 0, 0, 1, "m", "m"}, X+ /* 5*/ {U, 0, 0, 1, "l", "l"}, X+ /* 6*/ {U, 0, 0, 1, "i", "i"}, X+ /* 7*/ {U, 0, 0, 1, "z", "z"}, X+ /* 8*/ {U, 0, 0, 1, "s", "s"}, X+ /* 9*/ {U, 0, 0, 1, "d", "d"}, X+ /* 10*/ {U, 0, 0, 1, "b", "b"}, X+ /* 11*/ {U, 0, 0, 1, "x", "x"}, X+ /* 12*/ {U, 0, 0, 1, "f", "f"}, X+ /* 13*/ {U, 0, 0, 1, "j", "j"}, X+ /* 14*/ {U, 0, 0, 1, "u", "u"}, X+ /* 15*/ {U, 0, 0, 1, "k", "k"}, X+ /* 16*/ {U, 0, 0, 1, NOCODE, "unassigned"}, X+ /* 17*/ {U, 0, 0, 1, "p", "p"}, X+ /* 18*/ {S, 0, 0, 1, "\200", "3/4 em"}, X+ /* 19*/ {U, 0, 0, 1, ";", ";"}, X+ /* 20*/ {U, 0, 0, 1, NOCODE, "unassigned"}, X+ /* 21*/ {U, 0, 0, 1, "a", "a"}, X+ /* 22*/ {U, 0, 0, 1, "_", "horizontal rule"}, X+ /* 23*/ {U, 0, 0, 1, "c", "c"}, X+ /* 24*/ {U, 0, 0, 1, "`", "` open"}, X+ /* 25*/ {U, 0, 0, 1, "e", "e"}, X+ /* 26*/ {U, 0, 0, 1, "'", "' close"}, X+ /* 27*/ {U, 0, 0, 1, "o", "o"}, X+ /* 28*/ {S, 0, 0, 1, "\201", "1/4"}, X+ /* 29*/ {U, 0, 0, 1, "r", "r"}, X+ /* 30*/ {S, 0, 0, 1, "\202", "1/2"}, X+ /* 31*/ {U, 0, 0, 1, "v", "v"}, X+ /* 32*/ {U, 0, 0, 1, "-", "- (hyphen)"}, X+ /* 33*/ {U, 0, 0, 1, "w", "w"}, X+ /* 34*/ {U, 0, 0, 1, "q", "q"}, X+ /* 35*/ {U, 0, 0, 1, "/", "/"}, X+ /* 36*/ {U, 0, 0, 1, ".", "."}, X+ /* 37*/ {U, 0, 0, 1, "g", "g"}, X+ /* 38*/ {S, 0, 0, 1, "\177", "3/4"}, X+ /* 39*/ {U, 0, 0, 1, ",", ","}, X+ /* 40*/ {U, 0, 0, 1, "&", "&"}, X+ /* 41*/ {U, 0, 0, 1, "y", "y"}, X+ /* 42*/ {U, 0, 0, 1, NOCODE, "unassigned"}, X+ /* 43*/ {U, 0, 0, 1, "\%", "%"}, X+ /* 44*/ {U, 0, 0, 1, NOCODE, "unassigned"}, X+ /* 45*/ {U, 0, 0, 1, "Q", "Q"}, X+ /* 46*/ {U, 0, 0, 1, "T", "T"}, X+ /* 47*/ {U, 0, 0, 1, "O", "O"}, X+ /* 48*/ {U, 0, 0, 1, "H", "H"}, X+ /* 49*/ {U, 0, 0, 1, "N", "N"}, X+ /* 50*/ {U, 0, 0, 1, "M", "M"}, X+ /* 51*/ {U, 0, 0, 1, "L", "L"}, X+ /* 52*/ {U, 0, 0, 1, "R", "R"}, X+ /* 53*/ {U, 0, 0, 1, "G", "G"}, X+ /* 54*/ {U, 0, 0, 1, "I", "I"}, X+ /* 55*/ {U, 0, 0, 1, "P", "P"}, X+ /* 56*/ {U, 0, 0, 1, "C", "C"}, X+ /* 57*/ {U, 0, 0, 1, "V", "V"}, X+ /* 58*/ {U, 0, 0, 1, "E", "E"}, X+ /* 59*/ {U, 0, 0, 1, "Z", "Z"}, X+ /* 60*/ {U, 0, 0, 1, "D", "D"}, X+ /* 61*/ {U, 0, 0, 1, "B", "B"}, X+ /* 62*/ {U, 0, 0, 1, "S", "S"}, X+ /* 63*/ {U, 0, 0, 1, "Y", "Y"}, X+ /*from here on are actually code 1-45, upper half of font */ X+ /* 64*/ {U, 0, 0, 1, "F", "F"}, X+ /* 65*/ {U, 0, 0, 1, "X", "X"}, X+ /* 66*/ {U, 0, 0, 1, "A", "A"}, X+ /* 67*/ {U, 0, 0, 1, "W", "W"}, X+ /* 68*/ {U, 0, 0, 1, "J", "J"}, X+ /* 69*/ {U, 0, 0, 1, "U", "U"}, X+ /* 70*/ {U, 0, 0, 1, "K", "K"}, X+ /* 71*/ {U, 0, 0, 1, "0", "0"}, X+ /* 72*/ {U, 0, 0, 1, "1", "1"}, X+ /* 73*/ {U, 0, 0, 1, "2", "2"}, X+ /* 74*/ {U, 0, 0, 1, "3", "3"}, X+ /* 75*/ {U, 0, 0, 1, "4", "4"}, X+ /* 76*/ {U, 0, 0, 1, "5", "5"}, X+ /* 77*/ {U, 0, 0, 1, "6", "6"}, X+ /* 78*/ {U, 0, 0, 1, "7", "7"}, X+ /* 79*/ {U, 0, 0, 1, "8", "8"}, X+ /* 80*/ {U, 0, 0, 1, "9", "9"}, X+ /* 81*/ {U, 0, 0, 1, "*", "*"}, X+ /* 82*/ {U, 0, 0, 1, "-", "minus"}, X+ /* 83*/ {U, 0, 0, 1, NOPE, "fi"}, X+ /* 84*/ {U, 0, 0, 1, NOPE, "fl"}, X+ /* 85*/ {U, 0, 0, 1, NOPE, "ff"}, X+ /* 86*/ {S, 0, 0, 1, "\157", "cent sign"}, X+ /* 87*/ {U, 0, 0, 1, NOPE, "ffl"}, X+ /* 88*/ {U, 0, 0, 1, NOPE, "ffi"}, X+ /* 89*/ {U, 0, 0, 1, "(", "("}, X+ /* 90*/ {U, 0, 0, 1, ")", ")"}, X+ /* 91*/ {U, 0, 0, 1, "[", "["}, X+ /* 92*/ {U, 0, 0, 1, "]", "]"}, X+ /* 93*/ {S, 0, 0, 1, "\147", "degree"}, X+ /* 94*/ {S, 0, 0, 1, "\375", "dagger"}, X+ /* 95*/ {U, 0, 0, 1, "=", "="}, X+ /* 96*/ {S, 0, 0, 1, "\372", "registered"}, X+ /* 97*/ {U, 0, 0, 1, ":", ":"}, X+ /* 98*/ {U, 0, 0, 1, "+", "+"}, X+ /* 99*/ {U, 0, 0, 1, NOCODE, "unassigned"}, X+ /*100*/ {U, 0, 0, 1, "!", "!"}, X+ /*101*/ {S, 0, 0, 1, "\174", "bullet"}, X+ /*102*/ {U, 0, 0, 1, "?", "?"}, X+ /*103*/ {S, 0, 0, 1, "\141", "foot mark"}, X+ /*104*/ {U, 0, 0, 1, "|", "|"}, X+ /*105*/ {U, 0, 0, 1, NOCODE, "unassigned"}, X+ /*106*/ {S, 0, 0, 1, "\371", "copyright"}, X+ /*107*/ {S, 0, 0, 1, "\206", "square"}, /* not quite */ X+ /*108*/ {U, 0, 0, 1, "$", "$"} X+ }; X+ X+ struct troff2befont djSymFont[] = { X+ /* +-------------------------------- Troff character number X+ | X+ | +--------------------------- U: standard fonts X+ | | S: symbol font X+ | | D: draw macro X+ | | X+ | | +------------------------ X-shift (scaled by point) X+ | | | X+ | | | +--------------------- Y-shift (scaled by point) X+ | | | | X+ | | | | +------------------ Point-scale X+ | | | | | X+ | | | | | +-------------- Sequence X+ | | | | | | X+ | | | | | | Printable sequence title X+ | | | | | | | X+ | | | | | | | X+ v v v v v v v */ X+ /* 1*/ {S, 0, 0, 1, NOPE, "psi"}, X+ /* 2*/ {S, 0, 0, 1, NOPE, "theta"}, X+ /* 3*/ {S, 0, 0, 1, NOPE, "nu"}, X+ /* 4*/ {S, 0, 0, 1, "\175", "mu"}, X+ /* 5*/ {S, 0, 0, 1, NOPE, "lambda"}, X+ /* 6*/ {S, 0, 0, 1, NOPE, "iota"}, X+ /* 7*/ {S, 0, 0, 1, NOPE, "zeta"}, X+ /* 8*/ {S, 0, 0, 1, "\336", "sigma"}, X+ /* 9*/ {S, 0, 0, 1, "\343", "delta"}, X+ /* 10*/ {S, 0, 0, 1, "\332", "beta"}, X+ /* 11*/ {S, 0, 0, 1, NOPE, "xi"}, X+ /* 12*/ {S, 0, 0, 1, NOPE, "eta"}, X+ /* 13*/ {S, 0, 0, 1, "\345", "phi"}, X+ /* 14*/ {S, 0, 0, 1, NOPE, "upsilon"}, X+ /* 15*/ {S, 0, 0, 1, NOPE, "kappa"}, X+ /* 16*/ {S, 0, 0, 1, NOCODE, "unassigned"}, X+ /* 17*/ {S, 0, 0, 1, "\334", "pi"}, X+ /* 18*/ {U, 0, 0, 1, "@", "@"}, X+ /* 19*/ {S, 0, 0, 1, "\244", "down arrow"}, X+ /* 20*/ {S, 0, 0, 1, NOCODE, "unassigned"}, X+ /* 21*/ {S, 0, 0, 1, "\331", "alpha"}, X+ /* 22*/ {U, 0, 0, 1, "|", "or (was star)"}, X+ /* 23*/ {S, 0, 0, 1, NOPE, "chi"}, X+ /* 24*/ {U, 0, 0, 1, "\042", "double quote"}, X+ /* 25*/ {S, 0, 0, 1, "\346", "epsilon"}, X+ /* 26*/ {U, 0, 0, 1, "=", "equation equal"}, X+ /* 27*/ {S, 0, 0, 1, NOPE, "omicron"}, X+ /* 28*/ {S, 0, 0, 1, "\246", "left arrow"}, X+ /* 29*/ {S, 0, 0, 1, NOPE, "rho"}, X+ /* 30*/ {S, 0, 0, 1, "\243", "up arrow"}, X+ /* 31*/ {S, 0, 0, 1, "\337", "tau"}, X+ /* 32*/ {U, 0, 0, 1, "_", "_ underrule"}, X+ /* 33*/ {U, 0, 0, 1, "\\", "\\"}, X+ /* 34*/ {S, 0, 0, 1, NOPE, "Psi"}, X+ /* 35*/ {S, 0, 0, 1, "\176", "bell system sign"}, /* para */ X+ /* 36*/ {S, 0, 0, 1, "\344", "infinity"}, X+ /* 37*/ {S, 0, 0, 1, NOPE, "gamma"}, X+ /* 38*/ {S, 0, 0, 1, NOPE, "improper superset"}, X+ /* 39*/ {S, 0, 0, 1, NOPE, "proportional to"}, X+ /* 40*/ {S, 0, 0, 1, "\207", "right hand"}, X+ /* 41*/ {S, 0, 0, 1, NOPE, "omega"}, X+ /* 42*/ {S, 0, 0, 1, NOCODE, "unassigned"}, X+ /* 43*/ {S, 0, 0, 1, NOPE, "gradient"}, X+ /* 44*/ {S, 0, 0, 1, NOCODE, "unassigned"}, X+ /* 45*/ {S, 0, 0, 1, "\340", "Phi"}, X+ /* 46*/ {S, 0, 0, 1, "\341", "Theta"}, X+ /* 47*/ {S, 0, 0, 1, "\342", "Omega"}, X+ /* 48*/ {S, 0, 0, 1, NOPE, "union"}, X+ /* 49*/ {S, 0, 0, 1, "\146", "root en extender"}, X+ /* 50*/ {S, 0, 0, 1, NOPE, "terminal sigma (was root em)"}, X+ /* 51*/ {S, 0, 0, 1, NOPE, "Lambda"}, X+ /* 52*/ {U, 0, 0, 1, "-", "equation minus"}, X+ /* 53*/ {S, 0, 0, 1, "\333", "Gamma"}, X+ /* 54*/ {S, 0, 0, 1, "\353\b\354", "integral sign"}, X+ /* 55*/ {S, 0, 0, 1, NOPE, "Pi"}, X+ /* 56*/ {S, 0, 0, 1, NOPE, "subset of"}, X+ /* 57*/ {S, 0, 0, 1, NOPE, "superset of"}, X+ /* 58*/ {S, 0, 0, 1, "\136", "approximates"}, X+ /* 59*/ {S, 0, 0, 1, NOPE, "partial derivative"}, X+ /* 60*/ {S, 0, 0, 1, NOPE, "Delta"}, X+ /* 61*/ {S, 0, 0, 1, "\360", "square root"}, X+ /* 62*/ {S, 0, 0, 1, "\335", "Sigma"}, X+ /* 63*/ {S, 0, 0, 1, "\356", "approx ="}, X+ /* 64*/ {U, 0, 0, 1, ">", ">"}, X+ /* 65*/ {S, 0, 0, 1, NOPE, "Xi"}, X+ /* 66*/ {U, 0, 0, 1, "<", "<"}, X+ /* 67*/ {U, 0, 0, 1, "/", "long slash (longer)"}, X+ /* 68*/ {S, 0, 0, 1, "\347", "intersect"}, X+ /* 69*/ {S, 0, 0, 1, NOPE, "Upsilon"}, X+ /* 70*/ {S, 0, 0, 1, "\255", "logical not"}, X+ /* 71*/ {S, 0, 0, 1, "\275", "right ceiling"}, X+ /* 72*/ {S, 0, 0, 1, "\324", "left top brace"}, X+ /* 73*/ {S, 0, 0, 1, "\261", "bold vertical"}, X+ /* 74*/ {S, 0, 0, 1, "\262", "left ctr brace"}, X+ /* 75*/ {S, 0, 0, 1, "\276", "left bot brace"}, X+ /* 76*/ {S, 0, 0, 1, "\275", "right top brace"}, X+ /* 77*/ {S, 0, 0, 1, "\301", "right ctr brace"}, X+ /* 78*/ {S, 0, 0, 1, "\323", "right bot brace"}, X+ /* 79*/ {S, 0, 0, 1, "\323", "right floor"}, X+ /* 80*/ {S, 0, 0, 1, "\276", "left floor"}, X+ /* 81*/ {S, 0, 0, 1, "\324", "left ceiling"}, X+ /* 82*/ {S, 0, 0, 1, "\145", "multiply"}, X+ /* 83*/ {S, 0, 0, 1, "\355", "divide"}, X+ /* 84*/ {S, 0, 0, 1, "\210", "plus-minus"}, X+ /* 85*/ {S, 0, 0, 1, "\352", "<="}, X+ /* 86*/ {S, 0, 0, 1, "\351", ">="}, X+ /* 87*/ {S, 0, 0, 1, "\350", "identically equal"}, X+ /* 88*/ {U, 0, 0, 1, "=\b/", "not equal"}, X+ /* 89*/ {U, 0, 0, 1, "{", "{"}, X+ /* 90*/ {U, 0, 0, 1, "}", "}"}, X+ /* 91*/ {S, 0, 0, 1, "\140", "acute accent"}, X+ /* 92*/ {S, 0, 0, 1, "\141", "grave accent"}, X+ /* 93*/ {S, 0, 0, 1, "^", "^"}, X+ /* 94*/ {U, 0, 0, 1, "#", "#"}, X+ /* 95*/ {S, 0, 0, 1, "\205", "left hand"}, X+ /* 96*/ {S, 0, 0, 1, "\346", "member of"}, X+ /* 97*/ {U, 0, 0, 1, "~", "~"}, X+ /* 98*/ {S, 0, 0, 1, "\160", "empty set"}, X+ /* 99*/ {U, 0, 0, 1, NOCODE, "unassigned"}, X+ /*100*/ {S, 0, 0, 1, NOPE, "dbl dagger"}, X+ /*101*/ {S, 0, 0, 1, "\261", "box rule (was parallel sign)"}, X+ /*102*/ {U, 0, 0, 1, "*", "math * "}, X+ /*103*/ {S, 0, 0, 1, NOPE, "improper subset"}, X+ /*104*/ {S, 0, 0, 1, "\227", "circle"}, X+ /*105*/ {S, 0, 0, 1, NOCODE, "unassigned"}, X+ /*106*/ {U, 0, 0, 1, "+", "equation plus"}, X+ /*107*/ {S, 0, 0, 1, "\245", "right arrow"}, X+ /*108*/ {S, 0, 0, 1, "\155", "section"} X+ }; X+ #endif X+ X #endif X*** /usr4/public/src/t2current/./dit2catwid.c Wed Nov 22 14:24:14 1989 X--- ./dit2catwid.c Wed Nov 22 14:24:36 1989 X*************** X*** 1,17 **** X! /* Brute force ditroff to CAT width table converter 1.6 89/10/20 X Will generate ft* files that are compatible with troff (at least the X Xenix version that is) X */ X X! static char SCCSid[] = "@(#)dit2catwid.c 1.6 89/10/20"; X X #include <stdio.h> X #include "defs.h" X #include <ctype.h> X int res = 720; X int unitwid = 10; X int symfont = 0; X int verbose = 0; X X #define TROFFUWID 6 X X--- 1,35 ---- X! /* Brute force ditroff to CAT width table converter 1.7 89/11/09 X Will generate ft* files that are compatible with troff (at least the X Xenix version that is) X */ X X! static char SCCSid[] = "@(#)dit2catwid.c 1.7 89/11/09"; X X #include <stdio.h> X #include "defs.h" X #include <ctype.h> X+ X+ #ifndef HEADERSIZE X+ # ifdef COFF X+ # include <aouthdr.h> X+ # include <filehdr.h> X+ # include <scnhdr.h> X+ # include <ldfcn.h> X+ # include <reloc.h> X+ # define H1 (sizeof (struct filehdr) + sizeof (struct aouthdr)) X+ # define H2 (sizeof (struct scnhdr) + sizeof (struct reloc)) X+ # define HEADERSIZE (H1 + H2) X+ # else X+ # include <a.out.h> X+ # define HEADERSIZE (sizeof (struct exec)) X+ # endif X+ #endif X+ X int res = 720; X int unitwid = 10; X int symfont = 0; X int verbose = 0; X+ int genc = 0; X X #define TROFFUWID 6 X X*************** X*** 306,313 **** X X progname = argv[0]; X X! while ((c = getopt(argc, argv, "vsr:u:")) != EOF) X switch(c) { X case 's': X symfont = 1; X break; X--- 324,335 ---- X X progname = argv[0]; X X! while ((c = getopt(argc, argv, "vsr:u:ch")) != EOF) X switch(c) { X+ case 'h': X+ printf("%d\n", HEADERSIZE); X+ exit(0); X+ break; X case 's': X symfont = 1; X break; X*************** X*** 320,325 **** X--- 342,350 ---- X case 'v': X verbose = 1; X break; X+ case 'c': X+ genc = 1; X+ break; X default: X usage(); X } X*************** X*** 331,340 **** X out = mustopen(fout = argv[optind+2], "w"); X process(in1, fin1); X process(in2, fin2); X! if (symfont) X! output(symbol, out, fout, "Symbol character set"); X! else X! output(normal, out, fout, "Normal character set"); X fclose(in1); X fclose(in2); X fclose(out); X--- 356,372 ---- X out = mustopen(fout = argv[optind+2], "w"); X process(in1, fin1); X process(in2, fin2); X! if (genc) { X! if (symfont) X! genccode(symbol, out, fout, "Symbol character set"); X! else X! genccode(normal, out, fout, "Normal character set"); X! } else { X! if (symfont) X! output(symbol, out, fout, "Symbol character set"); X! else X! output(normal, out, fout, "Normal character set"); X! } X fclose(in1); X fclose(in2); X fclose(out); X*************** X*** 341,351 **** X--- 373,425 ---- X exit(0); X } X X+ genccode(symset, f, file, type) X+ FILE *f; X+ struct widths *symset; X+ char *type, *file; { X+ int i; X+ fprintf(f, "/* %s */\n", type); X+ fprintf(f, "char ftXX[224] = {\n"); X+ for (i = 0; i < 224; i++) { X+ if (symset[i].name && !symset[i].catwidth) { X+ fprintf(stderr, "%s: No width for %s (file %s)\n", X+ progname, symset[i].name, file); X+ gencline(f, i, normal[0].catwidth, symset[i].name); X+ } else X+ gencline(f, i, symset[i].catwidth, symset[i].name); X+ } X+ fprintf(f, "};\n"); X+ } X+ X+ gencline(file, index, width, name) X+ FILE *file; int index, width; char *name; { X+ int w = width&077; X+ int k = width&0300; X+ fprintf(file, "%d", w); X+ if (k) X+ fprintf(file, "+0%03o", k); X+ if (index != 223) X+ fprintf(file, ","); X+ if (name && *name) { X+ if (!k) X+ fprintf(file, "\t"); X+ fprintf(file, "\t/* %s */\n", name); X+ } else X+ fprintf(file, "\n"); X+ } X+ X output(symset, f, file, type) X FILE *f; X struct widths *symset; X char *type, *file; { X int i; X+ /* This simply prepends HEADERSIZE bytes to the font width file. X+ This may not be adequate for some troffs, in that some of the X+ fields in the appropriate object headers have to be filled in. X+ If this is a problem, use dit2catwid -c and compile it manually. X+ */ X+ for (i = 0; i < HEADERSIZE; i++) X+ fputc('\0', f); X for (i = 0; i < 224; i++) { X if (symset[i].name && !symset[i].catwidth) { X fprintf(stderr, "%s: No width for %s (file %s)\n", X*** /usr4/public/src/t2current/./ps.c Wed Nov 22 14:24:16 1989 X--- ./ps.c Wed Nov 22 14:24:39 1989 X*************** X*** 18,27 **** X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)ps.c: 1.26 Copyright 89/10/30 21:40:57 Chris Lewis"; X #endif X #else X! #ident "@(#)ps.c: 1.26 Copyright 89/10/30 21:40:57 Chris Lewis" /*(SVR3)*/ X #endif X X #define METRICS X--- 18,27 ---- X X #ifndef SVR3 X #ifndef lint X! static char SCCSid[] = "@(#)ps.c: 1.27 Copyright 89/11/22 12:05:29 Chris Lewis"; X #endif X #else X! #ident "@(#)ps.c: 1.27 Copyright 89/11/22 12:05:29 Chris Lewis" /*(SVR3)*/ X #endif X X #define METRICS X*************** X*** 171,177 **** X /* 98*/ {U, 0, 0, 1, "+", "+"}, X /* 99*/ {U, 0, 0, 1, NOCODE, "unassigned"}, X /*100*/ {U, 0, 0, 1, "!", "!"}, X! /*101*/ {U, 0, -.1, 1.5, "\\267", "bullet"}, X /*102*/ {U, 0, 0, 1, "?", "?"}, X /*103*/ {S, 0, 0, 1, "\\242", "foot mark (minute)"}, X /*104*/ {U, -.1, 0, 1, "|", "|"}, X--- 171,177 ---- X /* 98*/ {U, 0, 0, 1, "+", "+"}, X /* 99*/ {U, 0, 0, 1, NOCODE, "unassigned"}, X /*100*/ {U, 0, 0, 1, "!", "!"}, X! /*101*/ {U, 0, 0, 1, "\\267", "bullet"}, X /*102*/ {U, 0, 0, 1, "?", "?"}, X /*103*/ {S, 0, 0, 1, "\\242", "foot mark (minute)"}, X /*104*/ {U, -.1, 0, 1, "|", "|"}, X*************** X*** 365,371 **** X } X X psChar(x, y, font, points, troffChar) X! int x, y, font, points, troffChar; { X static double lasty = (-1); X register double nx = TROFF2PSX(x), ny = TROFF2PSY(y); X register struct troff2befont *rp; X--- 365,372 ---- X } X X psChar(x, y, font, points, troffChar) X! long x, y; X! int font, points, troffChar; { X static double lasty = (-1); X register double nx = TROFF2PSX(x), ny = TROFF2PSY(y); X register struct troff2befont *rp; END_OF_FILE if test 44322 -ne `wc -c <'Patch02'`; then echo shar: \"'Patch02'\" unpacked with wrong size! fi # end of 'Patch02' fi echo shar: End of archive 1 \(of 1\). cp /dev/null ark1isdone MISSING="" for I in 1 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have the archive. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 -- A fanatic is one who can't change his | Chris Lewis, Elegant Communications Inc. mind and won't change the subject. | {uunet!attcan,utzoo}!lsuc!eci386!clewis [Winston Churchill] | Ferret mailing list moderator.