diff -rbc titroff/n2.c /distribution/dwb/text/troff.d/n2.c
*** titroff/n2.c	Mon Nov 10 23:05:39 1986
--- /distribution/dwb/text/troff.d/n2.c	Fri Sep  9 18:45:21 1983
***************
*** 1,3
  #include "tdef.h"
  #include <sgtty.h>
  extern

--- 1,4 -----
+ /*	@(#)n2.c	1.2	*/
  #include "tdef.h"
  #include <sgtty.h>
  extern
***************
*** 92,98
  			oput(' ');
  			return;
  		}
! 		if (j < 0177) {
  			oput(j);
  			return;
  		}

--- 93,99 -----
  			oput(' ');
  			return;
  		}
! 		if (j < 0177 && j != WORDSP) {
  			oput(j);
  			return;
  		}
***************
*** 164,186
  			}
  #endif
  		}
- #ifdef TOOLATEFIX
- 		/* integer overflow seems unlikely, but could be 
- 		 * a little unfortunate in the *very* rare case that a
- 		 * .po happened at exactly the wrong time...
- 		 * Doing the stty twice would be bad, too, though
- 		 * While we're about it, let's check the write, too.
- 		 * though I don't know what to do if it fails!
- 		 */
- 		toolate = write(ptid, obuf, obufp - obuf);
- 		if (toolate != obufp - obuf) {
- #ifdef REPORTERRS
- 			errmsg(EWARN, "Write failed, errno = %d", errno);
- #endif REPORTERRS
- 			/* do something, I suppose.  Like ignore it */
- 		}
- 		toolate = 1;
- #else !TOOLATEFIX
  		toolate += write(ptid, obuf, obufp - obuf);
  #endif TOOLATEFIX
  	}

--- 165,170 -----
  			}
  #endif
  		}
  		toolate += write(ptid, obuf, obufp - obuf);
  	}
  	obufp = obuf;
***************
*** 182,188
  		toolate = 1;
  #else !TOOLATEFIX
  		toolate += write(ptid, obuf, obufp - obuf);
- #endif TOOLATEFIX
  	}
  	obufp = obuf;
  }

--- 166,171 -----
  #endif
  		}
  		toolate += write(ptid, obuf, obufp - obuf);
  	}
  	obufp = obuf;
  }
***************
*** 188,196
  }
  
  
- #ifdef LINTSTUFF
- void
- #endif LINTSTUFF
  done(x) 
  int	x;
  {

--- 171,176 -----
  }
  
  
  done(x) 
  int	x;
  {
***************
*** 205,216
  		if (control(i, 0))
  			longjmp(sjbuf, 1);
  	}
- #ifdef REPORTERRS
- 	if (dilev) {
- 		errmsg(EWARN, "End of File unexpected whilst diverting to %s",
- 				realname(dip->curd));
- 	}
- #endif REPORTERRS
  	if (!nfo)
  		done3(0);
  	mflg = 0;

--- 185,190 -----
  		if (control(i, 0))
  			longjmp(sjbuf, 1);
  	}
  	if (!nfo)
  		done3(0);
  	mflg = 0;
***************
*** 234,242
  }
  
  
- #ifdef LINTSTUFF
- void
- #endif LINTSTUFF
  done1(x) 
  int	x; 
  {

--- 208,213 -----
  }
  
  
  done1(x) 
  int	x; 
  {
***************
*** 258,266
  }
  
  
- #ifdef LINTSTUFF
- void
- #endif LINTSTUFF
  done2(x) 
  int	x; 
  {

--- 229,234 -----
  }
  
  
  done2(x) 
  int	x; 
  {
***************
*** 273,287
  	done3(x);
  }
  
- #ifdef COMMENT
- /* done3() seems to be the thing to call on a fatal error, as it does the
-  * least afterwords.
-  * -- req
-  */
- #endif COMMENT
- #ifdef LINTSTUFF
- void
- #endif LINTSTUFF
  done3(x) 
  int	x;
  {

--- 241,246 -----
  	done3(x);
  }
  
  done3(x) 
  int	x;
  {
***************
*** 302,310
  }
  
  
- #ifdef LINTSTUFF
- void
- #endif LINTSTUFF
  edone(x) 
  int	x;
  {

--- 261,266 -----
  }
  
  
  edone(x) 
  int	x;
  {
***************
*** 322,330
  	int	id[2];
  
  	if (toolate || skip() || !getname() || pipe(id) == -1 || (i = fork()) == -1) {
- #ifdef REPORTERRS
- 		errmsg(EWARN, ".pi: too late for pipe; not created");
- #else !REPORTERRS
  		fprintf(stderr, "Pipe not created.\n");
  #endif REPORTERRS
  		return;

--- 278,283 -----
  	int	id[2];
  
  	if (toolate || skip() || !getname() || pipe(id) == -1 || (i = fork()) == -1) {
  		fprintf(stderr, "Pipe not created.\n");
  		return;
  	}
***************
*** 326,332
  		errmsg(EWARN, ".pi: too late for pipe; not created");
  #else !REPORTERRS
  		fprintf(stderr, "Pipe not created.\n");
- #endif REPORTERRS
  		return;
  	}
  	ptid = id[1];

--- 279,284 -----
  
  	if (toolate || skip() || !getname() || pipe(id) == -1 || (i = fork()) == -1) {
  		fprintf(stderr, "Pipe not created.\n");
  		return;
  	}
  	ptid = id[1];
***************
*** 340,348
  	dup(id[0]);
  	close(id[1]);
  	execl(nextf, nextf, 0);
- #ifdef REPORTERRS
- 	errmsg(exit, -4, ".pi: cannot exec %s (errno = %d)", nextf, errno);
- #else !REPORTERRS
  	fprintf(stderr, "Cannot exec %s\n", nextf);
  	exit(-4);
  #endif REPORTERRS

--- 292,297 -----
  	dup(id[0]);
  	close(id[1]);
  	execl(nextf, nextf, 0);
  	fprintf(stderr, "Cannot exec %s\n", nextf);
  	exit(-4);
  }
***************
*** 345,349
  #else !REPORTERRS
  	fprintf(stderr, "Cannot exec %s\n", nextf);
  	exit(-4);
- #endif REPORTERRS
  }

--- 294,297 -----
  	execl(nextf, nextf, 0);
  	fprintf(stderr, "Cannot exec %s\n", nextf);
  	exit(-4);
  }
diff -rbc titroff/n3.c /distribution/dwb/text/troff.d/n3.c
*** titroff/n3.c	Tue Nov 11 18:51:29 1986
--- /distribution/dwb/text/troff.d/n3.c	Fri Sep  9 18:45:30 1983
***************
*** 1,3
  #include "tdef.h"
  extern
  #include "d.h"

--- 1,4 -----
+ /*      @(#)n3.c	1.1     */
  #include "tdef.h"
  extern
  #include "d.h"
***************
*** 49,61
  }
  
  
