[6982] in Athena Bugs

home help back first fref pref prev next nref lref last post

decmips 7.2P: troff, /mit/x11/src/mit/clients/xditview/devX75/DESC

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Tue Jan 29 09:39:00 1991

Date: Tue, 29 Jan 91 09:38:42 EST
From: John T Kohl <jtkohl@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
In-Reply-To: [6977]

System name:		quicksilver
Type and version:	KN01 7.2P
Display type:		PM-MONO

What were you trying to do?
	use troff on some input.

What's wrong:
	It can core dump due to bad pointer alignment problems.

What should have happened:
	It shouldn't have.  Here's a patch for troff

*** /source/third/common/ditroff/troff/n3.c	Thu Jan 16 01:39:36 1986
--- n3.c	Tue Jan 29 09:31:22 1991
***************
*** 517,522 ****
--- 517,525 ----
  }
  
  
+ /* only works for y = powers of 2... */
+ #define roundup(x,y) (((x) + (y-1)) & ~(y-1))
+ 
  char	*setbrk(x)
  int	x;
  {
***************
*** 523,530 ****
  	register char	*i;
  	char	*sbrk();
  
! 	if (x % 2 == 1) 
! 		x++;
  	if ((i = sbrk(x)) == MAXPTR) {
  		fprintf(stderr, "troff: Core limit reached.\n");
  		edone(0100);
--- 526,533 ----
  	register char	*i;
  	char	*sbrk();
  
! 	x = roundup(x,4);
! 
  	if ((i = sbrk(x)) == MAXPTR) {
  		fprintf(stderr, "troff: Core limit reached.\n");
  		edone(0100);

There's also a problem with the DESC file that comes with xditview; it
tries to use too many fonts.  Here's a patch for that as well:
*** /mit/x11/src/mit/clients/xditview/devX75/DESC	Wed Mar  1 15:49:56 1989
--- DESC	Tue Jan 29 09:11:57 1991
***************
*** 2,8 ****
  #	special fonts have to go at the end or else troff
  #	won't know about their numbers unless you do .fp
  #
! fonts 21 R I B F C CO CB CF H HO HB HF N NI NB NF A AI AB AF S
  sizes 8 10 12 14 18 24 0
  res 75
  hor 1
--- 2,9 ----
  #	special fonts have to go at the end or else troff
  #	won't know about their numbers unless you do .fp
  #
! fonts 10 R I B F H HB C CB CF S
! #fonts 21 R I B F C CO CB CF H HO HB HF N NI NB NF A AI AB AF S
  sizes 8 10 12 14 18 24 0
  res 75
  hor 1


Please describe any relevant documentation references:
	previous bug report [6977] should be DISREGARDED; the font table
sizes need to be the same between troff and makedev.


home help back first fref pref prev next nref lref last post