v04i049: xtroff -- troff previewer for X11, Part04/18

Dan Heller argv at island.uu.net
Mon Jul 17 16:55:21 AEST 1989


Submitted-by: Mark Moraes <moraes at ai.toronto.edu>
Posting-number: Volume 4, Issue 49
Archive-name: xtroff/part04



#! /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
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 4 (of 18)."
# Contents:  xtroff/XtStuff/CheckItem.h xtroff/XtStuff/CheckItemP.h
#   xtroff/XtStuff/Menu.h xtroff/XtStuff/MenuItemP.h
#   xtroff/XtStuff/MenuP.h xtroff/XtStuff/MinibufP.h
#   xtroff/XtStuff/README.Menu xtroff/XtStuff/Window.c
#   xtroff/bitmaps/ditroff.bm xtroff/devpsc/README.char
#   xtroff/devpsc/README.note xtroff/devpsc/S.aux xtroff/devsun/db
#   xtroff/devsun/dr xtroff/devsun/gf xtroff/fixpoint.c
#   xtroff/fontstuff/MakeImFonts xtroff/fontstuff/vft2ch.c
# Wrapped by moraes at neat.ai on Thu Jul 13 20:54:45 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'xtroff/XtStuff/CheckItem.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/XtStuff/CheckItem.h'\"
else
echo shar: Extracting \"'xtroff/XtStuff/CheckItem.h'\" \(2210 characters\)
sed "s/^X//" >'xtroff/XtStuff/CheckItem.h' <<'END_OF_FILE'
X/*
X* $Header: CheckItem.h,v 1.2 88/05/31 21:07:42 moraes Exp $
X*/
X
X/*
X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
X * 
X *                         All Rights Reserved
X * 
X * Permission to use, copy, modify, and distribute this software and its 
X * documentation for any purpose and without fee is hereby granted, 
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in 
X * supporting documentation, and that the name of Digital Equipment
X * Corporation not be used in advertising or publicity pertaining to
X * distribution of the software without specific, written prior permission.  
X * 
X * 
X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
X * SOFTWARE.
X */
X/*
X * CheckItem.h - CheckItem button widget
X *
X * Author:      Robert P. Shen
X *              Malcolm Forbes
X *              Digital Equipment Corporation
X *              ESG Systems Engineering
X *
X * Date:        February 1, 1988
X */
X#ifndef _XtCheckItem_h
X#define _XtCheckItem_h
X
X/***********************************************************************
X *
X * CheckItem Widget
X *
X ***********************************************************************/
X
X#define XtNcallback		"callback"
X#define XtNhighlightThickness   "hightlightThickness"
X#define XtNtranslations		"translations"
X
X#ifndef _XtCheckState
X#define _XtCheckState
X#define XtNcheckState "checkState"
X#define XtCCheckState "CheckState"
X#define XtRCheckState "CheckState"
Xtypedef enum {
X    XtitemChecked,
X    XtitemUnchecked
X} XtCheckState;
X#endif  _XtCheckState
X
Xextern WidgetClass     checkitemWidgetClass;
X
Xtypedef struct _CheckItemClassRec   *CheckItemWidgetClass;
Xtypedef struct _CheckItemRec        *CheckItemWidget;
X
X
X#endif _XtCheckItem_h
X/* DON'T ADD STUFF AFTER THIS */
END_OF_FILE
if test 2210 -ne `wc -c <'xtroff/XtStuff/CheckItem.h'`; then
    echo shar: \"'xtroff/XtStuff/CheckItem.h'\" unpacked with wrong size!
fi
# end of 'xtroff/XtStuff/CheckItem.h'
fi
if test -f 'xtroff/XtStuff/CheckItemP.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/XtStuff/CheckItemP.h'\"
else
echo shar: Extracting \"'xtroff/XtStuff/CheckItemP.h'\" \(3064 characters\)
sed "s/^X//" >'xtroff/XtStuff/CheckItemP.h' <<'END_OF_FILE'
X/*
X* $Header: CheckItemP.h,v 1.2 88/05/31 21:07:43 moraes Exp $
X*/
X
X/*
X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
X * 
X *                         All Rights Reserved
X * 
X * Permission to use, copy, modify, and distribute this software and its 
X * documentation for any purpose and without fee is hereby granted, 
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in 
X * supporting documentation, and that the name of Digital Equipment
X * Corporation not be used in advertising or publicity pertaining to
X * distribution of the software without specific, written prior permission.  
X * 
X * 
X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
X * SOFTWARE.
X */
X/* 
X * CheckItemP.h - Private definitions for CheckItem widget
X *
X * Author:      Robert P. Shen
X *              Malcolm Forbes
X *              Digital Equipment Corporation
X *              ESG Systems Engineering
X *
X * Date:        February 1, 1988
X */
X
X
X#ifndef _XtCheckItemPrivate_h
X#define _XtCheckItemPrivate_h
X
X/***********************************************************************
X *
X * CheckItem Widget Private Data
X *
X ***********************************************************************/
X
X/************************************
X *
X *  Class structure
X *
X ***********************************/
X
X
X   /* New fields for the CheckItem widget class record */
Xtypedef struct _CheckItemClass 
X  {
X    int makes_compiler_happy;  /* not used */
X  } CheckItemClassPart;
X
X   /* Full class record declaration */
Xtypedef struct _CheckItemClassRec {
X    CoreClassPart	core_class;
X    LabelClassPart	label_class;
X    CheckItemClassPart     checkitem_class;
X} CheckItemClassRec;
X
Xextern CheckItemClassRec checkitemClassRec;
X
X/***************************************
X *
X *  Instance (widget) structure 
X *
X **************************************/
X
X    /* New fields for the CheckItem widget record */
Xtypedef struct {
X    Pixmap      gray_pixmap;
X    GC          highlight_GC;
X    GC          erase_highlight_GC;
X    GC          inverse_GC;
X    GC          inverse_text_GC;
X    Dimension   highlight_thickness;
X    XtCallbackList callbacks;
X    Boolean     set;
X    Boolean     highlighted;
X    Boolean     display_set;
X    Boolean     display_highlighted;
X    Boolean	check_state;
X} CheckItemPart;
X
X
X/*    XtEventsPtr eventTable;*/
X
X
X   /* Full widget declaration */
Xtypedef struct _CheckItemRec {
X    CorePart         core;
X    SimplePart	     simple;
X    LabelPart	     label;
X    CheckItemPart    checkitem;
X} CheckItemRec;
X
X#endif _XtCheckItemPrivate_h
X/* DON'T ADD STUFF AFTER THIS #endif */
X
END_OF_FILE
if test 3064 -ne `wc -c <'xtroff/XtStuff/CheckItemP.h'`; then
    echo shar: \"'xtroff/XtStuff/CheckItemP.h'\" unpacked with wrong size!
fi
# end of 'xtroff/XtStuff/CheckItemP.h'
fi
if test -f 'xtroff/XtStuff/Menu.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/XtStuff/Menu.h'\"
else
echo shar: Extracting \"'xtroff/XtStuff/Menu.h'\" \(2643 characters\)
sed "s/^X//" >'xtroff/XtStuff/Menu.h' <<'END_OF_FILE'
X/*
X* $Header: Menu.h,v 1.2 88/06/01 02:47:17 moraes Exp $
X*/
X
X/*
X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
X * 
X *                         All Rights Reserved
X * 
X * Permission to use, copy, modify, and distribute this software and its 
X * documentation for any purpose and without fee is hereby granted, 
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in 
X * supporting documentation, and that the name of Digital Equipment
X * Corporation not be used in advertising or publicity pertaining to
X * distribution of the software without specific, written prior permission.  
X * 
X * 
X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
X * SOFTWARE.
X */
X/* Menu.h
X *   
X * Author:       Robert P. Shen
X *               Malcolm Forbes
X *               Digital Equipment Corporation
X *               ESG Systems Engineering
X *
X * Date:         February 1, 1988
X */
X#ifndef _XtMenu_h
X#define _XtMenu_h
X
X/***********************************************************************
X *
X * Menu Widget (subclass of CompositeClass)
X *
X ***********************************************************************/
X
X/* New fields */
X#define XtNxMargin		"xMargin"
X#define XtNyMargin		"yMargin"
X#define XtNmenuForeground       "menuForeground"
X#define XtNcheckForeground      "checkForeground"
X#define XtNmenuItemsList	"menuItemsList"
X
X	/*--------------------------------------------------------------*
X	 *  the following bit masks only apply when setting up		*
X	 *  a Menu Items List.  (This should be in a sub-widget ;-)	*
X	 *--------------------------------------------------------------*/
X
X#define XtitemUnselectable	0x04	/* 0=selectable, 1=not		*/
X#define XtitemCheckable		0x02	/* 0=uncheckable, 1=checkable	*/
X#define XtitemIsChecked		0x01	/* 0=unchecked, 1=checked	*/
X
X/* Class record constants */
X
Xextern WidgetClass menuWidgetClass;
X
Xtypedef struct _MenuClassRec *MenuWidgetClass;
Xtypedef struct _MenuRec      *MenuWidget;
X
Xtypedef struct MenuItemsRec {
X	String		text;
X	XtCallbackProc	proc;
X	caddr_t		closure;
X	Boolean		flags;
X};
X
Xtypedef struct MenuItemsRec *MenuItems, MenuItemsList;
X
X#endif _XtMenu_h
X/* DON'T ADD STUFF AFTER THIS #endif */
END_OF_FILE
if test 2643 -ne `wc -c <'xtroff/XtStuff/Menu.h'`; then
    echo shar: \"'xtroff/XtStuff/Menu.h'\" unpacked with wrong size!