- #ifdef COMMENT
- /* .rn aa bb
-  * call aa bb
-  * Question: is it an error if aa doesn't exist?  I guess so, so we print
-  * a warning if -DREPORTERRS is set
-  */
- #endif COMMENT
  casern()
  {
  	register i, j;

--- 50,55 -----
  }
  
  
  casern()
  {
  	register i, j;
***************
*** 63,72
  	lgf++;
  	skip();
  	if ((i = getrq()) == 0 || (oldmn = findmn(i)) < 0)
- #ifdef REPORTERRS
- 	{
- 		if (i == 0) {
- 			errmsg(EWARN, ".rn called without arguments");
  			return;
  		} else {
  			errmsg(EWARN, ".rn: no macro called %s to rename",

--- 57,62 -----
  	lgf++;
  	skip();
  	if ((i = getrq()) == 0 || (oldmn = findmn(i)) < 0)
  		return;
  	skip();
  	clrmn(findmn(j = getrq()));
***************
*** 68,81
  		if (i == 0) {
  			errmsg(EWARN, ".rn called without arguments");
  			return;
- 		} else {
- 			errmsg(EWARN, ".rn: no macro called %s to rename",
- 					realname(i));
- 		}
- 	}
- #else !REPORTERRS
- 		return;
- #endif REPORTERRS
  	skip();
  	clrmn(findmn(j = getrq()));
  	if (j)

--- 58,63 -----
  	skip();
  	if ((i = getrq()) == 0 || (oldmn = findmn(i)) < 0)
  		return;
  	skip();
  	clrmn(findmn(j = getrq()));
  	if (j)
***************
*** 80,90
  	clrmn(findmn(j = getrq()));
  	if (j)
  		contab[oldmn].rq = (contab[oldmn].rq & MMASK) | j;
- #ifdef REPORTERRS
- 	else {
- 		errmsg(EWARN, ".rn %s: two arguments are needed", realname(i));
- 	}
- #endif REPORTERRS
  }
  
  

--- 62,67 -----
  	clrmn(findmn(j = getrq()));
  	if (j)
  		contab[oldmn].rq = (contab[oldmn].rq & MMASK) | j;
  }
  
  
***************
*** 88,100
  }
  
  
- #ifdef COMMENT
- /* should probably be an error to .rm a non-existant macro, but this happens
-  * too often for it to be helpful.
-  * Think of .rm as rm -rf
-  * -- req
-  */
- #endif COMMENT
  caserm()
  {
  	lgf++;

--- 65,70 -----
  }
  
  
  caserm()
  {
  	lgf++;
***************
*** 137,147
  	lgf++;
  	skip();
  	if ((i = getrq()) == 0)
- #ifdef REPORTERRS
- 	{
- 		errmsg(EWARN, "%s called with no argument",
- 			ds ? (app ? ".as" : ".ds") :
- 			     (app ? ".am" : ".de")  );
  		goto de1;
  	}
  #else !REPORTERRS

--- 107,112 -----
  	lgf++;
  	skip();
  	if ((i = getrq()) == 0)
  		goto de1;
  	if ((offset = finds(i)) == 0)
  		goto de1;
***************
*** 143,152
  			ds ? (app ? ".as" : ".ds") :
  			     (app ? ".am" : ".de")  );
  		goto de1;
- 	}
- #else !REPORTERRS
- 		goto de1;
- #endif REPORTERRS
  	if ((offset = finds(i)) == 0)
  		goto de1;
  #ifdef COMMENT

--- 108,113 -----
  	skip();
  	if ((i = getrq()) == 0)
  		goto de1;
  	if ((offset = finds(i)) == 0)
  		goto de1;
  	if (ds)
***************
*** 149,159
  #endif REPORTERRS
  	if ((offset = finds(i)) == 0)
  		goto de1;
- #ifdef COMMENT
- 		/* finds() returns 0 on an error, so no need to report it here
- 		 * -- req
- 		 */
- #endif COMMENT
  	if (ds)
  		copys();
  	else 

--- 110,115 -----
  		goto de1;
  	if ((offset = finds(i)) == 0)
  		goto de1;
  	if (ds)
  		copys();
  	else 
***************
*** 200,210
  	if (i >= 0) {
  		if (contab[i].rq & MMASK)
  			ffree((filep)contab[i].x.mx);
- #ifdef PROTECTBUILTINS
- 		else
- 			errmsg(EWARN, "Builtin request %s removed",
- 					realname(contab[i].rq & ~MMASK));
- #endif PROTECTBUILTINS
  		contab[i].rq = 0;
  		contab[i].x.mx = 0;
  	}

--- 156,161 -----
  	if (i >= 0) {
  		if (contab[i].rq & MMASK)
  			ffree((filep)contab[i].x.mx);
  		contab[i].rq = 0;
  		contab[i].x.mx = 0;
  	}
***************
*** 233,242
  			ip = incoff(ip);
  		nextb = ip;
  		ip = savip;
- #ifdef PROTECTBUILTINS
- 	} else if (app && oldmn >= 0) {
- 		errmsg(EWARN, "Built-in request %s redefined", realname(mn));
- #endif PROTECTBUILTINS
  	} else {
  		for (i = 0; i < NM; i++) {
  			if (contab[i].rq == 0)

--- 184,189 -----
  			ip = incoff(ip);
  		nextb = ip;
  		ip = savip;
  	} else {
  		for (i = 0; i < NM; i++) {
  			if (contab[i].rq == 0)
***************
*** 246,257
  			app = 0;
  			if (macerr++ > 1)
  				done2(02);
- #ifdef REPORTERRS
- 			errmsg(edone,04, "too many (%d) string/macro names", NM);
- 			/* edone() may return, so the return is needed.
- 			 * -- req
- 			 */
- #else !REPORTERRS
  			fprintf(stderr, "troff: Too many (%d) string/macro names.\n", NM);
  			edone(04);
  #endif REPORTERRS

--- 193,198 -----
  			app = 0;
  			if (macerr++ > 1)
  				done2(02);
  			fprintf(stderr, "troff: Too many (%d) string/macro names.\n", NM);
  			edone(04);
  			return(offset = 0);
***************
*** 254,260
  #else !REPORTERRS
  			fprintf(stderr, "troff: Too many (%d) string/macro names.\n", NM);
  			edone(04);
- #endif REPORTERRS
  			return(offset = 0);
  		}
  		contab[i].x.mx = (unsigned) nextb;

--- 195,200 -----
  				done2(02);
  			fprintf(stderr, "troff: Too many (%d) string/macro names.\n", NM);
  			edone(04);
  			return(offset = 0);
  		}
  		contab[i].x.mx = (unsigned) nextb;
***************
*** 282,314
  }
  
  
