#! /bin/sh
# Removing some junk files, and renaming the manual page
if test -d xtroff ; then
	cd xtroff
fi
if test -f suntroff.c -a -f xtroff.man ; then
	thisdir=`pwd`
else
	echo 'Please cd to contrib/clients/xtroff before running this script'
	exit 1
fi
rm -f Makefile.old Window.c Window.h WindowP.h make.out
mv xtroff.man xtroff.manX
cd XtStuff
rm -f make.out
cd $thisdir
# Ok - this is the real thing.
patch -p1 << \WhAt_A_mArOoN
diff -r -c /h/xwindows/X/contrib/clients/xtroff/patchlevel.h xtroff/patchlevel.h
*** /h/xwindows/X/contrib/clients/xtroff/patchlevel.h	Mon Sep 26 09:44:48 1988
--- xtroff/patchlevel.h	Sat Nov 12 06:34:11 1988
***************
*** 1,2 ****
! #define PATCHLEVEL 2
  
--- 1,2 ----
! #define PATCHLEVEL 3
  
Common subdirectories: /h/xwindows/X/contrib/clients/xtroff/Fixes and xtroff/Fixes
diff -r -c /h/xwindows/X/contrib/clients/xtroff/Imakefile xtroff/Imakefile
*** /h/xwindows/X/contrib/clients/xtroff/Imakefile	Thu Sep  1 01:57:40 1988
--- xtroff/Imakefile	Sat Nov 12 06:27:36 1988
***************
*** 33,39 ****
  RSTFONTS=/usr/uturing/ron/rst
  # Xfonts go here - wish the X11 server could read vfonts like 
  # the X10 server used to.
! SUNTROFF_FONTS=/local/share/X11/fonts
  #DEVICE=imp	#imagen
  DEVICE=sun	#versatec - other printers like lw.
  WIDTHDIR=/local/share/troff
--- 33,39 ----
  RSTFONTS=/usr/uturing/ron/rst
  # Xfonts go here - wish the X11 server could read vfonts like 
  # the X10 server used to.
! SUNTROFF_FONTS=/local/share/X11/fonts/xtroff
  #DEVICE=imp	#imagen
  DEVICE=sun	#versatec - other printers like lw.
  WIDTHDIR=/local/share/troff
***************
*** 65,76 ****
  # These should be defined in an Imake.tmpl - except that the 
  # normal Imake.tmpl insists on these being compiled in the 
  # X directory tree.
! XAWLIB=$(USRLIBDIR)/libXaw.a
! XTOOLLIB=$(USRLIBDIR)/libXt.a
! XLIB=$(USRLIBDIR)/libX11.a
  MATHLIB=-lm
  
! FC = fc
  XTSTUFF = 	XtStuff/libXtStuff.a
  OBJS1 =		xwindows.o suntroff.o parse.o font.o draw.o \
  		fixpoint.o curves.o
--- 65,76 ----
  # These should be defined in an Imake.tmpl - except that the 
  # normal Imake.tmpl insists on these being compiled in the 
  # X directory tree.
! #XAWLIB=$(USRLIBDIR)/libXaw.a
! #XTOOLLIB=$(USRLIBDIR)/libXt.a
! #XLIB=$(USRLIBDIR)/libX11.a
  MATHLIB=-lm
  
! FC = bdftosnf
  XTSTUFF = 	XtStuff/libXtStuff.a
  OBJS1 =		xwindows.o suntroff.o parse.o font.o draw.o \
  		fixpoint.o curves.o
***************
*** 79,92 ****
  PROGRAMS = 	xtroff
  PREVIEWER = 	xtroff
  
! ComplexProgramTarget_1(xtroff,$(XTSTUFF) $(XAWLIB) $(XTOOLLIB) $(XLIB),$(MATHLIB))
  
  $(XTSTUFF):
  		cd XtStuff; make $(MFLAGS)			
  
  xfonts:
  		-mkdir $(SUNTROFF_FONTS)
! 		cd fontstuff; make $(MFLAGS) CFLAGS="$(CFLAGS)" \
  			VFONTS=$(VFONTS) \
  			RSTFONTS=$(RSTFONTS) PREVIEWER=$(PREVIEWER) \
  			FC=$(FC) PERCENT=$(PERCENT) \
--- 79,99 ----
  PROGRAMS = 	xtroff
  PREVIEWER = 	xtroff
  
! .SUFFIXES: .manX .man
  
+ .manX.man:
+ 	rm -f $*.man
+ 	sed -e 's?WIDTHDIR?$(WIDTHDIR)?g'\
+ 	    -e 's?FONTDIR?$(SUNTROFF_FONTS)?g' $*.manX > $*.man
+ 
+ ComplexProgramTarget_1(xtroff,$(XTSTUFF) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB),$(MATHLIB))
+ 
  $(XTSTUFF):
  		cd XtStuff; make $(MFLAGS)			
  
  xfonts:
  		-mkdir $(SUNTROFF_FONTS)