fi
# end of 'xtroff/XtStuff/Menu.h'
fi
if test -f 'xtroff/XtStuff/MenuItemP.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/XtStuff/MenuItemP.h'\"
else
echo shar: Extracting \"'xtroff/XtStuff/MenuItemP.h'\" \(3018 characters\)
sed "s/^X//" >'xtroff/XtStuff/MenuItemP.h' <<'END_OF_FILE'
X/*
X* $Header: MenuItemP.h,v 1.2 88/05/31 21:07:50 moraes Exp $
X*/
X
X/*
X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
X * 
X *                         All Rights Reserved
X * 
X * Permission to use, copy, modify, and distribute this software and its 
X * documentation for any purpose and without fee is hereby granted, 
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in 
X * supporting documentation, and that the name of Digital Equipment
X * Corporation not be used in advertising or publicity pertaining to
X * distribution of the software without specific, written prior permission.  
X * 
X * 
X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
X * SOFTWARE.
X */
X/* 
X * MenuItemP.h - Private definitions for MenuItem widget
X *
X * Author:      Robert P. Shen
X *              Malcolm Forbes
X *              Digital Equipment Corporation
X *              ESG Systems Engineering
X *
X * Date:        February 1, 1988
X */
X
X#ifndef _XtMenuItemPrivate_h
X#define _XtMenuItemPrivate_h
X
X/***********************************************************************
X *
X * MenuItem Widget Private Data
X *
X ***********************************************************************/
X
X/************************************
X *
X *  Class structure
X *
X ***********************************/
X
X
X   /* New fields for the MenuItem widget class record */
Xtypedef struct _MenuItemClass 
X  {
X    int makes_compiler_happy;  /* not used */
X  } MenuItemClassPart;
X
X   /* Full class record declaration */
Xtypedef struct _MenuItemClassRec {
X    CoreClassPart	core_class;
X    LabelClassPart	label_class;
X    MenuItemClassPart     menuitem_class;
X} MenuItemClassRec;
X
Xextern MenuItemClassRec menuitemClassRec;
X
X/***************************************
X *
X *  Instance (widget) structure 
X *
X **************************************/
X
X    /* New fields for the MenuItem widget record */
Xtypedef struct {
X    Pixmap      gray_pixmap;
X    GC          highlight_GC;
X    GC          erase_highlight_GC;
X    GC          inverse_GC;
X    GC          inverse_text_GC;
X    Dimension   highlight_thickness;
X    XtCallbackList callbacks;
X    Boolean     set;
X    Boolean     highlighted;
X    Boolean     display_set;
X    Boolean     display_highlighted;
X} MenuItemPart;
X
X
X/*    XtEventsPtr eventTable;*/
X
X
X   /* Full widget declaration */
Xtypedef struct _MenuItemRec {
X    CorePart         core;
X    SimplePart	     simple;
X    LabelPart	     label;
X    MenuItemPart      menuitem;
X} MenuItemRec;
X
X#endif _XtMenuItemPrivate_h
X/* DON'T ADD STUFF AFTER THIS #endif */
X
END_OF_FILE
if test 3018 -ne `wc -c <'xtroff/XtStuff/MenuItemP.h'`; then
    echo shar: \"'xtroff/XtStuff/MenuItemP.h'\" unpacked with wrong size!
fi
# end of 'xtroff/XtStuff/MenuItemP.h'
fi
if test -f 'xtroff/XtStuff/MenuP.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/XtStuff/MenuP.h'\"
else
echo shar: Extracting \"'xtroff/XtStuff/MenuP.h'\" \(2578 characters\)
sed "s/^X//" >'xtroff/XtStuff/MenuP.h' <<'END_OF_FILE'
X/*
X* $Header: MenuP.h,v 1.2 88/05/31 21:07:52 moraes Exp $
X*/
X
X/*
X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
X * 
X *                         All Rights Reserved
X * 
X * Permission to use, copy, modify, and distribute this software and its 
X * documentation for any purpose and without fee is hereby granted, 
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in 
X * supporting documentation, and that the name of Digital Equipment
X * Corporation not be used in advertising or publicity pertaining to
X * distribution of the software without specific, written prior permission.  
X * 
X * 
X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
X * SOFTWARE.
X */
X/* 
X * MenuPrivate.h - Private definitions for Menu widget
X * 
X * Author:       Robert P. Shen
X *               Malcolm Forbes
X *               Digital Equipment Corporation
X *               ESG Systems Engineering
X *
X * Date:         February 1, 1988
X */
X
X#ifndef _MenuP_h
X#define _MenuP_h
X
X#include "Menu.h"
X/***********************************************************************
X *
X * Menu Widget Private Data
X *
X ***********************************************************************/
X
X/* New fields for the Menu widget class record */
Xtypedef struct {
X     int mumble;   /* No new procedures */
X} MenuClassPart;
X
X/* Full class record declaration */
Xtypedef struct _MenuClassRec {
X    CoreClassPart	core_class;
X    CompositeClassPart  composite_class;
X    MenuClassPart	menu_class;
X} MenuClassRec;
X
Xextern MenuClassRec menuClassRec;
X
X/* New fields for the Menu widget record */
Xtypedef struct {
X    Dimension   x_margin, y_margin;
X    XtOrientation orient;
X    MenuItems	items;
X    Pixel       menu_foreground_pixel, check_foreground_pixel;
X} MenuPart;
X
X
X/****************************************************************
X *
X * Full instance record declaration
X *
X ****************************************************************/
X
Xtypedef struct _MenuRec {
X    CorePart		core;
X    CompositePart	composite;
X    MenuPart		menu;
X} MenuRec;
X#endif _MenuP_h
X/* DON'T ADD STUFF AFTER THIS #endif */
X
X
X
X
X
X
X
X
X
X
X
X
X
X
END_OF_FILE
if test 2578 -ne `wc -c <'xtroff/XtStuff/MenuP.h'`; then
    echo shar: \"'xtroff/XtStuff/MenuP.h'\" unpacked with wrong size!
fi
# end of 'xtroff/XtStuff/MenuP.h'
fi
if test -f 'xtroff/XtStuff/MinibufP.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/XtStuff/MinibufP.h'\"
else
echo shar: Extracting \"'xtroff/XtStuff/MinibufP.h'\" \(2123 characters\)
sed "s/^X//" >'xtroff/XtStuff/MinibufP.h' <<'END_OF_FILE'
X/* 
X * MinibufP.h - Private definitions for Minibuf widget
X * 
X */
X
X#ifndef _XtMinibufP_h
X#define _XtMinibufP_h
X
X/***********************************************************************
X *
X * Minibuf Widget Private Data
X *
X ***********************************************************************/
X
X#include "Minibuf.h"
X
X/* New fields for the Minibuf widget class record */
X
Xtypedef struct {int foo;} MinibufClassPart;
X
X/* Full class record declaration */
Xtypedef struct _MinibufClassRec {
X	CoreClassPart		core_class;
X	MinibufClassPart	minibuf_class;
X} MinibufClassRec;
X
Xextern MinibufClassRec minibufClassRec;
X
X/* New fields for the Minibuf widget record */
Xtypedef struct {
X	/* resources */
X	Pixel		foreground;
X	XFontStruct	*finfo;
X	Cursor		cursor;
X	Widget		typeout;
X
X	/* Callback stuff */
X	XtCallbackList finishedCallback;/* 
X									 *  Invoked on "newline" event
X									 *  (usually ^M) or "abort" event
X									 *  (usually ^G)
X									 */
X
X	/* private state */
X	GC			normal_gc;
X	GC          invert_gc;
X	int cursorX;			/* Physical position of cursor in window */
X
X	/* Logical info */
X	char *string;			/* Actual buffer */
X	int startPos;			/* First character of string displayed in window */
X	int cursorPos;			/* Position of the cursor in the buffer */
X	int mark;
X	char *killBuffer;
X	int killBufferLen;
X	int killBufferSize;
X	int size;				/* Size of the string buffer */
X	int len;				/* Actual length of the string */
X	int cols;				/* Width of buffer in columns */
X	int promptLen;			/* First promptLen chars of string are 
X							   non-editable prompt */
X	int arg;				/* Universal argument */
X	int typeoutColumns;		/* Number of columns in the typeout window */
X	int inputMode;			/* True, if we are in input mode */
X	int cursorOn;			/* Records the state of the cursor */
X	int completion;			/* Are we doing completion */
X} MinibufPart;
X
X
X/****************************************************************
X *
X * Full instance record declaration
X *
X ****************************************************************/
X
Xtypedef struct _MinibufRec {
X	CorePart	core;
X	MinibufPart	minibuf;
X} MinibufRec;
X
X#endif _XtMinibufP_h
END_OF_FILE
if test 2123 -ne `wc -c <'xtroff/XtStuff/MinibufP.h'`; then
    echo shar: \"'xtroff/XtStuff/MinibufP.h'\" unpacked with wrong size!
