mikew@wyse.wyse.com (Mike Wexler) (11/15/88)
Submitted-by: Mark Moraes <moraes%csri.toronto.edu@RELAY.CS.NET> Posting-number: Volume 2, Issue 14 Archive-name: xtroff/patch3 [I couldn't test this out since I don't have ditroff on the machine I use. Good luck!] The enclosed shar contains the changes needed to get xtroff (the ditroff previewer in contrib/clients in the X.V11R3 distribution) working under X.V11R3. (It was developed under R2, and should work with those libraries and includes). #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # If this archive is complete, you will see the following message at the end: # "End of shell archive." # # Contents: # CHANGES.R3 update.sh ximakedo.sh # # Wrapped by xwindows@ai.utoronto.ca on Sat Nov 12 08:47:05 1988 # PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f CHANGES.R3 -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"CHANGES.R3\" else echo shar: Extracting \"CHANGES.R3\" \(6923 characters\) sed "s/^X//" >CHANGES.R3 <<'END_OF_CHANGES.R3' XThe shell scripts update.sh and ximakedo.sh will update xtroff (the ditroff Xpreviewer in contrib/clients in the R3 distribution) so that it sort of works Xunder R3. X XTo update, cd to wherever you have xtroff, and run update.sh. It cleans up a Xfew unnecessary files, and applies a set of patches - you need to have the XLarry Wall's patch program installed someplace. (See the util/patch Xdirectory in the core distribution) X XThen edit the ximake script to change the TOPDIR define to wherever the Xtoplevel of the core X11R3 distribution is - for us, that's X/h/xwindows/X.V11R3/core.src. Then run that script when you're in the Xxtroff directory - it generates new Makefiles. (If you are familiar with Xximake, then you can probably run it by hand) X XYou can then type 'make'. Should work at least on Suns running SunOS3.5. X XCaveats: X 1. You must install the fonts before you try this out. You need to X know where ditroff stores the device descriptions and where the X ditroff makedev program is. X X 2. The menus are still broken - they look weird. The key commands X work, so I'm not even trying to fix the menus for a while. If someone X who knows more about those menus can fix them, use different menus, X (xterm, contrib/widgets/MenuBox, or the HP/Sony widgets, please do X so and let the rest of us know. Thanks. X X 3. The Minibuffer works, but you need to move the mouse down into it X to type - I might sort that out once I figure out how grabs work X now. Again, I'd welcome explanations/corrections. X X***** 3. I've had at least one server core dump just after running xtroff. X It could be doing something that R3 Xsun doesn't like, or that X triggers off a bug in R3 Xsun. X XNote that I do not use the nifty new Adobe/DEC/BitStream fonts, but generate Xand use scaled vfonts instead - the changes to some basic assumptions in Xxtroff's font code would take a little more work. I'd welcome a scheme for Xsuch font mapping. X XThanks to Dave Cahlander <dac%ni.CRAY.COM@uc.msc.umn.edu> for pointing out a Xserious bug in Minibuf and a silly mistake in MakeSunFonts. I enclose a Xcomment from him about better fonts. X XEnjoy. X Mark Moraes. X X--------------------------------------------------------------------------- XDate: Mon, 10 Oct 88 00:29:34 EDT XFrom: Dave Cahlander <dac%ni.CRAY.COM@uc.msc.umn.edu> XMessage-Id: <8810100429.AA06568@quixote.cray.com> XTo: moraes%csri.toronto.edu@relay.cs.net XSubject: Re: xtroff on X11R3 XCc: jlf@ni.cray.com, keith@ni.cray.com XStatus: OR X XOn another subject, I really don't like what the scale program does Xto fonts. In particular, the devsun.r.10 font derived from /usr/lib/vfonts Xhas some torn up characters (M, J, etc.). I have found two sources Xof fonts on the Sun system: X X 1. /usr/NeWS/fonts on our system has the following fonts: XBtn.ff CrrBO32.fb HlvBO32.fb Smb.ff TmsI12.fb XBtn10.fb CrrO.ff HlvM.ff Smb.fm TmsI14.fb XBtn12.fb CrrO.fm HlvM32.fb Smb10.fb TmsI18.fb XBtn18.fb CrrO10.fb HlvO.ff Smb12.fb TmsI24.fb XBtn30.fb CrrO12.fb HlvO.fm Smb14.fb TmsI26.fb XBtn35.fb CrrO14.fb HlvO10.fb Smb18.fb TmsI29.fb XBtn9.fb CrrO16.fb HlvO12.fb Smb24.fb TmsI32.fb XCrl.ff CrrO18.fb HlvO14.fb Smb32.fb TmsI33.fb XCrl11.fb CrrO24.fb HlvO18.fb SmbM.ff TmsI38.fb XCrr.ff CrrO32.fb HlvO24.fb SmbM32.fb TmsI43.fb XCrr.fm Cursor.ff HlvO32.fb TmsB.ff TmsI47.fb XCrr1.fb Cursor12.fb HrshCyr.ps TmsB.fm TmsI53.fb XCrr10.fb Dijkstra.ps HrshGoth.ps TmsB10.fb TmsI57.fb XCrr12.fb GFont.ff HrshGrk.ps TmsB12.fb TmsI67.fb XCrr14.fb GFont12.fb HrshGrkN.ps TmsB14.fb TmsI86.fb XCrr16.fb Hlv.ff HrshGrkp.ps TmsB18.fb TmsR.ff XCrr18.fb Hlv.fm HrshI.ps TmsB24.fb TmsR.fm XCrr24.fb Hlv10.fb HrshIN.ps TmsB25.fb TmsR10.fb XCrr32.fb Hlv12.fb HrshIW.ps TmsB27.fb TmsR12.fb XCrr6.fb Hlv14.fb HrshRom.ps TmsB30.fb TmsR14.fb XCrr7.fb Hlv18.fb HrshRomN.ps TmsB32.fb TmsR16.fb XCrr8.fb Hlv24.fb HrshRomW.ps TmsB34.fb TmsR18.fb XCrr9.fb Hlv32.fb HrshRomd.ps TmsB39.fb TmsR19.fb XCrrB.ff Hlv7.fb HrshRomp.ps TmsB44.fb TmsR20.fb XCrrB.fm Hlv9.fb HrshScr.ps TmsB49.fb TmsR23.fb XCrrB10.fb HlvB.ff HrshScrN.ps TmsB54.fb TmsR24.fb XCrrB12.fb HlvB.fm Icon.ff TmsB59.fb TmsR26.fb XCrrB14.fb HlvB10.fb Icon12.fb TmsB69.fb TmsR28.fb XCrrB16.fb HlvB12.fb Icon12.vft TmsB89.fb TmsR31.fb XCrrB18.fb HlvB14.fb Kanji.ff TmsBI.ff TmsR32.fb XCrrB24.fb HlvB18.fb Kanji16.fb TmsBI.fm TmsR36.fb XCrrB32.fb HlvB24.fb Kanji24.fb TmsBI10.fb TmsR41.fb XCrrBO.ff HlvB32.fb Scn.ff TmsBI12.fb TmsR46.fb XCrrBO.fm HlvBO.ff Scn11.fb TmsBI14.fb TmsR51.fb XCrrBO10.fb HlvBO.fm Scn13.fb TmsBI18.fb TmsR56.fb XCrrBO12.fb HlvBO10.fb Scn15.fb TmsBI24.fb TmsR62.fb XCrrBO14.fb HlvBO12.fb Scn7.fb TmsBI32.fb TmsR72.fb XCrrBO16.fb HlvBO14.fb ScnB.ff TmsI.ff TmsR9.fb XCrrBO18.fb HlvBO18.fb ScnB13.fb TmsI.fm TmsR92.fb XCrrBO24.fb HlvBO24.fb ScnB15.fb TmsI10.fb X There is a program called "dumpfont" that will change these from X NeWS format to: X 1. Adobe (version 1.7) X 2. vfont X 3. NeWS X As you can guess, the old Adobe format is of no use since "fc" X (now called "bdftosnf") can not read it. I have passed the X fonts through: X dumpfont -v X vf2bdf X bdftosnf (fc) X and find that what NeWS calls 14 point font, you call 10 point X font. X X 2. contrib/andrew/overhead/fonts XMakefile helvetica16b.fdb times10.fdb XMakefile.orig helvetica16bi.fdb times10b.fdb Xcourier10bf.fdb helvetica16i.fdb times10bi.fdb Xcourier10bif.fdb helvetica22.fdb times10i.fdb Xcourier10f.fdb helvetica22b.fdb times12.fdb Xcourier10if.fdb helvetica22bi.fdb times12b.fdb Xcourier12bf.fdb helvetica22i.fdb times12bi.fdb Xcourier12f.fdb helvetica8.fdb times12i.fdb Xcourier8bf.fdb helvetica8b.fdb times16.fdb Xcourier8bif.fdb helvetica8bi.fdb times16b.fdb Xcourier8f.fdb helvetica8i.fdb times16bi.fdb Xcourier8if.fdb symbol10.fdb times16i.fdb Xhelvetica10.fdb symbol12.fdb times22.fdb Xhelvetica10b.fdb symbol16.fdb times22b.fdb Xhelvetica10bi.fdb symbol22.fdb times22bi.fdb Xhelvetica10i.fdb symbol8.fdb times22i.fdb Xhelvetica12.fdb symbola10.fdb times8.fdb Xhelvetica12b.fdb symbola12.fdb times8b.fdb Xhelvetica12bi.fdb symbola16.fdb times8bi.fdb Xhelvetica12i.fdb symbola22.fdb times8i.fdb Xhelvetica16.fdb symbola8.fdb X X The andrew 10 point font is the same as the NeWS 12 point X font. These can be processed by: X fdbtobdf X bdftosnf X XI have made a Makefile to convert the NeWS fonts to the names Xthat are acceptable to xtroff: X TmsR10.fb -> times.r.10.snf Xand will do the same with the "andrew" fonts. This gives a much Xbetter quality character. X XThe problem that I have is that xtroff "knows" about the characters Xin the 01-0x1f range. The NeWS fonts have all special characters Xin the 0x80 and up range. They go beyound 0xff, and dumpfont Xgets rid of the characters above 0xff when translating to a vfont. X XThe andrew fonts do not have the special characters. X XIt may be that some hand editing of the bdf files is required. X XWell, I'm sorry that this note has gone on for so long. I hope Xthat some of the information is useful to you. X XThanks for your help, XDavid Cahlander X END_OF_CHANGES.R3 if test 6923 -ne `wc -c <CHANGES.R3`; then echo shar: \"CHANGES.R3\" unpacked with wrong size! fi # end of overwriting check fi if test -f update.sh -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"update.sh\" else echo shar: Extracting \"update.sh\" \(27954 characters\) sed "s/^X//" >update.sh <<'END_OF_update.sh' X#! /bin/sh X# Removing some junk files, and renaming the manual page Xif test -d xtroff ; then X cd xtroff Xfi Xif test -f suntroff.c -a -f xtroff.man ; then X thisdir=`pwd` Xelse X echo 'Please cd to contrib/clients/xtroff before running this script' X exit 1 Xfi Xrm -f Makefile.old Window.c Window.h WindowP.h make.out Xmv xtroff.man xtroff.manX Xcd XtStuff Xrm -f make.out Xcd $thisdir X# Ok - this is the real thing. Xpatch -p1 << \WhAt_A_mArOoN Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/patchlevel.h xtroff/patchlevel.h X*** /h/xwindows/X/contrib/clients/xtroff/patchlevel.h Mon Sep 26 09:44:48 1988 X--- xtroff/patchlevel.h Sat Nov 12 06:34:11 1988 X*************** X*** 1,2 **** X! #define PATCHLEVEL 2 X X--- 1,2 ---- X! #define PATCHLEVEL 3 X XCommon subdirectories: /h/xwindows/X/contrib/clients/xtroff/Fixes and xtroff/Fixes Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/Imakefile xtroff/Imakefile X*** /h/xwindows/X/contrib/clients/xtroff/Imakefile Thu Sep 1 01:57:40 1988 X--- xtroff/Imakefile Sat Nov 12 06:27:36 1988 X*************** X*** 33,39 **** X RSTFONTS=/usr/uturing/ron/rst X # Xfonts go here - wish the X11 server could read vfonts like X # the X10 server used to. X! SUNTROFF_FONTS=/local/share/X11/fonts X #DEVICE=imp #imagen X DEVICE=sun #versatec - other printers like lw. X WIDTHDIR=/local/share/troff X--- 33,39 ---- X RSTFONTS=/usr/uturing/ron/rst X # Xfonts go here - wish the X11 server could read vfonts like X # the X10 server used to. X! SUNTROFF_FONTS=/local/share/X11/fonts/xtroff X #DEVICE=imp #imagen X DEVICE=sun #versatec - other printers like lw. X WIDTHDIR=/local/share/troff X*************** X*** 65,76 **** X # These should be defined in an Imake.tmpl - except that the X # normal Imake.tmpl insists on these being compiled in the X # X directory tree. X! XAWLIB=$(USRLIBDIR)/libXaw.a X! XTOOLLIB=$(USRLIBDIR)/libXt.a X! XLIB=$(USRLIBDIR)/libX11.a X MATHLIB=-lm X X! FC = fc X XTSTUFF = XtStuff/libXtStuff.a X OBJS1 = xwindows.o suntroff.o parse.o font.o draw.o \ X fixpoint.o curves.o X--- 65,76 ---- X # These should be defined in an Imake.tmpl - except that the X # normal Imake.tmpl insists on these being compiled in the X # X directory tree. X! #XAWLIB=$(USRLIBDIR)/libXaw.a X! #XTOOLLIB=$(USRLIBDIR)/libXt.a X! #XLIB=$(USRLIBDIR)/libX11.a X MATHLIB=-lm X X! FC = bdftosnf X XTSTUFF = XtStuff/libXtStuff.a X OBJS1 = xwindows.o suntroff.o parse.o font.o draw.o \ X fixpoint.o curves.o X*************** X*** 79,92 **** X PROGRAMS = xtroff X PREVIEWER = xtroff X X! ComplexProgramTarget_1(xtroff,$(XTSTUFF) $(XAWLIB) $(XTOOLLIB) $(XLIB),$(MATHLIB)) X X $(XTSTUFF): X cd XtStuff; make $(MFLAGS) X X xfonts: X -mkdir $(SUNTROFF_FONTS) X! cd fontstuff; make $(MFLAGS) CFLAGS="$(CFLAGS)" \ X VFONTS=$(VFONTS) \ X RSTFONTS=$(RSTFONTS) PREVIEWER=$(PREVIEWER) \ X FC=$(FC) PERCENT=$(PERCENT) \ X--- 79,99 ---- X PROGRAMS = xtroff X PREVIEWER = xtroff X X! .SUFFIXES: .manX .man X X+ .manX.man: X+ rm -f $*.man X+ sed -e 's?WIDTHDIR?$(WIDTHDIR)?g'\ X+ -e 's?FONTDIR?$(SUNTROFF_FONTS)?g' $*.manX > $*.man X+ X+ ComplexProgramTarget_1(xtroff,$(XTSTUFF) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB),$(MATHLIB)) X+ X $(XTSTUFF): X cd XtStuff; make $(MFLAGS) X X xfonts: X -mkdir $(SUNTROFF_FONTS) X! cd fontstuff; make $(MFLAGS) CDEBUGFLAGS="$(CDEBUGFLAGS)" \ X VFONTS=$(VFONTS) \ X RSTFONTS=$(RSTFONTS) PREVIEWER=$(PREVIEWER) \ X FC=$(FC) PERCENT=$(PERCENT) \ X*************** X*** 106,111 **** X--- 113,119 ---- X clean:: X cd XtStuff ; make $(MFLAGS) clean X cd fontstuff ; make $(MFLAGS) clean X+ rm -f xtroff.man X X depend:: X cd XtStuff; make $(MFLAGS) depend XOnly in xtroff: RCS XCommon subdirectories: /h/xwindows/X/contrib/clients/xtroff/XtStuff and xtroff/XtStuff XCommon subdirectories: /h/xwindows/X/contrib/clients/xtroff/bitmaps and xtroff/bitmaps XOnly in xtroff: dave XCommon subdirectories: /h/xwindows/X/contrib/clients/xtroff/devsun and xtroff/devsun XCommon subdirectories: /h/xwindows/X/contrib/clients/xtroff/fontstuff and xtroff/fontstuff Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/xwindows.c xtroff/xwindows.c X*** /h/xwindows/X/contrib/clients/xtroff/xwindows.c Fri Sep 23 10:16:37 1988 X--- xtroff/xwindows.c Sat Nov 12 06:26:52 1988 X*************** X*** 19,25 **** X * X11. - Mark Moraes. X */ X #ifndef lint X! static char rcsid[]="$Header"; X #endif X X #include <stdio.h> X--- 19,25 ---- X * X11. - Mark Moraes. X */ X #ifndef lint X! static char rcsid[]="$Header: xwindows.c,v 1.1 88/11/12 06:26:27 moraes Exp $"; X #endif X X #include <stdio.h> X*************** X*** 175,180 **** X--- 175,181 ---- X static XColor bg = {0, 0, 0, 0}; X static XColor fg = {0, ~0, ~0, ~0}; X unsigned int depth; X+ Dimension xwidth, xheight; X X Display *dpy; X Screen *scn; X*************** X*** 207,214 **** X static Arg query_args[] = { X {XtNbackground, (XtArgVal) &bgcolor}, X {XtNforeground, (XtArgVal) &fgcolor}, X! {XtNwidth, (XtArgVal) &ViewWidth}, X! {XtNheight, (XtArgVal) &ViewHeight}, X }; X X /* args for the canvas window - we fill in translations by hand */ X--- 208,215 ---- X static Arg query_args[] = { X {XtNbackground, (XtArgVal) &bgcolor}, X {XtNforeground, (XtArgVal) &fgcolor}, X! {XtNwidth, (XtArgVal) &xwidth}, X! {XtNheight, (XtArgVal) &xheight}, X }; X X /* args for the canvas window - we fill in translations by hand */ X*************** X*** 237,247 **** X * XtNfromHoriz also changes to XtNfromVert. X */ X static Arg scroll_args[] = { X! XtNlength, (XtArgVal) 850, X! XtNorientation, (XtArgVal) XtorientVertical, X! XtNfromHoriz, (XtArgVal) NULL, X! XtNscrollProc, (XtArgVal) scrollCallbacks, X! XtNthumbProc, (XtArgVal) thumbCallbacks, X }; X X static MenuItemsList menu_list[] = { X--- 238,250 ---- X * XtNfromHoriz also changes to XtNfromVert. X */ X static Arg scroll_args[] = { X! {XtNlength, (XtArgVal) 850}, X! {XtNorientation, (XtArgVal) XtorientVertical}, X! {XtNfromHoriz, (XtArgVal) NULL}, X! {XtNtop, (XtArgVal) 0.0}, X! {XtNshown, (XtArgVal) 0.0}, X! {XtNscrollProc, (XtArgVal) scrollCallbacks}, X! {XtNthumbProc, (XtArgVal) thumbCallbacks}, X }; X X static MenuItemsList menu_list[] = { X*************** X*** 349,358 **** X--- 352,367 ---- X CanvasWidget = XtCreateManagedWidget("canvas", windowWidgetClass, X BaseFrame, canvas_args, XtNumber(canvas_args)); X XtGetValues(CanvasWidget, query_args, XtNumber(query_args)); X+ ViewWidth = xwidth; X+ ViewHeight = xheight; X if (Scrollbars) { X /* vertical scrollbar to the right of the canvas */ X XtSetArg(scroll_args[0], XtNlength, ViewHeight); X XtSetArg(scroll_args[2], XtNfromHoriz, CanvasWidget); X+ XtSetArg(scroll_args[3], XtNtop, X+ (float) ((float) ViewTop / (float) PAGE_PIXEL_HEIGHT)); X+ XtSetArg(scroll_args[4], XtNshown, X+ (float) ((float) ViewHeight / (float) PAGE_PIXEL_HEIGHT)); X VertScroll = XtCreateManagedWidget("vscroll", X scrollbarWidgetClass, BaseFrame, X scroll_args, XtNumber(scroll_args)); X*************** X*** 360,365 **** X--- 369,378 ---- X XtSetArg(scroll_args[0], XtNlength, ViewWidth); X XtSetArg(scroll_args[1], XtNorientation, XtorientHorizontal); X XtSetArg(scroll_args[2], XtNfromVert, CanvasWidget); X+ XtSetArg(scroll_args[3], XtNtop, X+ (float) ((float) ViewLeft / (float) PAGE_PIXEL_WIDTH)); X+ XtSetArg(scroll_args[4], XtNshown, X+ (float) ((float) ViewWidth / (float) PAGE_PIXEL_WIDTH)); X HorizScroll = XtCreateManagedWidget("hscroll", X scrollbarWidgetClass, BaseFrame, X scroll_args, XtNumber(scroll_args)); X*************** X*** 388,397 **** X minibuf_args[2].value = (XtArgVal) CanvasWidget; X InputWidget = XtCreateManagedWidget("minibuf", minibufWidgetClass, X BaseFrame, minibuf_args, XtNumber(minibuf_args)); X- if (Scrollbars) X- SetScrollBar(); X XtRealizeWidget(topLevel); X XFlush(dpy); X DrawingCanvas = XtWindow(CanvasWidget); X OuterFrame = XtWindow(topLevel); X InputWin = XtWindow(InputWidget); X--- 401,410 ---- X minibuf_args[2].value = (XtArgVal) CanvasWidget; X InputWidget = XtCreateManagedWidget("minibuf", minibufWidgetClass, X BaseFrame, minibuf_args, XtNumber(minibuf_args)); X XtRealizeWidget(topLevel); X XFlush(dpy); X+ if (Scrollbars) X+ SetScrollBar(); X DrawingCanvas = XtWindow(CanvasWidget); X OuterFrame = XtWindow(topLevel); X InputWin = XtWindow(InputWidget); X*************** X*** 768,778 **** X } X X X! static void Thumbed(w, closure, top) X Widget w; X caddr_t closure; X! float top; X { X #ifdef WINDOWDEBUG X printf( "thumbed to %f%%\n", top ); X #endif X--- 781,792 ---- X } X X X! static void Thumbed(w, closure, percent) X Widget w; X caddr_t closure; X! caddr_t percent; X { X+ float top = *((float *) percent); X #ifdef WINDOWDEBUG X printf( "thumbed to %f%%\n", top ); X #endif Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/CheckItem.c xtroff/XtStuff/CheckItem.c X*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/CheckItem.c Fri Jun 10 01:20:10 1988 X--- xtroff/XtStuff/CheckItem.c Fri Nov 11 23:53:27 1988 X*************** X*** 121,126 **** X--- 121,128 ---- X NULL, /* callback_private */ X defaultTranslations, /* tm_table */ X NULL, /* query_geometry */ X+ /* display_accelerator */ XtInheritDisplayAccelerator, X+ /* extension */ NULL X }, /* CoreClass fields initialization */ X { X 0, /* field not used */ Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/CheckItem.h xtroff/XtStuff/CheckItem.h X*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/CheckItem.h Fri Jun 10 01:20:10 1988 X--- xtroff/XtStuff/CheckItem.h Fri Nov 11 23:44:49 1988 X*************** X*** 43,61 **** X * X ***********************************************************************/ X X- #ifndef _XtJustify_e X- #define _XtJustify_e X- X- X- X- X- typedef enum { X- XtJustifyLeft, /* justify text to left side of button */ X- XtJustifyCenter, /* justify text in center of button */ X- XtJustifyRight /* justify text to right side of button */ X- } XtJustify; X- #endif _XtJustify_e X- X #define XtNcallback "callback" X #define XtNhighlightThickness "hightlightThickness" X #define XtNtranslations "translations" X--- 43,48 ---- Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/Menu.c xtroff/XtStuff/Menu.c X*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/Menu.c Fri Jun 10 01:20:11 1988 X--- xtroff/XtStuff/Menu.c Sat Nov 12 00:20:49 1988 X*************** X*** 37,47 **** X X #include <X11/IntrinsicP.h> X #include <X11/StringDefs.h> X! #include <X11/Misc.h> X #include "MenuP.h" X #include "MenuItem.h" X #include "CheckItem.h" X! #include <X11/Label.h> X #include <ctype.h> X X /**************************************************************** X--- 37,48 ---- X X #include <X11/IntrinsicP.h> X #include <X11/StringDefs.h> X! #include <X11/XawMisc.h> X! #include <X11/Xmu.h> X #include "MenuP.h" X #include "MenuItem.h" X #include "CheckItem.h" X! #include <X11/Label.h> X #include <ctype.h> X X /**************************************************************** X*************** X*** 56,64 **** X XtOffset(MenuWidget, menu.x_margin), XtRString, "0"}, X {XtNyMargin, XtCVSpace, XtRInt, sizeof(int), X XtOffset(MenuWidget, menu.y_margin), XtRString, "0"}, X! {XtNx, XtCPosition, XtRInt, sizeof(int), X XtOffset(MenuWidget,core.x),XtRString, "800"}, X! {XtNy, XtCPosition, XtRInt, sizeof(int), X XtOffset(MenuWidget,core.y),XtRString, "800"}, X {XtNborder,"MyBorder",XtRPixel,sizeof(Pixel), X XtOffset(MenuWidget,core.border_pixel),XtRString, "Black"}, X--- 57,65 ---- X XtOffset(MenuWidget, menu.x_margin), XtRString, "0"}, X {XtNyMargin, XtCVSpace, XtRInt, sizeof(int), X XtOffset(MenuWidget, menu.y_margin), XtRString, "0"}, X! {XtNx, XtCPosition, XtRPosition, sizeof(Position), X XtOffset(MenuWidget,core.x),XtRString, "800"}, X! {XtNy, XtCPosition, XtRPosition, sizeof(Position), X XtOffset(MenuWidget,core.y),XtRString, "800"}, X {XtNborder,"MyBorder",XtRPixel,sizeof(Pixel), X XtOffset(MenuWidget,core.border_pixel),XtRString, "Black"}, X*************** X*** 72,78 **** X XtOffset(MenuWidget,menu.check_foreground_pixel),XtRString, "Black"}, X {XtNbackground, XtCBackground,XtRPixel, sizeof(Pixel), X XtOffset(MenuWidget,core.background_pixel),XtRString, "White"}, X! {XtNborderWidth, XtCBorderWidth, XtRInt, sizeof(int), X XtOffset(MenuWidget,core.border_width),XtRString, "2"}, X {XtNorientation, XtCOrientation, XtROrientation, sizeof(XtOrientation), X XtOffset(MenuWidget,menu.orient),XtRString, "vertical"}, X--- 73,79 ---- X XtOffset(MenuWidget,menu.check_foreground_pixel),XtRString, "Black"}, X {XtNbackground, XtCBackground,XtRPixel, sizeof(Pixel), X XtOffset(MenuWidget,core.background_pixel),XtRString, "White"}, X! {XtNborderWidth, XtCBorderWidth, XtRDimension, sizeof(Dimension), X XtOffset(MenuWidget,core.border_width),XtRString, "2"}, X {XtNorientation, XtCOrientation, XtROrientation, sizeof(XtOrientation), X XtOffset(MenuWidget,menu.orient),XtRString, "vertical"}, X*************** X*** 126,131 **** X--- 127,134 ---- X /* callback_private */ NULL, X /* tm_table */ NULL, X /* query_geometry */ NULL, X+ /* display_accelerator */ XtInheritDisplayAccelerator, X+ /* extension */ NULL X },{ X /* composite_class fields */ X /* geometry_manager */ GeometryManager, X*************** X*** 132,139 **** X /* change_managed */ ChangeManaged, X /* insert_child */ NULL, /* Inherit from superclass */ X /* delete_child */ NULL, /* Inherit from superclass */ X- /* move_focus_to_next */ NULL, X- /* move_focus_to_prev */ NULL X },{ X /* mumble */ 0 /* Make C compiler happy */ X } X--- 135,140 ---- Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/Menu.h xtroff/XtStuff/Menu.h X*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/Menu.h Fri Jun 10 01:20:11 1988 X--- xtroff/XtStuff/Menu.h Fri Nov 11 23:44:49 1988 X*************** X*** 58,68 **** X #define XtitemCheckable 0x02 /* 0=uncheckable, 1=checkable */ X #define XtitemIsChecked 0x01 /* 0=unchecked, 1=checked */ X X- #ifndef _XtOrientation_e X- #define _XtOrientation_e X- typedef enum {XtorientHorizontal, XtorientVertical} XtOrientation; X- #endif _XtOrientation_e X- X /* Class record constants */ X X extern WidgetClass menuWidgetClass; X--- 58,63 ---- Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/MenuItem.c xtroff/XtStuff/MenuItem.c X*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/MenuItem.c Fri Jul 8 05:42:16 1988 X--- xtroff/XtStuff/MenuItem.c Fri Nov 11 23:53:27 1988 X*************** X*** 116,121 **** X--- 116,123 ---- X NULL, /* callback_private */ X defaultTranslations, /* tm_table */ X NULL, /* query_geometry */ X+ /* display_accelerator */ XtInheritDisplayAccelerator, X+ /* extension */ NULL X }, /* CoreClass fields initialization */ X { X 0, /* field not used */ Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/MenuItem.h xtroff/XtStuff/MenuItem.h X*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/MenuItem.h Fri Jun 10 01:20:11 1988 X--- xtroff/XtStuff/MenuItem.h Fri Nov 11 23:42:35 1988 X*************** X*** 43,61 **** X * X ***********************************************************************/ X X- #ifndef _XtJustify_e X- #define _XtJustify_e X- X- X- X- X- typedef enum { X- XtJustifyLeft, /* justify text to left side of button */ X- XtJustifyCenter, /* justify text in center of button */ X- XtJustifyRight /* justify text to right side of button */ X- } XtJustify; X- #endif _XtJustify_e X- X #define XtNcallback "callback" X #define XtNhighlightThickness "hightlightThickness" X #define XtNtranslations "translations" X--- 43,48 ---- Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/Minibuf.c xtroff/XtStuff/Minibuf.c X*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/Minibuf.c Wed Aug 31 18:23:45 1988 X--- xtroff/XtStuff/Minibuf.c Sat Nov 12 04:35:06 1988 X*************** X*** 79,85 **** X #define BUF_BLOCK 128 X X #define MIN_COLS 5 X! #define DEFAULTFONT "Fixed" X #define ABORT_MSG "[Aborted]" X #define DELAY 300000 /* X * Microseconds of delay for cursor X--- 79,85 ---- X #define BUF_BLOCK 128 X X #define MIN_COLS 5 X! #define DEFAULTFONT "8x13" X #define ABORT_MSG "[Aborted]" X #define DELAY 300000 /* X * Microseconds of delay for cursor X*************** X*** 170,176 **** X {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), X offset(minibuf.foreground), XtRString, "Black"}, X {XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *), X! offset(minibuf.finfo),XtRString, "Fixed"}, X {XtNcursor, XtCCursor, XtRCursor, sizeof(Cursor), X offset(minibuf.cursor), XtRString, "xterm"}, X {XtNfinishedCallback, XtCCallback, XtRCallback, sizeof(XtProc), X--- 170,176 ---- X {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), X offset(minibuf.foreground), XtRString, "Black"}, X {XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *), X! offset(minibuf.finfo),XtRString, DEFAULTFONT}, X {XtNcursor, XtCCursor, XtRCursor, sizeof(Cursor), X offset(minibuf.cursor), XtRString, "xterm"}, X {XtNfinishedCallback, XtCCallback, XtRCallback, sizeof(XtProc), X*************** X*** 220,225 **** X--- 220,227 ---- X NULL, /* callback_private */ X defaultTranslations, /* tm_table */ X NULL, /* query_geometry */ X+ XtInheritDisplayAccelerator, /* display_accelerator */ X+ NULL /* extension */ X }, /* CoreClass fields initialization */ X { X 0, /* field not used */ X*************** X*** 257,264 **** X mcore(height) = fontheight(mbuf(finfo)); X X if (mbuf(finfo)->per_char != NULL) { X /* default font since we must have a fixed width font */ X! XtConvert(new, XtRString, (XrmValuePtr) DEFAULTFONT, X XtRFontStruct, (XrmValuePtr) mbuf(finfo)); X #ifdef DEBUG X fprintf(stderr, "Need fixed font - falling back on default \"%s\"\n", X--- 259,269 ---- X mcore(height) = fontheight(mbuf(finfo)); X X if (mbuf(finfo)->per_char != NULL) { X+ XrmValue value; X+ value.size = sizeof(DEFAULTFONT); X+ value.addr = DEFAULTFONT; X /* default font since we must have a fixed width font */ X! XtConvert(new, XtRString, &value, X XtRFontStruct, (XrmValuePtr) mbuf(finfo)); X #ifdef DEBUG X fprintf(stderr, "Need fixed font - falling back on default \"%s\"\n", Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/Window.c xtroff/XtStuff/Window.c X*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/Window.c Thu Aug 18 23:55:31 1988 X--- xtroff/XtStuff/Window.c Sat Nov 12 01:10:51 1988 X*************** X*** 79,84 **** X--- 79,87 ---- X /* version */ XtVersion, X /* callback_private */ NULL, X /* tm_table */ NULL, X+ /* query_geometry */ NULL, X+ /* display_accelerator*/ XtInheritDisplayAccelerator, X+ /* extension */ NULL X } X }; X Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/XtStuff/Window.h xtroff/XtStuff/Window.h X*** /h/xwindows/X/contrib/clients/xtroff/XtStuff/Window.h Thu Aug 18 23:55:44 1988 X--- xtroff/XtStuff/Window.h Sat Nov 12 00:02:01 1988 X*************** X*** 11,17 **** X * X ***********************************************************************/ X X- #define XtNpixmap "Pixmap" X #define XtCpixmap "Pixmap" X X /* Class record constants */ X--- 11,16 ---- Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/fontstuff/MakeImFonts xtroff/fontstuff/MakeImFonts X*** /h/xwindows/X/contrib/clients/xtroff/fontstuff/MakeImFonts Thu Sep 1 00:06:10 1988 X--- xtroff/fontstuff/MakeImFonts Sat Nov 12 02:34:18 1988 X*************** X*** 23,29 **** X if test x$XWIN != x ; then X if test $XWIN != suntroff ; then X XWIN=x X! FC=${5-fc} X else X XWIN= X FC= X--- 23,29 ---- X if test x$XWIN != x ; then X if test $XWIN != suntroff ; then X XWIN=x X! FC=${5-bdftosnf} X else X XWIN= X FC= X*************** X*** 62,68 **** X NewSize=`expr $Size \* 100 / $PERCENT` X if test x$XWIN != x ; then X fname=`echo $Font | tr A-Z a-z` X! fname=$DEVICE.$fname.$NewSize.snf X else X fname=$Font.$NewSize X fi X--- 62,69 ---- X NewSize=`expr $Size \* 100 / $PERCENT` X if test x$XWIN != x ; then X fname=`echo $Font | tr A-Z a-z` X! fontname=$DEVICE.$fname.$NewSize X! fname=$fontname.snf X else X fname=$Font.$NewSize X fi X*************** X*** 76,82 **** X $SUNTROFF_FONTS/$fname X else X $BIN_DIR/ch2vft $TEMP > $TEMP2 X! $BIN_DIR/vf2bdf $TEMP2 $NewSize | X $FC > $SUNTROFF_FONTS/$fname X fi X X--- 77,84 ---- X $SUNTROFF_FONTS/$fname X else X $BIN_DIR/ch2vft $TEMP > $TEMP2 X! $BIN_DIR/vf2bdf $TEMP2 $NewSize | \ X! sed 's?^FONT .*$?FONT '$fontname'?' | \ X $FC > $SUNTROFF_FONTS/$fname X fi X X*************** X*** 103,118 **** X else X extension= X fi X! f1=$SUNTROFF_FONTS/$Font.`expr $Size - 1`$extension X! f2=$SUNTROFF_FONTS/$Font.`expr $Size`$extension X! f3=$SUNTROFF_FONTS/$Font.`expr $Size + 1`$extension X X if [ -r $f1 -o -r $f2 -o -r $f3 ] X then X true X else X echo scaling and converting $RSTFONTS/$i to \ X! $SUNTROFF_FONTS/$DEVICE.$Font.$Size$extension X $BIN_DIR/rst2ch $RSTFONTS/$i > $TEMP X $BIN_DIR/scalech -s$PERCENT $TEMP > $TEMP2 X if test x$XWIN = x ; then X--- 105,129 ---- X else X extension= X fi X! if [ x$XWIN = x ] X! then X! f1=$SUNTROFF_FONTS/$Font.`expr $Size - 1`$extension X! f2=$SUNTROFF_FONTS/$Font.`expr $Size`$extension X! f3=$SUNTROFF_FONTS/$Font.`expr $Size + 1`$extension X! else X! f1=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size - 1`$extension X! f2=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size`$extension X! f3=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size + 1`$extension X! fi X X if [ -r $f1 -o -r $f2 -o -r $f3 ] X then X true X else X+ fontname=$DEVICE.$Font.$Size X+ fname=$fontname$extension X echo scaling and converting $RSTFONTS/$i to \ X! $SUNTROFF_FONTS/$fname X $BIN_DIR/rst2ch $RSTFONTS/$i > $TEMP X $BIN_DIR/scalech -s$PERCENT $TEMP > $TEMP2 X if test x$XWIN = x ; then X*************** X*** 120,127 **** X else X $BIN_DIR/ch2vft $TEMP2 > $TEMP X $BIN_DIR/vf2bdf $TEMP $Size | X! $FC > $SUNTROFF_FONTS/$DEVICE.$Font.$Size$extension X fi X fi X fi X done X--- 131,142 ---- X else X $BIN_DIR/ch2vft $TEMP2 > $TEMP X $BIN_DIR/vf2bdf $TEMP $Size | X! sed 's?^FONT .*$?FONT '$fontname'?' | \ X! $FC > $SUNTROFF_FONTS/$fname X fi X fi X fi X done X+ if [ x$XWIN != x ]; then X+ mkfontdir $SUNTROFF_FONTS X+ fi Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/fontstuff/MakeSunFonts xtroff/fontstuff/MakeSunFonts X*** /h/xwindows/X/contrib/clients/xtroff/fontstuff/MakeSunFonts Thu Sep 1 01:42:57 1988 X--- xtroff/fontstuff/MakeSunFonts Sat Nov 12 02:34:17 1988 X*************** X*** 22,28 **** X if test x$XWIN != x ; then X if test $XWIN != suntroff ; then X XWIN=x X! FC=${5-fc} X else X XWIN= X FC= X--- 22,28 ---- X if test x$XWIN != x ; then X if test $XWIN != suntroff ; then X XWIN=x X! FC=${5-bdftosnf} X else X XWIN= X FC= X*************** X*** 69,75 **** X NewSize=`expr $Size \* 100 / $PERCENT` X if test x$XWIN != x ; then X fname=`echo $Font | tr A-Z a-z` X! fname=$DEVICE.$fname.$NewSize.snf X else X fname=$Font.$NewSize X fi X--- 69,76 ---- X NewSize=`expr $Size \* 100 / $PERCENT` X if test x$XWIN != x ; then X fname=`echo $Font | tr A-Z a-z` X! fontname=$DEVICE.$fname.$NewSize X! fname=$fontname.snf X else X fname=$Font.$NewSize X fi X*************** X*** 82,87 **** X--- 83,89 ---- X $SUNTROFF_FONTS/$fname X else X $BIN_DIR/vf2bdf $VFONTS/$i $NewSize | \ X+ sed 's?^FONT .*$?FONT '$fontname'?' | \ X $FC > $SUNTROFF_FONTS/$fname X fi X fi X*************** X*** 107,122 **** X else X extension= X fi X! f1=$SUNTROFF_FONTS/$Font.`expr $Size - 1`$extension X! f2=$SUNTROFF_FONTS/$Font.`expr $Size`$extension X! f3=$SUNTROFF_FONTS/$Font.`expr $Size + 1`$extension X X if [ -r $f1 -o -r $f2 -o -r $f3 ] X then X true X else X echo scaling and converting $VFONTS/$i to \ X! $SUNTROFF_FONTS/$DEVICE.$Font.$Size$extension X $BIN_DIR/vft2ch $VFONTS/$i > $TEMP X $BIN_DIR/scalech -s$PERCENT $TEMP > $TEMP2 X if test x$XWIN = x ; then X--- 109,133 ---- X else X extension= X fi X! if [ x$XWIN = x ] X! then X! f1=$SUNTROFF_FONTS/$Font.`expr $Size - 1`$extension X! f2=$SUNTROFF_FONTS/$Font.`expr $Size`$extension X! f3=$SUNTROFF_FONTS/$Font.`expr $Size + 1`$extension X! else X! f1=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size - 1`$extension X! f2=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size`$extension X! f3=$SUNTROFF_FONTS/$DEVICE.$Font.`expr $Size + 1`$extension X! fi X X if [ -r $f1 -o -r $f2 -o -r $f3 ] X then X true X else X+ fontname=$DEVICE.$Font.$Size X+ fname=$fontname$extension X echo scaling and converting $VFONTS/$i to \ X! $SUNTROFF_FONTS/$fname X $BIN_DIR/vft2ch $VFONTS/$i > $TEMP X $BIN_DIR/scalech -s$PERCENT $TEMP > $TEMP2 X if test x$XWIN = x ; then X*************** X*** 124,131 **** X else X $BIN_DIR/ch2vft $TEMP2 > $TEMP X $BIN_DIR/vf2bdf $TEMP $Size | X! $FC > $SUNTROFF_FONTS/$DEVICE.$Font.$Size$extension X fi X fi X fi X done X--- 135,146 ---- X else X $BIN_DIR/ch2vft $TEMP2 > $TEMP X $BIN_DIR/vf2bdf $TEMP $Size | X! sed 's?^FONT .*$?FONT '$fontname'?' | \ X! $FC > $SUNTROFF_FONTS/$fname X fi X fi X fi X done X+ if [ x$XWIN != x ]; then X+ mkfontdir $SUNTROFF_FONTS X+ fi Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/fontstuff/Makefile xtroff/fontstuff/Makefile X*** /h/xwindows/X/contrib/clients/xtroff/fontstuff/Makefile Thu Sep 1 00:13:25 1988 X--- xtroff/fontstuff/Makefile Sat Nov 12 01:37:44 1988 X*************** X*** 1,5 **** X # Not standalone - it gets a lot of variables from the invocation. X! # VFONTS, RSTFONTS, SUNTROFF_FONTS, PERCENT, PREVIEWER, FC X X all: install X X--- 1,7 ---- X # Not standalone - it gets a lot of variables from the invocation. X! # VFONTS, RSTFONTS, SUNTROFF_FONTS, PERCENT, PREVIEWER, FC, CDEBUGFLAGS X! X! CFLAGS = $(CDEBUGFLAGS) X X all: install X Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/fontstuff/vf2bdf.c xtroff/fontstuff/vf2bdf.c X*** /h/xwindows/X/contrib/clients/xtroff/fontstuff/vf2bdf.c Fri Jun 10 02:13:08 1988 X--- xtroff/fontstuff/vf2bdf.c Sat Nov 12 02:04:12 1988 X*************** X*** 127,133 **** X { X for (k = (pd->left + pd->right + 7) / 8; --k >= 0; ) X printf("%02x", *p++); X! printf(" \n"); X } X printf("ENDCHAR\n"); X } X--- 127,133 ---- X { X for (k = (pd->left + pd->right + 7) / 8; --k >= 0; ) X printf("%02x", *p++); X! printf("\n"); X } X printf("ENDCHAR\n"); X } Xdiff -r -c /h/xwindows/X/contrib/clients/xtroff/xtroff.man xtroff/xtroff.manX X*** /h/xwindows/X/contrib/clients/xtroff/xtroff.man Thu Jul 14 18:59:28 1988 X--- xtroff/xtroff.manX Sat Nov 12 03:03:22 1988 X*************** X*** 234,244 **** X "-xrm". X Some of the options are meaningless for \fIxtroff\fP. X .SH "FILES" X! .na X! .ta \w'/usr/local/lib/xtroff/* 'u X! /usr/local/lib/troff/* - troff width tables X! /usr/local/lib/xtroff/* - bitmap fonts for xtroff X! .ad X .SH "SEE ALSO" X .LP X .I Using and Specifiying X Resources X--- 234,242 ---- X "-xrm". X Some of the options are meaningless for \fIxtroff\fP. X .SH "FILES" X! WIDTHDIR/* - troff width tables X! .br X! FONTDIR/* - bitmap fonts for xtroff X .SH "SEE ALSO" X .LP X .I Using and Specifiying X Resources XWhAt_A_mArOoN Xecho 'Now run ximake in this directory, and XtStuff to generate the Makefiles' Xecho 'And you are ready to go...' Xexit END_OF_update.sh if test 27954 -ne `wc -c <update.sh`; then echo shar: \"update.sh\" unpacked with wrong size! fi chmod +x update.sh # end of overwriting check fi if test -f ximakedo.sh -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"ximakedo.sh\" else echo shar: Extracting \"ximakedo.sh\" \(871 characters\) sed "s/^X//" >ximakedo.sh <<'END_OF_ximakedo.sh' X#! /bin/sh X# Edit this to change this to the top directory where your X11R3 source is X# something like /usr/src/local/X.V11R3 XTOPDIR=please/change/this/to/the/real/X/top/level/directory Xif test -d xtroff ; then X cd xtroff Xfi Xif test -f suntroff.c -a -f xtroff.manX ; then X true Xelse X echo 'Please cd to contrib/clients/xtroff before running this script' X exit 1 Xfi Xif test ! \( -d $TOPDIR -a -d $TOPDIR/util -a -d $TOPDIR/util/scripts \) ; then X echo 'Please fix TOPDIR and run this script again' X exit 1 Xelif test ! -x $TOPDIR/util/scripts/ximake.sh ; then X echo Something wrong - $TOPDIR/util/scripts/ximake.sh isn\'t executable X exit 1 Xelse X $TOPDIR/util/scripts/ximake.sh $TOPDIR X cd XtStuff X case $TOPDIR in X /*);; X *)TOPDIR=../$TOPDIR;; X esac X $TOPDIR/util/scripts/ximake.sh $TOPDIR Xfi Xecho Now run \'make depend\', \'make\', \'make xfonts\' and \'make install\' END_OF_ximakedo.sh if test 871 -ne `wc -c <ximakedo.sh`; then echo shar: \"ximakedo.sh\" unpacked with wrong size! fi chmod +x ximakedo.sh # end of overwriting check fi echo shar: End of shell archive. exit 0 -- Mike Wexler(wyse!mikew) Phone: (408)433-1000 x1330 Moderator of comp.sources.x