- #ifdef COMMENT
- /* copyb() simulates a finite state machine that recognises
-  *	<start-of-line> .jk
-  * where j and k are the 1 or 2 letters of the macro name that getrq() finds.
-  *
-  * start---><state==1>--"."--><state==2>--"j"--<state==3>--"k"-->ACCEPT
-  * "\n" puts us back to <state==1>
-  * anything else puts us back to start (which is equivalent)
-  *
-  * The idea is to copy stuff into a macro (i.e. into the tmp file) until
-  * ACCEPT, when we return.  This is used by .de, .am and .ig.  .ig should
-  * really not use this, as auto-incremented number registers will be
-  * affected.  Or there could be another flag to getch().  Ugh.
-  *
-  * It would be nice if we could provide a warning if EOF was found, as a
-  * very common cause of no output is to have unmatched .de xx and .., but
-  * this is difficult.  We can warn about "open" diversions in done(), I
-  * suppose.  The problem is that getach() calls nextfile() on EOF, which
-  * in turn calls done() if there aren't any more; but done() doesn't know
-  * that we're still in coyb, and deducing it from the state of the global
-  * variables is too much effort.  The reason I'm content to leave it at that
-  * point is that even if done() *did* know about copyb, it wouldn't be able
-  * to relate that to the user-level .de or .am or whatever very easily.
-  *
-  * -- req
-  */
- #endif COMMENT
  copyb()
  {
  	register i, j, k;

--- 222,227 -----
  }
  
  
  copyb()
  {
  	register i, j, k;
***************
*** 375,384
  
  	copyf++;
  	if (skip())
- #ifdef REPORTERRS
- 	{
- 		/* would be nice if we knew the string name! */
- 		errmsg(EWARN, ".ds: usage is .ds xx \"string; no string here!");
  		goto c0;
  	}
  #else !REPORTERRS

--- 288,293 -----
  
  	copyf++;
  	if (skip())
  		goto c0;
  	if (cbits(i = getch()) != '"')
  		wbf(i);
***************
*** 380,389
  		/* would be nice if we knew the string name! */
  		errmsg(EWARN, ".ds: usage is .ds xx \"string; no string here!");
  		goto c0;
- 	}
- #else !REPORTERRS
- 		goto c0;
- #endif REPORTERRS
  	if (cbits(i = getch()) != '"')
  		wbf(i);
  	while (cbits(i = getch()) != '\n')

--- 289,294 -----
  	copyf++;
  	if (skip())
  		goto c0;
  	if (cbits(i = getch()) != '"')
  		wbf(i);
  	while (cbits(i = getch()) != '\n')
***************
*** 435,443
  }
  
  
- #ifdef COMMENT
- /* wbf() --- Write Buffer File (or Block File)		-- req  */
- #endif COMMENT
  wbf(i)
  tchar i;
  {

--- 340,345 -----
  }
  
  
  wbf(i)
  tchar i;
  {
***************
*** 469,477
  }
  
  
- #ifdef COMMENT
- /* wbfl() --- Write BLock to File -- req  */
- #endif COMMENT
  wbfl()
  {
  	if (woff == 0)

--- 371,376 -----
  }
  
  
  wbfl()
  {
  	if (woff == 0)
***************
*** 486,494
  }
  
  