! 		cd fontstuff; make $(MFLAGS) CDEBUGFLAGS="$(CDEBUGFLAGS)" \
  			VFONTS=$(VFONTS) \
  			RSTFONTS=$(RSTFONTS) PREVIEWER=$(PREVIEWER) \
  			FC=$(FC) PERCENT=$(PERCENT) \
***************
*** 106,111 ****
--- 113,119 ----
  clean::
  		cd XtStuff ; make $(MFLAGS) clean
  		cd fontstuff ; make $(MFLAGS) clean
+ 		rm -f xtroff.man
  
  depend::
  		cd XtStuff; make $(MFLAGS) depend
Only in xtroff: RCS
Common subdirectories: /h/xwindows/X/contrib/clients/xtroff/XtStuff and xtroff/XtStuff
Common subdirectories: /h/xwindows/X/contrib/clients/xtroff/bitmaps and xtroff/bitmaps
Only in xtroff: dave
Common subdirectories: /h/xwindows/X/contrib/clients/xtroff/devsun and xtroff/devsun
Common subdirectories: /h/xwindows/X/contrib/clients/xtroff/fontstuff and xtroff/fontstuff
diff -r -c /h/xwindows/X/contrib/clients/xtroff/xwindows.c xtroff/xwindows.c
*** /h/xwindows/X/contrib/clients/xtroff/xwindows.c	Fri Sep 23 10:16:37 1988
--- xtroff/xwindows.c	Sat Nov 12 06:26:52 1988
***************
*** 19,25 ****
   *  X11.  - Mark Moraes.
   */
  #ifndef lint
! static char rcsid[]="$Header";
  #endif
  
  #include	<stdio.h>
--- 19,25 ----
   *  X11.  - Mark Moraes.
   */
  #ifndef lint
! static char rcsid[]="$Header: xwindows.c,v 1.1 88/11/12 06:26:27 moraes Exp $";
  #endif
  
  #include	<stdio.h>
***************
*** 175,180 ****
--- 175,181 ----
  static XColor bg = {0, 0, 0, 0};
  static XColor fg = {0, ~0, ~0, ~0};
  unsigned int depth;
+ Dimension xwidth, xheight;
  
  Display *dpy;
  Screen *scn;
***************
*** 207,214 ****
  static Arg query_args[] = {
  	{XtNbackground, (XtArgVal) &bgcolor},
  	{XtNforeground, (XtArgVal) &fgcolor},
! 	{XtNwidth, (XtArgVal) &ViewWidth},
! 	{XtNheight, (XtArgVal) &ViewHeight},
  };
  
  /* args for the canvas window - we fill in translations by hand */
--- 208,215 ----
  static Arg query_args[] = {
  	{XtNbackground, (XtArgVal) &bgcolor},
  	{XtNforeground, (XtArgVal) &fgcolor},
! 	{XtNwidth, (XtArgVal) &xwidth},
! 	{XtNheight, (XtArgVal) &xheight},
  };
  
  /* args for the canvas window - we fill in translations by hand */