fi
# end of 'xtroff/XtStuff/MinibufP.h'
fi
if test -f 'xtroff/XtStuff/README.Menu' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/XtStuff/README.Menu'\"
else
echo shar: Extracting \"'xtroff/XtStuff/README.Menu'\" \(1984 characters\)
sed "s/^X//" >'xtroff/XtStuff/README.Menu' <<'END_OF_FILE'
XMenu Widget
X
XTo create a menu widget, the application first builds a table of the menu
Xitems to be used to construct the menu. This table is passed to the Menu
XWidget at the menu creation time. Each menu item in the table conveys four
Xpieces of information and has the following structure:
X
X   {String text; XtCallback proc; caddr_t closure; Boolean flags}
X
X	Where text 	: the text string to be displayed for this menu item.
X	      proc	: the callback procedure associated with this item.
X	      closure	: the closure to be returned by this item's callback
X			  procedure.
X	      flags	: the flag indicates the sensitivity and check states
X			  of this item. For simple applications, just pass NULL
X			  here. The format of this field will be explained later.
X
XFor example, the following segment of C program shows how to build a simple
Xmenu of three menu items.
X/****************************************************************************/
X...
X
Xvoid procedure_a (widget, closure, call_data)
X { 
X	...
X }
X
Xvoid procedure_b (widget, closure, call_data)
X{
X	...
X}
X
Xstatic MenuItemsList menu_list [] = {
X	{"menu item 1", procedure_a, 1, NULL},
X	{"menu item 2", procedure_a, 2, NULL},
X	{"menu item 3", procedure_b, 1, NULL},
X	{NULL, NULL, NULL, NLL}
X	};
X
X	{XtNmenuItemsList, (XtArgVal) menu_list}
X	};
X
X...
X
Xmenu = XtCreateManagedWidget("my_menu", menuWidgetClass, parent_widget,
X			 (ArgList) args, XtNumber(args));
X/****************************************************************************/
X
XThe following new fields are created for the Menu Widget Part and are accessible
Xto the application
XName			Type		Default		  Description
X
XXtNorientation		XtOrientation	XtorientVertical  Row/Column layout
XXtNxMargin		Dimension	0		  x margin between items
XXtNyMargin		Dimension	0		  y margin between items
XXtNmenuForeground	Pixel		Black		  color for menu item
XXtNcheckForeground	Pixel		Black		  color for check item
X_______________________________________________________________________________
END_OF_FILE
if test 1984 -ne `wc -c <'xtroff/XtStuff/README.Menu'`; then
    echo shar: \"'xtroff/XtStuff/README.Menu'\" unpacked with wrong size!
fi
# end of 'xtroff/XtStuff/README.Menu'
fi
if test -f 'xtroff/XtStuff/Window.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/XtStuff/Window.c'\"
else
echo shar: Extracting \"'xtroff/XtStuff/Window.c'\" \(3443 characters\)
sed "s/^X//" >'xtroff/XtStuff/Window.c' <<'END_OF_FILE'
X#ifndef lint
Xstatic char rcsid[] = "$Header: Window.c,v 1.2 89/04/21 03:30:12 xwindows Exp $";
X#endif lint
X
X/*
X * Window.c - Window widget
X *
X * Author:      Chris Peterson
X *              M.I.T.  
X *              Bldg. E40 - Project Athena
X *              77 Massachussets Ave.
X *              Cambridge, MA 02139
X * 
X * Date:        Tue Oct 27 1987
X *
X * Based upon the label widget by Charles Haynes.
X */
X
X/* 
X *  This is the window widget, its purpose is to allow windows to be
X *  used with the toolkit.  I has a foreground color, as core does not
X *  and it is best if this resource is owned by the widget.
X *  It will also add a pixmap to the background of your window.
X *
X *                                Chris Peterson - 2/9/88
X */
X
X#include <X11/IntrinsicP.h>
X#include "Window.h"
X#include "WindowP.h"
X#include <X11/StringDefs.h>
X
X/****************************************************************
X *
X * Full class record constant
X *
X ****************************************************************/
X
X/* Private Data */
X
Xstatic XtResource resources[] = {
X    {XtNpixmap, XtCpixmap, XtRString, sizeof(caddr_t),
X       XtOffset(WindowWidget, window.pixmap), XtRString, (caddr_t) NULL},
X    {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
X       XtOffset(WindowWidget, window.foreground), XtRString, "Black"},
X};
X
Xstatic void Realize();
X
XWindowClassRec windowClassRec = {
X  {
X/* core_class fields */	
X    /* superclass         */    (WidgetClass) &widgetClassRec,
X    /* class_name         */    "Window",
X    /* widget_size        */    sizeof(WindowRec),
X    /* class_initialize   */    NULL,
X    /* class_part_init    */    NULL,
X    /* class_inited       */	FALSE,
X    /* initialize         */    NULL,
X    /* initialize_hook    */    NULL,
X    /* realize            */    Realize,
X    /* actions            */    NULL,
X    /* num_actions	  */	0,
X    /* resources          */    resources,
X    /* num_resources      */    XtNumber(resources),
X    /* xrm_class          */    NULLQUARK,
X    /* compress_motion	  */	TRUE,
X    /* compress_exposure  */	TRUE,
X    /* compress_enterleave*/    TRUE,
X    /* visible_interest   */    FALSE,
X    /* destroy            */    NULL,
X    /* resize             */    NULL,
X    /* expose             */    NULL,
X    /* set_values         */    NULL,
X    /* set_values_hook    */    NULL,
X    /* set_values_almost  */    XtInheritSetValuesAlmost,
X    /* get_values_hook    */    NULL,
X    /* accept_focus       */    NULL,
X    /* version            */    XtVersion,
X    /* callback_private   */    NULL,
X    /* tm_table           */    NULL,
X    /* query_geometry     */    NULL,
X#ifdef XtCAccelerators
X    /* display_accelerator*/	XtInheritDisplayAccelerator,
X    /* extension		  */	NULL
X#endif /* XtCAccelerators */
X  }
X};
X
XWidgetClass windowWidgetClass = (WidgetClass)&windowClassRec;
X
X/****************************************************************
X *
X * Private Procedures
X *
X ****************************************************************/
X
Xstatic void Realize(w, valueMask, attributes)
X    register Widget w;
X    Mask *valueMask;
X    XSetWindowAttributes *attributes;
X{
X  WindowWidget lw = (WindowWidget)w;
X  if (lw->window.pixmap != NULL) {
X    *valueMask |= CWBackPixmap;
X    *valueMask &= ~CWBackPixel;
X    attributes->background_pixmap = lw->window.pixmap;
X  }
X
X  XtCreateWindow(w, (Cardinal) InputOutput, (Visual *)CopyFromParent,
X		 *valueMask, attributes);
X} /* Realize */
END_OF_FILE
if test 3443 -ne `wc -c <'xtroff/XtStuff/Window.c'`; then
    echo shar: \"'xtroff/XtStuff/Window.c'\" unpacked with wrong size!