- #ifdef COMMENT
- /* rbf() -- read block from file -- req */
- #endif COMMENT
  tchar rbf()
  {
  	tchar i;

--- 385,390 -----
  }
  
  
  tchar rbf()
  {
  	tchar i;
***************
*** 520,528
  		p = ip;
  		if (!((j = ++p) & (BLK - 1))) {
  			if ((i = blist[blisti(--p)]) == -1) {
- #ifdef REPORTERRS
- 				errmsg(done2,-5, "Internal error in rbf()");
- #else !REPORTERRS
  				fprintf(stderr, "troff: Bad storage allocation.\n");
  				done2(-5);
  #endif REPORTERRS

--- 416,421 -----
  		p = ip;
  		if (!((j = ++p) & (BLK - 1))) {
  			if ((i = blist[blisti(--p)]) == -1) {
  				fprintf(stderr, "troff: Bad storage allocation.\n");
  				done2(-5);
  			}
***************
*** 525,531
  #else !REPORTERRS
  				fprintf(stderr, "troff: Bad storage allocation.\n");
  				done2(-5);
- #endif REPORTERRS
  			}
  			j = ((filep)i);
  		}

--- 418,423 -----
  			if ((i = blist[blisti(--p)]) == -1) {
  				fprintf(stderr, "troff: Bad storage allocation.\n");
  				done2(-5);
  			}
  			j = ((filep)i);
  		}
***************
*** 540,550
  {
  	register filep i;
  
- #ifdef COMMENT
- 	/* BLK is a power of 2, so p & ~(BLK - 1) is (on a 2's compl. m/c)
- 	 * the bits higher than BLK
- 	 * -- req */
- #endif COMMENT
  	if ((i = p & ~(BLK - 1)) != roff) {
  		roff = i;
  #ifndef INCORE

--- 432,437 -----
  {
  	register filep i;
  
  	if ((i = p & ~(BLK - 1)) != roff) {
  		roff = i;
  #ifndef INCORE
***************
*** 567,575
  
  	if (!((j = ++p) & (BLK - 1))) {
  		if ((i = blist[blisti(--p)]) == -1) {
- #ifdef REPORTERRS
- 			errmsg(done2, -5, "Internal storage error in incoff()");
- #else !REPORTERRS
  			fprintf(stderr, "troff: Bad storage allocation.\n");
  			done2(-5);
  #endif REPORTERRS

--- 454,459 -----
  
  	if (!((j = ++p) & (BLK - 1))) {
  		if ((i = blist[blisti(--p)]) == -1) {
  			fprintf(stderr, "troff: Bad storage allocation.\n");
  			done2(-5);
  		}
***************
*** 572,578
  #else !REPORTERRS
  			fprintf(stderr, "troff: Bad storage allocation.\n");
  			done2(-5);
- #endif REPORTERRS
  		}
  		j = (filep) i;
  	}

--- 456,461 -----
  		if ((i = blist[blisti(--p)]) == -1) {
  			fprintf(stderr, "troff: Bad storage allocation.\n");
  			done2(-5);
  		}
  		j = (filep) i;
  	}
***************
*** 639,644
  int	x;
  {
  	register char	*i;
  	char	*sbrk();
  
  #ifdef ALIGNFIXES

--- 522,528 -----
  int	x;
  {
  	register char	*i;
+ 	register j;
  	char	*sbrk();
  
  	if (j = x % sizeof(int))	/*allocate only whole words for 3B*/
***************
*** 641,671
  	register char	*i;
  	char	*sbrk();
  
! #ifdef ALIGNFIXES
! 	/* have to align x to a suitable boundary for storing an int.
! 	 * Or a tchar?  Or a struct?  We'll use the larger of int and tchar
! 	 * to be on the safe side...  Really ought to go through and check
! 	 * every use, but...
! 	 * - req
! 	 */
! 	unsigned int xsize = sizeof(int);
! 
! 	if (xsize < sizeof(tchar))
! 		xsize = sizeof(tchar);
! 	if (x % (int) xsize)
! 		x += (int) (xsize - 1);
! #else !ALIGNFIXES
! 	if (x % 2 == 1) 
! 		x++;
! #endif ALIGNFIXES
! #ifdef COMMENT
! 	/* } for brace-match tool */
! 
! 	/* note that MAXPTR is (char *) -1, so it's really an error
! 	 * rather than a cvalue to check against.
! 	 * - req
! 	 */
! #endif COMMENT
  	if ((i = sbrk(x)) == MAXPTR) {
  #ifdef REPORTERRS
  		errmsg(edone, 0100, "Out of memory at %d (recursive macro problem?)", i);

--- 525,532 -----
  	register j;
  	char	*sbrk();
  
! 	if (j = x % sizeof(int))	/*allocate only whole words for 3B*/
! 		x += sizeof(int) - j;
  	if ((i = sbrk(x)) == MAXPTR) {
  		fprintf(stderr, "troff: Core limit reached.\n");
  		edone(0100);
***************
*** 667,676
  	 */
  #endif COMMENT
  	if ((i = sbrk(x)) == MAXPTR) {
- #ifdef REPORTERRS
- 		errmsg(edone, 0100, "Out of memory at %d (recursive macro problem?)", i);
- 		edone(0100);
- #else !REPORTERRS
  		fprintf(stderr, "troff: Core limit reached.\n");
  		edone(0100);
  #endif REPORTERRS

--- 528,533 -----
  	if (j = x % sizeof(int))	/*allocate only whole words for 3B*/
  		x += sizeof(int) - j;
  	if ((i = sbrk(x)) == MAXPTR) {
  		fprintf(stderr, "troff: Core limit reached.\n");
  		edone(0100);
  	} else {
***************
*** 673,679
  #else !REPORTERRS
  		fprintf(stderr, "troff: Core limit reached.\n");
  		edone(0100);
- #endif REPORTERRS
  	} else {
  		enda = i + x;
  	}

--- 530,535 -----
  	if ((i = sbrk(x)) == MAXPTR) {
  		fprintf(stderr, "troff: Core limit reached.\n");
  		edone(0100);
  	} else {
  		if ((unsigned)i % sizeof(int)){	/*check alignment for 3B*/
  			fprintf(stderr, "troff: alignment problem.\n");
***************
*** 675,680
  		edone(0100);
  #endif REPORTERRS
  	} else {
  		enda = i + x;
  	}
  	return(i);

--- 531,540 -----
  		fprintf(stderr, "troff: Core limit reached.\n");
  		edone(0100);
  	} else {
+ 		if ((unsigned)i % sizeof(int)){	/*check alignment for 3B*/
+ 			fprintf(stderr, "troff: alignment problem.\n");
+ 			edone(0100);
+ 		}
  		enda = i + x;
  	}
  	return(i);
***************
*** 681,689
  }
  
  
- #ifdef COMMENT
- /* Long name stuff would go here, of course */
- #endif COMMENT
  getsn()
  {
  	register i;

--- 541,546 -----
  }
  
  
  getsn()
  {
  	register i;
***************
*** 701,718
  {
  	register i;
  
- #ifdef COMMENT
- 	/* lgf++ --- don't expand ligatures in strings.  Bug: if input that
- 	 * would normally be turned into a ligature overlapps a string
- 	 * (eg:
- 	 * .ds a "i
- 	 * f\*a  ), the ligature isn't expanded.  I don't know why.
- 	 *
- 	 * Is it an error to say \*x if x doesn't exist?  I guess so,
- 	 * but this would make lots of errors with -ms.  I'll think about it.
- 	 * -- req
- 	 */
- #endif COMMENT
  	lgf++;
  	if (((i = getsn()) == 0) ||  ((i = findmn(i)) == -1) ||  !(contab[i].rq & MMASK)) {
  		lgf--;

--- 558,563 -----
  {
  	register i;
  
  	lgf++;
  	if (((i = getsn()) == 0) ||  ((i = findmn(i)) == -1) ||  !(contab[i].rq & MMASK)) {
  		lgf--;
***************
*** 716,724
  	lgf++;
  	if (((i = getsn()) == 0) ||  ((i = findmn(i)) == -1) ||  !(contab[i].rq & MMASK)) {
  		lgf--;
- #ifdef COMMENT
- 		/* an error message should prbably go here --- req */
- #endif COMMENT
  		return(0);
  	} else {
  		SPACETEST(nxf, sizeof(struct s));

--- 561,566 -----
  	lgf++;
  	if (((i = getsn()) == 0) ||  ((i = findmn(i)) == -1) ||  !(contab[i].rq & MMASK)) {
  		lgf--;
  		return(0);
  	} else {
  		SPACETEST(nxf, sizeof(struct s));
***************
*** 731,739
  
  
  
- #ifdef COMMENT
- /* collect macro arguments */
- #endif COMMENT
  collect()
  {
  	register j;

--- 573,578 -----
  
  
  
  collect()
  {
  	register j;
***************
*** 809,819
  				fprintf(stderr, "strp=0x%x, lim = 0x%x\n",
  					strp, lim);
  #endif 0
- #ifdef REPORTERRS
- 				copyf--;
- 				errmsg(edone, 04,
- 			"Macro arguments use more than %d characters", CPERMAC);
- #else !REPORTERRS
  				fprintf(stderr,
  					"troff: Macro argument too long.\n");
  				copyf--;

--- 648,653 -----
  				fprintf(stderr, "strp=0x%x, lim = 0x%x\n",
  					strp, lim);
  #endif 0
  				fprintf(stderr,
  					"troff: Macro argument too long.\n");
  				copyf--;
***************
*** 818,824
  					"troff: Macro argument too long.\n");
  				copyf--;
  				edone(004);
- #endif REPORTERRS
  			}
  			SPACETEST(strp, 3 * sizeof(tchar));
  		}

--- 652,657 -----
  					"troff: Macro argument too long.\n");
  				copyf--;
  				edone(004);
  			}
  			SPACETEST(strp, 3 * sizeof(tchar));
  		}
***************
*** 824,836
  		}
  		*strp++ = 0;
  	}
- #ifdef COMMENT
- 	/* should report if > APERMAC args... */
- 	/* Also, the cast to (tchar **) may be wrong;  4.2bsd troff has int **
- 	 * instead, but uses nxf rather than savnxf.  Who cares?
- 	 * - req
- 	 */
- #endif COMMENT
  	nxf = savnxf;
  	nxf->nargs = argpp - (tchar **)(savnxf + 1);
  	argtop = strp;

--- 657,662 -----
  		}
  		*strp++ = 0;
  	}
  	nxf = savnxf;
  	nxf->nargs = argpp - (tchar **)(savnxf + 1);
  	argtop = strp;
***************
*** 866,874
  
  	lgf++;
  	if (skip() || ((i = getrq()) == 0)) {
- #ifdef COMMENT
- 		/* .di */
- #endif COMMENT
  		if (dip != d)
  			wbt((tchar)0);
  		if (dilev > 0) {

--- 692,697 -----
  
  	lgf++;
  	if (skip() || ((i = getrq()) == 0)) {
  		if (dip != d)
  			wbt((tchar)0);
  		if (dilev > 0) {
***************
*** 877,887
  			dip = &d[--dilev];
  			offset = dip->op;
  		}
- #ifdef REPORTERRS
- 		else {
- 			errmsg(EWARN, ".di without arguments outside a diversion");
- 		}
- #endif REPORTERRS
  		goto rtn;
  	}
  	if (++dilev == NDI) {

--- 700,705 -----
  			dip = &d[--dilev];
  			offset = dip->op;
  		}
  		goto rtn;
  	}
  	if (++dilev == NDI) {
***************
*** 886,895
  	}
  	if (++dilev == NDI) {
  		--dilev;
- #ifdef REPORTERRS
- 		errmsg(edone,02,"Diversions nested deeper than %d levels", NDI);
- 		edone(02);
- #else !REPORTERRS
  		fprintf(stderr, "troff: Diversions nested too deep.\n");
  		edone(02);
  #endif REPORTERRS

--- 704,709 -----
  	}
  	if (++dilev == NDI) {
  		--dilev;
  		fprintf(stderr, "troff: Diversions nested too deep.\n");
  		edone(02);
  	}
***************
*** 892,898
  #else !REPORTERRS
  		fprintf(stderr, "troff: Diversions nested too deep.\n");
  		edone(02);
- #endif REPORTERRS
  	}
  	if (dip != d)
  		wbt((tchar)0);

--- 706,711 -----
  		--dilev;
  		fprintf(stderr, "troff: Diversions nested too deep.\n");
  		edone(02);
  	}
  	if (dip != d)
  		wbt((tchar)0);
***************
*** 917,925
  	skip();
  	dip->ditrap = vnumb((int *)0);
  	if (nonumb)
- #ifdef REPORTERRS
- 	{
- 		errmsg(EWARN, ".dt must have a numeric first argument");
  		return;
  	}
  #else !REPORTERRS

--- 730,735 -----
  	skip();
  	dip->ditrap = vnumb((int *)0);
  	if (nonumb)
  		return;
  	skip();
  	dip->dimac = getrq();
***************
*** 921,930
  	{
  		errmsg(EWARN, ".dt must have a numeric first argument");
  		return;
- 	}
- #else !REPORTERRS
- 		return;
- #endif REPORTERRS
  	skip();
  #ifdef REPORTERRS
  	if ((dip->dimac = getrq()) == 0) {

--- 731,736 -----
  	dip->ditrap = vnumb((int *)0);
  	if (nonumb)
  		return;
  	skip();
  	dip->dimac = getrq();
  }
***************
*** 926,936
  		return;
  #endif REPORTERRS
  	skip();
- #ifdef REPORTERRS
- 	if ((dip->dimac = getrq()) == 0) {
- 		errmsg(EWARN, ".dt needs to have a macro-name as a third argument");
- 	}
- #else !REPORTERRS
  	dip->dimac = getrq();
  #endif REPORTERRS
  }

--- 732,737 -----
  	if (nonumb)
  		return;
  	skip();
  	dip->dimac = getrq();
  }
  
***************
*** 932,938
  	}
  #else !REPORTERRS
  	dip->dimac = getrq();
- #endif REPORTERRS
  }
  
  

--- 733,738 -----
  		return;
  	skip();
  	dip->dimac = getrq();
  }
  
  
***************
*** 951,959
  	if ((offset = begin = alloc()) == 0)
  		return;
  	if (ismot(delim = getch())) {
- #ifdef REPORTERRS
- 		errmsg(EWARN, ".tl: first delimiter unsuitable; using \"'\"");
- #endif REPORTERRS
  		ch = delim;
  		delim = '\'';
  	} else 

--- 751,756 -----
  	if ((offset = begin = alloc()) == 0)
  		return;
  	if (ismot(delim = getch())) {
  		ch = delim;
  		delim = '\'';
  	} else 
***************
*** 959,974
  	} else 
  		delim = cbits(delim);
  	if (!nlflg)
- #ifdef REPORTERRS
- 	{
- #endif REPORTERRS
- #ifdef COMMENT
- 		/* would like to detect .tl with no trailing delim here.
- 		 * Maybe .tl 'left'
- 		 * should be an error, too (no 'center'right')
- 		 * - req
- 		 */
- #endif COMMENT
  		while (cbits(i = getch()) != '\n') {
  			if (cbits(i) == cbits(delim))
  				i = IMP;

--- 756,761 -----
  	} else 
  		delim = cbits(delim);
  	if (!nlflg)
  		while (cbits(i = getch()) != '\n') {
  			if (cbits(i) == cbits(delim))
  				i = IMP;
***************
*** 974,984
  				i = IMP;
  			wbf(i);
  		}
- #ifdef REPORTERRS
- 	} else {
- 		errmsg(EWARN, ".tl with no arguments ignored");
- 	}
- #endif REPORTERRS
  	wbf((tchar)IMP);
  	wbf((tchar)IMP);
  	wbt((tchar)0);

--- 761,766 -----
  				i = IMP;
  			wbf(i);
  		}
  	wbf((tchar)IMP);
  	wbf((tchar)IMP);
  	wbt((tchar)0);
