|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T f
Length: 52776 (0xce28) Types: TextFile Names: »fix4«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki └─⟦this⟧ »EUUGD11/euug-87hel/sec1/ditroff-fix/fix4«
#! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # diffc # This archive created: Thu Nov 20 21:50:05 1986 export PATH; PATH=/bin:$PATH echo shar: extracting "'diffc'" '(49231 characters)' if test -f 'diffc' then echo shar: will not over-write existing file "'diffc'" else sed 's/^X//' << \SHAR_EOF > 'diffc' Xdiff -rbc titroff/n5.c /distribution/dwb/text/troff.d/n5.c X*** titroff/n5.c Wed Nov 19 21:30:06 1986 X--- /distribution/dwb/text/troff.d/n5.c Fri Sep 9 18:45:51 1983 X*************** X*** 1,3 X #include "tdef.h" X #include <sgtty.h> X extern X X--- 1,4 ----- X+ /* @(#)n5.c 1.1 */ X #include "tdef.h" X #include <sgtty.h> X extern X*************** X*** 46,56 X case '3': X case '5': X admod = (i - '0') / 2; X- #ifdef REPORTERRS X- break; X- default: X- errmsg(EWARN, ".ad: Unknown adjust mode \"%s\"", tchartos(i)); X- #endif REPORTERRS X } X } X X X--- 47,52 ----- X case '3': X case '5': X admod = (i - '0') / 2; X } X } X X*************** X*** 146,154 X i = atoi(); X noscale = 0; X if (nonumb) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, ".hy: numeric argument expected assuming 1"); X return; X } X #else !REPORTERRS X X--- 142,147 ----- X i = atoi(); X noscale = 0; X if (nonumb) X return; X hyf = max(i, 0); X } X*************** X*** 150,159 X { X errmsg(EWARN, ".hy: numeric argument expected assuming 1"); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X hyf = max(i, 0); X } X X X--- 143,148 ----- X noscale = 0; X if (nonumb) X return; X hyf = max(i, 0); X } X X*************** X*** 285,298 X X skip(); X if ((i = vnumb(&pl)) == 0) X- #ifdef PAPERSIZEREG X- { X- extern int paperlength, paperwidth; X- X- pl = paperlength; /* from DESC */ X- /* this is swapped with paperwidth if the page gets rotated */ X- } X- #else !PAPERSIZEREG X pl = 11 * INCH; /*11in*/ X #endif PAPERSIZEREG X else X X--- 274,279 ----- X X skip(); X if ((i = vnumb(&pl)) == 0) X pl = 11 * INCH; /*11in*/ X else X pl = i; X*************** X*** 294,300 X } X #else !PAPERSIZEREG X pl = 11 * INCH; /*11in*/ X- #endif PAPERSIZEREG X else X pl = i; X if (v.nl > pl) X X--- 275,280 ----- X skip(); X if ((i = vnumb(&pl)) == 0) X pl = 11 * INCH; /*11in*/ X else X pl = i; X if (v.nl > pl) X*************** X*** 310,318 X skip(); X i = vnumb((int *)0); X if (nonumb) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, ".wh: usage .wh nnn xx (can't find number nnn)"); X return; X } X #else !REPORTERRS X X--- 290,295 ----- X skip(); X i = vnumb((int *)0); X if (nonumb) X return; X skip(); X j = getrq(); X*************** X*** 314,323 X { X errmsg(EWARN, ".wh: usage .wh nnn xx (can't find number nnn)"); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X skip(); X j = getrq(); X if ((k = findn(i)) != NTRAP) { X X--- 291,296 ----- X i = vnumb((int *)0); X if (nonumb) X return; X skip(); X j = getrq(); X if ((k = findn(i)) != NTRAP) { X*************** X*** 329,337 X break; X if (k == NTRAP) { X flusho(); X- #ifdef REPORTERRS X- errmsg(EWARN, "more than %d traps -- too many", NTRAP - 1); X- #else !REPORTERRS X fprintf(stderr, "troff: cannot plant trap.\n"); X #endif REPORTERRS X return; X X--- 302,307 ----- X break; X if (k == NTRAP) { X flusho(); X fprintf(stderr, "troff: cannot plant trap.\n"); X return; X } X*************** X*** 333,339 X errmsg(EWARN, "more than %d traps -- too many", NTRAP - 1); X #else !REPORTERRS X fprintf(stderr, "troff: cannot plant trap.\n"); X- #endif REPORTERRS X return; X } X mlist[k] = j; X X--- 303,308 ----- X if (k == NTRAP) { X flusho(); X fprintf(stderr, "troff: cannot plant trap.\n"); X return; X } X mlist[k] = j; X*************** X*** 348,356 X lgf++; X skip(); X if (!(j = getrq())) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, ".ch: need a macro name and a place -- no name given"); X return; X } X #else !REPORTERRS X X--- 317,322 ----- X lgf++; X skip(); X if (!(j = getrq())) X return; X else X for (k = 0; k < NTRAP; k++) X*************** X*** 352,361 X { X errmsg(EWARN, ".ch: need a macro name and a place -- no name given"); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X else X for (k = 0; k < NTRAP; k++) X if (mlist[k] == j) X X--- 318,323 ----- X skip(); X if (!(j = getrq())) X return; X else X for (k = 0; k < NTRAP; k++) X if (mlist[k] == j) X*************** X*** 361,369 X if (mlist[k] == j) X break; X if (k == NTRAP) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, ".ch: Can't change unplanted macro \"%s\"", realname(j)); X return; X } X #else !REPORTERRS X X--- 323,328 ----- X if (mlist[k] == j) X break; X if (k == NTRAP) X return; X skip(); X i = vnumb((int *)0); X*************** X*** 365,374 X { X errmsg(EWARN, ".ch: Can't change unplanted macro \"%s\"", realname(j)); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X skip(); X i = vnumb((int *)0); X if (nonumb) X X--- 324,329 ----- X break; X if (k == NTRAP) X return; X skip(); X i = vnumb((int *)0); X if (nonumb) X*************** X*** 401,411 X npn = i; X npnflg++; X } X- #ifdef REPORTERRS X- else { X- errmsg(EWARN, "Call to .pn with non-numeric argument ignored"); X- } X- #endif REPORTERRS X } X X X X--- 356,361 ----- X npn = i; X npnflg++; X } X } X X X*************** X*** 434,443 X int x; X { X register i; X- #ifdef TCHARTOS X- tchar tmbuf[NTM]; X- extern char *tchartos(); X- #else !TCHARTOS X char tmbuf[NTM]; X #endif TCHARTOS X X X--- 384,389 ----- X int x; X { X register i; X char tmbuf[NTM]; X X lgf++; X*************** X*** 439,445 X extern char *tchartos(); X #else !TCHARTOS X char tmbuf[NTM]; X- #endif TCHARTOS X X lgf++; X copyf++; X X--- 385,390 ----- X { X register i; X char tmbuf[NTM]; X X lgf++; X copyf++; X*************** X*** 452,463 X tmbuf[i++] = '\n'; X tmbuf[i] = 0; X flusho(); X- #ifdef TCHARTOS X- for (i = 0; i < NTM -2 && tmbuf[i] && tmbuf[i] != '\n'; i++) { X- fprintf(stderr, tchartos(tmbuf[i])); X- } X- fprintf(stderr, "\n"); X- #else !TCHARTOS X fprintf(stderr, "%s", tmbuf); X #endif TCHARTOS X copyf--; X X--- 397,402 ----- X tmbuf[i++] = '\n'; X tmbuf[i] = 0; X flusho(); X fprintf(stderr, "%s", tmbuf); X copyf--; X } X*************** X*** 459,465 X fprintf(stderr, "\n"); X #else !TCHARTOS X fprintf(stderr, "%s", tmbuf); X- #endif TCHARTOS X copyf--; X } X X X--- 398,403 ----- X tmbuf[i] = 0; X flusho(); X fprintf(stderr, "%s", tmbuf); X copyf--; X } X X*************** X*** 539,547 X if (skip()) { X e0: X if (evi == 0) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, ".ev at outermost level ignored"); X return; X } X #else !REPORTERRS X X--- 477,482 ----- X if (skip()) { X e0: X if (evi == 0) X return; X nxev = evlist[--evi]; X goto e1; X*************** X*** 543,552 X { X errmsg(EWARN, ".ev at outermost level ignored"); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X nxev = evlist[--evi]; X goto e1; X } X X--- 478,483 ----- X e0: X if (evi == 0) X return; X nxev = evlist[--evi]; X goto e1; X } X*************** X*** 556,582 X if (nonumb) X goto e0; X flushi(); X- #ifdef REPORTERRS X- if (nxev >= NEV) { X- flusho(); X- errmsg(error? done2 : edone, 040, X- ".ev %d: largest number allowed is %d", X- nxev, NEV - 1); X- return; X- } else if (nxev < 0) { X- flusho(); X- errmsg(error? done2 : edone, 040, X- ".ev %d: number must be in range 0-%d", X- nxev, NEV - 1); X- return; X- } else if (evi >= EVLSZ) { X- flusho(); X- errmsg(error? done2 : edone, 040, X- ".ev %d: Environments nested deeper than %d levels", X- nxev, EVLSZ - 1); X- return; X- } X- #else !REPORTERRS X if ((nxev >= NEV) || (nxev < 0) || (evi >= EVLSZ)) { X flusho(); X fprintf(stderr, "troff: cannot do ev.\n"); X X--- 487,492 ----- X if (nonumb) X goto e0; X flushi(); X if ((nxev >= NEV) || (nxev < 0) || (evi >= EVLSZ)) { X flusho(); X fprintf(stderr, "troff: cannot do ev.\n"); X*************** X*** 586,592 X edone(040); X return; X } X- #endif REPORTERRS X evlist[evi++] = ev; X e1: X if (ev == nxev) X X--- 496,501 ----- X edone(040); X return; X } X evlist[evi++] = ev; X e1: X if (ev == nxev) X*************** X*** 604,612 X if (--ifx < 0) { X ifx = 0; X iflist[0] = 0; X- #ifdef REPORTERRS X- errmsg(EWARN, ".el without matching .if ignored"); X- #endif REPORTERRS X } X caseif(2); X } X X--- 513,518 ----- X if (--ifx < 0) { X ifx = 0; X iflist[0] = 0; X } X caseif(2); X } X*************** X*** 615,625 X caseie() X { X if (ifx >= NIF) { X- #ifdef REPORTERRS X- ifx = 0; X- errmsg(edone, 040, ".ie: if-else nested deeper than %d pairs", X- NIF - 1); X- #else !REPORTERRS X fprintf(stderr, "troff: if-else overflow.\n"); X #endif REPORTERRS X } X X--- 521,526 ----- X caseie() X { X if (ifx >= NIF) { X fprintf(stderr, "troff: if-else overflow.\n"); X ifx = 0; X edone(040); X*************** X*** 621,627 X NIF - 1); X #else !REPORTERRS X fprintf(stderr, "troff: if-else overflow.\n"); X! #endif REPORTERRS X } X caseif(1); X ifx++; X X--- 522,529 ----- X { X if (ifx >= NIF) { X fprintf(stderr, "troff: if-else overflow.\n"); X! ifx = 0; X! edone(040); X } X caseif(1); X ifx++; X*************** X*** 641,652 X goto i1; X } X true = 0; X- #ifdef REPORTERRS X- if (skip()) { X- errmsg(EWARN, ".i%c without test ignored", X- (x == 0) ? 'f' : ((x < 2) ? 'e' : 'l') ); X- } X- #else !REPORTERRS X skip(); X #endif REPORTERRS X if ((cbits(i = getch())) == '!') { X X--- 543,548 ----- X goto i1; X } X true = 0; X skip(); X if ((cbits(i = getch())) == '!') { X notflag = 1; X*************** X*** 648,654 X } X #else !REPORTERRS X skip(); X- #endif REPORTERRS X if ((cbits(i = getch())) == '!') { X notflag = 1; X } else { X X--- 544,549 ----- X } X true = 0; X skip(); X if ((cbits(i = getch())) == '!') { X notflag = 1; X } else { X*************** X*** 655,674 X notflag = 0; X ch = i; X } X- #ifdef REPORTERRS X- /* atoi will moan if we give it something that's not an expression. X- * I'm not so sure it was a good idea giving atoi error checking! X- * Let's do a real kludge and have a gloval variable to turn off X- * error checking! X- * - req X- */ X- { X- int save_errs = reporterrs; X- X- reporterrs &= (~LERR_BADEXPSTART); X- /* don't moan about leading garbage -- X- * just assume there isn't an expression there X- */ X i = atoi(); X reporterrs = save_errs; X } X X--- 550,555 ----- X notflag = 0; X ch = i; X } X i = atoi(); X if (!nonumb) { X if (i > 0) X*************** X*** 670,680 X * just assume there isn't an expression there X */ X i = atoi(); X- reporterrs = save_errs; X- } X- #else !REPORTERRS X- i = atoi(); X- #endif REPORTERRS X if (!nonumb) { X if (i > 0) X true++; X X--- 551,556 ----- X ch = i; X } X i = atoi(); X if (!nonumb) { X if (i > 0) X true++; X*************** X*** 702,743 X #endif X case ' ': X break; X- #ifdef TESTFILES X- case 'r': /* true if file is readable */ X- { X- int c; X- char filename[NS]; X- X- if (skip()) { X- errmsg(EWARN, ".i%c r: newline unexpected", x == 0 ? 'f' : 'e'); X- break; X- } X- for (i = 0; i < NS - 1; i++) { X- int oldlgf = lgf; X- X- /* I'm not sure what the 0176 is, but the others use X- * it too... X- * probably EOF. X- * - req X- */ X- lgf++; X- if ((c = cbits(getch())) <= ' ' || c > 0176 || X- c == '\n' || nlflg) { X- break; X- } else { X- filename[i] = c; X- } X- } X- filename[i] = '\0'; X- if (c == '\n') { X- errmsg(EWARN, ".i%c r \"%s\": newline unexpected", x == 0 ? 'f' : 'e', filename); X- } else { X- ch = c; X- } X- true = (access(filename, 4) >= 0); X- } X- break; X- #endif TESTFILES X default: X true = cmpstr(i); X } X X--- 578,583 ----- X #endif X case ' ': X break; X default: X true = cmpstr(i); X } X*************** X*** 810,820 X if (ismot(c)) X return(0); X delim = cbits(c); X- #ifdef REPORTERRS X- if (isvmot(delim)) { X- errmsg(EWARN, "String delimiter is a vertical motion!"); X- } X- #endif REPORTERRS X if (dip != d) X wbfl(); X if ((offset = begin = alloc()) == (filep)0) X X--- 650,655 ----- X if (ismot(c)) X return(0); X delim = cbits(c); X if (dip != d) X wbfl(); X if ((offset = begin = alloc()) == (filep)0) X*************** X*** 832,842 X wbf(i); X cnt++; X } X- #ifdef REPORTERRS X- if (j != delim) { X- errmsg(EWARN, "Unexpected newline in conditional test"); X- } X- #endif REPORTERRS X wbt((tchar)0); X k = !cnt; X if (nlflg) X X--- 667,672 ----- X wbf(i); X cnt++; X } X wbt((tchar)0); X k = !cnt; X if (nlflg) X*************** X*** 853,863 X pinchar = inchar; /* XXX */ X while ((j = cbits(i = getch())) != delim && j != '\n') { X if (rbf0(p) != i) { X- #ifdef REPORTERRS X- if (eat(delim) != delim) { X- errmsg(EWARN, "No closing delim \"%s\" for string test", tchartos(delim)); X- } X- #else !REPORTERRS X eat(delim); X #endif REPORTERRS X k = 0; X X--- 683,688 ----- X pinchar = inchar; /* XXX */ X while ((j = cbits(i = getch())) != delim && j != '\n') { X if (rbf0(p) != i) { X eat(delim); X k = 0; X break; X*************** X*** 859,865 X } X #else !REPORTERRS X eat(delim); X- #endif REPORTERRS X k = 0; X break; X } X X--- 684,689 ----- X while ((j = cbits(i = getch())) != delim && j != '\n') { X if (rbf0(p) != i) { X eat(delim); X k = 0; X break; X } X*************** X*** 866,876 X p = incoff(p); X k = !(--cnt); X } X- #ifdef REPORTERRS X- if (j == '\n') { X- errmsg(EWARN, "Newline unexpected after string test"); X- } X- #endif REPORTERRS X rtn: X apts = savapts; X apts1 = savapts1; X X--- 690,695 ----- X p = incoff(p); X k = !(--cnt); X } X rtn: X apts = savapts; X apts1 = savapts1; X*************** X*** 954,963 X for (i = 0; ((i < (NTAB - 1)) && !nonumb); i++) { X if (skip()) X break; X- #ifdef ALIGNFIXES X- tabtab[i] = tabtab[max(i-1, 0)] & TMASK; X- tabtab[i] = max(hnumb(&tabtab[i]), 0) & TMASK; X- #else !ALIGNFIXES X tabtab[i] = max(hnumb(&tabtab[max(i-1,0)]), 0) & TMASK; X #endif ALIGNFIXES X if (!nonumb) X X--- 773,778 ----- X for (i = 0; ((i < (NTAB - 1)) && !nonumb); i++) { X if (skip()) X break; X tabtab[i] = max(hnumb(&tabtab[max(i-1,0)]), 0) & TMASK; X if (!nonumb) X switch (cbits(ch)) { X*************** X*** 959,965 X tabtab[i] = max(hnumb(&tabtab[i]), 0) & TMASK; X #else !ALIGNFIXES X tabtab[i] = max(hnumb(&tabtab[max(i-1,0)]), 0) & TMASK; X- #endif ALIGNFIXES X if (!nonumb) X switch (cbits(ch)) { X case 'C': X X--- 774,779 ----- X if (skip()) X break; X tabtab[i] = max(hnumb(&tabtab[max(i-1,0)]), 0) & TMASK; X if (!nonumb) X switch (cbits(ch)) { X case 'C': X*************** X*** 968,976 X case 'R': X tabtab[i] |= RTAB; X break; X- #ifdef COMMENT X- /* no error checking here. Probably not a problem */ X- #endif COMMENT X default: /*includes L*/ X #ifdef REPORTERRS X if (cbits(ch) != 'L' && cbits(ch) != ' ' && X X--- 782,787 ----- X case 'R': X tabtab[i] |= RTAB; X break; X default: /*includes L*/ X break; X } X*************** X*** 972,983 X /* no error checking here. Probably not a problem */ X #endif COMMENT X default: /*includes L*/ X- #ifdef REPORTERRS X- if (cbits(ch) != 'L' && cbits(ch) != ' ' && X- cbits(ch) != '\t' && cbits(ch) != '\n') { X- errmsg(EWARN, ".ta: tab suffix \"%s\" not L, R or C; using L", tchartos(ch)); X- } X- #endif REPORTERRS X break; X } X nonumb = ch = 0; X X--- 783,788 ----- X tabtab[i] |= RTAB; X break; X default: /*includes L*/ X break; X } X nonumb = ch = 0; X*************** X*** 986,997 X } X X X- #ifdef COMMENT X- /* note that for .ne to work in an intuitive way, there must be a .br before X- * it!!! X- * - req X- */ X- #endif COMMENT X casene() X { X register i, j; X X--- 791,796 ----- X } X X X casene() X { X register i, j; X*************** X*** 1010,1035 X } X X X- #ifdef COMMENT X- /* lines like X- * 'trouble in the outer hebrides' was.... X- * cause so many problems that it'd be nice to be able to spot them. X- * X- * A better approach to .tr would be to have a read-only string that X- * contained the current trtab[]. Then .tr \*(xx would be useful. X- * There is no way to turn off all translations, except one-at-a-time. X- * The s & f bits (see tdef.h or BWK's titroff paper) are not stored, so X- * you can't do useful things like X- * .tr *\s+2* X- * to make all stars come out bigger, or X- * .tr *\f(ma* X- * to use the * from font "ma" instead. Really this would be introducing X- * single-character macros, though. User defined fonts sound a better way X- * of doing this to me. X- * X- * - req X- */ X- #endif COMMENT X casetr() X { X register i, j; X X--- 809,814 ----- X } X X X casetr() X { X register i, j; X*************** X*** 1036,1046 X tchar k; X X lgf++; X- #ifdef REPORTERRS X- if (skip()) { X- errmsg(EWARN, ".tr with no arguments ignored"); X- } X- #else !REPORTERRS X skip(); X #endif REPORTERRS X while ((i = cbits(k=getch())) != '\n') { X X--- 815,820 ----- X tchar k; X X lgf++; X skip(); X while ((i = cbits(k=getch())) != '\n') { X if (ismot(k)) X*************** X*** 1042,1048 X } X #else !REPORTERRS X skip(); X- #endif REPORTERRS X while ((i = cbits(k=getch())) != '\n') { X if (ismot(k)) X return; X X--- 816,821 ----- X X lgf++; X skip(); X while ((i = cbits(k=getch())) != '\n') { X if (ismot(k)) X return; X*************** X*** 1103,1111 X } X X X- #ifdef COMMENT X- /* note -- there can only be one active input trap -- req */ X- #endif COMMENT X caseit() X { X register i; X X--- 876,881 ----- X } X X X caseit() X { X register i; X*************** X*** 1122,1133 X } X X X- #ifdef COMMENT X- /* BUG: interaction between .nm (line number mode) and .mc (margin character) X- * whereby the margin character is indented wrongly on numbered lines! X- * - req X- */ X- #endif COMMENT X casemc() X { X register i; X X--- 892,897 ----- X } X X X casemc() X { X register i; X*************** X*** 1139,1165 X return; X ic = getch(); X icf = 1; X- #ifdef COMMENT X- /* what should we do with ".mc xxx 4"? X- * it's an error, or we could allow a margin-string... X- * Let's be lazy. X- * -- req X- */ X- #endif COMMENT X- #ifdef REPORTERRS X- i = 0; X- if (skip()) { /* use old ics if nonumb */ X- return; X- } X- i = hnumb((int *) 0); X- if (nonumb) { X- errmsg(EWARN, ".mc: 2nd argument should be numeric"); X- } else if (i < 0) { X- errmsg(EWARN, ".mc: offset N should be positive"); X- } else { X- ics = i; X- } X- #else !REPORTERRS X skip(); X i = max(hnumb((int *)0), 0); X if (!nonumb) X X--- 903,908 ----- X return; X ic = getch(); X icf = 1; X skip(); X i = max(hnumb((int *)0), 0); X if (!nonumb) X*************** X*** 1164,1170 X i = max(hnumb((int *)0), 0); X if (!nonumb) X ics = i; X- #endif REPORTERRS X } X X X X--- 907,912 ----- X i = max(hnumb((int *)0), 0); X if (!nonumb) X ics = i; X } X X X*************** X*** 1181,1189 X return; X } X if ((i = getrq()) == 0) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, ".mk: 2nd argument must be a macro-name"); X return; X } X #else !REPORTERRS X X--- 923,928 ----- X return; X } X if ((i = getrq()) == 0) X return; X vlist[findr(i)] = j; X } X*************** X*** 1185,1194 X { X errmsg(EWARN, ".mk: 2nd argument must be a macro-name"); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X vlist[findr(i)] = j; X } X X X--- 924,929 ----- X } X if ((i = getrq()) == 0) X return; X vlist[findr(i)] = j; X } X X*************** X*** 1199,1207 X X skip(); X if ((i = vnumb((int *)0)) < 0) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, ".sv request for negative (%d) space ignored", i); X return; X } X #else !REPORTERRS X X--- 934,939 ----- X X skip(); X if ((i = vnumb((int *)0)) < 0) X return; X if (nonumb) X i = 1; X*************** X*** 1203,1212 X { X errmsg(EWARN, ".sv request for negative (%d) space ignored", i); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X if (nonumb) X i = 1; X sv += i; X X--- 935,940 ----- X skip(); X if ((i = vnumb((int *)0)) < 0) X return; X if (nonumb) X i = 1; X sv += i; X*************** X*** 1228,1246 X } X X X- #ifdef COMMENT X- /* .nm +-N M S I -- line number mode: next line numbered N (+0 to continue) X- * Defaults: M = 1, number-text sepapation S = 1, line-number Indent I = 0 X- * M > 1 prints only linenumbers that are multiples of M. X- * X- * Creaping featurism really -- it could probably be done with traps. X- * X- * Doing .af nl i X- * really ought to allow non-arabic line-numbers, I suppose. X- * X- * -req X- */ X- #endif COMMENT X casenm() X { X register i; X X--- 956,961 ----- X } X X X casenm() X { X register i; XOnly in titroff: n6.c Xdiff -rbc titroff/n7.c /distribution/dwb/text/troff.d/n7.c X*** titroff/n7.c Mon Nov 3 14:27:47 1986 X--- /distribution/dwb/text/troff.d/n7.c Fri Sep 9 18:46:01 1983 X*************** X*** 1,3 X #include "tdef.h" X extern X #include "d.h" X X--- 1,4 ----- X+ /* @(#)n7.c 1.3 */ X #include "tdef.h" X extern X #include "d.h" X*************** X*** 54,62 X if (dip == d) X horiz(po); X #endif X- #ifdef COMMENT X- /* put out line numbers */ X- #endif COMMENT X if (lnmod) X donum(); X lastl = ne; X X--- 55,60 ----- X if (dip == d) X horiz(po); X #endif X if (lnmod) X donum(); X lastl = ne; X*************** X*** 126,140 X nc--; X } X } X- #ifdef COMMENT X- /* Margin Character is ic [sic]. X- * BUG: if we have numbered this line, there's a horizontal X- * offset error! X- * Look at donum(). X- * X- * req X- */ X- #endif COMMENT X if (ic) { X if ((k = ll - un - lastl + ics) > 0) X horiz(k); X X--- 124,129 ----- X nc--; X } X } X if (ic) { X if ((k = ll - un - lastl + ics) > 0) X horiz(k); X*************** X*** 166,176 X extern pchar(); X X nrbits = nmbits; X- #ifdef COMMENT X- /* this all fails horribly if digits don't all have the same width! X- * - req X- */ X- #endif COMMENT X nw = width('1' | nrbits); X if (nn) { X nn--; X X--- 155,160 ----- X extern pchar(); X X nrbits = nmbits; X nw = width('1' | nrbits); X if (nn) { X nn--; X*************** X*** 190,200 X horiz(nw * (ni + i)); X nform = 0; X fnumb(v.ln, pchar); X- #ifdef COMMENT X- /* the next line screws up margin characters. X- * -req X- */ X- #endif COMMENT X un += nw * nms; X v.ln++; X } X X--- 174,179 ----- X horiz(nw * (ni + i)); X nform = 0; X fnumb(v.ln, pchar); X un += nw * nms; X v.ln++; X } X*************** X*** 204,221 X { X tchar i; X static int spcnt; X- #ifdef BLANKSMACRO X- static int nlcnt; /* no. of blank lines seen... */ X- /* The idea is to call a macro set by .bm (default is sp) when X- * there's a line that starts with whitespace. X- * eg: 5 blank lines followed by X- * " hello" X- * causes callblank(3, 5) because the 1st line with text on it X- * has 3 leading spaces & happens after 5 blank lines. X- * X- * - req X- */ X- #endif BLANKSMACRO X X nflush++; X if ((dip == d) && (v.nl == -1)) { X X--- 183,188 ----- X { X tchar i; X static int spcnt; X X nflush++; X if ((dip == d) && (v.nl == -1)) { X*************** X*** 220,228 X nflush++; X if ((dip == d) && (v.nl == -1)) { X newline(1); X- #ifdef COMMENT X- /* the first line of a new file */ X- #endif COMMENT X return; X } X setnel(); X X--- 187,192 ----- X nflush++; X if ((dip == d) && (v.nl == -1)) { X newline(1); X return; X } X setnel(); X*************** X*** 244,261 X spcnt++; X if (nlflg) { X t1: X- #ifdef BLANKSMACRO X- /* call the .bl macro if lines start with whitespace */ X- nlcnt++; X- nflush = pendt = ch = 0; X- if (spcnt) { X- int x = spcnt, y = nlcnt; X- spcnt = nlcnt = 0; /* in case bm macro introduces X- * a blank line */ X- callblank(x, y); X- } X- spcnt = 0; X- #else !BLANKSMACRO X nflush = pendt = ch = spcnt = 0; X callsp(); X #endif BLANKSMACRO X X--- 208,213 ----- X spcnt++; X if (nlflg) { X t1: X nflush = pendt = ch = spcnt = 0; X callsp(); X return; X*************** X*** 258,264 X #else !BLANKSMACRO X nflush = pendt = ch = spcnt = 0; X callsp(); X- #endif BLANKSMACRO X return; X } X #ifdef BLANKSMACRO X X--- 210,215 ----- X t1: X nflush = pendt = ch = spcnt = 0; X callsp(); X return; X } X ch = i; X*************** X*** 261,278 X #endif BLANKSMACRO X return; X } X- #ifdef BLANKSMACRO X- else { X- if (nlcnt) { X- int x = spcnt, y = nlcnt; X- X- nflush = pendt = ch = 0; X- nlcnt = spcnt = 0; /* in case bm macro introduces X- * a blank line */ X- callblank(x, y); X- } X- } X- #endif BLANKSMACRO X ch = i; X if (spcnt) { X t2: X X--- 212,217 ----- X callsp(); X return; X } X ch = i; X if (spcnt) { X t2: X*************** X*** 403,411 X if (linep >= line + lnsize - 1) { X if (!over) { X flusho(); X- #ifdef REPORTERRS X- errmsg(EWARN, "Internal error: Line overflow"); X- #else !REPORTERRS X fprintf(stderr, "troff: Line overflow.\n"); X #endif REPORTERRS X over++; X X--- 342,347 ----- X if (linep >= line + lnsize - 1) { X if (!over) { X flusho(); X fprintf(stderr, "troff: Line overflow.\n"); X over++; X c = LEFTHAND; X*************** X*** 407,413 X errmsg(EWARN, "Internal error: Line overflow"); X #else !REPORTERRS X fprintf(stderr, "troff: Line overflow.\n"); X- #endif REPORTERRS X over++; X c = LEFTHAND; X w = -1; X X--- 343,348 ----- X if (!over) { X flusho(); X fprintf(stderr, "troff: Line overflow.\n"); X over++; X c = LEFTHAND; X w = -1; X*************** X*** 517,525 X } else if ((i = findt(v.nl - nlss)) <= nlss) { X if ((j = findn1(v.nl - nlss + i)) == NTRAP) { X flusho(); X- #ifdef REPORTERRS X- errmsg(done2, -5, "Internal error: Trap botch in __FILE__ at line __LINE__"); X- #else !REPORTERRS X fprintf(stderr, "troff: Trap botch.\n"); X done2(-5); X #endif REPORTERRS X X--- 452,457 ----- X } else if ((i = findt(v.nl - nlss)) <= nlss) { X if ((j = findn1(v.nl - nlss + i)) == NTRAP) { X flusho(); X fprintf(stderr, "troff: Trap botch.\n"); X done2(-5); X } X*************** X*** 522,528 X #else !REPORTERRS X fprintf(stderr, "troff: Trap botch.\n"); X done2(-5); X- #endif REPORTERRS X } X trap = control(mlist[j], 0); X } X X--- 454,459 ----- X flusho(); X fprintf(stderr, "troff: Trap botch.\n"); X done2(-5); X } X trap = control(mlist[j], 0); X } X*************** X*** 805,812 X if (j != ' ') { X if (j != '\n') X goto g0; X! j = cbits(*(wordp - 1)); X! if ((j == '.') || (j == '!') || (j == '?')) X spflg++; X } X *wordp = 0; X X--- 736,747 ----- X if (j != ' ') { X if (j != '\n') X goto g0; X! { tchar *wp = wordp-1; X! while (wp >= word) { X! j = cbits(*wp--); X! if (j=='"' || j=='\'' || j==')' ||j==']') X! continue; X! if (j == '.' || j == '!' || j == ':' || j == '?') X spflg++; X break; X } X*************** X*** 808,813 X j = cbits(*(wordp - 1)); X if ((j == '.') || (j == '!') || (j == '?')) X spflg++; X } X *wordp = 0; X rtn: X X--- 743,749 ----- X continue; X if (j == '.' || j == '!' || j == ':' || j == '?') X spflg++; X+ break; X } X } X } X*************** X*** 809,814 X if ((j == '.') || (j == '!') || (j == '?')) X spflg++; X } X *wordp = 0; X rtn: X wdstart = 0; X X--- 745,752 ----- X spflg++; X break; X } X+ } X+ } X *wordp = 0; X rtn: X wdstart = 0; X*************** X*** 828,836 X if (wordp >= &word[WDSIZE - 1]) { X if (!over) { X flusho(); X- #ifdef REPORTERRS X- errmsg(EWARN, "Word overflow (word longer than %d chars)", WDSIZE - 1); X- #else !REPORTERRS X fprintf(stderr, "troff: Word overflow.\n"); X #endif REPORTERRS X over++; X X--- 766,771 ----- X if (wordp >= &word[WDSIZE - 1]) { X if (!over) { X flusho(); X fprintf(stderr, "troff: Word overflow.\n"); X over++; X c = LEFTHAND; X*************** X*** 832,838 X errmsg(EWARN, "Word overflow (word longer than %d chars)", WDSIZE - 1); X #else !REPORTERRS X fprintf(stderr, "troff: Word overflow.\n"); X- #endif REPORTERRS X over++; X c = LEFTHAND; X w = -1; X X--- 767,772 ----- X if (!over) { X flusho(); X fprintf(stderr, "troff: Word overflow.\n"); X over++; X c = LEFTHAND; X w = -1; Xdiff -rbc titroff/n8.c /distribution/dwb/text/troff.d/n8.c X*** titroff/n8.c Tue Nov 11 14:56:59 1986 X--- /distribution/dwb/text/troff.d/n8.c Fri Sep 9 18:46:03 1983 X*************** X*** 1,3 X #include <ctype.h> X #include "tdef.h" X #define HY_BIT 0200 /* stuff in here only works for ascii */ X X--- 1,4 ----- X+ /* @(#)n8.c 1.1 */ X #include <ctype.h> X #include "tdef.h" X #define HY_BIT 0200 /* stuff in here only works for ascii */ X*************** X*** 122,130 X } X return; X full: X- #ifdef REPORTERRS X- errmsg(EWARN, ".hw: exception word list full (%d bytes)", NHEX - 2); X- #else !REPORTERRS X fprintf(stderr, "troff: exception word list full.\n"); X #endif REPORTERRS X *nexth = 0; X X--- 123,128 ----- X } X return; X full: X fprintf(stderr, "troff: exception word list full.\n"); X *nexth = 0; X } X*************** X*** 126,132 X errmsg(EWARN, ".hw: exception word list full (%d bytes)", NHEX - 2); X #else !REPORTERRS X fprintf(stderr, "troff: exception word list full.\n"); X- #endif REPORTERRS X *nexth = 0; X } X X X--- 124,129 ----- X return; X full: X fprintf(stderr, "troff: exception word list full.\n"); X *nexth = 0; X } X Xdiff -rbc titroff/n9.c /distribution/dwb/text/troff.d/n9.c X*** titroff/n9.c Tue Nov 11 15:01:18 1986 X--- /distribution/dwb/text/troff.d/n9.c Fri Sep 9 18:46:08 1983 X*************** X*** 1,3 X #include "tdef.h" X extern X #include "d.h" X X--- 1,4 ----- X+ /* @(#)n9.c 1.1 */ X #include "tdef.h" X extern X #include "d.h" X*************** X*** 34,42 X int w, cnt, delim, rem, temp; X X if (ismot(c = getch())) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, "\\l with unsuitable delimiter (vertical motion) ignored"); X return; X } X #else !REPORTERRS X X--- 35,40 ----- X int w, cnt, delim, rem, temp; X X if (ismot(c = getch())) X return; X delim = cbits(c); X vflag = 0; X*************** X*** 38,47 X { X errmsg(EWARN, "\\l with unsuitable delimiter (vertical motion) ignored"); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X delim = cbits(c); X vflag = 0; X dfact = EM; X X--- 36,41 ----- X X if (ismot(c = getch())) X return; X delim = cbits(c); X vflag = 0; X dfact = EM; X*************** X*** 48,59 X length = quant(atoi(), HOR); X dfact = 1; X if (!length) { X- #ifdef REPORTERRS X- if (eat(delim) != delim) { X- errmsg(EWARN, "\\l%s: zero length & no trailing delim", X- tchartos(delim)); X- } X- #else !REPORTERRS X eat(delim); X #endif REPORTERRS X return; X X--- 42,47 ----- X length = quant(atoi(), HOR); X dfact = 1; X if (!length) { X eat(delim); X return; X } X*************** X*** 55,61 X } X #else !REPORTERRS X eat(delim); X- #endif REPORTERRS X return; X } X s0: X X--- 43,48 ----- X dfact = 1; X if (!length) { X eat(delim); X return; X } X s0: X*************** X*** 66,82 X goto s0; X w = width(c); X i = cbuf; X- #ifdef ZEROLINES X- if (w == 0) { X- /* prevent zero-width char from causing a core dump! */ X- w = quant(EM, HOR); X- #ifdef REPORTERRS X- errmsg(EWARN, "\\l: zero-width character used to draw a line\n"); X- #else !REPORTERRS X- fprintf(stderr,"troff: Warning: zero-width character used to draw a line\n"); X- #endif REPORTERRS X- } X- #endif ZEROLINES X if (length < 0) { X *i++ = makem(length); X length = -length; X X--- 53,58 ----- X goto s0; X w = width(c); X i = cbuf; X if (length < 0) { X *i++ = makem(length); X length = -length; X*************** X*** 99,114 X } X s1: X *i++ = 0; X- #ifdef REPORTERRS X- c = getch(); X- if (cbits(c) != delim) { X- if (cbits(c) == '\n') { X- errmsg(EWARN, "\\l: newline unexpected"); X- } else { X- errmsg(EWARN, "\\l: delimiters different (\"%s\" and \"%s\")", tchartos(delim), tchartos(c)); X- } X- } X- #else !REPORTERRS X eat(delim); X #endif REPORTERRS X cp = cbuf; X X--- 75,80 ----- X } X s1: X *i++ = 0; X eat(delim); X cp = cbuf; X } X*************** X*** 110,116 X } X #else !REPORTERRS X eat(delim); X- #endif REPORTERRS X cp = cbuf; X } X X X--- 76,81 ----- X s1: X *i++ = 0; X eat(delim); X cp = cbuf; X } X X*************** X*** 133,141 X int delim, w[NOV]; X X if (ismot(i = getch())) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, "\\o: vertical motion unsuitable as delimiter"); X return; X } X #else !REPORTERRS X X--- 98,103 ----- X int delim, w[NOV]; X X if (ismot(i = getch())) X return; X delim = cbits(i); X for (k = 0; (k < NOV) && ((j = cbits(i = getch())) != delim) && (j != '\n'); k++) { X*************** X*** 137,146 X { X errmsg(EWARN, "\\o: vertical motion unsuitable as delimiter"); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X delim = cbits(i); X #ifdef LONGOVFIX X for (k = 0; (k < NOV - 1) && ((j = cbits(i = getch())) != delim) && (j != '\n'); k++) { X X--- 99,104 ----- X X if (ismot(i = getch())) X return; X delim = cbits(i); X for (k = 0; (k < NOV) && ((j = cbits(i = getch())) != delim) && (j != '\n'); k++) { X o[k] = i; X*************** X*** 142,150 X return; X #endif REPORTERRS X delim = cbits(i); X- #ifdef LONGOVFIX X- for (k = 0; (k < NOV - 1) && ((j = cbits(i = getch())) != delim) && (j != '\n'); k++) { X- #else !LONGOVFIX X for (k = 0; (k < NOV) && ((j = cbits(i = getch())) != delim) && (j != '\n'); k++) { X #endif LONGOVFIX X o[k] = i; X X--- 100,105 ----- X if (ismot(i = getch())) X return; X delim = cbits(i); X for (k = 0; (k < NOV) && ((j = cbits(i = getch())) != delim) && (j != '\n'); k++) { X o[k] = i; X w[k] = width(i); X*************** X*** 146,152 X for (k = 0; (k < NOV - 1) && ((j = cbits(i = getch())) != delim) && (j != '\n'); k++) { X #else !LONGOVFIX X for (k = 0; (k < NOV) && ((j = cbits(i = getch())) != delim) && (j != '\n'); k++) { X- #endif LONGOVFIX X o[k] = i; X w[k] = width(i); X } X X--- 101,106 ----- X return; X delim = cbits(i); X for (k = 0; (k < NOV) && ((j = cbits(i = getch())) != delim) && (j != '\n'); k++) { X o[k] = i; X w[k] = width(i); X } X*************** X*** 150,163 X o[k] = i; X w[k] = width(i); X } X- #ifdef REPORTERRS X- if (k >= NOV - 1) { X- errmsg(EWARN, "\\o: overstrike longer than %d characters", NOV); X- } else if (j == '\n') { X- errmsg(EWARN, X- "\\o: no trailing delimiter found to match \"%s\"", tchartos(delim)); X- } X- #endif REPORTERRS X o[k] = w[k] = 0; X if (o[0]) X for (j = 1; j; ) { X X--- 104,109 ----- X o[k] = i; X w[k] = width(i); X } X o[k] = w[k] = 0; X if (o[0]) X for (j = 1; j; ) { X*************** X*** 175,184 X } X } X else X- #ifdef REPORTERRS X- { X- errmsg(EWARN, "Empty overstrike \"\\o%s%s\" ignored", X- tchartos(delim), tchartos(delim)); X return; X } X #else !REPORTERRS X X--- 121,126 ----- X } X } X else X return; X p = cbuf; X for (k = 0; o[k]; k++) { X*************** X*** 180,189 X errmsg(EWARN, "Empty overstrike \"\\o%s%s\" ignored", X tchartos(delim), tchartos(delim)); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X p = cbuf; X for (k = 0; o[k]; k++) { X *p++ = o[k]; X X--- 122,127 ----- X } X else X return; X p = cbuf; X for (k = 0; o[k]; k++) { X *p++ = o[k]; X*************** X*** 202,210 X int cnt, delim; X X if (ismot(i = getch())) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, "\\b: vertical motion unsuitable as delimiter"); X return; X } X #else !REPORTERRS X X--- 140,145 ----- X int cnt, delim; X X if (ismot(i = getch())) X return; X delim = cbits(i); X j = cbuf + 1; X*************** X*** 206,215 X { X errmsg(EWARN, "\\b: vertical motion unsuitable as delimiter"); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X delim = cbits(i); X j = cbuf + 1; X cnt = 0; X X--- 141,146 ----- X X if (ismot(i = getch())) X return; X delim = cbits(i); X j = cbuf + 1; X cnt = 0; X*************** X*** 224,248 X *j++ = dwn; X cnt++; X } X- #ifdef REPORTERRS X- if (j > (cbuf + NC - 4)) { X- errmsg(EWARN, X- "Bracket (\\b) too long (truncated to %d characte", X- cbuf + NC - 4); X- while (((k = cbits(i = getch())) != delim) && (k != '\n')) { X- /* throw away the rest... */ X- ; X- } X- } X- if (k == '\n') { X- errmsg(EWARN, "\\b: No delimiter found to match \"%s\"", X- tchartos(delim)); X- } else if (--cnt < 0) { X- errmsg(EWARN, "Empty bracket \"\\b%s%s\" ignored", X- tchartos(delim), tchartos(delim)); X- return; X- } X- #else !REPORTERRS X if (--cnt < 0) X return; X #endif REPORTERRS X X--- 155,160 ----- X *j++ = dwn; X cnt++; X } X if (--cnt < 0) X return; X else if (!cnt) { X*************** X*** 245,251 X #else !REPORTERRS X if (--cnt < 0) X return; X- #endif REPORTERRS X else if (!cnt) { X #ifdef ZBRACKFIX X ch = *(j - 2) & ~ZBIT; X X--- 157,162 ----- X } X if (--cnt < 0) X return; X else if (!cnt) { X ch = *(j - 2); X return; X*************** X*** 247,269 X return; X #endif REPORTERRS X else if (!cnt) { X- #ifdef ZBRACKFIX X- ch = *(j - 2) & ~ZBIT; X- /* turn off the ZBIT (zero width) on single chars, or X- * there'd be a problem with \b'\zx', whereby the entire X- * bracket would have no space left for it. Or maybe that's X- * how it *should* behave? A \b with only 1 char seems an X- * odd thing to want anyway! X- * X- * Should we warn the user? Probably not. The only time X- * this is likely to happen involves machine-generated X- * troff input. X- * X- * What about \b'' --- should that be an error?!?? X- * X- * -- req, after John Buck (trixie!polyof!john), 7/10/86 X- */ X- #else !ZBRACKFIX X ch = *(j - 2); X #endif ZBRACKFIX X return; X X--- 158,163 ----- X if (--cnt < 0) X return; X else if (!cnt) { X ch = *(j - 2); X return; X } X*************** X*** 265,271 X */ X #else !ZBRACKFIX X ch = *(j - 2); X- #endif ZBRACKFIX X return; X } X *j = 0; X X--- 159,164 ----- X return; X else if (!cnt) { X ch = *(j - 2); X return; X } X *j = 0; X*************** X*** 287,295 X int cnt, delim, v; X X if (ismot(c = getch())) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, "\\L: unsuitable start delimiter"); X return; X } X #else !REPORTERRS X X--- 180,185 ----- X int cnt, delim, v; X X if (ismot(c = getch())) X return; X delim = cbits(c); X dfact = lss; X*************** X*** 291,300 X { X errmsg(EWARN, "\\L: unsuitable start delimiter"); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X delim = cbits(c); X dfact = lss; X vflag++; X X--- 181,186 ----- X X if (ismot(c = getch())) X return; X delim = cbits(c); X dfact = lss; X vflag++; X*************** X*** 301,311 X i = quant(atoi(), VERT); X dfact = 1; X if (!i) { X- #ifdef REPORTERRS X- if (eat(delim) != delim) { X- errmsg(EWARN, "Vertical line (\\L): no closing delimiter"); X- } /* not an error to have a zero-length line */ X- #else !REPORTERRS X eat(delim); X #endif REPORTERRS X vflag = 0; X X--- 187,192 ----- X i = quant(atoi(), VERT); X dfact = 1; X if (!i) { X eat(delim); X vflag = 0; X return; X*************** X*** 307,313 X } /* not an error to have a zero-length line */ X #else !REPORTERRS X eat(delim); X- #endif REPORTERRS X vflag = 0; X return; X } X X--- 188,193 ----- X dfact = 1; X if (!i) { X eat(delim); X vflag = 0; X return; X } X*************** X*** 314,334 X if ((cbits(c = getch())) == delim) { X c = BOXRULE | chbits; /*default box rule*/ X } else X- #ifdef REPORTERRS X- { X- int delim2 = cbits(getch()); X- X- if (delim2 != delim) { X- if (delim2 == '\n') { X- errmsg(EWARN, "\\v: unexpected newline"); X- } else { X- errmsg(EWARN, X- "\\v: expected closing delim \"%s\", found \"%s\"", X- tchartos(delim), tchartos(delim2)); X- } X- } X- } X- #else !REPORTERRS X getch(); X #endif REPORTERRS X c |= ZBIT; X X--- 194,199 ----- X if ((cbits(c = getch())) == delim) { X c = BOXRULE | chbits; /*default box rule*/ X } else X getch(); X c |= ZBIT; X neg = 0; X*************** X*** 330,336 X } X #else !REPORTERRS X getch(); X- #endif REPORTERRS X c |= ZBIT; X neg = 0; X if (i < 0) { X X--- 195,200 ----- X c = BOXRULE | chbits; /*default box rule*/ X } else X getch(); X c |= ZBIT; X neg = 0; X if (i < 0) { X*************** X*** 343,354 X #ifndef NROFF X v = EM; X #endif X- #ifdef REPORTERRS X- if (!v) { X- errmsg(EWARN, "Internal error: !v (__FILE__:__LINE__)"); X- v = EM; X- } X- #endif REPORTERRS X cnt = i / v; X rem = makem(i % v) | neg; X ver = makem(v) | neg; X X--- 207,212 ----- X #ifndef NROFF X v = EM; X #endif X cnt = i / v; X rem = makem(i % v) | neg; X ver = makem(v) | neg; X*************** X*** 374,382 X X setdraw() /* generate internal cookies for a drawing function */ X { X- #ifdef DXLIM X- int i, j, k, dx[DXLIM], dy[DXLIM], delim, type, temp; X- #else !DXLIM X int i, j, k, dx[100], dy[100], delim, type, temp; X #endif DXLIM X tchar c; X X--- 232,237 ----- X X setdraw() /* generate internal cookies for a drawing function */ X { X int i, j, k, dx[100], dy[100], delim, type, temp; X tchar c; X /* input is \D'f x y x y ... c' (or at least it had better be) */ X*************** X*** 378,384 X int i, j, k, dx[DXLIM], dy[DXLIM], delim, type, temp; X #else !DXLIM X int i, j, k, dx[100], dy[100], delim, type, temp; X- #endif DXLIM X tchar c; X /* input is \D'f x y x y ... c' (or at least it had better be) */ X /* this does drawing function f with character c and the */ X X--- 233,238 ----- X setdraw() /* generate internal cookies for a drawing function */ X { X int i, j, k, dx[100], dy[100], delim, type, temp; X tchar c; X /* input is \D'f x y x y ... c' (or at least it had better be) */ X /* this does drawing function f with character c and the */ X*************** X*** 389,402 X /* e x y: ellipse of diameters x,y, left side here */ X /* a x y r: arc to x,y with radius r (ccw) */ X /* ~ x y ...: wiggly line */ X- #ifdef GREMLIN X- /* t n: line thickness n */ X- /* s n: line style mask set to n */ X- /* g x y ...: gremlin [!??!?] don't ask me! - req */ X- #endif GREMLIN X- #ifdef ANYBASESTR X- /* b drawingstuff ' text ': use DRAWFCN as baseline for text -- req */ X- #endif ANYBASESTR X X if (ismot(c = getch())) X #ifdef REPORTERRS X X--- 243,248 ----- X /* e x y: ellipse of diameters x,y, left side here */ X /* a x y r: arc to x,y with radius r (ccw) */ X /* ~ x y ...: wiggly line */ X X if (ismot(c = getch())) X return; X*************** X*** 399,407 X #endif ANYBASESTR X X if (ismot(c = getch())) X- #ifdef REPORTERRS X- { X- errmsg(EWARN, "\\D: Unsuitable delimiter for drawing function"); X return; X } X #else !REPORTERRS X X--- 245,250 ----- X /* ~ x y ...: wiggly line */ X X if (ismot(c = getch())) X return; X delim = cbits(c); X type = cbits(getch()); X*************** X*** 403,412 X { X errmsg(EWARN, "\\D: Unsuitable delimiter for drawing function"); X return; X- } X- #else !REPORTERRS X- return; X- #endif REPORTERRS X delim = cbits(c); X type = cbits(getch()); X #ifdef REPORTERRS X X--- 246,251 ----- X X if (ismot(c = getch())) X return; X delim = cbits(c); X type = cbits(getch()); X for (i = 0; i < 50 ; i++) { X*************** X*** 409,447 X #endif REPORTERRS X delim = cbits(c); X type = cbits(getch()); X- #ifdef REPORTERRS X- switch(type) { X- X- default: X- errmsg(EWARN, "\\D%c: unknown drawing function \"%c\"", X- type, type); X- break; X- X- case DRAWLINE: X- case DRAWCIRCLE: X- case DRAWELLIPSE: X- case DRAWARC: X- case DRAWWIG: X- #ifdef GREMLIN X- case DRAWGREM: X- case DRAWTHICK: X- case DRAWLSTYLE: X- #endif GREMLIN X- #ifdef ANYBASESTR X- case DRAWBASESTR: X- #endif ANYBASESTR X- X- /* do nothing -- only the default action is interesting! X- * - req X- */ X- break; X- X- } X- #endif REPORTERRS X- X- #ifdef DXLIM X- for (i = 0; i < DXLIM/2 ; i++) { X- #else !DXLIM X for (i = 0; i < 50 ; i++) { X #endif DXLIM X #ifdef COMMENT X X--- 248,253 ----- X return; X delim = cbits(c); X type = cbits(getch()); X for (i = 0; i < 50 ; i++) { X c = getch(); X if (cbits(c) == delim) X*************** X*** 443,452 X for (i = 0; i < DXLIM/2 ; i++) { X #else !DXLIM X for (i = 0; i < 50 ; i++) { X- #endif DXLIM X- #ifdef COMMENT X- /* } */ /* (brace is for bracket matching tool!) */ X- #endif COMMENT X c = getch(); X if (cbits(c) == delim) X break; X X--- 249,254 ----- X delim = cbits(c); X type = cbits(getch()); X for (i = 0; i < 50 ; i++) { X c = getch(); X if (cbits(c) == delim) X break; X*************** X*** 472,482 X else if (dy[i] < -MAXMOT) X dy[i] = -MAXMOT; X } X- #ifdef REPORTERRS X- if (cbits(c) != delim) { X- errmsg(EWARN, "\\D: more than %d parameters", i - 1); X- } X- #endif REPORTERRS X dfact = 1; X vflag = 0; X #ifndef NROFF X X--- 274,279 ----- X else if (dy[i] < -MAXMOT) X dy[i] = -MAXMOT; X } X dfact = 1; X vflag = 0; X #ifndef NROFF X*************** X*** 536,544 X for (j = 0; ; j++) { X if ((tabtab[j] & TMASK) == 0) { X if (x == savfc) X- #ifdef REPORTERRS X- errmsg(EWARN, "zero field width"); X- #else !REPORTERRS X fprintf(stderr, "troff: zero field width.\n"); X #endif REPORTERRS X jj = 0; X X--- 333,338 ----- X for (j = 0; ; j++) { X if ((tabtab[j] & TMASK) == 0) { X if (x == savfc) X fprintf(stderr, "troff: zero field width.\n"); X jj = 0; X goto rtn; X*************** X*** 540,546 X errmsg(EWARN, "zero field width"); X #else !REPORTERRS X fprintf(stderr, "troff: zero field width.\n"); X- #endif REPORTERRS X jj = 0; X goto rtn; X } X X--- 334,339 ----- X if ((tabtab[j] & TMASK) == 0) { X if (x == savfc) X fprintf(stderr, "troff: zero field width.\n"); X jj = 0; X goto rtn; X } Xdiff -rbc titroff/ni.c /distribution/dwb/text/troff.d/ni.c X*** titroff/ni.c Fri Oct 31 19:13:42 1986 X--- /distribution/dwb/text/troff.d/ni.c Tue Oct 25 17:24:10 1983 X*************** X*** 1,3 X #include "tdef.h" X X /* You may want to change these names */ X X--- 1,4 ----- X+ /* @(#)ni.c 1.2 */ X #include "tdef.h" X X /* You may want to change these names */ X*************** X*** 3,15 X /* You may want to change these names */ X X #ifndef NROFF X! char termtab[NS] = FONTFILE; /* rest added in ptinit() */ X! char fontfile[NS] = FONTFILE; /* rest added in casefp() */ X! #ifdef DESCHASNAME X! char devname[10] = "default"; /* default typesetter */ X! #else !DESCHASNAME X! char devname[10] = "va"; /* default typesetter */ X! #endif DESCHASNAME X #endif X char obuf[OBUFSZ]; /* characters collected here for actual typesetter output */ X char *obufp = obuf; X X--- 4,12 ----- X /* You may want to change these names */ X X #ifndef NROFF X! char termtab[NS] = "/usr/lib/font"; /* rest added in ptinit() */ X! char fontfile[NS] = "/usr/lib/font"; /* rest added in casefp() */ X! char devname[12] = "aps"; /* default typesetter */ X #endif X char obuf[OBUFSZ]; /* characters collected here for actual typesetter output */ X char *obufp = obuf; X*************** X*** 29,37 X PAIR('s', 'b'), X PAIR('c', '.'), X PAIR('$', '$'), X- #ifdef WARNLEVELREG X- PAIR('w', 'l'), /* warning level */ X- #endif WARNLEVELREG X }; X X X X--- 26,31 ----- X PAIR('s', 'b'), X PAIR('c', '.'), X PAIR('$', '$'), X }; X X X*************** X*** 91,105 X casecc(), casec2(), caseem(), caseaf(), casehw(), casemc(), casepm(), X casecu(), casepi(), caserr(), caseuf(), caseie(), caseel(), casepc(), X caseht(), casecf(), casesy(); X- #ifdef ROTATEPAGE X- extern caserp(); /* rotate page -- req */ X- #endif ROTATEPAGE X- #ifdef FONTFAMILIES X- extern caseff(); /* font family -- req */ X- #endif FONTFAMILIES X- #ifdef BLANKSMACRO X- extern casebm(); /* blanks macro -- req */ X- #endif BLANKSMACRO X X #ifdef COMMENT X /* the comments are because we can't initialise a union in C X X--- 85,90 ----- X casecc(), casec2(), caseem(), caseaf(), casehw(), casemc(), casepm(), X casecu(), casepi(), caserr(), caseuf(), caseie(), caseel(), casepc(), X caseht(), casecf(), casesy(); X X struct contab { X int rq; X*************** X*** 101,111 X extern casebm(); /* blanks macro -- req */ X #endif BLANKSMACRO X X- #ifdef COMMENT X- /* the comments are because we can't initialise a union in C X- * - req X- */ X- #endif COMMENT X struct contab { X int rq; X /* X X--- 86,91 ----- X casecu(), casepi(), caserr(), caseuf(), caseie(), caseel(), casepc(), X caseht(), casecf(), casesy(); X X struct contab { X int rq; X /* X*************** X*** 202,217 X PAIR('h', 't'), caseht, X PAIR('c', 'f'), casecf, X PAIR('s', 'y'), casesy, X! PAIR('!', 0), casesy, /* synonym for .sy */ X! #ifdef ROTATEPAGE X! PAIR('r', 'p'), caserp, /* .rp -- rotate page */ X! #endif ROTATEPAGE X! #ifdef FONTFAMILIES X! PAIR('f', 'f'), caseff, /*.ff -- font family */ X! #endif FONTFAMILIES X! #ifdef BLANKSMACRO X! PAIR('b', 'm'), casebm, /* .bl xx -- blanks macro */ X! #endif BLANKSMACRO X }; X X X X--- 182,188 ----- X PAIR('h', 't'), caseht, X PAIR('c', 'f'), casecf, X PAIR('s', 'y'), casesy, X! /* PAIR('!', 0), casesy, /* synonym for .sy */ X }; X X X*************** X*** 268,274 X int c2 = '\''; X int ohc = OHC; X int tdelim = IMP; X! int hyf = 1; X int hyoff = 0; X int un1 = -1; X int tabc = 0; X X--- 239,245 ----- X int c2 = '\''; X int ohc = OHC; X int tdelim = IMP; X! int hyf = 0; X int hyoff = 0; X int un1 = -1; X int tabc = 0; X*************** X*** 323,325 X X char blockxxx[EVSPARE] = { X 0}; X X--- 294,298 ----- X X char blockxxx[EVSPARE] = { X 0}; X+ X+ SHAR_EOF if test 49231 -ne "`wc -c < 'diffc'`" then echo shar: error transmitting "'diffc'" '(should have been 49231 characters)' fi fi # end of overwriting check # End of shell archive exit 0 -- ARPA req%uu.warwick.ac.uk@ucl-cs.arpa EARN/BITNET req%UK.AC.WARWICK.UU@AC.UK JANET req@uk.ac.warwick.uu UUCP seismo!mcvax!ukc!warwick!req (req@warwick.UUCP) PHONE +44 203 523485 For mail.frplist, use "frplist" instead of "req" in the above lines. The BITNET path only works from sites that have AC.UK in their tables. Sorry.