fi
# end of 'xtroff/XtStuff/Window.c'
fi
if test -f 'xtroff/bitmaps/ditroff.bm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/bitmaps/ditroff.bm'\"
else
echo shar: Extracting \"'xtroff/bitmaps/ditroff.bm'\" \(3369 characters\)
sed "s/^X//" >'xtroff/bitmaps/ditroff.bm' <<'END_OF_FILE'
X#define ditroff_width 64
X#define ditroff_height 64
Xstatic char ditroff_bits[] = {
X    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 
X    0xff, 0xff, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0xf0, 0x3f, 0x01, 0x00, 
X    0x00, 0x01, 0x88, 0x88, 0x0c, 0xc0, 0x01, 0x00, 0x00, 0x01, 0x10, 0x11, 
X    0x83, 0x03, 0x07, 0x00, 0x00, 0x01, 0x44, 0xc4, 0x80, 0x03, 0x18, 0x00, 
X    0x00, 0x01, 0x20, 0x22, 0x80, 0x03, 0x20, 0x00, 0x00, 0x01, 0x00, 0x18, 
X    0xc0, 0x07, 0xc0, 0x00, 0x00, 0x01, 0x00, 0x04, 0xc0, 0x07, 0x00, 0x01, 
X    0x00, 0x41, 0x44, 0x06, 0xc0, 0x07, 0x00, 0x02, 0x00, 0x21, 0x22, 0x02, 
X    0xe0, 0x0f, 0x00, 0x02, 0x00, 0x89, 0x88, 0x01, 0xe0, 0x0f, 0x00, 0x04, 
X    0x00, 0x11, 0x91, 0x01, 0xf0, 0x1f, 0x00, 0x08, 0x00, 0x01, 0xc0, 0x00, 
X    0x30, 0x1f, 0x00, 0x08, 0x00, 0x01, 0x62, 0x00, 0x30, 0x1f, 0x00, 0x10, 
X    0x00, 0x89, 0x48, 0x00, 0x38, 0x3f, 0x00, 0x10, 0x00, 0x11, 0x31, 0x00, 
X    0x18, 0x3e, 0x00, 0x20, 0x00, 0x41, 0x24, 0x00, 0x1c, 0x7e, 0x00, 0x20, 
X    0x00, 0x21, 0x22, 0x00, 0x0c, 0x7c, 0x00, 0x20, 0x00, 0x01, 0x10, 0x00, 
X    0x0c, 0x7c, 0x00, 0x40, 0x00, 0x01, 0x10, 0x00, 0x0e, 0xfc, 0x00, 0x40, 
X    0x00, 0x41, 0x14, 0x00, 0x06, 0xf8, 0x00, 0x40, 0x00, 0x21, 0x12, 0x00, 
X    0xff, 0xff, 0x01, 0x40, 0x00, 0x89, 0x18, 0x00, 0xff, 0xff, 0x01, 0x40, 
X    0x00, 0x11, 0x11, 0x00, 0x03, 0xf0, 0x01, 0x40, 0x00, 0x41, 0x10, 0x80, 
X    0x03, 0xf0, 0x03, 0x40, 0x00, 0x01, 0x10, 0x80, 0x01, 0xe0, 0x03, 0x40, 
X    0x00, 0x89, 0x18, 0x80, 0x01, 0xe0, 0x03, 0x40, 0x00, 0x11, 0x31, 0xc0, 
X    0x01, 0xe0, 0x07, 0x20, 0x00, 0x41, 0x24, 0xc0, 0x00, 0xc0, 0x07, 0x20, 
X    0x00, 0x21, 0x22, 0xf0, 0x00, 0xc0, 0x0f, 0x20, 0x00, 0x01, 0x40, 0xfe, 
X    0x07, 0xf8, 0xff, 0x10, 0x00, 0x11, 0x51, 0xfe, 0x07, 0xf8, 0xff, 0x10, 
X    0x00, 0x41, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x21, 0xa2, 0x00, 
X    0x00, 0x00, 0x00, 0x38, 0x00, 0x89, 0x88, 0x01, 0x00, 0x00, 0x00, 0x7c, 
X    0x00, 0x11, 0x11, 0x03, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x01, 0x00, 0x06, 
X    0x00, 0x00, 0x00, 0xfe, 0x00, 0x21, 0x02, 0x06, 0x00, 0x00, 0x00, 0xff, 
X    0x00, 0x89, 0x88, 0x18, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x11, 0x11, 0x31, 
X    0x00, 0x00, 0xe0, 0xff, 0x00, 0x41, 0x44, 0xc0, 0x00, 0x00, 0xf8, 0xff, 
X    0x00, 0x01, 0x00, 0x00, 0x03, 0x00, 0xff, 0xff, 0x00, 0x09, 0x88, 0x88, 
X    0x1c, 0xc0, 0xf1, 0xff, 0x00, 0x11, 0x11, 0x11, 0xf1, 0x3f, 0xe1, 0xff, 
X    0x00, 0x41, 0x44, 0x44, 0x44, 0x04, 0x81, 0xff, 0x00, 0x21, 0x02, 0x22, 
X    0x20, 0x22, 0x01, 0xff, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0xfe, 
X    0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0xff, 0xff, 0xff, 
X    0xff, 0xff, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 
X    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x07, 0x02, 0x01, 
X    0x00, 0xc0, 0x60, 0x00, 0x00, 0x09, 0x00, 0x01, 0x00, 0x20, 0x10, 0x00, 
X    0x00, 0x91, 0xc3, 0xa7, 0xe1, 0x20, 0x10, 0x00, 0x00, 0x11, 0x02, 0x61, 
X    0x12, 0xf9, 0x7c, 0x00, 0x00, 0x11, 0x02, 0x21, 0x10, 0x21, 0x10, 0x00, 
X    0x00, 0x11, 0x02, 0x21, 0x10, 0x21, 0x10, 0x00, 0x00, 0x11, 0x02, 0x21, 
X    0x10, 0x21, 0x10, 0x00, 0x00, 0x09, 0x02, 0x21, 0x10, 0x21, 0x10, 0x00, 
X    0x00, 0x07, 0x02, 0x26, 0xe0, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 
X    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
X    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
END_OF_FILE
if test 3369 -ne `wc -c <'xtroff/bitmaps/ditroff.bm'`; then
    echo shar: \"'xtroff/bitmaps/ditroff.bm'\" unpacked with wrong size!
fi
# end of 'xtroff/bitmaps/ditroff.bm'
fi
if test -f 'xtroff/devpsc/README.char' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/devpsc/README.char'\"
else
echo shar: Extracting \"'xtroff/devpsc/README.char'\" \(2665 characters\)
sed "s/^X//" >'xtroff/devpsc/README.char' <<'END_OF_FILE'
Xlocal/fonts/bdf/75dpi/devpsc/R		89/01/01.  d. a. cahlander
XNeWS collating sequence
X	32-127 ascii characters
X	128-159 installation dependant
X	160-255 PostScript sequence
X	256-319 ISO Latin 1 sequence
X	320-511 installation dependant
X
X32 space
X33 exclam
X34 quotedbl
X35 numbersign
X36 dollar
X37 percent
X38 ampersand
X39 quoteright
X40 parenleft
X41 parenright
X42 asterisk
X43 plus
X44 comma
X45 hyphen
X46 period
X47 slash
X48 zero
X49 one
X50 two
X51 three
X52 four
X53 five
X54 six
X55 seven
X56 eight
X57 nine
X58 colon
X59 semicolon
X60 less
X61 equal
X62 greater
X63 question
X64 at
X65 A
X66 B
X67 C
X68 D
X69 E
X70 F
X71 G
X72 H
X73 I
X74 J
X75 K
X76 L
X77 M
X78 N
X79 O
X80 P
X81 Q
X82 R
X83 S
X84 T
X85 U
X86 V
X87 W
X88 X
X89 Y
X90 Z
X91 bracketleft
X92 backslash
X93 bracketright
X94 asciicircum
X95 underscore
X96 quoteleft
X97 a
X98 b
X99 c
X100 d
X101 e
X102 f
X103 g
X104 h
X105 i
X106 j
X107 k
X108 l
X109 m
X110 n
X111 o
X112 p
X113 q
X114 r
X115 s
X116 t
X117 u
X118 v
X119 w
X120 x
X121 y
X122 z
X123 braceleft
X124 bar
X125 braceright
X126 asciitilde
X129 onequarter
X130 onehalf
X131 threequarters
X161 exclamdown
X162 cent
X163 sterling
X164 fraction
X165 yen
X166 florin
X167 section
X168 currency
X169 quotesingle
X170 quotedblleft
X171 guillemotleft
X172 guilsinglleft
X173 guilsinglright
X174 fi
X175 fl
X177 endash
X178 dagger
X179 daggerdbl
X180 periodcentered
X182 paragraph
X183 bullet
X184 quotesinglbase
X185 quotedblbase
X186 quotedblright
X187 guillemotright
X188 ellipsis
X189 perthousand
X191 questiondown
X193 grave
X194 acute
X195 circumflex
X196 tilde
X197 macron
X198 breve
X199 dotaccent
X200 dieresis
X202 ring
X203 cedilla
X205 hungarumlaut
X206 ogonek
X207 caron
X208 emdash
X225 AE
X227 ordfeminine
X232 Lslash
X233 Oslash
X234 OE
X235 ordmasculine
X241 ae
X245 dotlessi
X248 lslash
X249 oslash
X250 oe
X251 germandbls
X256 Aacute
X257 Acircumflex
X258 Adieresis
X259 Agrave
X260 Aring
X261 Atilde
X262 Ccedilla
X263 Eacute
X264 Ecircumflex
X265 Edieresis
X266 Egrave
X267 Iacute
X268 Icircumflex
X269 Idieresis
X270 Igrave
X271 Ntilde
X272 Oacute
X273 Ocircumflex
X274 Odieresis
X275 Ograve
X276 Otilde
X277 Scaron
X278 Uacute
X279 Ucircumflex
X280 Udieresis
X281 Ugrave
X282 Ydieresis
X283 Zcaron
X284 aacute
X285 acircumflex
X286 adieresis
X287 agrave
X288 aring
X289 atilde
X290 ccedilla
X291 eacute
X292 ecircumflex
X293 edieresis
X294 egrave
X295 iacute
X296 icircumflex
X297 idieresis
X298 igrave
X299 ntilde
X300 oacute
X301 ocircumflex
X302 odieresis
X303 ograve
X304 otilde
X305 scaron
X306 uacute
X307 ucircumflex
X308 udieresis
X309 ugrave
X310 ydieresis
X311 zcaron
X320 Eth
X321 Thorn
X322 Yacute
X323 brokenbar
X324 copyright
X325 degree
X326 divide
X327 eth
X328 logicalnot
X329 minus
X330 mu
X331 multiply
X332 onesuperior
X333 plusminus
X334 registered
X335 thorn
X336 threesuperior
X337 trademark
X338 twosuperior
X339 yacute
END_OF_FILE
if test 2665 -ne `wc -c <'xtroff/devpsc/README.char'`; then
    echo shar: \"'xtroff/devpsc/README.char'\" unpacked with wrong size!
fi
# end of 'xtroff/devpsc/README.char'
fi
if test -f 'xtroff/devpsc/README.note' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/devpsc/README.note'\"
else
echo shar: Extracting \"'xtroff/devpsc/README.note'\" \(2665 characters\)
sed "s/^X//" >'xtroff/devpsc/README.note' <<'END_OF_FILE'
Xlocal/fonts/bdf/75dpi/devpsc/R		89/01/01.  d. a. cahlander
XNeWS collating sequence
X	32-127 ascii characters
X	128-159 installation dependant
X	160-255 PostScript sequence
X	256-319 ISO Latin 1 sequence
X	320-511 installation dependant
X
X32 space
X33 exclam
X34 quotedbl
X35 numbersign
X36 dollar
X37 percent
X38 ampersand
X39 quoteright
X40 parenleft
X41 parenright
X42 asterisk
X43 plus
X44 comma
X45 hyphen
X46 period
X47 slash
X48 zero
X49 one
X50 two
X51 three
X52 four
X53 five
X54 six
X55 seven
X56 eight
X57 nine
X58 colon
X59 semicolon
X60 less
X61 equal
X62 greater
X63 question
X64 at
X65 A
X66 B
X67 C
X68 D
X69 E
X70 F
X71 G
X72 H
X73 I
X74 J
X75 K
X76 L
X77 M
X78 N
X79 O
X80 P
X81 Q
X82 R
X83 S
X84 T
X85 U
X86 V
X87 W
X88 X
X89 Y
X90 Z
X91 bracketleft
X92 backslash
X93 bracketright
X94 asciicircum
X95 underscore
X96 quoteleft
X97 a
X98 b
X99 c
X100 d
X101 e
X102 f
X103 g
X104 h
X105 i
X106 j
X107 k
X108 l
X109 m
X110 n
X111 o
X112 p
X113 q
X114 r
X115 s
X116 t
X117 u
X118 v
X119 w
X120 x
X121 y
X122 z
X123 braceleft
X124 bar
X125 braceright
X126 asciitilde
X129 onequarter
X130 onehalf
X131 threequarters
X161 exclamdown
X162 cent
X163 sterling
X164 fraction
X165 yen
X166 florin
X167 section
X168 currency
X169 quotesingle
X170 quotedblleft
X171 guillemotleft
X172 guilsinglleft
X173 guilsinglright
X174 fi
X175 fl
X177 endash
X178 dagger
X179 daggerdbl
X180 periodcentered
X182 paragraph
X183 bullet
X184 quotesinglbase
X185 quotedblbase
X186 quotedblright
X187 guillemotright
X188 ellipsis
X189 perthousand
X191 questiondown
X193 grave
X194 acute
X195 circumflex
X196 tilde
X197 macron
X198 breve
X199 dotaccent
X200 dieresis
X202 ring
X203 cedilla
X205 hungarumlaut
X206 ogonek
X207 caron
X208 emdash
X225 AE
X227 ordfeminine
X232 Lslash
X233 Oslash
X234 OE
X235 ordmasculine
X241 ae
X245 dotlessi
X248 lslash
X249 oslash
X250 oe
X251 germandbls
X256 Aacute
X257 Acircumflex
X258 Adieresis
X259 Agrave
X260 Aring
X261 Atilde
X262 Ccedilla
X263 Eacute
X264 Ecircumflex
X265 Edieresis
X266 Egrave
X267 Iacute
X268 Icircumflex
X269 Idieresis
X270 Igrave
X271 Ntilde
X272 Oacute
X273 Ocircumflex
X274 Odieresis
X275 Ograve
X276 Otilde
X277 Scaron
X278 Uacute
X279 Ucircumflex
X280 Udieresis
X281 Ugrave
X282 Ydieresis
X283 Zcaron
X284 aacute
X285 acircumflex
X286 adieresis
X287 agrave
X288 aring
X289 atilde
X290 ccedilla
X291 eacute
X292 ecircumflex
X293 edieresis
X294 egrave
X295 iacute
X296 icircumflex
X297 idieresis
X298 igrave
X299 ntilde
X300 oacute
X301 ocircumflex
X302 odieresis
X303 ograve
X304 otilde
X305 scaron
X306 uacute
X307 ucircumflex
X308 udieresis
X309 ugrave
X310 ydieresis
X311 zcaron
X320 Eth
X321 Thorn
X322 Yacute
X323 brokenbar
X324 copyright
X325 degree
X326 divide
X327 eth
X328 logicalnot
X329 minus
X330 mu
X331 multiply
X332 onesuperior
X333 plusminus
X334 registered
X335 thorn
X336 threesuperior
X337 trademark
X338 twosuperior
X339 yacute
END_OF_FILE
if test 2665 -ne `wc -c <'xtroff/devpsc/README.note'`; then
    echo shar: \"'xtroff/devpsc/README.note'\" unpacked with wrong size!
fi
# end of 'xtroff/devpsc/README.note'
fi
if test -f 'xtroff/devpsc/S.aux' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/devpsc/S.aux'\"
else
echo shar: Extracting \"'xtroff/devpsc/S.aux'\" \(1977 characters\)
sed "s/^X//" >'xtroff/devpsc/S.aux' <<'END_OF_FILE'
X33 333 0
X34 713 0
X35 500 0
X36 549 0
X37 833 0
X38 778 0
X39 439 0
X40 333 0
X41 333 0
X42 500 0
X43 549 0
X44 250 0
X45 549 0
X46 250 0
X47 278 0
X48 500 0
X49 500 0
X50 500 0
X51 500 0
X52 500 0
X53 500 0
X54 500 0
X55 500 0
X56 500 0
X57 500 0
X58 278 0
X59 278 0
X60 549 0
X61 549 0
X62 549 0
X63 444 0
X64 549 0
X65 722 0
X66 667 0
X67 722 0
X68 612 0
X69 611 0
X70 763 0
X71 603 0
X72 722 0
X73 333 0
X74 631 0
X75 722 0
X76 686 0
X77 889 0
X78 722 0
X79 722 0
X80 768 0
X81 741 0
X82 556 0
X83 592 0
X84 611 0
X85 690 0
X86 439 0
X87 768 0
X88 645 0
X89 795 0
X90 611 0
X91 333 0
X92 863 0
X93 333 0
X94 658 0
X95 500 0
X96 500 0
X97 631 0
X98 549 0
X99 549 0
X100 494 0
X101 439 0
X102 521 0
X103 411 0
X104 603 0
X105 329 0
X106 603 0
X107 549 0
X108 549 0
X109 576 0
X110 521 0
X111 549 0
X112 549 0
X113 521 0
X114 549 0
X115 603 0
X116 439 0
X117 576 0
X118 713 0
X119 686 0
X120 493 0
X121 686 0
X122 494 0
X123 480 0
X124 200 0
X125 480 0
X126 549 0
X161 620 0
X162 247 0
X163 549 0
X164 167 0
X165 713 0
X166 500 0
X167 753 0
X168 753 0
X169 753 0
X170 753 0
X171 1042 0
X172 987 0
X173 603 0
X174 987 0
X175 603 0
X176 400 0
X177 549 0
X178 411 0
X179 549 0
X180 549 0
X181 713 0
X182 494 0
X183 460 0
X184 549 0
X185 549 0
X186 549 0
X187 549 0
X188 1000 0
X189 603 0
X190 1000 0
X191 658 0
X192 823 0
X193 686 0
X194 795 0
X195 987 0
X196 768 0
X197 768 0
X198 823 0
X199 768 0
X200 768 0
X201 713 0
X202 713 0
X203 713 0
X204 713 0
X205 713 0
X206 713 0
X207 713 0
X208 768 0
X209 713 0
X210 790 0
X211 790 0
X212 890 0
X213 823 0
X214 549 0
X215 250 0
X216 713 0
X217 603 0
X218 603 0
X219 1042 0
X220 987 0
X221 603 0
X222 987 0
X223 603 0
X224 494 0
X225 329 0
X226 790 0
X227 790 0
X228 786 0
X229 713 0
X230 384 0
X231 384 0
X232 384 0
X233 384 0
X234 384 0
X235 384 0
X236 494 0
X237 494 0
X238 494 0
X239 494 0
X240 790 0
X241 329 0
X242 274 0
X243 686 0
X244 686 0
X245 686 0
X246 384 0
X247 384 0
X248 384 0
X249 384 0
X250 384 0
X251 384 0
X252 494 0
X253 494 0
X254 494 0
X133 722 1
X132 722 1
X134 790 1
X135 200 1
X137 500 1
X148 384 1
X136 384 1
X146 384 1
X141 494 1
X144 494 1
X142 494 1
X147 384 1
X145 384 1
X139 494 1
X143 494 1
X140 494 1
END_OF_FILE
if test 1977 -ne `wc -c <'xtroff/devpsc/S.aux'`; then
    echo shar: \"'xtroff/devpsc/S.aux'\" unpacked with wrong size!
fi
# end of 'xtroff/devpsc/S.aux'
fi
if test -f 'xtroff/devsun/db' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/devsun/db'\"
else
echo shar: Extracting \"'xtroff/devsun/db'\" \(2001 characters\)
sed "s/^X//" >'xtroff/devsun/db' <<'END_OF_FILE'
X# Font /usr/lib/vfont/delegate.b.12, max width 17, max height 25
Xname db
Xspacewidth 51
X# char	width	u/d	octal
Xcharset
X\|	  51	 0	015
X\^	   0	 0	015
Xda	  51	 0	01
X*a	  51	 0	02
X*b	  51	 1	03
Xan	  51	 0	04
Xno	  51	 0	05
Xmo	  51	 0	06
X*p	  51	 0	07
X*l	  51	 0	010
X*g	  51	 2	011
X*d	  51	 2	012
Xua	  51	 0	013
X+-	  51	 2	014
Xif	  51	 0	016
Xpd	  51	 0	017
Xsb	  51	 0	020
Xsp	  51	 0	021
Xca	  51	 0	022
Xcu	  51	 0	023
Xfa	  51	 0	024
Xte	  51	 0	025
XOX	  51	 0	026
X<>	  51	 0	027
X<-	  51	 0	030
X->	  51	 0	031
X!=	  51	 0	032
Xap	  51	 0	033
X<=	  51	 0	034
X>=	  51	 0	035
X==	  51	 0	036
Xor	  51	 0	037
X!	  51	 0	041
X"	  51	 0	042
X#	  51	 0	043
X$	  51	 0	044
X%	  51	 0	045
X&	  51	 0	046
X'	  51	 0	047
X(	  51	 0	050
X)	  51	 0	051
X*	  51	 0	052
X+	  51	 0	053
X,	  51	 1	054
X-	  51	 0	055
Xhy	"
X\-	"
X.	  51	 0	056
X/	  51	 0	057
X0	  51	 0	060
X1	  51	 0	061
X2	  51	 0	062
X3	  51	 0	063
X4	  51	 0	064
X5	  51	 0	065
X6	  51	 0	066
X7	  51	 0	067
X8	  51	 0	070
X9	  51	 0	071
X:	  51	 0	072
X;	  51	 1	073
X<	  51	 0	074
X=	  51	 0	075
X>	  51	 0	076
X?	  51	 0	077
X@	  51	 0	0100
XA	  51	 0	0101
XB	  51	 0	0102
XC	  51	 0	0103
XD	  51	 0	0104
XE	  51	 0	0105
XF	  51	 0	0106
XG	  51	 0	0107
XH	  51	 0	0110
XI	  51	 0	0111
XJ	  51	 0	0112
XK	  51	 0	0113
XL	  51	 0	0114
XM	  51	 0	0115
XN	  51	 0	0116
XO	  51	 0	0117
XP	  51	 0	0120
XQ	  51	 1	0121
XR	  51	 0	0122
XS	  51	 0	0123
XT	  51	 0	0124
XU	  51	 0	0125
XV	  51	 0	0126
XW	  51	 0	0127
XX	  51	 0	0130
XY	  51	 0	0131
XZ	  51	 0	0132
X[	  51	 0	0133
X\	  51	 0	0134
X]	  51	 0	0135
X^	  51	 0	0136
X_	  51	 0	0137
X\_	"
X`	  51	 0	0140
Xa	  51	 0	0141
Xb	  51	 0	0142
Xc	  51	 0	0143
Xd	  51	 0	0144
Xe	  51	 0	0145
Xf	  51	 0	0146
Xg	  51	 1	0147
Xh	  51	 0	0150
Xi	  51	 0	0151
Xj	  51	 1	0152
Xk	  51	 0	0153
Xl	  51	 0	0154
Xm	  51	 0	0155
Xn	  51	 0	0156
Xo	  51	 0	0157
Xp	  51	 1	0160
Xq	  51	 1	0161
Xr	  51	 0	0162
Xs	  51	 0	0163
Xt	  51	 0	0164
Xu	  51	 0	0165
Xv	  51	 0	0166
Xw	  51	 0	0167
Xx	  51	 0	0170
Xy	  51	 1	0171
Xz	  51	 0	0172
X{	  51	 0	0173
X|	  51	 0	0174
X}	  51	 0	0175
X~	  51	 0	0176
X??	  51	 1	0177
END_OF_FILE
if test 2001 -ne `wc -c <'xtroff/devsun/db'`; then
    echo shar: \"'xtroff/devsun/db'\" unpacked with wrong size!
fi
# end of 'xtroff/devsun/db'
fi
if test -f 'xtroff/devsun/dr' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/devsun/dr'\"
else
echo shar: Extracting \"'xtroff/devsun/dr'\" \(2001 characters\)
sed "s/^X//" >'xtroff/devsun/dr' <<'END_OF_FILE'
X# Font /usr/lib/vfont/delegate.r.12, max width 17, max height 25
Xname dr
Xspacewidth 51
X# char	width	u/d	octal
Xcharset
X\|	  51	 0	015
X\^	   0	 0	015
Xda	  51	 3	01
X*a	  51	 3	02
X*b	  51	 3	03
Xan	  51	 3	04
Xno	  51	 3	05
Xmo	  51	 3	06
X*p	  51	 3	07
X*l	  51	 3	010
X*g	  51	 3	011
X*d	  51	 3	012
Xua	  51	 3	013
X+-	  51	 3	014
Xif	  51	 3	016
Xpd	  51	 3	017
Xsb	  51	 3	020
Xsp	  51	 3	021
Xca	  51	 3	022
Xcu	  51	 3	023
Xfa	  51	 3	024
Xte	  51	 3	025
XOX	  51	 3	026
X<>	  51	 3	027
X<-	  51	 3	030
X->	  51	 3	031
X!=	  51	 3	032
Xap	  51	 3	033
X<=	  51	 3	034
X>=	  51	 3	035
X==	  51	 3	036
Xor	  51	 3	037
X!	  51	 3	041
X"	  51	 3	042
X#	  51	 3	043
X$	  51	 3	044
X%	  51	 3	045
X&	  51	 3	046
X'	  51	 3	047
X(	  51	 3	050
X)	  51	 3	051
X*	  51	 3	052
X+	  51	 3	053
X,	  51	 3	054
X-	  51	 3	055
Xhy	"
X\-	"
X.	  51	 3	056
X/	  51	 3	057
X0	  51	 3	060
X1	  51	 3	061
X2	  51	 3	062
X3	  51	 3	063
X4	  51	 3	064
X5	  51	 3	065
X6	  51	 3	066
X7	  51	 3	067
X8	  51	 3	070
X9	  51	 3	071
X:	  51	 3	072
X;	  51	 3	073
X<	  51	 3	074
X=	  51	 3	075
X>	  51	 3	076
X?	  51	 3	077
X@	  51	 3	0100
XA	  51	 3	0101
XB	  51	 3	0102
XC	  51	 3	0103
XD	  51	 3	0104
XE	  51	 3	0105
XF	  51	 3	0106
XG	  51	 3	0107
XH	  51	 3	0110
XI	  51	 3	0111
XJ	  51	 3	0112
XK	  51	 3	0113
XL	  51	 3	0114
XM	  51	 3	0115
XN	  51	 3	0116
XO	  51	 3	0117
XP	  51	 3	0120
XQ	  51	 3	0121
XR	  51	 3	0122
XS	  51	 3	0123
XT	  51	 3	0124
XU	  51	 3	0125
XV	  51	 3	0126
XW	  51	 3	0127
XX	  51	 3	0130
XY	  51	 3	0131
XZ	  51	 3	0132
X[	  51	 3	0133
X\	  51	 3	0134
X]	  51	 3	0135
X^	  51	 3	0136
X_	  51	 3	0137
X\_	"
X`	  51	 3	0140
Xa	  51	 3	0141
Xb	  51	 3	0142
Xc	  51	 3	0143
Xd	  51	 3	0144
Xe	  51	 3	0145
Xf	  51	 3	0146
Xg	  51	 3	0147
Xh	  51	 3	0150
Xi	  51	 3	0151
Xj	  51	 3	0152
Xk	  51	 3	0153
Xl	  51	 3	0154
Xm	  51	 3	0155
Xn	  51	 3	0156
Xo	  51	 3	0157
Xp	  51	 3	0160
Xq	  51	 3	0161
Xr	  51	 3	0162
Xs	  51	 3	0163
Xt	  51	 3	0164
Xu	  51	 3	0165
Xv	  51	 3	0166
Xw	  51	 3	0167
Xx	  51	 3	0170
Xy	  51	 3	0171
Xz	  51	 3	0172
X{	  51	 3	0173
X|	  51	 3	0174
X}	  51	 3	0175
X~	  51	 3	0176
X??	  51	 3	0177
END_OF_FILE
if test 2001 -ne `wc -c <'xtroff/devsun/dr'`; then
    echo shar: \"'xtroff/devsun/dr'\" unpacked with wrong size!
fi
# end of 'xtroff/devsun/dr'
fi
if test -f 'xtroff/devsun/gf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/devsun/gf'\"
else
echo shar: Extracting \"'xtroff/devsun/gf'\" \(2004 characters\)
sed "s/^X//" >'xtroff/devsun/gf' <<'END_OF_FILE'
X# Font /usr/lib/vfont/graphics.14, max width 35, max height 16
Xname gf
Xspacewidth 41
X# char	width	u/d	octal
Xcharset
X\|	  41	 0	040
X\^	   0	 0	040
Xda	  41	 3	01
X*a	  41	 0	02
X*b	  41	 3	03
Xan	  41	 0	04
Xno	  41	 3	05
Xmo	  41	 3	06
X*p	  41	 1	07
X*l	  41	 3	010
X*g	  41	 2	011
X*d	  41	 2	012
Xua	  41	 2	013
X+-	  41	 2	014
XO+	  41	 2	015
Xif	  41	 0	016
Xpd	  41	 2	017
Xsb	  41	 1	020
Xsp	  41	 1	021
Xca	  41	 3	022
Xcu	  41	 3	023
Xfa	  41	 2	024
Xte	  41	 3	025
XOX	  41	 3	026
X<>	  41	 0	027
X<-	  41	 0	030
X->	  41	 0	031
X!=	  41	 3	032
Xap	  41	 0	033
X<=	  41	 1	034
X>=	  41	 1	035
X==	  41	 2	036
Xor	  41	 0	037
X!	  41	 2	041
X"	  41	 2	042
X#	  41	 0	043
X$	  41	 2	044
X%	  41	 2	045
X&	  41	 3	046
X'	  41	 2	047
X(	  41	 2	050
X)	  41	 2	051
X*	  41	 2	052
X+	  41	 0	053
X,	  41	 0	054
X-	  41	 0	055
X\-	"
X.	  41	 0	056
X/	  41	 3	057
X0	  41	 2	060
X1	  41	 2	061
X2	  41	 2	062
X3	  41	 2	063
X4	  41	 2	064
X5	  41	 2	065
X6	  41	 2	066
X7	  41	 2	067
X8	  41	 2	070
X9	  41	 2	071
X:	  41	 0	072
X;	  41	 0	073
X<	  41	 0	074
X=	  41	 0	075
X>	  41	 0	076
X?	  41	 2	077
X@	  41	 0	0100
XA	  41	 2	0101
XB	  41	 2	0102
XC	  41	 2	0103
XD	  41	 2	0104
XE	  41	 2	0105
XF	  41	 2	0106
XG	  41	 2	0107
XH	  41	 2	0110
XI	  41	 2	0111
XJ	  41	 2	0112
XK	  41	 2	0113
XL	  41	 2	0114
XM	  41	 2	0115
XN	  41	 2	0116
XO	  41	 2	0117
XP	  41	 2	0120
XQ	  41	 2	0121
XR	  41	 2	0122
XS	  41	 2	0123
XT	  41	 2	0124
XU	  41	 2	0125
XV	  41	 2	0126
XW	  41	 2	0127
XX	  41	 2	0130
XY	  41	 2	0131
XZ	  41	 2	0132
X[	  41	 2	0133
X\	  41	 3	0134
X]	  41	 2	0135
X^	  41	 3	0136
X_	  41	 0	0137
X`	  41	 2	0140
Xa	  41	 0	0141
Xb	  41	 2	0142
Xc	  41	 0	0143
Xd	  41	 2	0144
Xe	  41	 0	0145
Xf	  41	 2	0146
Xg	  41	 0	0147
Xh	  41	 2	0150
Xi	  41	 2	0151
Xj	  41	 2	0152
Xk	  41	 2	0153
Xl	  41	 2	0154
Xm	  41	 0	0155
Xn	  41	 0	0156
Xo	  41	 0	0157
Xp	  41	 0	0160
Xq	  41	 0	0161
Xr	  41	 0	0162
Xs	  41	 0	0163
Xt	  41	 2	0164
Xu	  41	 0	0165
Xv	  41	 0	0166
Xw	  41	 0	0167
Xx	  41	 0	0170
Xy	  41	 0	0171
Xz	  41	 0	0172
X{	  41	 2	0173
X|	  41	 2	0174
X}	  41	 2	0175
X~	  41	 2	0176
X??	  41	 2	0177
END_OF_FILE
if test 2004 -ne `wc -c <'xtroff/devsun/gf'`; then
    echo shar: \"'xtroff/devsun/gf'\" unpacked with wrong size!
fi
# end of 'xtroff/devsun/gf'
fi
if test -f 'xtroff/fixpoint.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/fixpoint.c'\"
else
echo shar: Extracting \"'xtroff/fixpoint.c'\" \(3191 characters\)
sed "s/^X//" >'xtroff/fixpoint.c' <<'END_OF_FILE'
X/*
X *	SunTroff -  A program to display the output of Device Independent
X *		Troff as a window on a Sun Workstation.
X *
X *	Authors - The original version of this program was written by
X *			Richard L. Hyde (Purdue)
X *			David Slattengren (Berkeley)
X *		It was nearly all rewritten, cleaned up and a more elegant
X *		user interface installed by
X *			Malcolm Slaney (Schlumberger Palo Alto Research)
X *
X *	Legalese -  This command was developed as an independent project
X *		to satisfy a need of the author.  This program may contain
X *		bugs and the user is cautioned to independently verify that
X *		the program is suitable for the user's intended purpose.
X *		The program is made available on an ``as is'' basis with
X *		all faults and without any implied or expressed warranties
X *		or support from either the author, Malcolm Slaney, or
X *		Schlumberger Palo Alto Research Laboratory.
X *
X *		I am putting this program in the public domain.  You are
X *		free to use it as you wish.  In return I ask two things.
X *		First, that you do not remove the names of the authors
X *		from this work.  Secondly, if you make changes or
X *		improvements to this program that you pass these back to
X *		the author so that everybody can benefit from the
X *		improvements.
X *
X *					Malcolm Slaney  (December 1986)
X *					Schlumberger Palo Alto Research
X *					3340 Hillview Avenue
X *					Palo Alto, CA 94304
X *					(415) 496-4669
X *					spar!malcolm at decwrl.dec.com
X *					malcolm at ecn.purdue.edu
X *					malcolm at spar.slb.com (Someday)
X */
X
X/*
X *
X *	"long" fixed-point arithmetic package library
X *
X *	This DEPENDS on a sign-filled arithmetic right-shift
X */
X
X#include "fixpoint.h"
X
X
X#define F_INTEGER	(((1<<F_INTSHFT)-1)<<F_INTSHFT)
X#define F_FRACTION	((1<<F_INTSHFT)-1)
X#define F_FRACT		((1<<F_QSHFT)-1)
X#define	F_SIGN_BIT	(1 << ((F_INTSHFT * 2) - 1))
X
X
X/*----------------------------------------------------------------------------*
X | Routine:	fmult (fixed x, fixed y)
X |
X | Results:	returns fixed-point product of x and y (fixed-point numbers)
X |
X | Bugs:	Requires arithmetic right-shift
X *----------------------------------------------------------------------------*/
X
Xfixed fmult(x, y)
Xregister fixed x;
Xregister fixed y;
X{
X    return
X    ((x >> F_QSHFT) * (y >> F_QSHFT))			/* int * int */
X    + (((x >> F_QSHFT) * (y & F_FRACT)) >> F_QSHFT)	/* int * fract */ 
X    + (((y >> F_QSHFT) * (x & F_FRACT)) >> F_QSHFT);	/* fract * int */
X}
X
X
X/*----------------------------------------------------------------------------*
X | Routine:	fdiv (fixed x, fixed y)
X |
X | Results:	returns the fixed-point quotient of x / y (fixed-point numbers)
X |
X | Bugs:	returns largest possible numbers on divide by zero.
X |		Requires arithmetic right-shift
X *----------------------------------------------------------------------------*/
X
Xfixed fdiv(x, y)
Xregister fixed x;
Xregister fixed y;
X{
X    register int i = F_INTSHFT;
X    register fixed temp;
X
X    if (y == 0)
X	return (x < 0 ? (fixed) F_SIGN_BIT : (fixed)~F_SIGN_BIT);
X
X    while (((temp = x << 1) & F_SIGN_BIT) == (x & F_SIGN_BIT)) {
X	x = temp;
X	i--;
X    }
X    while (!(y & 1)) {
X	y >>= 1;
X	i--;
X    }
X    if(i<0)
X	return ((x / y) >> -i);
X    return ((x / y) << i);
X}
END_OF_FILE
if test 3191 -ne `wc -c <'xtroff/fixpoint.c'`; then
    echo shar: \"'xtroff/fixpoint.c'\" unpacked with wrong size!
fi
# end of 'xtroff/fixpoint.c'
fi
if test -f 'xtroff/fontstuff/MakeImFonts' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/fontstuff/MakeImFonts'\"
else
echo shar: Extracting \"'xtroff/fontstuff/MakeImFonts'\" \(3513 characters\)
sed "s/^X//" >'xtroff/fontstuff/MakeImFonts' <<'END_OF_FILE'
X#!/bin/sh
X#
X#	This file can be used to make all the reduced fonts needed
X#	by SunTroff.  The RSTFONTS variable points to the location of
X#	the RST fonts provided by Imagen.  Finally the SUNTROFF_FONTS
X#	variable points to the final location of the reduced fonts.
X#	The DEVICE variable is the name of the device used for Imagen
X#	typesetting.  The actual location of the reduced imagen fonts
X#	will be $SUNTROFF_FONTS/$DEVICE.
X#
XRSTFONTS=${1-/usr/local/lib/imagen/fonts/rst}
XSUNTROFF_FONTS=${2-/usr/local/lib/suntroff/devimp}
XDEVICE=imp
X
X#
X#	Reduce fonts by 120/300
X#
X#	Because of scalech this number must be a TWO digit percentage!!
X#
XPERCENT=${3-40}
Xdpi=120
X
XXWIN=${4}
Xif test x$XWIN != x ; then
X	if test $XWIN != suntroff ; then
X		XWIN=x
X		FC=${5-bdftosnf}
X		extension='.snf'
X	else
X		XWIN=
X		FC=
X		extension=
X	fi
Xfi
XDEVICE=${6-sun}
X
X#	If you don't have the current directory in your path (.) then
X#	you will need to change the BIN_DIR variable to point to the
X#	location of this directory.  Many thanks to Len at Sentry for
X#	pointing this potential problem out.
X#
XBIN_DIR=.
X
XTEMP=/tmp/font
XTEMP2=/tmp/font2
X
Xif [ ! -d $SUNTROFF_FONTS ]
Xthen
X	mkdir $SUNTROFF_FONTS
Xelse
X	echo Font Directory already in place.
Xfi
X
X#
X#	Now create those fonts that we can make by renaming.....
X#
X
Xfor i in `cd $RSTFONTS;echo [a-zA-Z]/[0-9] [a-zA-Z]/[0-9][0-9] \
X			  [a-zA-Z][a-zA-Z]/[0-9] [a-zA-Z][a-zA-Z]/[0-9][0-9]`
Xdo
X	if [ -r $RSTFONTS/$i ]
X	then
X		Size=`echo $i | sed "s/.*\///"`
X		Font=`echo $i | sed "s/\/.*//"`
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.$dpi
X			fname=$fname$NewSize.snf
X		else
X			fname=$Font.$NewSize
X		fi
X		if [ ! -r $SUNTROFF_FONTS/$fname ]
X		then
X			echo Converting $RSTFONTS/$i to \
X				$SUNTROFF_FONTS/$fname
X			$BIN_DIR/rst2ch $RSTFONTS/$i > $TEMP
X			if [ x$XWIN = x ] ; then 
X				$BIN_DIR/ch2vft $TEMP > \
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		fi
X	fi
Xdone
X
X#
X#	Now create the fonts that we need to make by bit reduction.
X#	First check to see if we have a font "close enough".  Close
X#	enough is defined here to be within one point size.
X#
Xfor i in `cd $RSTFONTS;echo [a-zA-Z]/[0-9] [a-zA-Z]/[0-9][0-9] \
X			  [a-zA-Z][a-zA-Z]/[0-9] [a-zA-Z][a-zA-Z]/[0-9][0-9]`
Xdo
X	if [ -r $RSTFONTS/$i ]
X	then
X		Size=`echo $i | sed "s/.*\///"`
X		Font=`echo $i | sed "s/\/.*//"`
X
X		if [ x$XWIN = x ]
X		then
X			f1=$SUNTROFF_FONTS/$Font.`expr $Size - 1`
X			f2=$SUNTROFF_FONTS/$Font.`expr $Size`
X			f3=$SUNTROFF_FONTS/$Font.`expr $Size + 1`
X			fname=$Font.$Size
X		else
X			Font=`echo $Font | tr A-Z a-z`
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			fontname=$DEVICE.$Font.$Size.$dpi
X			fname=$Font$Size$extension
X		fi
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/$fname
X			$BIN_DIR/rst2ch $RSTFONTS/$i > $TEMP
X			$BIN_DIR/scalech -s$PERCENT  $TEMP > $TEMP2
X			if test x$XWIN = x ; then
X				$BIN_DIR/ch2vft $TEMP2 > $SUNTROFF_FONTS/$i
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
Xdone
Xif [ x$XWIN != x ]; then
X	mkfontdir $SUNTROFF_FONTS
Xfi
END_OF_FILE
if test 3513 -ne `wc -c <'xtroff/fontstuff/MakeImFonts'`; then
    echo shar: \"'xtroff/fontstuff/MakeImFonts'\" unpacked with wrong size!
fi
# end of 'xtroff/fontstuff/MakeImFonts'
fi
if test -f 'xtroff/fontstuff/vft2ch.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/fontstuff/vft2ch.c'\"
else
echo shar: Extracting \"'xtroff/fontstuff/vft2ch.c'\" \(3342 characters\)
sed "s/^X//" >'xtroff/fontstuff/vft2ch.c' <<'END_OF_FILE'
X/* Font translation for vfont-style fonts to character format.
X *
X *	Use:  vft2ch fontfile  [ character_list ]
X *
X *		Reads "fontfile" from current directory (or if not found,
X *	from VFONTDIR defined below) and converts it to a character font format
X *	editable by real people, and convertable BACK to vfont format by the
X *	ch2rst program.  Output goes to stdout.
X */
X
X#include <stdio.h>
X#include <ctype.h>
X#include <vfont.h>
X
X
X#define	DIRSIZ	256
X#define	MAGICNO	0436
X
X#ifndef	VFONTDIR
X#define VFONTDIR		"/usr/lib/vfont"
X#endif	VFONTDIR
X
X
Xstruct header FontHeader;
Xstruct dispatch disptable[DIRSIZ];
X
Xchar	IName[100];
Xlong	fbase;
X
Xunsigned char	defascii[DIRSIZ];
Xunsigned char	*charswanted = defascii;
Xchar	charbits[20000];
Xint	height, width, bwidth;
X
X
Xmain(argc,argv)
Xint argc;
Xchar **argv;
X{
X	int FID,i,j;
X
X	if (argc < 2)
X		error("usage: %s filename", argv[0]);
X
X	for (i=0; i<DIRSIZ; i++)
X		defascii[i] = i;
X	if (argc >= 3)
X		charswanted = (unsigned char *) argv[2];
X
X	sprintf(IName,"%s/%s", VFONTDIR, argv[1]);
X	if ((FID = open(argv[1],0)) < 0)
X		if ((FID = open(IName,0)) < 0)
X			error("Can't find %s", argv[1]);
X
X	if (read(FID,&FontHeader,sizeof FontHeader) != sizeof FontHeader)
X		error("bad header in Font file.");
X	if (FontHeader.magic != MAGICNO)
X		error("magic number %o wrong", FontHeader.magic);
X	if (read(FID,&disptable[0],sizeof disptable) != sizeof disptable)
X		error("bad dispatch table in Font file");
X	fbase = sizeof FontHeader + sizeof disptable;
X
X	while (*argv[1] != '.' || *(argv[1]+1) < '0' || *(argv[1]+1) > '9')
X		(argv[1])++;
X	printf("fontheader\nsize 46\nmag 1000\ndesiz %d\n", atoi(*argv));
X	printf("rot 0\ncadv 0\nladv 1\nid 0\nres 200\n");
X
X	for (i=0; i<DIRSIZ; i++) {
X		j = charswanted[i];
X		if (i>0 && j==0)
X			break;
X		if (disptable[j].nbytes != 0) {
X			register int k, l;
X			register int left = disptable[j].left;
X			register int right = disptable[j].right;
X			register int up = disptable[j].up;
X			register int down = disptable[j].down;
X
X
X			printf(":%d, width = %d.01\n", j, disptable[j].width);
X
X			lseek(FID, fbase+disptable[j].addr, 0);
X			read(FID, charbits, disptable[j].nbytes);
X			height = up + down;
X			width = left + right;
X			bwidth = (width+7)/8;
X			for (k = up; k < 0; k++) {
X			    for (l = left; l < 0; l++)
X				pbit(l, k, l==left && k==up);
X			    for (l = 0; l <= left; l++)
X				pbit(l, k, l==left && k==up);
X			    while (l < width)
X				pbit(l++, k, 0);
X			    printf("\n");
X			}
X			for (k = 0; k <= up; k++) {
X			    for (l = left; l < 0; l++)
X				pbit(l, k, l==left && k==up);
X			    for (l = 0; l <= left; l++)
X				pbit(l, k, l==left && k==up);
X			    while (l < width)
X				pbit(l++, k, 0);
X			    printf("\n");
X			}
X			while (k < height) {
X			    for (l = left; l < 0; l++)
X				pbit(l, k, 0);
X			    for (l = 0; l <= left; l++)
X				pbit(l, k, 0);
X			    while (l < width)
X				pbit(l++, k, 0);
X			    printf("\n");
X			    k++;
X			}
X			printf("\n");
X		}
X	}
X}
X
X
X/*VARARGS1*/
Xerror(string, a1, a2, a3, a4)
Xchar *string;
X{ 
X	fprintf(stderr, "vft2ch: ");
X	fprintf(stderr, string, a1, a2, a3, a4);
X	fprintf(stderr, "\n");
X	exit(8);
X}
X
X
Xpbit(col, row, flag)
Xint col, row, flag;
X{
X	if (col<0 || row<0 || row>=height || col>=width) {
X		printf(flag?"x":".");
X		return;
X	}
X	if ((charbits[row*bwidth + (col>>3)] & 0xff) & (0x80 >> (col&7)))
X		printf(flag?"X":"@");
X	else
X		printf(flag?"x":".");
X}
END_OF_FILE
if test 3342 -ne `wc -c <'xtroff/fontstuff/vft2ch.c'`; then
    echo shar: \"'xtroff/fontstuff/vft2ch.c'\" unpacked with wrong size!
fi
# end of 'xtroff/fontstuff/vft2ch.c'
fi
echo shar: End of archive 4 \(of 18\).
cp /dev/null ark4isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 18 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0



More information about the Comp.sources.x mailing list