***************
*** 1011,1020
  }
  
  
- #ifdef COMMENT
- /* if no argument to .pc, set to IMP (i.e. turn the mechanism off
-  * -- req */
- #endif COMMENT
  casepc()
  {
  	pagech = chget(IMP);

--- 793,798 -----
  }
  
  
  casepc()
  {
  	pagech = chget(IMP);
diff -rbc titroff/n4.c /distribution/dwb/text/troff.d/n4.c
*** titroff/n4.c	Wed Nov 19 21:24:19 1986
--- /distribution/dwb/text/troff.d/n4.c	Fri Sep  9 18:45:36 1983
***************
*** 1,3
  #include	<ctype.h>
  #include "tdef.h"
  extern

--- 1,4 -----
+ /*      @(#)n4.c	1.1     */
  #include	<ctype.h>
  #include "tdef.h"
  extern
***************
*** 18,28
  #include <sgtty.h>
  #include "ext.h"
  
- #ifndef NROFF
- #ifdef PAPERSIZEREG
- extern int paperwidth, paperlength;
- #endif PAPERSIZEREG
- #endif !NROFF
  int	regcnt = NNAMES;
  int	falsef	= 0;	/* on if inside false branch of if */
  

--- 19,24 -----
  #include <sgtty.h>
  #include "ext.h"
  
  int	regcnt = NNAMES;
  int	falsef	= 0;	/* on if inside false branch of if */
  
***************
*** 139,164
  		case 'b':
  			i = bdtab[font];
  			break;
! #ifndef NROFF
! #ifdef PAPERSIZEREG
! 		case 'W':	/* .W -- paperwidth */
! 			i = paperwidth;
! #ifdef LOCALWARN
! 			lwarn(".W number register non-standard\n");
! #endif LOCALWARN
! 			break;
! 		case 'M':	/* .M -- paperlength */
! 			i = paperlength;
! #ifdef LOCALWARN
! 			lwarn(".M number register non-standard\n");
! #endif LOCALWARN
! 			break;
! #endif PAPERSIZEREG
! #endif !NROFF
! #ifdef BLANKSMACRO
! 		case 'B':	/* .B number of leading blanks on this line */
! 			{
! 				extern int nrspaces; /* from local.c */
  
  				i = nrspaces;
  #ifdef LOCALWARN

--- 135,144 -----
  		case 'b': 
  			i = bdtab[font];
  			break;
! 		case 'F':
! 			for (i=0; cbuf[i] = cfname[ifi][i]; i++) ;
! 			cp = cbuf;
! 			return;
  
  		default:
  			goto s0;
***************
*** 160,192
  			{
  				extern int nrspaces; /* from local.c */
  
- 				i = nrspaces;
- #ifdef LOCALWARN
- 				lwarn(".B number register non-standard\n");
- #endif LOCALWARN
- 				break;
- 			}
- 
- 		case 'N':	/* nlflag */
- 			{
- 				extern int nrlines;
- 
- 				i = nrlines;
- #ifdef LOCALWARN
- 				lwarn(".B number register non-standard\n");
- #endif LOCALWARN
- 				break;
- 			}
- #endif BLANKSMACRO
- 
- #ifdef EVREG
- 		case 'e':	/* .e -- environment number */
- 			i = ev;
- #ifdef LOCALWARN
- 			lwarn(".e number register non-standard\n");
- #endif LOCALWARN
- 			break;
- #endif EVREG
  		default:
  #ifdef REPORTERRS
  			errmsg(EWARN, "\\n: No such read-only number register as .%c",

--- 140,145 -----
  			cp = cbuf;
  			return;
  
  		default:
  			goto s0;
  		}
***************
*** 188,197
  			break;
  #endif EVREG
  		default:
- #ifdef REPORTERRS
- 			errmsg(EWARN, "\\n: No such read-only number register as .%c",
- 								i >> BYTE);
- #endif REPORTERRS
  			goto s0;
  		}
  	else {

--- 141,146 -----
  			return;
  
  		default:
  			goto s0;
  		}
  	else {
***************
*** 196,207
  		}
  	else {
  s0:
- #ifdef COMMENT
- 		/* no such number register could be an error, but it
- 		 * happens too often to be worth moaning at.
- 		 * -- req
- 		 */
- #endif COMMENT
  		if ((j = findr(i)) == -1)
  			i = 0;
  		else {

--- 145,150 -----
  		}
  	else {
  s0:
  		if ((j = findr(i)) == -1)
  			i = 0;
  		else {
***************
*** 249,257
  		}
  	}
  	if (p == &r[NN]) {
- #ifdef REPORTERRS
- 		errmsg(done2, 04, "more than %d number registers", NN);
- #else !REPORTERRS
  		fprintf(stderr, "troff: too many number registers (%d).\n", NN);
  		done2(04);
  #endif REPORTERRS

--- 192,197 -----
  		}
  	}
  	if (p == &r[NN]) {
  		fprintf(stderr, "troff: too many number registers (%d).\n", NN);
  		done2(04); 
  	}
***************
*** 254,260
  #else !REPORTERRS
  		fprintf(stderr, "troff: too many number registers (%d).\n", NN);
  		done2(04);
- #endif REPORTERRS
  	}
  	return(p - r);
  }