***************
*** 237,247 ****
   *  XtNfromHoriz also changes to XtNfromVert.
   */
  static Arg scroll_args[] = {
! 	XtNlength, (XtArgVal) 850,
! 	XtNorientation, (XtArgVal) XtorientVertical,
! 	XtNfromHoriz, (XtArgVal) NULL,
! 	XtNscrollProc, (XtArgVal) scrollCallbacks,
! 	XtNthumbProc, (XtArgVal) thumbCallbacks,
  };
  
  static MenuItemsList menu_list[] = {
--- 238,250 ----
   *  XtNfromHoriz also changes to XtNfromVert.
   */
  static Arg scroll_args[] = {
! 	{XtNlength, (XtArgVal) 850},
! 	{XtNorientation, (XtArgVal) XtorientVertical},
! 	{XtNfromHoriz, (XtArgVal) NULL},
! 	{XtNtop, (XtArgVal) 0.0},
! 	{XtNshown, (XtArgVal) 0.0},
! 	{XtNscrollProc, (XtArgVal) scrollCallbacks},
! 	{XtNthumbProc, (XtArgVal) thumbCallbacks},
  };
  
  static MenuItemsList menu_list[] = {
***************
*** 349,358 ****
--- 352,367 ----
  	CanvasWidget = XtCreateManagedWidget("canvas", windowWidgetClass, 
  	 BaseFrame, canvas_args, XtNumber(canvas_args));
  	XtGetValues(CanvasWidget, query_args, XtNumber(query_args));
+ 	ViewWidth = xwidth;
+ 	ViewHeight = xheight;
  	if (Scrollbars) {
  		/* vertical scrollbar to the right of the canvas */
  		XtSetArg(scroll_args[0], XtNlength, ViewHeight);
  		XtSetArg(scroll_args[2], XtNfromHoriz, CanvasWidget);
+ 		XtSetArg(scroll_args[3], XtNtop, 
+ 		 (float) ((float) ViewTop / (float) PAGE_PIXEL_HEIGHT));
+ 		XtSetArg(scroll_args[4], XtNshown, 
+ 		 (float) ((float) ViewHeight / (float) PAGE_PIXEL_HEIGHT));
  		VertScroll = XtCreateManagedWidget("vscroll", 
  		 scrollbarWidgetClass, BaseFrame, 
  		 scroll_args, XtNumber(scroll_args));
***************
*** 360,365 ****
--- 369,378 ----
  		XtSetArg(scroll_args[0], XtNlength, ViewWidth);
  		XtSetArg(scroll_args[1], XtNorientation, XtorientHorizontal);
  		XtSetArg(scroll_args[2], XtNfromVert, CanvasWidget);
+ 		XtSetArg(scroll_args[3], XtNtop, 
+ 		 (float) ((float) ViewLeft / (float) PAGE_PIXEL_WIDTH));
+ 		XtSetArg(scroll_args[4], XtNshown, 
+ 		 (float) ((float) ViewWidth / (float) PAGE_PIXEL_WIDTH));
  		HorizScroll = XtCreateManagedWidget("hscroll", 
  		 scrollbarWidgetClass, BaseFrame, 
  		 scroll_args, XtNumber(scroll_args));
***************
*** 388,397 ****
  		minibuf_args[2].value = (XtArgVal) CanvasWidget;
  	InputWidget = XtCreateManagedWidget("minibuf", minibufWidgetClass,
  		BaseFrame, minibuf_args, XtNumber(minibuf_args));
- 	if (Scrollbars)
- 		SetScrollBar();
  	XtRealizeWidget(topLevel);
  	XFlush(dpy);
  	DrawingCanvas = XtWindow(CanvasWidget);
  	OuterFrame = XtWindow(topLevel);
  	InputWin = XtWindow(InputWidget);
--- 401,410 ----
  		minibuf_args[2].value = (XtArgVal) CanvasWidget;
  	InputWidget = XtCreateManagedWidget("minibuf", minibufWidgetClass,
  		BaseFrame, minibuf_args, XtNumber(minibuf_args));
  	XtRealizeWidget(topLevel);
  	XFlush(dpy);
+ 	if (Scrollbars)
+ 		SetScrollBar();
  	DrawingCanvas = XtWindow(CanvasWidget);
  	OuterFrame = XtWindow(topLevel);
  	InputWin = XtWindow(InputWidget);
***************
*** 768,778 ****
  }
  
  
! static void Thumbed(w, closure, top)
  Widget w;
  caddr_t closure;
! float top;
  {
  #ifdef WINDOWDEBUG
  	printf( "thumbed to %f%%\n", top );
  #endif
--- 781,792 ----
  }
  
  
! static void Thumbed(w, closure, percent)
  Widget w;
  caddr_t closure;
! caddr_t percent;
  {
+ 	float top = *((float *) percent);
  #ifdef WINDOWDEBUG
  	printf( "thumbed to %f%%\n", top );
  #endif
diff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/CheckItem.c xtroff/XtStuff/CheckItem.c
*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/CheckItem.c	Fri Jun 10 01:20:10 1988
--- xtroff/XtStuff/CheckItem.c	Fri Nov 11 23:53:27 1988
***************
*** 121,126 ****
--- 121,128 ----
      NULL,                                  /* callback_private	*/
      defaultTranslations,		   /* tm_table          */
      NULL,                                  /* query_geometry	*/
+     /* display_accelerator	*/	XtInheritDisplayAccelerator,
+     /* extension		*/	NULL
    },  /* CoreClass fields initialization */
    {
      0,                                     /* field not used    */
diff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/CheckItem.h xtroff/XtStuff/CheckItem.h
*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/CheckItem.h	Fri Jun 10 01:20:10 1988
--- xtroff/XtStuff/CheckItem.h	Fri Nov 11 23:44:49 1988
***************
*** 43,61 ****
   *
   ***********************************************************************/
  
- #ifndef _XtJustify_e
- #define _XtJustify_e
- 
- 
- 
- 
- typedef enum {
-     XtJustifyLeft,       /* justify text to left side of button   */
-     XtJustifyCenter,     /* justify text in center of button      */
-     XtJustifyRight       /* justify text to right side of button  */
- } XtJustify;
- #endif _XtJustify_e
- 
  #define XtNcallback		"callback"
  #define XtNhighlightThickness   "hightlightThickness"
  #define XtNtranslations		"translations"
--- 43,48 ----
diff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/Menu.c xtroff/XtStuff/Menu.c
*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/Menu.c	Fri Jun 10 01:20:11 1988
--- xtroff/XtStuff/Menu.c	Sat Nov 12 00:20:49 1988
***************
*** 37,47 ****
  
  #include	<X11/IntrinsicP.h>
  #include	<X11/StringDefs.h>
! #include	<X11/Misc.h>
  #include	"MenuP.h"
  #include	"MenuItem.h"
  #include	"CheckItem.h"
! #include        <X11/Label.h>
  #include	<ctype.h>
  
  /****************************************************************
--- 37,48 ----
  
  #include	<X11/IntrinsicP.h>
  #include	<X11/StringDefs.h>
! #include	<X11/XawMisc.h>
! #include	<X11/Xmu.h>
  #include	"MenuP.h"
  #include	"MenuItem.h"
  #include	"CheckItem.h"
! #include 	<X11/Label.h>
  #include	<ctype.h>
  
  /****************************************************************
***************
*** 56,64 ****
  	 XtOffset(MenuWidget, menu.x_margin), XtRString, "0"},
      {XtNyMargin, XtCVSpace, XtRInt, sizeof(int),
  	 XtOffset(MenuWidget, menu.y_margin), XtRString, "0"},
!     {XtNx, XtCPosition, XtRInt, sizeof(int),
           XtOffset(MenuWidget,core.x),XtRString, "800"},
!     {XtNy, XtCPosition, XtRInt, sizeof(int),
           XtOffset(MenuWidget,core.y),XtRString, "800"},
      {XtNborder,"MyBorder",XtRPixel,sizeof(Pixel),
           XtOffset(MenuWidget,core.border_pixel),XtRString, "Black"},
--- 57,65 ----
  	 XtOffset(MenuWidget, menu.x_margin), XtRString, "0"},
      {XtNyMargin, XtCVSpace, XtRInt, sizeof(int),
  	 XtOffset(MenuWidget, menu.y_margin), XtRString, "0"},
!     {XtNx, XtCPosition, XtRPosition, sizeof(Position),
           XtOffset(MenuWidget,core.x),XtRString, "800"},
!     {XtNy, XtCPosition, XtRPosition, sizeof(Position),
           XtOffset(MenuWidget,core.y),XtRString, "800"},
      {XtNborder,"MyBorder",XtRPixel,sizeof(Pixel),
           XtOffset(MenuWidget,core.border_pixel),XtRString, "Black"},
***************
*** 72,78 ****
           XtOffset(MenuWidget,menu.check_foreground_pixel),XtRString, "Black"},
      {XtNbackground, XtCBackground,XtRPixel, sizeof(Pixel),
           XtOffset(MenuWidget,core.background_pixel),XtRString, "White"},
!     {XtNborderWidth, XtCBorderWidth, XtRInt, sizeof(int),
           XtOffset(MenuWidget,core.border_width),XtRString, "2"},
      {XtNorientation, XtCOrientation, XtROrientation, sizeof(XtOrientation),
           XtOffset(MenuWidget,menu.orient),XtRString, "vertical"},
--- 73,79 ----
           XtOffset(MenuWidget,menu.check_foreground_pixel),XtRString, "Black"},
      {XtNbackground, XtCBackground,XtRPixel, sizeof(Pixel),
           XtOffset(MenuWidget,core.background_pixel),XtRString, "White"},
!     {XtNborderWidth, XtCBorderWidth, XtRDimension, sizeof(Dimension),
           XtOffset(MenuWidget,core.border_width),XtRString, "2"},
      {XtNorientation, XtCOrientation, XtROrientation, sizeof(XtOrientation),
           XtOffset(MenuWidget,menu.orient),XtRString, "vertical"},
***************
*** 126,131 ****
--- 127,134 ----
      /* callback_private   */    NULL,
      /* tm_table           */	NULL,
      /* query_geometry     */    NULL,
+     /* display_accelerator	*/	XtInheritDisplayAccelerator,
+     /* extension		*/	NULL
    },{
  /* composite_class fields */
      /* geometry_manager   */    GeometryManager,
***************
*** 132,139 ****
      /* change_managed     */    ChangeManaged,
      /* insert_child	  */	NULL,	/* Inherit from superclass */
      /* delete_child	  */	NULL,	/* Inherit from superclass */
-     /* move_focus_to_next */    NULL,
-     /* move_focus_to_prev */    NULL
    },{
      /* mumble		  */	0	/* Make C compiler happy   */
    }
--- 135,140 ----
diff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/Menu.h xtroff/XtStuff/Menu.h
*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/Menu.h	Fri Jun 10 01:20:11 1988
--- xtroff/XtStuff/Menu.h	Fri Nov 11 23:44:49 1988
***************
*** 58,68 ****
  #define XtitemCheckable		0x02	/* 0=uncheckable, 1=checkable	*/
  #define XtitemIsChecked		0x01	/* 0=unchecked, 1=checked	*/
  
- #ifndef _XtOrientation_e
- #define _XtOrientation_e
- typedef enum {XtorientHorizontal, XtorientVertical} XtOrientation;
- #endif _XtOrientation_e
- 
  /* Class record constants */
  
  extern WidgetClass menuWidgetClass;
--- 58,63 ----
diff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/MenuItem.c xtroff/XtStuff/MenuItem.c
*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/MenuItem.c	Fri Jul  8 05:42:16 1988
--- xtroff/XtStuff/MenuItem.c	Fri Nov 11 23:53:27 1988
***************
*** 116,121 ****
--- 116,123 ----
      NULL,                                  /* callback_private	*/
      defaultTranslations,		   /* tm_table          */
      NULL,                                  /* query_geometry	*/
+     /* display_accelerator	*/	XtInheritDisplayAccelerator,
+     /* extension		*/	NULL
    },  /* CoreClass fields initialization */
    {
      0,                                     /* field not used    */
diff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/MenuItem.h xtroff/XtStuff/MenuItem.h
*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/MenuItem.h	Fri Jun 10 01:20:11 1988
--- xtroff/XtStuff/MenuItem.h	Fri Nov 11 23:42:35 1988
***************
*** 43,61 ****
   *
   ***********************************************************************/
  
- #ifndef _XtJustify_e
- #define _XtJustify_e
- 
- 
- 
- 
- typedef enum {
-     XtJustifyLeft,       /* justify text to left side of button   */
-     XtJustifyCenter,     /* justify text in center of button      */
-     XtJustifyRight       /* justify text to right side of button  */
- } XtJustify;
- #endif _XtJustify_e
- 
  #define XtNcallback		"callback"
  #define XtNhighlightThickness   "hightlightThickness"
  #define XtNtranslations		"translations"
--- 43,48 ----
diff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/Minibuf.c xtroff/XtStuff/Minibuf.c
*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/Minibuf.c	Wed Aug 31 18:23:45 1988
--- xtroff/XtStuff/Minibuf.c	Sat Nov 12 04:35:06 1988
***************
*** 79,85 ****
  #define BUF_BLOCK 		128
  
  #define MIN_COLS 		5
! #define DEFAULTFONT		"Fixed"
  #define ABORT_MSG		"[Aborted]"
  #define DELAY			300000		/*
  									 *  Microseconds of delay for cursor
--- 79,85 ----
  #define BUF_BLOCK 		128
  
  #define MIN_COLS 		5
! #define DEFAULTFONT		"8x13"
  #define ABORT_MSG		"[Aborted]"
  #define DELAY			300000		/*
  									 *  Microseconds of delay for cursor
***************
*** 170,176 ****
  	{XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
  	 offset(minibuf.foreground), XtRString, "Black"},
  	{XtNfont,  XtCFont, XtRFontStruct, sizeof(XFontStruct *),
! 	 offset(minibuf.finfo),XtRString, "Fixed"},
  	{XtNcursor, XtCCursor, XtRCursor, sizeof(Cursor),
  	 offset(minibuf.cursor), XtRString, "xterm"},
  	{XtNfinishedCallback, XtCCallback, XtRCallback, sizeof(XtProc),
--- 170,176 ----
  	{XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
  	 offset(minibuf.foreground), XtRString, "Black"},
  	{XtNfont,  XtCFont, XtRFontStruct, sizeof(XFontStruct *),
! 	 offset(minibuf.finfo),XtRString, DEFAULTFONT},
  	{XtNcursor, XtCCursor, XtRCursor, sizeof(Cursor),
  	 offset(minibuf.cursor), XtRString, "xterm"},
  	{XtNfinishedCallback, XtCCallback, XtRCallback, sizeof(XtProc),
***************
*** 220,225 ****
--- 220,227 ----
  		NULL,							/* callback_private	  	*/
  		defaultTranslations,			/* tm_table		  		*/
  		NULL,							/* query_geometry	  	*/
+ 		XtInheritDisplayAccelerator,	/* display_accelerator	*/
+ 		NULL							/* extension		*/
  	},  /* CoreClass fields initialization */
  	{
  		0,								/* field not used    	*/
***************
*** 257,264 ****
  		mcore(height) = fontheight(mbuf(finfo));
  
  	if (mbuf(finfo)->per_char != NULL) {
  		/* default font since we must have a fixed width font */
! 		XtConvert(new, XtRString, (XrmValuePtr) DEFAULTFONT,
  		 XtRFontStruct, (XrmValuePtr) mbuf(finfo));
  #ifdef DEBUG
  		fprintf(stderr, "Need fixed font - falling back on default \"%s\"\n",
--- 259,269 ----
  		mcore(height) = fontheight(mbuf(finfo));
  
  	if (mbuf(finfo)->per_char != NULL) {
+ 		XrmValue value;
+ 		value.size = sizeof(DEFAULTFONT);
+ 		value.addr = DEFAULTFONT;
  		/* default font since we must have a fixed width font */
! 		XtConvert(new, XtRString, &value,
  		 XtRFontStruct, (XrmValuePtr) mbuf(finfo));
  #ifdef DEBUG
  		fprintf(stderr, "Need fixed font - falling back on default \"%s\"\n",
diff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/Window.c xtroff/XtStuff/Window.c
*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/Window.c	Thu Aug 18 23:55:31 1988
--- xtroff/XtStuff/Window.c	Sat Nov 12 01:10:51 1988
***************
*** 79,84 ****
--- 79,87 ----
      /* version            */    XtVersion,
      /* callback_private   */    NULL,
      /* tm_table           */    NULL,
+     /* query_geometry     */    NULL,
+     /* display_accelerator*/	XtInheritDisplayAccelerator,
+     /* extension		  */	NULL
    }
  };
  
diff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/Window.h xtroff/XtStuff/Window.h
*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/Window.h	Thu Aug 18 23:55:44 1988
--- xtroff/XtStuff/Window.h	Sat Nov 12 00:02:01 1988
***************
*** 11,17 ****
   *
   ***********************************************************************/
  
- #define XtNpixmap    "Pixmap"
  #define XtCpixmap    "Pixmap"
  
  /* Class record constants */
--- 11,16 ----
diff -r -c /h/xwindows/X/contrib/clients/xtroff/fontstuff/MakeImFonts xtroff/fontstuff/MakeImFonts
*** /h/xwindows/X/contrib/clients/xtroff/fontstuff/MakeImFonts	Thu Sep  1 00:06:10 1988
--- xtroff/fontstuff/MakeImFonts	Sat Nov 12 02:34:18 1988
***************
*** 23,29 ****
  if test x$XWIN != x ; then
  	if test $XWIN != suntroff ; then
  		XWIN=x
! 		FC=${5-fc}
  	else
  		XWIN=
  		FC=
--- 23,29 ----
  if test x$XWIN != x ; then
  	if test $XWIN != suntroff ; then
  		XWIN=x
! 		FC=${5-bdftosnf}
  	else
  		XWIN=
  		FC=
***************
*** 62,68 ****
  		NewSize=`expr $Size \* 100 / $PERCENT`
  		if test x$XWIN != x ; then
  			fname=`echo $Font | tr A-Z a-z`
! 			fname=$DEVICE.$fname.$NewSize.snf
  		else
  			fname=$Font.$NewSize
  		fi
--- 62,69 ----
  		NewSize=`expr $Size \* 100 / $PERCENT`
  		if test x$XWIN != x ; then
  			fname=`echo $Font | tr A-Z a-z`
! 			fontname=$DEVICE.$fname.$NewSize
! 			fname=$fontname.snf
  		else
  			fname=$Font.$NewSize
  		fi
***************
*** 76,82 ****
  					$SUNTROFF_FONTS/$fname
  			else
  				$BIN_DIR/ch2vft $TEMP > $TEMP2
! 				$BIN_DIR/vf2bdf $TEMP2 $NewSize |
  				$FC > $SUNTROFF_FONTS/$fname
  			fi
  
--- 77,84 ----
  					$SUNTROFF_FONTS/$fname
  			else
  				$BIN_DIR/ch2vft $TEMP > $TEMP2
! 				$BIN_DIR/vf2bdf $TEMP2 $NewSize | \
! 				sed 's?^FONT .*$?FONT '$fontname'?' | \
  				$FC > $SUNTROFF_FONTS/$fname
  			fi
  
***************
*** 103,118 ****
  		else
  			extension=
  		fi
! 		f1=$SUNTROFF_FONTS/$Font.`expr $Size - 1`$extension
! 		f2=$SUNTROFF_FONTS/$Font.`expr $Size`$extension
! 		f3=$SUNTROFF_FONTS/$Font.`expr $Size + 1`$extension
  
  		if [ -r $f1 -o -r $f2 -o -r $f3 ]
  		then
  			true
  		else
  			echo scaling and converting $RSTFONTS/$i to \
! 				$SUNTROFF_FONTS/$DEVICE.$Font.$Size$extension
  			$BIN_DIR/rst2ch $RSTFONTS/$i > $TEMP
  			$BIN_DIR/scalech -s$PERCENT  $TEMP > $TEMP2
  			if test x$XWIN = x ; then
--- 105,129 ----
  		else
  			extension=
  		fi
! 		if [ x$XWIN = x ]
! 		then
! 			f1=$SUNTROFF_FONTS/$Font.`expr $Size - 1`$extension
! 			f2=$SUNTROFF_FONTS/$Font.`expr $Size`$extension
! 			f3=$SUNTROFF_FONTS/$Font.`expr $Size + 1`$extension
! 		else
! 			f1=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size - 1`$extension
! 			f2=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size`$extension
! 			f3=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size + 1`$extension
! 		fi
  
  		if [ -r $f1 -o -r $f2 -o -r $f3 ]
  		then
  			true
  		else
+ 			fontname=$DEVICE.$Font.$Size
+ 			fname=$fontname$extension
  			echo scaling and converting $RSTFONTS/$i to \
! 				$SUNTROFF_FONTS/$fname
  			$BIN_DIR/rst2ch $RSTFONTS/$i > $TEMP
  			$BIN_DIR/scalech -s$PERCENT  $TEMP > $TEMP2
  			if test x$XWIN = x ; then
***************
*** 120,127 ****
  			else
  				$BIN_DIR/ch2vft $TEMP2 > $TEMP
  				$BIN_DIR/vf2bdf $TEMP $Size |
! 				$FC > $SUNTROFF_FONTS/$DEVICE.$Font.$Size$extension
  			fi
  		fi
  	fi
  done
--- 131,142 ----
  			else
  				$BIN_DIR/ch2vft $TEMP2 > $TEMP
  				$BIN_DIR/vf2bdf $TEMP $Size |
! 				sed 's?^FONT .*$?FONT '$fontname'?' | \
! 				$FC > $SUNTROFF_FONTS/$fname
  			fi
  		fi
  	fi
  done
+ if [ x$XWIN != x ]; then
+ 	mkfontdir $SUNTROFF_FONTS
+ fi
diff -r -c /h/xwindows/X/contrib/clients/xtroff/fontstuff/MakeSunFonts xtroff/fontstuff/MakeSunFonts
*** /h/xwindows/X/contrib/clients/xtroff/fontstuff/MakeSunFonts	Thu Sep  1 01:42:57 1988
--- xtroff/fontstuff/MakeSunFonts	Sat Nov 12 02:34:17 1988
***************
*** 22,28 ****
  if test x$XWIN != x ; then
  	if test $XWIN != suntroff ; then
  		XWIN=x
! 		FC=${5-fc}
  	else
  		XWIN=
  		FC=
--- 22,28 ----
  if test x$XWIN != x ; then
  	if test $XWIN != suntroff ; then
  		XWIN=x
! 		FC=${5-bdftosnf}
  	else
  		XWIN=
  		FC=
***************
*** 69,75 ****
  		NewSize=`expr $Size \* 100 / $PERCENT`
  		if test x$XWIN != x ; then
  			fname=`echo $Font | tr A-Z a-z`
! 			fname=$DEVICE.$fname.$NewSize.snf
  		else
  			fname=$Font.$NewSize
  		fi
--- 69,76 ----
  		NewSize=`expr $Size \* 100 / $PERCENT`
  		if test x$XWIN != x ; then
  			fname=`echo $Font | tr A-Z a-z`
! 			fontname=$DEVICE.$fname.$NewSize
! 			fname=$fontname.snf
  		else
  			fname=$Font.$NewSize
  		fi
***************
*** 82,87 ****
--- 83,89 ----
  					      $SUNTROFF_FONTS/$fname
  			else
  				$BIN_DIR/vf2bdf $VFONTS/$i $NewSize | \
+ 				sed 's?^FONT .*$?FONT '$fontname'?' | \
  				$FC > $SUNTROFF_FONTS/$fname
  			fi
  		fi
***************
*** 107,122 ****
  		else
  			extension=
  		fi
! 		f1=$SUNTROFF_FONTS/$Font.`expr $Size - 1`$extension
! 		f2=$SUNTROFF_FONTS/$Font.`expr $Size`$extension
! 		f3=$SUNTROFF_FONTS/$Font.`expr $Size + 1`$extension
  
  		if [ -r $f1 -o -r $f2 -o -r $f3 ]
  		then
  			true
  		else
  			echo scaling and converting $VFONTS/$i to \
! 				$SUNTROFF_FONTS/$DEVICE.$Font.$Size$extension
  			$BIN_DIR/vft2ch $VFONTS/$i > $TEMP
  			$BIN_DIR/scalech -s$PERCENT  $TEMP > $TEMP2
  			if test x$XWIN = x ; then
--- 109,133 ----
  		else
  			extension=
  		fi
! 		if [ x$XWIN = x ]
! 		then
! 			f1=$SUNTROFF_FONTS/$Font.`expr $Size - 1`$extension
! 			f2=$SUNTROFF_FONTS/$Font.`expr $Size`$extension
! 			f3=$SUNTROFF_FONTS/$Font.`expr $Size + 1`$extension
! 		else
! 			f1=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size - 1`$extension
! 			f2=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size`$extension
! 			f3=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size + 1`$extension
! 		fi
  
  		if [ -r $f1 -o -r $f2 -o -r $f3 ]
  		then
  			true
  		else
+ 			fontname=$DEVICE.$Font.$Size
+ 			fname=$fontname$extension
  			echo scaling and converting $VFONTS/$i to \
! 				$SUNTROFF_FONTS/$fname
  			$BIN_DIR/vft2ch $VFONTS/$i > $TEMP
  			$BIN_DIR/scalech -s$PERCENT  $TEMP > $TEMP2
  			if test x$XWIN = x ; then
***************
*** 124,131 ****
  			else
  				$BIN_DIR/ch2vft $TEMP2 > $TEMP
  				$BIN_DIR/vf2bdf $TEMP $Size |
! 				$FC > $SUNTROFF_FONTS/$DEVICE.$Font.$Size$extension
  			fi
  		fi
  	fi
  done
--- 135,146 ----
  			else
  				$BIN_DIR/ch2vft $TEMP2 > $TEMP
  				$BIN_DIR/vf2bdf $TEMP $Size |
! 				sed 's?^FONT .*$?FONT '$fontname'?' | \
! 				$FC > $SUNTROFF_FONTS/$fname
  			fi
  		fi
  	fi
  done
+ if [ x$XWIN != x ]; then
+ 	mkfontdir $SUNTROFF_FONTS
+ fi
diff -r -c /h/xwindows/X/contrib/clients/xtroff/fontstuff/Makefile xtroff/fontstuff/Makefile
*** /h/xwindows/X/contrib/clients/xtroff/fontstuff/Makefile	Thu Sep  1 00:13:25 1988
--- xtroff/fontstuff/Makefile	Sat Nov 12 01:37:44 1988
***************
*** 1,5 ****
  #	Not standalone - it gets a lot of variables from the invocation.
! #	VFONTS, RSTFONTS, SUNTROFF_FONTS, PERCENT, PREVIEWER, FC
  
  all: install
  
--- 1,7 ----
  #	Not standalone - it gets a lot of variables from the invocation.
! #	VFONTS, RSTFONTS, SUNTROFF_FONTS, PERCENT, PREVIEWER, FC, CDEBUGFLAGS
! 
! CFLAGS = $(CDEBUGFLAGS)
  
  all: install
  
diff -r -c /h/xwindows/X/contrib/clients/xtroff/fontstuff/vf2bdf.c xtroff/fontstuff/vf2bdf.c
*** /h/xwindows/X/contrib/clients/xtroff/fontstuff/vf2bdf.c	Fri Jun 10 02:13:08 1988
--- xtroff/fontstuff/vf2bdf.c	Sat Nov 12 02:04:12 1988
***************
*** 127,133 ****
  		{
  			for (k = (pd->left + pd->right + 7) / 8; --k >= 0; )
  				printf("%02x", *p++);
! 			printf(" \n");
  		}
  		printf("ENDCHAR\n");
  	}
--- 127,133 ----
  		{
  			for (k = (pd->left + pd->right + 7) / 8; --k >= 0; )
  				printf("%02x", *p++);
! 			printf("\n");
  		}
  		printf("ENDCHAR\n");
  	}
diff -r -c /h/xwindows/X/contrib/clients/xtroff/xtroff.man xtroff/xtroff.manX
*** /h/xwindows/X/contrib/clients/xtroff/xtroff.man	Thu Jul 14 18:59:28 1988
--- xtroff/xtroff.manX	Sat Nov 12 03:03:22 1988
***************
*** 234,244 ****
  "-xrm".
  Some of the options are meaningless for \fIxtroff\fP. 
  .SH "FILES"
! .na
! .ta \w'/usr/local/lib/xtroff/*   'u
! /usr/local/lib/troff/*	- troff width tables
! /usr/local/lib/xtroff/*	- bitmap fonts for xtroff
! .ad
  .SH "SEE ALSO"
  .LP
  .I Using and Specifiying X Resources
--- 234,242 ----
  "-xrm".
  Some of the options are meaningless for \fIxtroff\fP. 
  .SH "FILES"
! WIDTHDIR/*	- troff width tables
! .br
! FONTDIR/*	- bitmap fonts for xtroff
  .SH "SEE ALSO"
  .LP
  .I Using and Specifiying X Resources
WhAt_A_mArOoN
echo 'Now run ximake in this directory, and XtStuff to generate the Makefiles'
echo 'And you are ready to go...'
exit