--- 194,199 -----
  	if (p == &r[NN]) {
  		fprintf(stderr, "troff: too many number registers (%d).\n", NN);
  		done2(04); 
  	}
  	return(p - r);
  }
***************
*** 389,397
  }
  
  
- #ifdef REPORTERRS
- static int bracklevel = 0;	/* depth of ( ... ) in expressions */
- #endif REPORTERRS
  long	atoi0()
  {
  	register c, k, cnt;

--- 328,333 -----
  }
  
  
  long	atoi0()
  {
  	register c, k, cnt;
***************
*** 412,425
  		ch = ii;
  		if (cnt)
  			break;
- #ifdef COMMENT
- 		/* else fall through... */
- 
- 		/* Could warn here about trailing garbage, but things like
- 		 * .ta 3iR or \l'3iX' would go horribly wrong then!
- 		 * - req
- 		 */
- #endif COMMENT
  	case '+':
  		i = ckph();
  #ifdef REPORTERRS

--- 348,353 -----
  		ch = ii;
  		if (cnt)
  			break;
  	case '+':
  		i = ckph();
  		if (nonumb)
***************
*** 422,448
  #endif COMMENT
  	case '+':
  		i = ckph();
- #ifdef REPORTERRS
- 		if (nonumb) {
- 			if (cnt) {
- 				if (cbits(ch) == '\n') {
- 					errmsg(EWARN, "newline unexpected after +");
- 				} else {
- 					errmsg(EWARN, "Unexpected \"%s\" found after +", tchartos(ch));
- 				}
- 			} else if (cbits(ch) != '\n') {
- 				/* caseif() turns off this message! */
- 				if (reporterrs & LERR_BADEXPSTART) {
- 					if (!(ismot(ch) && !isvmot(ch)) &&
- 						cbits(ch) != RIGHT &&
- 						cbits(ch) != ' ') {
- 							errmsg(EWARN, "\"%s\" can't start an expression", tchartos(ch));
- 					}
- 				}
- 			}
- 			break;
- 		} 
- #else !REPORTERRS
  		if (nonumb)
  			break;
  #endif REPORTERRS

--- 350,355 -----
  			break;
  	case '+':
  		i = ckph();
  		if (nonumb)
  			break;
  		acc += i;
***************
*** 445,451
  #else !REPORTERRS
  		if (nonumb)
  			break;
- #endif REPORTERRS
  		acc += i;
  		goto a0;
  	case '-':

--- 352,357 -----
  		i = ckph();
  		if (nonumb)
  			break;
  		acc += i;
  		goto a0;
  	case '-':
***************
*** 451,459
  	case '-':
  		i = ckph();
  		if (nonumb)
- #ifdef REPORTERRS
- 		{
- 			errmsg(EWARN, "found \"%s\" after \"-\" in expression!", tchartos(ch));
  			break;
  		}
  #else !REPORTERRS

--- 357,362 -----
  	case '-':
  		i = ckph();
  		if (nonumb)
  			break;
  		acc -= i;
  		goto a0;
***************
*** 455,464
  		{
  			errmsg(EWARN, "found \"%s\" after \"-\" in expression!", tchartos(ch));
  			break;
- 		}
- #else !REPORTERRS
- 			break;
- #endif REPORTERRS
  		acc -= i;
  		goto a0;
  	case '*':

--- 358,363 -----
  		i = ckph();
  		if (nonumb)
  			break;
  		acc -= i;
  		goto a0;
  	case '*':
***************
*** 464,472
  	case '*':
  		i = ckph();
  		if (nonumb)
- #ifdef REPORTERRS
- 		{
- 			errmsg(EWARN, "found \"%s\" after * in expression!", tchartos(ch));
  			break;
  		}
  #else !REPORTERRS

--- 363,368 -----
  	case '*':
  		i = ckph();
  		if (nonumb)
  			break;
  		acc *= i;
  		goto a0;
***************
*** 468,477
  		{
  			errmsg(EWARN, "found \"%s\" after * in expression!", tchartos(ch));
  			break;
- 		}
- #else !REPORTERRS
- 			break;
- #endif REPORTERRS
  		acc *= i;
  		goto a0;
  	case '/':

--- 364,369 -----
  		i = ckph();
  		if (nonumb)
  			break;
  		acc *= i;
  		goto a0;
  	case '/':
***************
*** 477,485
  	case '/':
  		i = ckph();
  		if (nonumb)
- #ifdef REPORTERRS
- 		{
- 			errmsg(EWARN, "found \"%s\" after / in expression!", tchartos(ch));
  			break;
  		}
  #else !REPORTERRS

--- 369,374 -----
  	case '/':
  		i = ckph();
  		if (nonumb)
  			break;
  		if (i == 0) {
  			flusho();
***************
*** 481,490
  		{
  			errmsg(EWARN, "found \"%s\" after / in expression!", tchartos(ch));
  			break;
- 		}
- #else !REPORTERRS
- 			break;
- #endif REPORTERRS
  		if (i == 0) {
  			flusho();
  #ifdef REPORTERRS

--- 370,375 -----
  		i = ckph();
  		if (nonumb)
  			break;
  		if (i == 0) {
  			flusho();
  			fprintf(stderr, "troff: divide by zero.\n");
***************
*** 487,495
  #endif REPORTERRS
  		if (i == 0) {
  			flusho();
- #ifdef REPORTERRS
- 			errmsg(EWARN, "divide by zero in expression (result is 0)");
- #else !REPORTERRS
  			fprintf(stderr, "troff: divide by zero.\n");
  #endif REPORTERRS
  			acc = 0;

--- 372,377 -----
  			break;
  		if (i == 0) {
  			flusho();
  			fprintf(stderr, "troff: divide by zero.\n");
  			acc = 0;
  		} else 
***************
*** 491,497
  			errmsg(EWARN, "divide by zero in expression (result is 0)");
  #else !REPORTERRS
  			fprintf(stderr, "troff: divide by zero.\n");
- #endif REPORTERRS
  			acc = 0;
  		} else
  			acc /= i;

--- 373,378 -----
  		if (i == 0) {
  			flusho();
  			fprintf(stderr, "troff: divide by zero.\n");
  			acc = 0;
  		} else 
  			acc /= i;
***************
*** 499,507
  	case '%':
  		i = ckph();
  		if (nonumb)
- #ifdef REPORTERRS
- 		{
- 			errmsg(EWARN, "found \"%s\" after % (mod) in expression!", tchartos(ch));
  			break;
  		}
  #else !REPORTERRS

--- 380,385 -----
  	case '%':
  		i = ckph();
  		if (nonumb)
  			break;
  		acc %= i;
  		goto a0;
***************
*** 503,512
  		{
  			errmsg(EWARN, "found \"%s\" after % (mod) in expression!", tchartos(ch));
  			break;
- 		}
- #else !REPORTERRS
- 			break;
- #endif REPORTERRS
  		acc %= i;
  		goto a0;
  	case '&':	/*and*/

--- 381,386 -----
  		i = ckph();
  		if (nonumb)
  			break;
  		acc %= i;
  		goto a0;
  	case '&':	/*and*/
***************
*** 512,520
  	case '&':	/*and*/
  		i = ckph();
  		if (nonumb)
- #ifdef REPORTERRS
- 		{
- 			errmsg(EWARN, "found \"%s\" after & in expression!", tchartos(ch));
  			break;
  		}
  #else !REPORTERRS

--- 386,391 -----
  	case '&':	/*and*/
  		i = ckph();
  		if (nonumb)
  			break;
  		if ((acc > 0) && (i > 0))
  			acc = 1; 
***************
*** 516,525
  		{
  			errmsg(EWARN, "found \"%s\" after & in expression!", tchartos(ch));
  			break;
- 		}
- #else !REPORTERRS
- 			break;
- #endif REPORTERRS
  		if ((acc > 0) && (i > 0))
  			acc = 1;
  		else

--- 387,392 -----
  		i = ckph();
  		if (nonumb)
  			break;
  		if ((acc > 0) && (i > 0))
  			acc = 1; 
  		else 
***************
*** 528,536
  	case ':':	/*or*/
  		i = ckph();
  		if (nonumb)
- #ifdef REPORTERRS
- 		{
- 			errmsg(EWARN, "found \"%s\" after : (logical or) in expression!", tchartos(ch));
  			break;
  		}
  #else !REPORTERRS

--- 395,400 -----
  	case ':':	/*or*/
  		i = ckph();
  		if (nonumb)
  			break;
  		if ((acc > 0) || (i > 0))
  			acc = 1; 
***************
*** 532,541
  		{
  			errmsg(EWARN, "found \"%s\" after : (logical or) in expression!", tchartos(ch));
  			break;
- 		}
- #else !REPORTERRS
- 			break;
- #endif REPORTERRS
  		if ((acc > 0) || (i > 0))
  			acc = 1;
  		else

--- 396,401 -----
  		i = ckph();
  		if (nonumb)
  			break;
  		if ((acc > 0) || (i > 0))
  			acc = 1; 
  		else 
***************
*** 547,555
  		i = ckph();
  		if (nonumb) {
  			acc = 0;
- #ifdef REPORTERRS
- 			errmsg(EWARN, "found \"%s\" after = in expression!", tchartos(ch));
- #endif REPORTERRS
  			break;
  		}
  		if (i == acc)

--- 407,412 -----
  		i = ckph();
  		if (nonumb) {
  			acc = 0; 
  			break;
  		}
  		if (i == acc)
***************
*** 566,574
  		i = ckph();
  		if (nonumb) {
  			acc = 0;
- #ifdef REPORTERRS
- 			errmsg(EWARN, "found \"%s\" after > in expression!", tchartos(ch));
- #endif REPORTERRS
  			break;
  		}
  		if (acc > (i - k))

--- 423,428 -----
  		i = ckph();
  		if (nonumb) {
  			acc = 0; 
  			break;
  		}
  		if (acc > (i - k))
***************
*** 585,593
  		i = ckph();
  		if (nonumb) {
  			acc = 0;
- #ifdef REPORTERRS
- 			errmsg(EWARN, "found \"%s\" after < in expression!", tchartos(ch));
- #endif REPORTERRS
  			break;
  		}
  		if (acc < (i + k))

--- 439,444 -----
  		i = ckph();
  		if (nonumb) {
  			acc = 0; 
  			break;
  		}
  		if (acc < (i + k))
***************
*** 596,608
  			acc = 0;
  		goto a0;
  	case ')':
- #ifdef REPORTERRS
- 		if (bracklevel) {
- 			bracklevel--;
- 		} else {
- 			errmsg(EWARN, "too many ) in expression!");
- 		}
- #endif REPORTERRS
  		break;
  	case '(':
  #ifdef REPORTERRS

--- 447,452 -----
  			acc = 0;
  		goto a0;
  	case ')': 
  		break;
  	case '(':
  		acc = atoi0();
***************
*** 605,613
  #endif REPORTERRS
  		break;
  	case '(':
- #ifdef REPORTERRS
- 		bracklevel++;
- #endif REPORTERRS
  		acc = atoi0();
  		goto a0;
  	}

--- 449,454 -----
  	case ')': 
  		break;
  	case '(':
  		acc = atoi0();
  		goto a0;
  	}
***************
*** 623,631
  	extern long	atoi1();
  
  	if (cbits(i = getch()) == '(')
- #ifdef REPORTERRS
- 	{
- 		bracklevel++;
  		j = atoi0();
  	}
  #else !REPORTERRS

--- 464,469 -----
  	extern long	atoi1();
  
  	if (cbits(i = getch()) == '(')
  		j = atoi0();
  	else {
  		ch = i;
***************
*** 627,636
  	{
  		bracklevel++;
  		j = atoi0();
- 	}
- #else !REPORTERRS
- 		j = atoi0();
- #endif REPORTERRS
  	else {
  		ch = i;
  		j = atoi1();

--- 465,470 -----
  
  	if (cbits(i = getch()) == '(')
  		j = atoi0();
  	else {
  		ch = i;
  		j = atoi1();
***************
*** 770,778
  casenr()
  {
  	register i, j;
- #ifdef REPORTERRS
- 	tchar name;
- #endif REPORTERRS
  
  	lgf++;
  #ifdef REPORTERRS

--- 604,609 -----
  casenr()
  {
  	register i, j;
  
  	lgf++;
  	skip();
***************
*** 775,799
  #endif REPORTERRS
  
  	lgf++;
- #ifdef REPORTERRS
- 	if (skip()) {
- 		errmsg(EWARN, ".nr request with no arguments ignored");
- 		goto rtn;
- 	}
- 	if ((i = findr(name = getrq())) == -1)
- 		goto rtn;
- 		/* findr() allocates a new register & warns if there are none,
- 		 * so no need to give an error here too.
- 		 *
- 		 * We save the name of the register for error messages
- 		 *
- 		 * -- req
- 		 */
- 	if (skip()) {
- 		errmsg(EWARN, ".nr %s: missing expression!", realname(name));
- 		goto rtn;
- 	}
- #else !REPORTERRS
  	skip();
  	if ((i = findr(getrq())) == -1)
  		goto rtn;

--- 606,611 -----
  	register i, j;
  
  	lgf++;
  	skip();
  	if ((i = findr(getrq())) == -1)
  		goto rtn;
***************
*** 798,807
  	if ((i = findr(getrq())) == -1)
  		goto rtn;
  	skip();
- #endif REPORTERRS
- #ifdef COMMENT
- 		/* should warn about read-only number registers here? */
- #endif COMMENT
  	j = inumb(&vlist[i]);
  #ifdef REPORTERRS
  	if (nonumb) {

--- 610,615 -----
  	if ((i = findr(getrq())) == -1)
  		goto rtn;
  	skip();
  	j = inumb(&vlist[i]);
  	if (nonumb)
  		goto rtn;
***************
*** 803,824
  		/* should warn about read-only number registers here? */
  #endif COMMENT
  	j = inumb(&vlist[i]);
- #ifdef REPORTERRS
- 	if (nonumb) {
- 		/* ch can be set to 0 & then have font & size info ORed in,
- 		 * so you can have NULLs in different fonts!!  This is why we
- 		 * test cbits(ch) rather than ch itself.  -- req
- 		 */
- 		if (cbits(ch) && cbits(ch) != '\n') {
- 			errmsg(EWARN,
- ".nr %s: extra characters ignored from \"%s\"", realname(name), tchartos(ch));
- 		} else {
- 			errmsg(EWARN, ".nr %s %d ignored (error in expression?)",
- 								realname(name), j);
- 		}
- 		goto rtn;
- 	}
- #else !REPORTERRS
  	if (nonumb)
  		goto rtn;
  #endif REPORTERRS

--- 611,616 -----
  		goto rtn;
  	skip();
  	j = inumb(&vlist[i]);
  	if (nonumb)
  		goto rtn;
  	vlist[i] = j;
***************
*** 821,827
  #else !REPORTERRS
  	if (nonumb)
  		goto rtn;
- #endif REPORTERRS
  	vlist[i] = j;
  #ifdef REPORTERRS
  	if (!skip()) {

--- 613,618 -----
  	j = inumb(&vlist[i]);
  	if (nonumb)
  		goto rtn;
  	vlist[i] = j;
  	skip();
  	j = atoi();
***************
*** 823,853
  		goto rtn;
  #endif REPORTERRS
  	vlist[i] = j;
- #ifdef REPORTERRS
- 	if (!skip()) {
- 		/* 3rd argument to .nr is auto-increment value (which may
- 		 * be -ve, of course)
- 		 */
- 		int savrpterrs = reporterrs;
- 		int n = j;
- 
- 		/* as arg is optional...  Otherwise a trailing TAB */
- 		/* produces error messages! */
- 		/* this might confuse people who use the reporterrs number
- 		 * register as an increment, I suppose!
- 		 */
- 		reporterrs &= (~LERR_BADEXPSTART);
- 
- 		j = atoi();
- 
- 		reporterrs = savrpterrs;
- 
- 		if (nonumb && cbits(ch) == '\n') {
- 				errmsg(EWARN,
- 					".nr %s %d: non-numeric increment ignored", realname(name), n);
- 		}
- 	}
- #else !REPORTERRS
  	skip();
  	j = atoi();
  #endif REPORTERRS

--- 614,619 -----
  	if (nonumb)
  		goto rtn;
  	vlist[i] = j;
  	skip();
  	j = atoi();
  	if (nonumb)
***************
*** 850,856
  #else !REPORTERRS
  	skip();
  	j = atoi();
! #endif REPORTERRS
  	inc[i] = j;
  rtn:
  	return;

--- 616,623 -----
  	vlist[i] = j;
  	skip();
  	j = atoi();
! 	if (nonumb)
! 		goto rtn;
  	inc[i] = j;
  rtn:
  	return;
***************
*** 863,880
  	tchar j;
  
  	lgf++;
- #ifdef REPORTERRS
- 	if (skip()) {
- 		errmsg(EWARN, ".af: called without arguments");
- 		return;
- 	} else if (!(i = getrq())) {
- 		errmsg(EWARN, ".af: need a register name as 2nd argument");
- 		return;
- 	} else if (skip()) {
- 		errmsg(EWARN, ".af: need 2 arguments (reg, format), found 1");
- 		return;
- 	}
- #else !REPORTERRS
  	if (skip() || !(i = getrq()) || skip())
  		return;
  #endif REPORTERRS

--- 630,635 -----
  	tchar j;
  
  	lgf++;
  	if (skip() || !(i = getrq()) || skip())
  		return;
  	k = 0;
***************
*** 877,883
  #else !REPORTERRS
  	if (skip() || !(i = getrq()) || skip())
  		return;
- #endif REPORTERRS
  	k = 0;
  	j = getch();
  	if (!isalpha(cbits(j))) {

--- 632,637 -----
  	lgf++;
  	if (skip() || !(i = getrq()) || skip())
  		return;
  	k = 0;
  	j = getch();
  	if (!isalpha(cbits(j))) {
***************
*** 888,899
  	if (!k)
  		k = j;
  	fmt[findr(i)] = k & BMASK;
- #ifdef COMMENT
- 	/* note that (1) findr could return -1 if i == 0, so we check it
- 	 * 	     (2) we allocate a new number register if necessary
- 	 * - req
- 	 */
- #endif COMMENT
  }
  
  setaf()	/* return format of number register */

--- 642,647 -----
  	if (!k)
  		k = j;
  	fmt[findr(i)] = k & BMASK;
  }
  
  setaf()	/* return format of number register */
***************
*** 970,981
  		neg++;
  		n = -n;
  	}
- #ifdef REPORTERRS
- 	if (m == 0) {
- 		errmsg(EWARN, "Internal Error: m == 0 in quant()");
- 		m = 1;	/* guess... */
- 	}
- #endif REPORTERRS
  	/* better as i = ((n + (m/2))/m)*m */
  	i = n / m;
  	if ((n - m * i) > (m / 2))

--- 718,723 -----
  		neg++;
  		n = -n;
  	}
  	/* better as i = ((n + (m/2))/m)*m */
  	i = n / m;
  	if ((n - m * i) > (m / 2))
***************
*** 985,987
  		i = -i;
  	return(i);
  }

--- 727,731 -----
  		i = -i;
  	return(i);
  }
+ 
+ 
