BSD 4_3 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Sat, 1 Feb 1986 06:50:56 +0000 (22:50 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Sat, 1 Feb 1986 06:50:56 +0000 (22:50 -0800)
Work on file usr/src/games/monop/Makefile
Work on file usr/contrib/apl/lib/Makefile
Work on file usr/contrib/cpm/src/Makefile
Work on file usr/contrib/X/man/bitmap.1
Work on file usr/contrib/X/man/resize.1
Work on file usr/contrib/X/man/xfd.1
Work on file usr/contrib/X/man/xdemo.1
Work on file usr/contrib/hyper/hylog/Makefile
Work on file usr/contrib/X/man/xfax.1
Work on file usr/contrib/X/man/xclock.1
Work on file usr/contrib/X/man/xnwm.1
Work on file usr/contrib/X/man/xload.1
Work on file usr/contrib/X/man/xwm.1
Work on file usr/contrib/hyper/hyroute/Makefile
Work on file usr/contrib/X/man/Xqvss.8c
Work on file usr/contrib/X/man/xtext.3x
Work on file usr/contrib/X/man/X.8c
Work on file usr/contrib/icon/Makefile
Work on file usr/contrib/mkmf/src/buildlist.c
Work on file usr/contrib/mkmf/src/Mkmf.c
Work on file usr/contrib/mkmf/man/mann/mkmf.n
Work on file usr/contrib/rn/Makefile.SH
Work on file usr/contrib/X/man/xpr.1
Work on file usr/contrib/X/man/ximpv.1
Work on file usr/contrib/X/man/biff.1
Work on file usr/contrib/X/man/xwd.1
Work on file usr/contrib/X/man/xwud.1
Work on file usr/contrib/X/man/pikapix.1
Work on file usr/contrib/X/man/XMenu.3x
Work on file usr/contrib/spms/Makefile
Work on file usr/contrib/X/man/Xvs100.8c
Work on file usr/contrib/X/man/xrefresh.1
Work on file usr/contrib/X/man/Makefile
Work on file usr/contrib/X/man/xshell.1
Work on file usr/contrib/X/man/Xnest.8c
Work on file usr/contrib/X/man/Xlib.3x
Work on file usr/contrib/spms/bin/pinstall
Work on file usr/contrib/X/man/xwininfo.1
Work on file usr/contrib/X/man/xhost.1
Work on file usr/contrib/X/man/xinit.1

Synthesized-from: CSRG/cd1/4.3

40 files changed:
usr/contrib/X/man/Makefile [new file with mode: 0644]
usr/contrib/X/man/X.8c [new file with mode: 0644]
usr/contrib/X/man/XMenu.3x [new file with mode: 0644]
usr/contrib/X/man/Xlib.3x [new file with mode: 0644]
usr/contrib/X/man/Xnest.8c [new file with mode: 0644]
usr/contrib/X/man/Xqvss.8c [new file with mode: 0644]
usr/contrib/X/man/Xvs100.8c [new file with mode: 0644]
usr/contrib/X/man/biff.1 [new file with mode: 0644]
usr/contrib/X/man/bitmap.1 [new file with mode: 0644]
usr/contrib/X/man/pikapix.1 [new file with mode: 0644]
usr/contrib/X/man/resize.1 [new file with mode: 0644]
usr/contrib/X/man/xclock.1 [new file with mode: 0644]
usr/contrib/X/man/xdemo.1 [new file with mode: 0644]
usr/contrib/X/man/xfax.1 [new file with mode: 0644]
usr/contrib/X/man/xfd.1 [new file with mode: 0644]
usr/contrib/X/man/xhost.1 [new file with mode: 0644]
usr/contrib/X/man/ximpv.1 [new file with mode: 0644]
usr/contrib/X/man/xinit.1 [new file with mode: 0644]
usr/contrib/X/man/xload.1 [new file with mode: 0644]
usr/contrib/X/man/xnwm.1 [new file with mode: 0644]
usr/contrib/X/man/xpr.1 [new file with mode: 0644]
usr/contrib/X/man/xrefresh.1 [new file with mode: 0644]
usr/contrib/X/man/xshell.1 [new file with mode: 0644]
usr/contrib/X/man/xtext.3x [new file with mode: 0644]
usr/contrib/X/man/xwd.1 [new file with mode: 0644]
usr/contrib/X/man/xwininfo.1 [new file with mode: 0644]
usr/contrib/X/man/xwm.1 [new file with mode: 0644]
usr/contrib/X/man/xwud.1 [new file with mode: 0644]
usr/contrib/apl/lib/Makefile [new file with mode: 0644]
usr/contrib/cpm/src/Makefile [new file with mode: 0644]
usr/contrib/hyper/hylog/Makefile [new file with mode: 0644]
usr/contrib/hyper/hyroute/Makefile [new file with mode: 0644]
usr/contrib/icon/Makefile [new file with mode: 0644]
usr/contrib/mkmf/man/mann/mkmf.n [new file with mode: 0644]
usr/contrib/mkmf/src/Mkmf.c [new file with mode: 0644]
usr/contrib/mkmf/src/buildlist.c [new file with mode: 0644]
usr/contrib/rn/Makefile.SH [new file with mode: 0644]
usr/contrib/spms/Makefile [new file with mode: 0644]
usr/contrib/spms/bin/pinstall [new file with mode: 0755]
usr/src/games/monop/Makefile [new file with mode: 0644]

diff --git a/usr/contrib/X/man/Makefile b/usr/contrib/X/man/Makefile
new file mode 100644 (file)
index 0000000..a240c13
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# Copyright 1985, Massachusetts Institute of Technology
+#
+DESTDIR=
+MANDIR= /usr/man/man
+SECTION=n
+TROFF= troff -T480
+PRINTER= -Pim
+
+all:
+
+install:
+       for i in *.1; do \
+               cp $$i ${DESTDIR}${MANDIR}${SECTION}/`basename $$i .1`.${SECTION}; \
+       done
+       cp *.3* ${DESTDIR}${MANDIR}3
+       cp *.8* ${DESTDIR}${MANDIR}8
+
+clean:
+       rm -f *~ \#*
+
+paper:
+       for i in *.? *.[0-9]?; do \
+               echo -n "Troffing ";\
+               echo -n $$i;\
+               echo '....';\
+               ${TROFF} -man $$i | lpr -n ${PRINTER};\
+       done
diff --git a/usr/contrib/X/man/X.8c b/usr/contrib/X/man/X.8c
new file mode 100644 (file)
index 0000000..3cda907
--- /dev/null
@@ -0,0 +1,119 @@
+.TH X 8C "25 January 1986" "X Version 10"
+.SH NAME
+X - X window system server
+.SH SYNOPSIS
+.B X
+<display> [ option ... ] <tty>
+.SH DESCRIPTION
+.I X
+is the window system server.
+It is normally run automatically by \fIinit(8)\fP,
+which provides the tty argument.
+The display argument is the number of the bitmap display to service.
+The number is typically in the range 0-6, and defines the ports the
+server will accept connections on and the filename of the device.
+.PP
+The program \fIxinit(8)\fP is  usually used to start
+X interactively.
+.PP
+Connections through the Unix domain, through TCP, and through DECnet are
+currently possible.  The connections actually accepted by a server depend
+on how it was compiled.  Unix domain connections are through \fI/dev/X*\fP,
+where * is the display number.
+TCP connections are through ports 5800+N (VAX byte order)
+and 5900+N (68000 byte order), where N is the display number.  DECnet
+connections are through object name ``X*'', where * is the display number.
+.SH
+OPTIONS
+.PP
+See the \fIX(1)\fP manual page for a list of command line options.
+.SH
+INITIALIZATION
+.PP
+\fIX(1)\fP and your first \fIxterm(1)\fP are normally started by the 
+\fIinit(8)\fP program.
+.sp
+A typical line in \fI/etc/ttys\fP might be:
+.sp
+.nf
+       ttyv0 "/etc/xterm -L =-1+1 :0" xterm on secure window="/etc/Xvs100 0 -c -l"
+.fi
+.sp
+However, if you want the xterm to run on a different machine, you might have:
+.sp
+.nf
+       remote "/etc/X 0 -l -c" xterm on secure
+.fi
+.sp
+on the server machine and
+.sp
+.nf
+       ttyv0 "/exe/xterm -L =-1+1 orpheus:0" xterm on secure
+.fi
+.sp
+on the client machine.
+.sp
+.I X
+maintains an access control list for accepting connections.  The host where
+the server runs is initially on the list.
+In addition, hosts listed the file
+\fI/etc/X*.hosts\fP,
+where \fI*\fP is the display number, are also initially on the list.
+The format of this file is a list of host names, one per line.  DECnet hosts
+are distinguished from Internet hosts by the existance of a trailing ``::'' in
+the name.  
+The access control list can be manipulated with \fIxhost(1)\fP.
+.sp
+.I X
+will catch the SIGHUP signal sent by \fIinit(8)\fP
+after the initial process (usually
+the login \fIxterm(1)\fP) started on the display terminates.
+This signal causes all connections to be closed (thereby ``disowning'' the
+terminal), all resources to be freed, and all defaults restored.
+.sp
+The X protocol is documented in ``X.doc''.
+Note that while X is running, all access to the display must be through
+the window system.
+.SH "SEE ALSO"
+X(1), xinit(1), xterm(1), bitmap(1), xwm(1), xhost(1), xload(1), xset(1), qv(4), vs(4), init(8)
+.SH DIAGNOSTICS
+Are too numerous to list them all.
+If run from \fIinit(8)\fP, errors are logged in the file \fI/usr/adm/X*msgs\fP,
+where * is the display number.  Otherwise, errors go to error output.
+.sp
+`fatal error: No such device or address at Opening' usually means
+someone else (like an existing X) has the display open.
+.sp
+`fatal error: No such file or directory at Initializing' usually means
+the VS100 firmware was not found or that the device file for the display
+does not exist.
+.SH FILES
+.ta \w'/usr/new/lib/X/s-code   'u
+/etc/X*.hosts  Initial access control list
+.br
+/usr/new/lib/X/font    VS100/QVSS font directory
+.br
+/usr/new/lib/X/s-code  VS100 firmware directory
+.br
+/dev/vs*       VS100 devices
+.br
+/dev/qd*       QDSS devices
+.br
+/dev/mouse     QVSS device
+.br
+/dev/X*        Unix domain socket (if configured)
+.br
+/usr/adm/X*msgs        Error log file
+.SH BUGS
+The option syntax is inconsistent with itself and \fIxset(1)\fP.
+.sp
+If
+.I X
+dies before its clients, new clients won't be able to connect until all
+existing connections have their TCP TIME_WAIT timers expire.
+.SH AUTHOR
+Bob Scheifler (MIT-LCS).
+.br
+Copyright (c) 1984, 1985, 1986, by Massachusetts Institute of Technology.
+.br
+See \fIX(1)\fP for a complete copyright notice.
diff --git a/usr/contrib/X/man/XMenu.3x b/usr/contrib/X/man/XMenu.3x
new file mode 100644 (file)
index 0000000..307035c
--- /dev/null
@@ -0,0 +1,839 @@
+.TH XMENU 3X "29 January 1986" "X Version 10"
+.SH NAME
+XMenu - X Deck of cards Menu System
+.SH SYNOPSIS
+.nf
+.B #include <X/XMenu.h>
+.PP
+.B XMenu *XMenuCreate(parent, xdef_env)
+.B Window parent;
+.B char *xdef_env;
+.PP
+.B int XMenuAddPane(menu, label, active)
+.B XMenu *menu;
+.B char *label;
+.B int active;
+.PP
+.B int XMenuAddSelection(menu, pane, data, label, active)
+.B XMenu *menu;
+.B int pane;
+.B char *data;
+.B char *label;
+.B int active;
+.PP
+.B int XMenuInsertPane(menu, pane, label, active)
+.B XMenu *menu;
+.B int pane;
+.B char *label;
+.B int active;
+.PP
+.B int XMenuInsertSelection(menu, pane,selection, data, label, active)
+.B XMenu *menu;
+.B int pane, selection;
+.B caddr_d data;
+.B char *label;
+.B int active;
+.PP
+.B int XMenuFindPane(menu, label) 
+.B XMenu *menu;
+.B char *label;
+.PP
+.B int XMenuFindSelection(menu, pane, label)
+.B XMenu *menu;
+.B int pane;
+.B char *label;
+.PP
+.B int XMenuChangePane(menu, pane, label)
+.B XMenu *menu;
+.B int pane;
+.B char *label;
+.PP
+.B int XMenuChangeSelection(menu, pane,selection, data,d_sw, label,l_sw)
+.B XMenu *menu;
+.B int pane, selection;
+.B char *data;
+.B int d_sw;
+.B char *label;
+.B int l_sw;
+.PP
+.B int XMenuSetPane(menu, pane, active)
+.B XMenu *menu;
+.B int pane;
+.B int active;
+.PP
+.B int XMenuSetSelection(menu, pane, selection, active)
+.B XMenu *menu;
+.B int pane, selection;
+.B int active;
+.PP
+.B int XMenuDeletePane(menu, pane)
+.B XMenu *menu;
+.B int pane;
+.PP
+.B int XMenuDeleteSelection(menu, pane, selection)
+.B XMenu menu;
+.B int pane, selection;
+.PP
+.B int XMenuRecompute(menu)
+.B XMenu *menu;
+.PP
+.B XMenuEventHandler(handler)
+.B int (*handler)();
+.PP
+.B int XMenuLocate(menu, pane,selection, x,y, ulx,uly, width,height)
+.B XMenu *menu;
+.B int pane, selection;
+.B int x, y;
+.B int *ulx, *uly;
+.B int *width, *height;
+.PP
+.B XMenuSetFreeze(menu, freeze)
+.B XMenu *menu;
+.B int freeze;
+.PP
+.B int XMenuActivate(menu, pane,selection, x,y, event_mask, data)
+.B XMenu *menu;
+.B int *pane, *selection;
+.B int x, y;
+.B int event_mask;
+.B char **data;
+.PP
+.B XMenuDestroy(menu)
+.B XMenu *menu;
+.PP
+.B char *XMenuError()
+.fi
+.SH DESCRIPTION
+.PP
+.I XMenu
+is an
+.I X
+Window System Utility Package that implements a `deck of cards'
+menu system.
+.I XMenu
+is intended for use in conjunction with
+.I Xlib,
+the \fIC Language X Window System Interface Library.\fP
+.PP
+In a `deck of cards' menu system a menu is composed
+of several cards or panes.  The panes are stacked as if they were a 
+deck of playing cards that were fanned out.  Each of these
+panes has one or more selections.
+A user interacts with a `deck of cards' menu by sliding the mouse cursor
+across the panes of the menu.  As the mouse cursor enters each pane it
+will rise to the top of the deck and become `current'.  
+If the current pane is an active pane it will be `activated', or made
+available for selection.  To indicate this its background will then change
+from the patterned inactive background to a solid color and the 
+selections on that pane will be activated.
+If the current pane is not an active pane (a setable state) then it
+will not be activated.  To indicate this its background will continue
+to be the patterned inactive background and no selections on the
+pane will be activated.
+The pane previously containing the mouse will lower (preserving its
+stacking order).  If it was activated it will then become deactivated,
+its background changing back to the inactive pattern.
+Because of this action it is not possible to have more than one current
+pane at any one time.
+When the mouse cursor enters an active selection in a pane that has been
+activated then that selection will become activated and be high lighted.
+If the selection is not active or the pane has not been activated
+then the selection will not be activated and will not be high lighted.
+Selection high lighting is accomplished in one of two ways depending
+upon the state of the user's
+.I Xdefaults
+variables.
+If `box' mode high lighting is in effect, the menu selection will be
+activated by placing a high light box around the selection as the mouse
+cursor enters the selection's active region and removing it (deactivating
+the selection) as the cursor leaves.
+If `invert' mode high lighting is in effect, the menu selection will be
+activated by inverting the background and foreground colors within the
+selection's active region as the mouse cursor enters it and reinverting
+them as the cursor leaves.
+.PP
+The application specifies a mouse event that will signify that the user
+has made a selection. Any time that the selection mouse event is received by
+.I XMenu
+one of several results will occur, depending upon the state of the menu system
+at the time of the event.  If the selection event occurs while the mouse
+cursor is in an activated selection the data that has been stored with that
+selection will be returned to the application program.
+The data stored is in the form of a generic pointer to memory (char *).
+This allows the application programmer to completely define the interpretation
+of the selection data by recasting the data pointer as is desired.
+.PP
+An application constructs a menu by first creating the
+.I XMenu
+object.  Once the
+.I XMenu
+object has been created then panes and selections are added in order as
+is needed.  Typically panes contain related selections that are `described'
+by the pane's label.  For example, you might create a pane labeled `Mail'
+that has selections labeled `Read', `Send', `Forward', `Refile' and `Delete'.
+There is no real need for the panes in a menu to be related to each other but
+typically they are related by default by the fact that they are all being
+utilized the application that created the menu.
+.PP
+The
+.I XMenu
+system is maintained (menus, panes and selections) via routines in
+the
+.I XMenu
+library.  The library contains the following routines:
+.PP
+.TP 8
+.B XMenuCreate
+In order for a process to create a menu, it is necessary for that process
+to have opened a connection to an
+.I X
+display server and have a window in hand that will be designated as the
+parent window of the menu being created (remember that 
+.I X
+is designed such that child windows of a parent window are clipped to the
+borders of the parent).  Typically the
+.I X
+root window (
+.I RootWindow
+) is used for this purpose.  When the connection is open and a parent
+window chosen, the application calls
+.I XMenuCreate
+passing it the parent window and a null-terminated string.
+The string designates the default environment name that will be used
+by XMenu to read the users
+.I Xdefaults
+variables.  Typically the application name is used for this purpose (a good
+software engineering practice is to use element zero of the applications
+argument vector, argv[0],  as the default environment since this is the
+name by which the application was called from the shell).  All
+.I user
+setable parameters are set via the
+.I Xdefaults
+mechanism.  If any parameters do not have
+.I Xdefaults
+values then they default to preset
+.I XMenu
+internal values.  The 
+.I Xdefaults
+parameters are listed below along with their preset internal values.
+If the create operation is successful
+.I XMenuCreate
+will return an
+.I XMenu
+object.  If it fails NULL will be returned.
+.PP
+.TP 8
+.B XMenuAddPane
+Once a menu has been created the application may then begin
+adding panes and subsequently selections.  Panes are added by calling
+.I XMenuAddPane.
+.I XMenuAddPane
+adds additional panes to a menu in call order.  That is, panes will appear
+in the menu with the first pane added being at the front of the pane stack
+and the last pane added being at the back of the pane stack.
+.I XMenuAddPane
+takes the following arguments: The menu to which the pane is being added; A
+null-terminated string that will be the label for the new pane; and an flag
+that designates whether or not the pane is to be considered active for
+selection.  It is sometimes useful to add inactive panes to indicate a
+currently unavailable but planned set of selections.  If the add operation is
+successful the index number of the pane just added will be returned.  If it
+fails XM_FAILURE will be returned.  Further panes may be added at a later time
+but remember that when this routine is used to add panes they are always added
+to the back of the pane stack!
+.PP
+.TP 8
+.B XMenuAddSelection
+Once a pane has been added to a menu is it possible to begin adding selections
+to that pane.  Selections are added to panes in much the same way as panes are
+added to menus.  Selections are added by calling
+.I XMenuAddSelection.
+.I XMenuAddSelection
+adds additional selections to a pane in call order.  That is, selections will
+appear in the pane with the first selection added being at the top of the pane
+and the last selection added being at the bottom of the pane.
+.I XMenuAddSelection
+takes the following arguments: The menu containing the pane to which the
+selection is being added; The index number of the pane to which the selection
+is being added; A null-terminated string that will be the label for the new
+selection; A (char *) data value that will be returned by
+.I XMenuActivate
+whenever the new selection is selected by the menu's user; and a flag that
+designates whether or not the selection will be considered active.  It is
+sometimes useful to add inactive selections which may become active as the
+application state changes.  If the add operation is successful then the
+index number of the selection just added will be returned.  If it fails
+XM_FAILURE will be returned.  Further selections may be added at a later time
+but remember when this routine is used to add selections they are always added
+to the bottom of a pane!
+.PP
+.TP 8
+.B XMenuInsertPane
+This routine allows the application to insert menu panes into a menu in
+random order.  If the index number of the pane being inserted matches the
+index number of a pane that already exists, then the existing pane is displaced
+backward (its index number and the index numbers of all following planes
+increased by one) in the menu and the new pane inserted in its place.  Panes
+may be inserted into any menu provided that the index number of the pane being
+inserted is no more than one greater than the index number of the last pane in
+the menu.  For example, if a menu contains 4 panes with index numbers 0 through
+3 then it is possible to insert a new pane with an index number from 0 through
+4 inclusive.  It is possible to use
+.I XMenuInsertPane
+in place of
+.I XMenuAddPane
+but in situations where panes are simply being added to a menu one after
+another then the use of the simpler and more efficient
+.I XMenuAddPane
+routine is encouraged.
+.I XMenuInsertPane
+takes the following arguments: The menu into which the pane is being inserted;
+the index number of the new pane; a null-terminated string that will be the
+label for the new pane; and an int that designates whether or not the pane
+will to be considered active for selection.  It is sometimes useful to add
+inactive panes to indicate a currently unavailable but planned set of
+selections.  If the insert operation is successful the index number of the
+pane just inserted will be returned.  If it fails XM_FAILURE will be returned.
+.PP
+.TP 8
+.B XMenuInsertSelection
+This routine allows the application to insert selections into a menu pane in
+random order.  If the index number of the selection being inserted matches the
+index number of a selection that already exists in the specified pane, then the
+existing selection is displaced downward (its index number and the index 
+numbers of all following selections increased by one) in the pane and the new
+selection inserted in its place.  Selections may be inserted into any pane
+provided that the index number of the selection being inserted is no more than
+one greater than the index number of the last selection in the pane.  For
+example, if a pane contains 4 selections numbered 0 through 3 then it is
+possible to insert a new selection with an index number from 0 through 4
+inclusive.  It is possible to use
+.I XMenuInsertSelection
+in place of
+.I XMenuAddSelection
+but in situations where selections are simply being added to a pane one after
+another then the use of the simpler and more efficient
+.I XMenuAddSelection
+routine is encouraged.
+.I XMenuInsertSelection
+takes the following arguments: the menu containing the pane into which the
+selection is being inserted; the index number of the pane to which the
+selection is being inserted; the desired index number of the new selection;
+a null-terminated string that will be the label for the new selection; A
+(char *) data value that will be returned by
+.I XMenuActivate
+whenever the new selection is selected by a user; and an int that designates
+whether or not the selection will be considered active for selection.  It is
+sometimes useful to insert inactive selections which may become active as the
+application state changes.  If the insert operation is successful the index
+number of the selection just inserted will be returned.  If it fails XM_FAILURE
+will be returned.
+.PP
+.TP 8
+.B XMenuFindPane
+This routine allows the application to find the index number of a pane whose
+label matches a given NULL terminated string.
+.I XMenuFindPane
+takes the following arguments: the menu containing the pane whose index number
+is being searched for; and a null terminated string to be searched for.
+If the find operation is successful then the index number of the first pane
+whose label matches the given string will be returned.  If it fails XM_FAILURE
+will be returned.
+.PP
+.TP 8
+.B XMenuFindSelection
+This routine allows the application to find the index number of a selection
+whose label matches a given NULL terminated string.
+.I XMenuFindSelection
+takes the following arguments:  the menu containing the pane which contains
+the selection being searched for; the index number of the pane which contains
+the selection being searched for; and a null terminated string to be searched
+for.
+If the find operation is successful then the index number of the first
+selection whose label matched the given string will be returned.  If is fails
+XM_FAILURE will be returned.
+.PP
+.TP 8
+.B XMenuChangePane
+This routine allows the application to change a pane's label on the fly.  This
+is useful for situations where a state change in the application must be
+reflected in the menu.
+.I XMenuChangePane
+takes the following arguments: the menu containing the pane whose label is
+being changed; the index number of that pane in the specified menu; and a
+null-terminated string that will be the used as the new pane label.  If the
+change operation is successful the index number of the pane just changed will
+be returned.  If it fails XM_FAILURE will be returned.
+.I XMenuChangePane
+may be called any time after the pane being changed has been added / inserted 
+into the specified menu.
+.PP
+.TP 8
+.B XMenuChangeSelection
+This routine allows the application to change a selection's data and label on
+the fly.  This is useful for situations where a state change in the application
+must be reflected in the menu.
+.I XMenuChangeSelection
+takes the following arguments: the menu containing the pane that contains the
+selection to be changed; the index number of that pane in the menu; the index
+number of the selection to be changed; a (char *) new data value for the
+selection; an int that indicates whether or not to actually store the new
+data value (in case only the label is being changed); Aanull-terminated string
+that will be the used as the new selection label; and an int that indicates
+whether or not to actually store the new label (incase only the data value
+is being changed).  If the change operation is successful the index number of
+the selection just changed will be returned.  If it fails XM_FAILURE will be
+returned.
+.I XMenuChangeSelection
+may be called anytime after the pane selection being changed has been added to
+the specified pane and menu.
+.PP
+.TP 8
+.B XMenuSetPane
+.I XMenuSetPane
+allows the application to make an active pane inactive or an inactive pane
+active.  This provides the application with the ability to restrict the usage
+of certain panes to times when they may or may not have a valid purpose.  In
+addition this allows the application to activate and utilize dummy panes that
+were added at menu creation time as place holders for future selections.
+.I XMenuSetPane
+takes the following arguments: the menu containing the pane to be activated or
+deactivated; the index number of that pane in the specified menu; and an int
+that designates whether or not the pane is to be considered active for
+selection.  If the set operation is successful the index number of the pane
+just set will be returned.  If it fails XM_FAILURE will be returned.
+.I XMenuSetPane
+may be called anytime after the pane being set has been added / inserted into
+the specified menu.
+.PP
+.TP 8
+.B XMenuSetSelection
+.I XMenuSetSelection
+allows the application to make an active selection inactive or an inactive
+selection active.  This provides the application with the ability to restrict
+the usage of certain selections to times when they may or may not have a valid
+purpose.  In addition this allows the application to activate and utilize
+selections that were added at menu creation time with a future purpose in mind.
+.I XMenuSetSelection
+takes the following arguments: the menu containing the pane that contains the
+selection to be activated or deactivated;  the index number of that pane in the
+menu;  the index number of the selection to be activated / deactivated; and an
+int that designates whether or not to make the specified selection active.  If
+the set operation is successful the index number of the selection just set will
+be returned.  If it fails XM_FAILURE will be returned.
+.I XMenuSetSelection
+may be called anytime after the pane selection being set has been added to the
+specified pane and menu.
+.PP
+.TP 8
+.B XMenuDeletePane
+This routine allows the application to delete panes when they will no longer
+be needed.
+.I XMenuDeletePane
+takes the following arguments: the menu containing the pane to be deleted;
+and the index number of that pane in the specified menu.
+.PP
+.TP 8
+.B XMenuDeleteSelection
+This routine allows the application to delete selections when they will no
+longer be needed.
+.I XMenuDeleteSelection
+takes the following arguments: the menu containing the pane which contains the
+selection to be deleted; the index number of the pane containing the selection
+to be deleted; and the index number of the selection to be deleted in that
+pane.
+.PP
+.TP 8
+.B XMenuRecompute
+After the initial menu configuration has been constructed (in fact, anytime
+that the menu configuration, a pane label or selection label is altered), the
+menu dependencies need to be recomputed.
+.I XMenu
+will do this automatically if needed when
+.I XMenuLocate
+or
+.I XMenuActivate
+is called.  In the interest of efficiency it is suggested that the application
+call
+.I XMenuRecompute
+prior to any calls to
+.I XMenuLocate
+or
+.I XMenuActivate.
+This need only be done if
+.I XMenuAddPane,
+.I XMenuAddSelection,
+.I XMenuInsertPane,
+.I XMenuInsertSelection,
+.I XMenuChangePane,
+.I XMenuChangeSelection,
+.I XMenuDeletePane,
+or
+.I XMenuDeleteSelection
+have been called since the last call to
+.I XMenuRecompute
+or
+.I XMenuActivate.
+If
+.I XMenuRecompute
+is called before the first pane has been added to the menu a error will result
+indicating that the menu has not been initialized.  The most efficient state
+is achieved if a sequence of panes and selections are added or modified in
+order and then a single call is immediately made to
+.I XMenuRecompute.
+In this way all operations will batched and all dependencies will be up to date
+by the time the next
+.I XMenuActivate
+call occurs.  If the recompute operation is successful XM_SUCCESS will be
+be returned.  If it fails XM_FAILURE will be returned.
+.PP
+.TP 8
+.B XMenuEventHandler
+Since
+.I XMenu
+shares the
+.I Xlib
+event queue with the application, it is possible that
+.I X
+events selected by the application will arrive and be queued while a menu is
+posted.  Before a menu is posted, it is up to the application to decide what
+will happen to events that do occur while the menu is posted.
+.I XMenuEventHandler
+allows the application to specify an asynchronous event handling routine.
+.I XMenuEventHandler
+takes only one argument which is a pointer to a routine which returns int.
+This routine will be called by
+.I XMenuActivate
+if it encounters an event that it does not recognize.  The format of the
+handler should be as follows:
+.br
+.B int handler(event)
+.br
+.B XEvent *event;
+.br
+If no action is taken by the application (i.e., no event handler is specified)
+.I XMenuActivate
+will discard any events that they do not recognize.
+.PP
+.TP 8
+.B XMenuLocate
+This routine provides an application will all the necessary data to properly
+locate and position a menu with respect to the parent window.
+.I XMenuLocate
+takes the following arguments: the menu that is being located; the index number
+of the current pane; the index number of the current selection; the X and Y
+coordinates of where the application would like the center of the current
+selection (in the current pane) to be; and four return value pointers to int
+that will be filled in by the routine.  The four return value pointers are set
+to the following values (respectively):  the upper left X and Y coordinates
+of the entire menu (relative to the parent window); and the overall width and
+height of the entire menu.  If the locate operation is successful XM_SUCCESS
+will be be returned.  If it fails XM_FAILURE will be returned.
+.PP
+.TP 8
+.B XMenuSetFreeze
+This routine allows the application to forcibly override the
+.I Xdefaults
+setting of the `freeze' parameter.  If freeze mode is turned on the
+bits under where the menu will appear are saved by
+.I XMenu
+then the
+.I X
+server is frozen and remains frozed while the menu is activated.  Immediately
+after the menu is deactivated the bits under the menu are restored to their
+original state and the server is unfrozen.  This routine is necessary for
+certain applications that must guarantee that the screen contents are not
+damaged by
+.I XMenu.  XMenuSetFreeze
+takes two arguments: The menu to be set and an int that indicates whether or
+not to place the menu in freeze mode.
+.PP
+.TP 8
+.B XMenuActivate
+.I XMenuActivate maps a given menu to the display and activates the menu for
+user selection.  Before
+.I XMenuActivate
+is called it is suggested that the application synchronize the X connection and
+and process all events in the
+.I Xlib
+internal event queue.  This guarantees that a minimum of asynchronous
+call-backs to the applications event handler routine (or discards if no
+application event handler is specified).
+.I XMenuActivate
+guarantees that no unprocessed events of its own will be left in the
+.I Xlib
+event queue upon its return.
+.I XMenuActivate
+takes the following arguments: the menu that is to be posted; the desired
+current pane and selection; the X and Y menu position; the mouse button event
+mask; and a pointer to a pointer to char (char **).  The menu is positioned
+within the menu's parent window such that the specified X and Y location
+(relative to the parent window) is in the center of the specified current
+selection in the current pane.  The mouse button event mask provided by the
+application should be suitable for an
+.I XGrabMouse
+operation.  It provides the application with a way to indicate which mouse
+events will be used to identify a selection request.  Every time
+.I XMenuActivate
+returns, the pane and selection indices are left at their last known values
+(i.e., the last current pane and selection indices).  The following are the
+defined return states for this routine:
+.LP
+.nf
+.ta 1i 1.5i
+       1)      If the selection that is current at the time a
+               selection request is made is active then the data
+               pointer will be set to the data associated with that
+               particular selection and XM_SUCCESS is returned.
+       2)      If the selection that is current at the time a
+               selection request is made is not active then the data
+               pointer will be left untouched and XM_IA_SELECT will
+               be returned.
+       3)      If there is no selection current at the time a
+               selection request is made then the data pointer will
+               be left untouched and XM_NO_SELECT will be returned.
+       4)      If at any time an error occurs the data pointer is
+               left untouched and XM_FAILURE is returned.  
+.fi
+.PP
+.TP 8
+.B XMenuDestroy
+When the application is no longer intending to use a menu
+.I XMenuDestroy
+should be called.
+.I XMenuDestroy
+frees all resources (both
+.I X
+resources and system resources) that are being held by the menu.
+.I XMenuDestroy
+takes only one argument, the menu to be destroyed.  WARNING! Using a menu after
+it has been destroyed is to invite disaster!
+.PP
+.TP 8
+.B XMenuError
+When called
+.I XMenuError
+will return a null-terminated string that describes the current error state of
+the
+.I XMenu
+library.  The string returned is static in the
+.I XMenu
+library and should not be modified or freed.  The error state is set every time
+an
+.I XMenu
+routine returns a status condition.
+.I XMenuError
+takes no arguments.
+.SH X DEFAULTS
+.PP
+.TP 8
+.B MenuFreeze
+Determines whether or not to grab the
+.I X
+server while a menu is posted.
+One of: on, off.
+The default value is off.
+.PP
+.TP 8
+.B MenuStyle
+Determines the menu display style.
+One of: left_hand, right_hand, center.
+The default value is right_hand.
+.PP
+.TP 8
+.B MenuMode
+Determines the menu selection high light mode.
+One of: box, invert.
+If box mode is chosen then the SelectionBorderWidth and SelectionBorderColor
+parameters effect the box line width and color respectively.
+If invert mode is chose then the SelectionForeground and MenuBackground
+colors are used for the inversion.
+The default value is invert.
+.PP
+.TP 8
+.B MenuMouse
+Determines the color of the mouse cursor while it is within 
+the menu.
+Any valid
+.I X
+color may be used.
+The default value is black.
+.PP
+.TP 8
+.B MenuBackground
+Determines the menu background color.
+Any valid
+.I X
+color may be used.
+The default value is white.
+.PP
+.TP 8
+.B MenuInactivePattern
+Determines which of the five possible bitmap patterns will be used to tile
+inactive panes.
+One of: dimple1, dimple3, gray1, gray3, cross_weave.
+The default value is gray3.
+.PP
+.TP 8
+.B PaneStyle
+Determines the display style of all menu panes.
+One of: flush_left, flush_right, center.
+The default value is center.
+.PP
+.TP 8
+.B PaneFont
+Determines the font used for the label (heading text) of each pane.
+Any valid
+.I X
+font may be used.
+The default value is 8x13.
+.PP
+.TP 8
+.B PaneForeground
+Determines the pane foreground color.
+This is the color used for the label (heading text) in each pane.
+Any valid
+.I X
+color may be used.
+The default value is black.
+.PP
+.TP 8
+.B PaneBorder
+Determines the color of all menu pane borders.
+Any valid
+.I X
+color may be used.
+The default value is black.
+.PP
+.TP 8
+.B PaneBorderWidth
+Determines the width (in pixels) of all menu pane borders.
+Any integer greater than or equal to 0 may be used.
+The default value is 2.
+.PP
+.TP 8
+.B PaneSpread
+Determines the horizontal spread of menu panes.
+Any double greater than or equal to 0.0 may be used.
+A value of 1.0 specifies a one to one ratio between horizontal spread and
+vertical spread.
+A value less than 1.0 will compress the menu panes inward and a value greater
+than 1.0 will expand them outward.
+The default value is 1.0.
+.PP
+.TP 8
+.B SelectionStyle
+Determines the display style of all menu selections.
+One of: flush_left, flush_right, center.
+The default value is flush_left.
+.PP
+.TP 8
+.B SelectionFont
+Determines the font used for the text in each selection.
+Any valid X font may be used.
+The default value is 6x10.
+.PP
+.TP 8
+.B SelectionForeground
+Determines the selection foreground color.
+This is the color used for the text in each selection.
+Any valid
+.I X
+color may be used.
+The default value is black.
+.PP
+.TP 8
+.B SelectionBorder
+Determines the color of all menu selection borders.
+Any valid
+.I X
+color
+may be used.
+The default value is black.
+.PP
+.TP 8
+.B SelectionBorderWidth
+Determines the width (in pixels) of all menu selection borders.
+Any integer greater than or equal to 0 may be used.
+The default value is 1.
+.PP
+.TP 8
+.B SelectionSpread
+Determines the inter-selection spread.
+Any double greater than or equal to 0.0 may be used.
+A value of 1.0 specifies that 1.0 times the height of the current selection
+font will be used for padding
+The default value is 0.25.
+.SH DIAGNOSTICS
+.PP
+Since
+.I XMenu
+uses the
+.I Xlib
+library, the
+.I XIOError
+and
+.I XError
+.I Xlib
+routines may be set by the application to change how asynchronous error
+reporting occurs.
+.PP
+Synchronous error reporting is primarily accomplished by examining the return
+values of routines and using the
+.I XMenuError
+routine.  Although its use is discouraged, synchronous error reporting may also
+be accomplished by having the application directly examine the value of the
+.I _XMErrorCode
+global variable.
+.I _XMErrorCode
+is set every time an
+.I XMenu
+routine returns a status condition.  The following sequence of symbols is
+provided in
+.I XMenu.h
+and may be used to index the null-terminated description strings in the global
+error string array
+.I _XMErrorList.
+.LP
+.nf
+.ta \w'XME_CREATE_WINDOW   'u + .5i
+XME_CODE_COUNT         Total number of entries in \fI_XMErrorList\fP (17).
+
+XME_NO_ERROR           -> ``No error''
+XME_NOT_INIT           -> ``Menu not initialized''
+XME_ARG_BOUNDS         -> ``Argument out of bounds''
+XME_P_NOT_FOUND                -> ``Pane not found''
+XME_S_NOT_FOUND                -> ``Selection not found''
+XME_STYLE_PARAM                -> ``Invalid menu style parameter''
+XME_GRAB_MOUSE         -> ``Unable to grab mouse''
+XME_INTERP_LOC         -> ``Unable to interpret locator''
+XME_CALLOC             -> ``Unable to calloc memory''
+XME_CREATE_ASSOC               -> ``Unable to create XAssocTable''
+XME_STORE_BITMAP               -> ``Unable to store bitmap''
+XME_MAKE_TILES         -> ``Unable to make tile pixmaps''
+XME_MAKE_PIXMAP                -> ``Unable to make pixmap''
+XME_CREATE_CURSOR              -> ``Unable to create cursor''
+XME_OPEN_FONT          -> ``Unable to open font''
+XME_CREATE_WINDOW              -> ``Unable to create windows''
+XME_CREATE_TRANSP              -> ``Unable to create transparencies''
+.fi
+.SH FILES
+.PP
+/usr/include/X/XMenu.h, /usr/lib/libXMenu.a, /usr/include/X/Xlib.h,
+/usr/lib/libX.a
+.SH SEE ALSO
+Xlib(3x), X(1), X(8c)
+.SH AUTHOR
+.PP
+Copyright 1985, 1986, Massachusetts Institute of Technology.
+.PP
+See \fIX(1)\fP for a complete copyright notice.
+.PP
+Tony Della Fera (MIT Project Athena, DEC)
+.SH BUGS
+.PP
+There is a problem that necessitates an additional round trip time
+when panes are activated and deactivated.  In order for this to be fixed
+efficiently, a change needs to be made to the
+.I X
+protocol.
diff --git a/usr/contrib/X/man/Xlib.3x b/usr/contrib/X/man/Xlib.3x
new file mode 100644 (file)
index 0000000..446d306
--- /dev/null
@@ -0,0 +1,29 @@
+.TH XLIB 3X "3 January 1986" "X Version 10"
+.SH NAME
+Xlib \- C Language X Window System Interface Library
+.SH SYNOPSIS
+.nf
+.B #include <X/Xlib.h>
+.SH DESCRIPTION
+This library is the low level interface for C to the X protocol.
+The list of subroutines is too long to list here, comprising more than
+150 subroutines.
+
+This library gives complete access to all capability provided by the
+X window system, and is intended to be the basis for other higher level
+libraries for use with X 
+(See \fIXtext(3x)\fP for an example of such a library).
+
+More subroutines will be added to this library with time.
+Contributions will be gratefully accepted.
+.SH FILES
+/usr/include/X/Xlib.h, /usr/lib/libX.a
+.SH "SEE ALSO"
+`Xlib - C Language X Interface', X(1), X(8c), Xtext(3x), Xtty(3x)
+.SH AUTHORS
+Ron Newman, Tony Della Fera, Jim Gettys (MIT Project Athena)
+.br
+Copyright 1985, 1986, Massachusetts Institute of Technology
+.br
+See X(1) for a full copyright notice.
+.SH BUGS
diff --git a/usr/contrib/X/man/Xnest.8c b/usr/contrib/X/man/Xnest.8c
new file mode 100644 (file)
index 0000000..a86e0ea
--- /dev/null
@@ -0,0 +1,48 @@
+.TH XNEST 8 "9 January 1986" "X Version 10"
+.SH NAME
+Xnest - Recursive X window system implementation
+.SH DESCRIPTION
+.PP
+This implementation allows you to run an X server in a window of another
+X server.  Full functionality is supported.  The number of planes provided
+by this pseudo-device is the same as the underlying device.  The cursor
+sizes, tile sizes, and brush sizes supported are also the same.  The number
+of color cells provided is specified with a \fI.Xdefaults\fP option.
+.PP
+Aside from being a good hack, this implementation exists primarily to aid
+system developers when debugging the device-independent portion of the
+server.  The debugging can be accomplished without requiring a second
+physical display.
+.PP
+Exposures on (and resizings of) the window are ignored, and so corrupt the
+"screen".
+.SH X DEFAULTS
+.PP
+Accepts the following defaults (for the program "X", not "Xnest"):
+.PP
+.TP 8
+.B BorderWidth
+Set the border width of the window.
+.PP
+.TP 8
+.B Border
+Set the border color.
+.PP
+.TP 8
+.B CellExponent
+If not set or set to zero, a monochrome psuedo-display is created.
+Otherwise, if a value of N is provided, specifies the maximum number color
+cells to be 2^N.  The number actually provided will be a power of two,
+but may be less than 2^N if allocation fails.
+.SH ENVIRONMENT
+Uses the environment variable ``DISPLAY'' to specify which display to use.
+.PP
+.SH "SEE ALSO"
+X(8c), X(1)
+.br
+`ddX - Device Dependent X Interface'
+.SH AUTHOR
+.br
+Bob Scheifler, MIT Laboratory for Computer Science
+.br
+Copyright (c) 1986, by Massachusetts Institute of Technology.
diff --git a/usr/contrib/X/man/Xqvss.8c b/usr/contrib/X/man/Xqvss.8c
new file mode 100644 (file)
index 0000000..72ac7b9
--- /dev/null
@@ -0,0 +1,45 @@
+.TH XQVSS 8 "3 January 1985" "X Version 10"
+.SH NAME
+Xqvss - X window system QVSS implementation notes
+.SH DESCRIPTION
+.PP
+The QVSS hardware in the DEC VS1 and VS2 is monochrome.
+The usable size is 864 lines by 960 pixels/line.
+(Future driver mods will default to 1024 pixels/line on the VR260 monitor
+of the VS2, in Ultrix 1.2; for VR260 monitors under 1.1, patch
+the kernel variable qv_def_scrn to 2.).
+.PP
+Probably the most irritating problem with the QVSS hardware is the
+cursor support, which is limited to 16x16.
+As only ``and'' and ``or'' operations are available in the hardware,
+the driver inverts the cursor depending upon the pixels below
+the cursor.
+We will eventually get fed up and implement a software cursor.
+.PP
+Under Ultrix-32 release 1.1 and 4.2BSD,
+the window system will be slightly unreliable due
+to a kernel problem.
+Fixed in Ultrix32 release 1.2.
+Under Ultrix-32 1.1, your best bet is to use unix domain connections
+(unix:0 as host spec's) for local connections.
+.PP
+Thanks must go to Dave Carver (and others) in the DEC Workstations
+group for implementing the bit-blit library.
+Large area bit-blit code is compiled on the fly and runs at optimal
+speed.
+.PP
+Performance is now tolerable, between 3400 and 4200 characters/second
+on a VS2.
+Performance on a VS1 is approximately 2000 characters/second.
+Some further improvement can be expected.
+.SH "SEE ALSO"
+X(8c), X(1)
+.br
+`Xlib - C Language X Interface'
+.br
+`ddX - Device Dependent X Interface'
+.SH AUTHOR
+.br
+Copyright (c) 1984, 1985, 1986 by Massachusetts Institute of Technology.
+.br
+See X(1) for a complete Copyright notice.
diff --git a/usr/contrib/X/man/Xvs100.8c b/usr/contrib/X/man/Xvs100.8c
new file mode 100644 (file)
index 0000000..e1d1ea5
--- /dev/null
@@ -0,0 +1,37 @@
+.TH XVS100 8 "26 August 1985" "X Version 10"
+.SH NAME
+Xvs100 - X window system VS100 implementation notes
+.SH DESCRIPTION
+.PP
+The VS100 implementation of X was the first, and is complete.
+Many of the X output operations are in fact modeled on the interface provided
+by the VS100 firmware.
+The VS100 is a monochrome display, 864 bits high and 1088 bits wide.
+The firmware we are currently using is version #235.
+.PP
+Cursors can be any size up to 64x64.
+Tiles can only be 16x16 in size.
+Brushes can be any size, but the current firmware draws wide lines about an
+order of magnitude slower than 1x1 lines.
+Off-screen storage is limited to that provided in the VS100 itself; no attempt
+is made to use DMA access to VAX memory for fonts and such or to dynamically
+shuffle data back and forth.
+.PP
+The keyboard is controlled by the VS100 firmware.  Unfortunately, with the
+current firmware, the keyboard only gives up transitions for the Control,
+Shift, Lock, and Meta keys, so chord applications won't work.
+.PP
+At system boot, for some reason the first three attempts to down load the
+firmware fail.  Thus, a VS100 won't become active until about 45 seconds
+after other terminal lines activate.
+Power-cycling a VS100 will cause the X server to restart.  The down
+problem doesn't occur in this case, but typically a
+3 minute TCP CLOSE_WAIT will occur.
+.PP
+.SH "SEE ALSO"
+X(8c), X(1)
+.br
+`ddX - Device Dependent X Interface'
+.SH AUTHOR
+.br
+Copyright (c) 1985, by Massachusetts Institute of Technology.
diff --git a/usr/contrib/X/man/biff.1 b/usr/contrib/X/man/biff.1
new file mode 100644 (file)
index 0000000..2638cbd
--- /dev/null
@@ -0,0 +1,101 @@
+.TH BIFF 1 "4 September 1985" "X Version 10"
+.UC 4
+.SH NAME
+biff \- be notified if mail arrives and who it is from
+.SH SYNOPSIS
+.B biff
+[
+.B yn
+]
+.SH DESCRIPTION
+.I Biff
+informs the system whether you want to be notified when mail arrives
+during the current terminal session.
+The command
+.IP
+.B "biff y"
+.LP
+enables notification; the command
+.IP
+.B "biff n"
+.LP
+disables it.
+When mail notification is enabled, the header and first few lines of
+the message will be printed on your screen whenever mail arrives.
+A ``biff y'' command is often included in the file
+.I \&.login
+or
+.I \&.profile
+to be executed at each login.
+.PP
+.I Biff
+operates asynchronously.
+For synchronous notification use the MAIL variable of
+.IR sh (1)
+or the
+.I mail
+variable of
+.IR csh (1).
+.SH "X WINDOW SYSTEM"
+.PP
+If you are logged in under the X window system, a popup window is used instead
+of a message to your login window.  To delete the window, click any mouse
+button with the mouse in the window.
+Properties of the window can be controlled
+with options for \fIbiff\fP in your \fI.Xdefaults\fP file.
+The following options are
+recognized:
+.PP
+.TP 8
+.B Background
+To determine the background color.
+.PP
+.TP 8
+.B Border
+To determine the border color.
+.PP
+.TP 8
+.B BorderWidth
+To determine the border width.  Default is 2.
+.PP
+.TP 8
+.B BodyFont
+To determine text font.  Default is 8x13.
+.PP
+.TP 8
+.B Foreground
+To determine the foreground color.
+.PP
+.TP 8
+.B InternalBorder
+To determine the padding around the text.  Default is 2.
+.PP
+.TP 8
+.B Mouse
+To determine the mouse cursor color.
+.PP
+.TP 8
+.B Offset
+To determine the vertical position of the window.  Positive is offset from
+the top of the screen, negative is from the bottom.  Default is 2.
+Window is centered horizontally.
+.PP
+.TP 8
+.B ReverseVideo
+If ``on'', the window should be white on black instead of black on white.
+Default is off.
+.PP
+.TP 8
+.B Timeout
+In the event you don't click in the window, specifies the maximum number of
+minutes the window should remain on the screen.  Value of zero means infinite.
+Default is zero.
+.TP 8
+.B Volume
+Controls the volume of the bell.  Default is zero.
+.SH SEE ALSO
+csh(1),
+sh(1),
+mail(1),
+X(1),
+comsat(8C)
diff --git a/usr/contrib/X/man/bitmap.1 b/usr/contrib/X/man/bitmap.1
new file mode 100644 (file)
index 0000000..b9ce0b9
--- /dev/null
@@ -0,0 +1,448 @@
+.TH BITMAP 1 "29 January 1986" "X Version 10"
+.SH NAME
+bitmap \- bitmap editor for X window system
+
+.SH SYNOPSIS
+.B bitmap
+filename [\fIdimensions\fP] [\fIhost\fP:\fIdisplay\fP] [=\fIgeometry\fP]
+
+.SH DESCRIPTION
+
+.I bitmap
+lets you interactively create small bitmaps, or edit previously created
+bitmaps.  A bitmap is a small picture, represented as a rectangular
+array of 0 and 1 bits.  The X window system uses bitmaps to represent
+cursors and icons, among other things.
+
+When you run
+.I bitmap,
+you are given a magnified version of the bitmap, with each
+pixel blown up into a large square, like a piece of graph paper.  You
+can then use the mouse to set, clear, or invert individual pixels, and
+can invoke commands to set, clear or invert larger rectangular areas of
+the bitmap.  Other commands allow you to move or copy rectangular areas
+from one part of the bitmap to another, and to define a `hot spot'--a
+special single point on the bitmap, which is useful when the bitmap is
+used as an X cursor.
+
+The output of the
+.I bitmap
+program is a small program fragment.  By #include'ing such a program
+fragment in your C program, you can easily declare the size and contents
+of cursors, icons, and other bitmaps that your program creates to deal
+with the X window system.
+    
+When 
+.I bitmap
+starts, it first tries to read the specified file
+(see FILE FORMAT). If the file already exists, it
+creates a window containing a grid of the
+appropriate dimensions.
+
+If the file does not exist, 
+.I bitmap
+will create a window for a
+bitmap of the size specified by
+.I dimensions
+, which should be two
+numbers separated by the letter `x' (e.g. 7x9, 13x21).  The first number
+is the bitmap's width; the second is its height.  The bitmap will start
+out empty.  If no dimensions are specified on the command line, a
+16x16 bitmap will be created.  The absolute limit is 99x99; the practical
+limit is somewhat lower, and depends on the size and resolution of your
+display.
+
+.I bitmap
+accepts two other optional command line arguments.  You may specify a
+display name in the form \fIhost\fP:\fIdisplay\fP (see \fIX(1)\fP).
+And you may provide
+a geometry specification.  If you don't give a geometry specification, 
+.I bitmap
+will ask you where you want to put the window when it starts up.  See
+.I X(1)
+for a full explanation.
+
+The window that 
+.I bitmap
+creates has four parts.  The largest
+section is the checkerboard grid, which is a magnified version of the
+bitmap you are editing.  At the upper left is a set of commands that you
+can invoke with any mouse button.  Below the commands is an "actual size"
+picture of the bitmap you are editing;  below that is an inverted
+version of the same bitmap.  Each time you change the grid, the same
+change will occur in the actual-size bitmap and its inverse.
+
+If you use a window manager to make the
+.I bitmap
+window larger or smaller, the grid squares will automatically
+get larger or smaller as well.
+
+.SH COMMANDS
+
+(Note for users of color displays:  In all of the following, 
+``white'' means the background color, and ``black'' means the
+foreground color.  You may specify a foreground and background
+color in your \fI.Xdefaults\fP file;  see the X DEFAULTS section below.)
+
+When the cursor is in the checkerboard region, each mouse button has
+a different effect upon the single square that the cursor is over.
+
+The 
+.I left mouse button
+turns a grid square black and sets the corresponding
+bitmap bit to 1.
+
+The 
+.I right mouse button
+turns a grid square white and sets the corresponding
+bitmap bit to 0.
+
+The
+.I middle mouse button
+inverts a grid square, turning it white if it was
+black, or black if it was white.  It also inverts the corresponding bitmap
+bit, setting it to 0 if it was 1, and to 1 if it was 0.
+  
+You can also invoke more sophisticated commands by moving the mouse over
+one of the command boxes at the upper right corner, and pressing any
+mouse button.
+
+.PP
+.TP 8
+.I Clear All
+turns all the grid squares white and
+sets all bitmap bits to 0.  This is irreversible, so invoke it with care.
+
+.PP
+.TP 8
+.I Set All
+turns all the grid squares black and sets all bitmap bits to 1.
+This is also irreversible.
+
+.PP
+.TP 8
+.I Invert All
+inverts all the grid squares and bitmap bits, as if you had pressed
+the middle mouse button over each square.
+
+.PP
+.TP 8
+.I Clear Area
+clears a rectangular area of the grid, turning it white and setting the
+corresponding bitmap bits to 0. After you click over this command, the
+cursor turns into an `upper-left corner'.  Press any mouse button over the
+upper-left corner of the area you want to invert, and 
+.I hold the button down
+while moving the mouse to the lower-right corner of the area you
+want to invert, then let the button up.
+
+While you are holding down the button, the selected area will be
+covered with X's, and the cursor will change to a `lower-right corner'.
+If you now wish to abort the command without clearing an area, either press
+another mouse button, move the cursor outside the grid, or move the
+cursor to the left of or above the upper-left corner.
+
+.PP
+.TP 8
+.I Set Area
+turns a rectangular area of the grid black and sets the corresponding
+bitmap bits to 1.  It works the same way as the 
+.I Clear Area
+command.
+    
+.PP
+.TP 8
+.I Invert Area
+inverts a rectangular area of
+the grid.  It works the same way as the 
+.I Clear Area
+command.
+
+.PP
+.TP 8
+.I Copy Area
+copies a rectangular area from
+one part of the grid to another.  First, you select the rectangle to be
+copied, in the manner described under 
+.I Clear Area
+above.  Then, the
+cursor will change to an "upper-left corner".  When you press a mouse
+button, a destination rectangle will overlay the grid;  moving the mouse
+while holding down the button will move this destination rectangle.  The
+copy will occur when you let up the button.  To cancel the copy, move
+the mouse outside the grid and then let up the button.
+
+.PP
+.TP 8
+.I Move Area
+works identically to 
+.I Copy Area, except
+that it clears the source rectangle after copying to the destination.
+
+.PP
+.TP 8
+.I Set Hotspot
+designates a point on the bitmap as the "hot spot".  If a program
+is using your bitmap as a cursor, the hot spot indicates which point on
+the bitmap is the "actual" location of the cursor.  For instance, if
+your cursor is an arrow, the hot spot should be the tip of the arrow;  if
+your cursor is a cross, the hot spot should be where the perpendicular
+lines intersect.
+
+.PP
+.TP 8
+.I Clear Hotspot
+removes any hot spot that was defined on this bitmap.
+
+.PP
+.TP 8
+.I Write Output
+writes the current bitmap value to the
+file specified in the original command line.  If the file already
+exists, the original file is first renamed to 
+.B filename~
+(in the manner of \fIemacs(1)\fP and other text editors).
+    
+If either the renaming or the writing cause an error (e.g.
+``Permission denied'), a Macintosh-style dialog window will appear, asking
+if you want to write the file \fI/tmp/filename\fP instead.  If you say yes,
+all future ``Write Output'' commands will write to \fI/tmp/filename\fP as well.
+See below for the format of the output file.
+
+.PP
+.TP 8
+.I Quit
+exits the 
+.I bitmap
+program.  If you have edited
+the bitmap and have not invoked 
+.I Write Output,
+or you have edited it
+since the last time you invoked 
+.I Write Output,
+a Macintosh-style dialog
+window will appear, asking if you want to save changes before quitting.
+``Yes'' does a ``Write Output'' before exiting;  ``No'' just exits, losing
+the edits;  ``Cancel'' means you decided not to quit after all.
+
+
+.SH FILE FORMAT
+
+\fIBitmap\fP reads and writes files in the following format,
+which is suitable for #include'ing in a C program:
+.nf
+#define foo_width 9
+#define foo_height 13
+#define foo_x_hot 4
+#define foo_y_hot 6
+static short foo_bits[] = {
+   0x0010, 0x0038, 0x007c, 0x0010,
+   0x0010, 0x0010, 0x01ff, 0x0010,
+   0x0010, 0x0010, 0x007c, 0x0038,
+   0x0010};
+.fi
+
+The variables ending with
+.I _x_hot
+and 
+.I _y_hot
+are optional; they will be present only if a hot spot has been
+defined for this bitmap.  The other variables must be present.
+
+In place of ``foo'', the five variables will be prefixed
+with a string derived from the name of the file that you specified
+on the original command line by
+  (1) deleting the directory path (all characters up to and including
+the last `/', if one is present)
+  (2) deleting the extension (the first `.', if one is present,
+and all characters beyond it)
+
+For example, invoking 
+.I bitmap
+with filename
+.I /usr/include/bitmaps/cross.bitmap
+will produce a file with variable
+names 
+.I cross_width, cross_height,
+and 
+.I cross_bits
+(and 
+.I cross_x_hot
+and 
+.I cross_y_hot
+if a hot spot is defined).
+
+It's easy to define a bitmap or cursor in an X program by simply #include'ing
+a bitmap file and referring to its variables.  For instance, to use a cursor
+defined in the files
+.I this.cursor
+and
+.I this_mask.cursor,
+one simply writes
+.sp
+.nf
+#include "this.cursor"
+#include "this_mask.cursor"
+XCreateCursor (this_width, this_height, this_bits, this_mask_bits,
+  this_x_hot, this_y_hot, foreground, background, func);
+.sp
+.fi
+where
+.I foreground
+and
+.I background
+are color values, and
+.I func
+is a display function (normally GXcopy).
+
+An X program can also read a bitmap file at runtime by using the function
+.I XReadBitmapFile.
+
+.SH X DEFAULTS
+.PP
+.PP
+.TP 8
+.B Background
+The window's background color.  Bits which are 0 in the bitmap are
+displayed in this color.  This option is useful only on color
+displays.  Default: white.
+.PP
+.TP 8
+.B Border
+The border color.  This option is useful only on color displays. 
+Default: black.
+.PP
+.TP 8
+.B BorderWidth
+The border width.  Default: 3.
+.PP
+.TP 8
+.B BodyFont
+The text font.  Default: vtsingle.
+.PP
+.TP 8
+.B Foreground
+The foreground color.  Bits which are 1 in the bitmap are
+displayed in this color.  This option is useful only on color
+displays. Default: black.
+.PP
+.TP 8
+.B Highlight
+The highlight color.
+.I bitmap
+uses this color to show the hot spot and to indicate rectangular areas
+that will be affected by the
+.I Move Area, Copy Area, Set Area, Clear Area,
+and
+.I Invert Area
+commands.   If a highlight color is not given, then
+.I bitmap
+will highlight by inverting.  This option is useful only on color displays.
+
+.PP
+.TP 8
+.B Mouse
+The mouse cursor's color.  This option is useful only on color displays.
+Default: black.
+
+.SH ENVIRONMENT
+   DISPLAY - the default host and display number.
+
+.SH SEE ALSO
+   X(1), Xlib Documentation.
+
+
+.SH DIAGNOSTICS
+
+The following messages may be displayed in the C-shell that you invoked
+.I bitmap
+with.  Any of these conditions aborts 
+.I bitmap
+before it can create its window.
+
+
+  ``bitmap: could not connect to X server on \fIhost\fP:\fIdisplay\fP''
+
+Either the display given on the command line or the DISPLAY
+environment variable has an invalid host name or display number, or
+the host is down, or the host is unreachable, or the host is not
+running an X server, or the host is refusing connections.
+
+  ``bitmap: no file name specified''
+
+You invoked 
+.I bitmap
+with no command line arguments.  You must give a
+file name as the first argument.
+
+
+  ``bitmap: could not open file \fIfilename\fP for reading -- \fImessage\fP''
+
+The specified file exists but cannot be read, for the reason given in
+<message> (e.g., permission denied).
+
+
+  ``bitmap: invalid dimensions \fIstring\fP''
+  ``bitmap: dimensions must be positive''
+
+The second command line argument was not a valid dimension
+specification.
+
+  
+  ``bitmap: file \fIfilename\fP does not have a valid width dimension''
+  ``bitmap: file \fIfilename\fP does not have a valid height dimension''
+  ``bitmap: file \fIfilename\fP has an invalid \fIn\fPth array element''
+
+The input file is not in the correct format;  the program gave up when
+trying to read the specified data.
+
+
+The following messages may be displayed in the C-shell after \fIbitmap\fP
+creates its window:
+  
+  ``bitmap: Unrecognized variable \fIname\fP in file \fIfilename\fP''
+
+.I bitmap
+encountered a variable ending in something other than
+.I _x_hot, _y_hot, _width,
+or
+.I _height
+while parsing the input file.  It will ignore this variable and
+continue parsing the file.
+
+
+  ``bitmap: XError: \fImessage\fP''
+  ``bitmap: XIOError''
+
+A protocol error occurred.  Something is wrong with either the X server
+or the X library which the program was compiled with.  Possibly they are
+incompatible.  If the server is not on the local host, maybe the
+connection broke.
+
+
+.SH BUGS
+   Doesn't take enough command line options yet.  Most options can be
+specified only through .\fIXdefaults\fP.
+   
+   If you move the mouse too fast while holding a mouse button down,
+some squares may be `missed'.  This is caused by limitations in how
+frequently the X server can sample the mouse location.
+
+   There is no way to write to a file other than that specified on the
+command line.
+
+   There is no way to change the size of the bitmap once the program
+is started.
+   
+   Edits are unrecoverably lost if you terminate the program with a ^C
+or ^\ in the shell which invoked it, or if you kill it with the shell's
+``kill'' command.
+
+   Dimensions greater than 99 are not read properly from the command
+line or input file.  Generally such dimensions would not be useful anyway,
+since they would produce a window larger than most displays.
+
+.SH AUTHOR
+Copyright (c) 1986 by Massachusetts Institute of Technology.
+.br
+   Ron Newman, MIT Project Athena
diff --git a/usr/contrib/X/man/pikapix.1 b/usr/contrib/X/man/pikapix.1
new file mode 100644 (file)
index 0000000..165a5b7
--- /dev/null
@@ -0,0 +1,72 @@
+.TH PIKAPIX 1 "16 September 1985" "X Version 10"
+.SH NAME
+pikapix - recolor an X window snapshot
+.SH SYNOPSIS
+.B pikapix
+[ -s ] [ host:number ]
+.SH DESCRIPTION
+.PP
+\fIPikapix\fP takes a snapshot of an existing window,
+and then lets you change colors
+in the snapshot.  This can be a convenient way to choose sets of colors for
+applications.
+.PP
+When started, \fIpikapix\fP grabs the mouse,
+and waits for you to select the window
+you want to recolor.  Clicking the right button on a window selects the entire
+top-level window.  Clicking the middle button on a window selects the first
+level subwindow under the mouse, or the top-level window if there is no
+subwindow.  Clicking the left button on a top-level window selects the lowest
+subwindow under the mouse, or the top-level window if there is no subwindow.
+After a few moments, a snapshot of the window will appear in the same place
+as the original window.  Move the snapshot with your window manager if you
+want to compare the snapshot with the original window.
+.PP
+As you move the cursor around in the snapshot, it will change color to reflect
+whatever pixel it is pointing at.
+.PP
+If you click the middle mouse button, you will get a popup text window.  The
+prompt indicates the current color value in hexadecimal notation as described
+in \fIX(1)\fP.
+To change the color, simply type in a color name (or a color value
+in hexadecimal notation), followed by carriage return.  Rubout and control-U
+can be used for editing.  To abort, simply click any mouse button in the popup,
+or type control-C or control-D.
+.PP
+If you click the left mouse button, you will restore the color to its value in
+the original snapshot.
+.PP
+If you click the right mouse button, you will get a popup mix window.  At the
+top are three squares with the red, green, and blue primaries, and at the
+bottom is the combined color and its hexadecimal notation.  Clicking the
+left button in a primary decrements its value, and clicking the right button
+increments its value.  If you press the middle button in a primary and then
+move around, the vertical position of the mouse controls the value, with zero
+intensity at the top of the window, and full intensity at the bottom of the
+window; releasing the mouse button sets the final value.  Clicking the right
+button in the combined color will exit the popup and change to the new color.
+Clicking the middle button in the combined color will restore the values to
+their current state in the snapshot.  Clicking the left button in the combined
+color will restore the values to their state in the original snapshot.
+.PP
+Typing control-C or control-D in the snapshot will terminate the program.
+.PP
+By default, once the snapshot is created, it no longer depends on the existence
+of the original window, and the color in the snapshot will dynamically track
+the color in the popup mix window.  However, a potentially large number of
+color map entries may be required for this mode.  If not enough entries are
+available, the ``-s'' can be used.  When run with the ``-s'' option,
+the snapshot
+continues to depend on colors from the original window, new colors are shared
+when possible, and the snapshot is completely repainted after every change in
+color.
+.SH ENVIRONMENT
+DISPLAY        This program gets the display to use by default from this variable.
+.SH BUGS
+Redisplay is very slow on all but small windows.
+.SH AUTHOR
+Bob Scheifler, MIT Laboratory for Computer Science.
+.br
+Copyright (c) 1985, Massachusetts Institute of Technology
+.SH "SEE ALSO"
+X(1)
diff --git a/usr/contrib/X/man/resize.1 b/usr/contrib/X/man/resize.1
new file mode 100644 (file)
index 0000000..b5bc7c1
--- /dev/null
@@ -0,0 +1,34 @@
+.TH RESIZE 1 "3 January 1985" "X Version 10"
+.SH NAME
+resize - reset TERMCAP with current size of a window
+.SH SYNOPSIS
+.B resize
+.SH DESCRIPTION
+\fIResize\fP prints on its standard output the TERM and TERMCAP commands for
+the C-shell of the current size of a window.  It is never executed directly,
+but should be aliased similarly to
+.I tset
+to cause the C-shell to execute the commands.
+.PP
+For example, the following alias when executed as a command will reset
+the environment of the current shell:
+.sp
+       alias xs        'set noglob; eval `resize`'
+.br
+.SH FILES
+/etc/termcap   for the base termcap entry to modify.
+.br
+~/.cshrc       user's alias for the command.
+.SH "SEE ALSO"
+csh(1), tset(1), xterm(1)
+.SH AUTHORS
+Mark Vandevoorde (MIT-Athena)
+.br
+Copyright (c) 1984, 1985 by Massachusetts Institute of Technology.
+.br
+See \fIX(1)\fP for a complete copyright notice.
+.SH BUGS
+Ought to be able to generate the strings for the Bourne shell.
+There should be some global notion of display size; termcap and
+terminfo need to be rethought in the context of window systems.
+(Fixed in 4.3BSD, and Ultrix-32 1.2)
diff --git a/usr/contrib/X/man/xclock.1 b/usr/contrib/X/man/xclock.1
new file mode 100644 (file)
index 0000000..1d978bb
--- /dev/null
@@ -0,0 +1,183 @@
+.TH XCLOCK 1 "18 August 1985" "X Version 10"
+.SH NAME
+xclock - X Window System, analog / digital clock
+.SH SYNOPSIS
+.B xclock
+[ option ] ...
+.SH DESCRIPTION
+.I Xclock 
+is the
+.I X
+window system clock.
+.I Xclock
+Continuously  displays  the  current  time of day.  The user is given a
+choice of either an analog or a digital display (of  course  there  is
+nothing  precluding  the  user  from  having more than one clock).  It
+creates a window and displays the time in the chosen format.
+.SH ARGUMENTS
+.PP
+.TP 10
+.B \-analog 
+Use analog display mode.  Draw a conventional 12 hour clock face with ``ticks''
+for each minute and stroke marks on each hour.  The default is digital mode.
+.PP
+.TP 10
+.B \-bg \fIcolor\fP
+Determines the color of the background.
+.PP
+.TP 10
+.B \-bd \fIcolor\fP
+Determines the color of the border.
+.PP
+.TP 10
+.B \-bw \fIpixels\fP
+Specify the width in pixels of the border around the
+.I xclock
+window.
+.PP
+.TP 10
+.B \-digital
+Use  digital  display  mode  (default).   Display the date and time in
+digital format.
+.PP
+.TP 10
+.B \-fg \fIcolor\fP
+Determines the color of the text in digital mode and the
+tick marks in analog mode.
+.PP
+.TP 10
+.B \-fn \fIfont\fP
+The specified
+.I font
+will be used as the output font
+in digital mode. Any fixed width font may be used, the default is ``6x10''.
+.PP
+.TP 10
+.B \-help
+Display a brief summary of
+.I xclock's
+calling syntax and options.
+.PP
+.TP 10
+.B \-hl \fIcolor\fP
+Determines the color of the hands in analog mode.
+.PP
+.TP 10
+.B \-padding \fIpixels\fP
+Specify the width in pixels of the padding ``white space''
+between the window border and anything
+.I xclock
+displays.  The default padding is 10 in digital mode and 8 in analog mode.
+.PP
+.TP 10
+.B \-rv
+Cause
+.I xclock
+to produce all output in white-on-black instead of black-on-white.  This
+is only useful on Black and White displays.
+.PP
+.TP 10
+.B \-update \fIseconds\fP
+Specify the frequency in seconds with which
+.I xclock
+updates its display.  If the
+.I xclock
+window is obscured and then exposed,
+.I xclock
+will override this setting  and  redisplay  immediately.   The  default
+update  frequency  is  60  seconds.   The  specification  of an update
+frequency greater than 30 seconds disables the display of  the  second
+hand in analog mode.
+.PP
+.TP 8
+.B =\fIgeometry\fP
+The clock window is created with the specified
+size according to the geometry specification.
+See \fIX(1)\fP for details.
+In digital mode if you do not specify either height and width they are
+determined  by  the font in use.  In analog mode if you do not specify
+either width or height they default to 164.  The  default  offset  for
+any unspecified offset is -0.  All values are in pixels.
+.PP
+.TP 10
+.B \fIhost\fP:\fIdisplay\fP
+Normally,
+.I xclock
+gets  the host and display number to use from the environment variable
+``DISPLAY''.  One can, however specify them explicitly.
+The
+.I host
+specifies which machine to create the
+.I xclock
+window on, and
+the
+.I display
+argument specifies the display number.
+For example,
+``mit-frobozz:1'' creates an
+.I xclock
+on display one on the machine mit-frobozz.  If the host is omitted the
+local  host  is  assumed.   If  the  display  is omitted, display 0 is
+assumed, the ``:'' is necessary in either case.
+.SH X DEFAULTS
+.PP
+.PP
+.TP 8
+.B Background
+To determine the background color.
+.PP
+.TP 8
+.B Border
+To determine the border color.
+.PP
+.TP 8
+.B BorderWidth
+To determine the border width.
+.PP
+.TP 8
+.B BodyFont
+To determine digital clock display font.
+.PP
+.TP 8
+.B Foreground
+To determine the foreground color.
+.PP
+.TP 8
+.B Highlight
+To determine the highlight color.
+.PP
+.TP 8
+.B InternalBorder
+To determine the internal padding value.
+.PP
+.TP 8
+.B Mode
+To determine if ``analog'' or ``digital'' mode is the default.
+.PP
+.TP 8
+.B ReverseVideo
+If ``on'', the clock should be white on black instead of black on white.
+This is only useful on Black and White displays.
+.PP
+.TP 8
+.B Update
+To determine the update rate.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+To get the default host and display number.
+.SH SEE ALSO
+X(1), xwm(1), X(1), time(3C), select(2)
+.SH AUTHORS
+.PP
+Copyright 1985, Massachusetts Institute of Technology.
+.PP
+Tony Della Fera (MIT-Athena, DEC)
+.PP
+Dave Mankins (MIT-Athena, BBN)
+.SH BUGS
+.I Xclock
+believes the Unix clock.  When specifying the window size manually  in
+digital  mode  the  string should be centered automatically, currently
+you have to fiddle with the padding parameter to get it right.
diff --git a/usr/contrib/X/man/xdemo.1 b/usr/contrib/X/man/xdemo.1
new file mode 100644 (file)
index 0000000..7e2cbd2
--- /dev/null
@@ -0,0 +1,171 @@
+.TH XDEMO 1 "12 December 1985" "X Version 10"
+.SH NAME
+xdemo - demonstration program for X window system
+.SH SYNOPSIS
+.B xdemo
+[ options ] demo [ =\fIgeometry\fP ] [ \fIhost\fP:\fInumber\fP ]
+.SH DESCRIPTION
+.I Xdemo
+is a demonstration program for the X window system.
+By default, the host and display number are extracted from the
+environment variable ``DISPLAY''.
+One can, however, specify a different display.
+.I Host
+specifies the host,
+and
+.I number
+specifies the number of the display.  For example, ``xdemo star orpheus:1''
+will put the star demo on display one on machine orpheus.
+Demo can be any of: balls, bounce, circle, circles, colors, cookie, draw, life,
+lines, menulife, motion, plaid, qix, rgb, shades, slide, star, tetra,
+wallpaper, web, and xor.
+The colors, rgb, and shades demos will only work on color displays.
+.PP
+The window is created in the usual way using one of the mouse buttons.
+Using the center button, depress the button to define one corner of the window,
+move the cursor to where the opposite corner of the window should be
+and release the button.  Using the right button, depress the button to
+define the default size window, move the cursor to position the window,
+and release the button.  Using the left button for all demos but colors,
+life, and menulife, click the left button to place the default size window
+in the upper left corner of the screen.  Using the left button for the
+colors, life, and menulife demos, depress the button to define the default
+size window, move the cursor to position the window, and release the button.
+.PP
+The window can also be placed, or given a default size, with the standard
+geometry specification:
+.br
+       \fB=\fP\fIgeometry\fP
+.br
+The geometry specification can be used to set the size and location of the
+window.
+See \fIX(1)\fP for details.
+.PP
+Most of the demos run without user input: balls, bounce, circle, circles,
+colors, lines, plaid, qix, slide, star, tetra, wallpaper, web, and xor.
+Most of these have random number generators built in, and will produce
+different results each time they are run, or each time the window is
+resized.
+.PP
+.SH "MOUSE USAGE"
+.PP
+Mouse usage only applies on the demos draw, life, menulife, motion, rgb, and
+shades.
+.PP
+In the draw demo, clicking the left button defines points that will
+be connected by a spline when the center button is clicked.
+If the center button is clicked twice in a row, the window is cleared.
+Clicking the right button defines points to be connected by straight lines
+when the center button is clicked.
+Left and right button clicks can be combined in a single shape.
+Clicking any button in one of the selection boxes at the upper left selects
+a drawing mode: patterned gray line, solid white line, solid black line, dashed
+white line, dashed black line, filled black, filled white, and filled gray.
+The drawing function can be selected by placing the cursor over the function
+box at the top right and typing a single hexadecimal digit (corresponding
+to the characteristic function).  For line drawing, the brush height and width
+can be adjusted by placing the cursor over the height or width box and typing
+a single hexadecimal digit.  Text can be put into the picture by positioning
+the mouse and typing.  The color of the text is determined from the line/fill
+color, and the display function is applied.
+.PP
+The motion demo uses the mouse to define points of a shape just as in the draw
+demo, but moves the line drawing around the window, bouncing off the walls,
+while randomly changing the points relative to each other.
+.PP
+The life demo uses the left button to randomly insert occupied cells into the
+window and start the life program initially.
+Clicking the center button will turn life on and off, so you can look
+at interesting intermediate patterns,
+and the right button is used to clear the `universe'.
+.PP
+The menulife demo uses the left button to set/clear individual cells while
+the button is held down.  The right button and the space bar can be used
+to single step the generations.  The middle button pops up a pull down menu.
+Release the middle button on a selection for it to take effect; release outside
+of all selections to abort.  Changing rules takes a long time.
+.PP
+The rgb demo uses button operations in the three boxes at the top of the window
+to change color values.  The left button decrements the value, the right
+button increments the value.  If you press the middle button and then
+move around, the vertical position of the mouse controls the value, with zero
+intensity at the top of the box, and full intensity at the bottom of the box;
+releasing the mouse button sets the final value.
+.PP
+The shades demo uses button clicks to change color values.  A matrix of two
+primary colors of varying intensity, with a third primary of constant intensity
+is displayed.  The right button increments the value of the third primary, the
+left button decrements the value, and the middle button switches to a different
+pair of initial primaries.
+.SH OPTIONS
+On color displays, colors can be specified in the command line:
+.PP
+.nf
+       \fB-fg=\fP\fIcolor\fP           foreground (lines, text, etc.)
+       \fB-bg=\fP\fIcolor\fP           background
+       \fB-bd=\fP\fIcolor\fP           border
+       \fB-ms=\fP\fIcolor\fP           mouse
+       \fB-fn=\fP\fIfont\fP            font
+.fi
+.PP
+Many demos ignore the foreground color and do random color selection.
+.SH X DEFAULTS
+.PP
+For the following defaults, you can also give a demo-specific default by
+prepending the demo name and a separating period, e.g., ``Plaid.Foreground''.
+.PP
+.TP 8
+.B Background
+To determine the background color.
+.PP
+.TP 8
+.B Border
+To determine the border color.
+.PP
+.TP 8
+.B BorderWidth
+To determine the border width.
+.PP
+.TP 8
+.B BodyFont
+To determine text font.
+.PP
+.TP 8
+.B Foreground
+To determine the foreground color.
+.PP
+.TP 8
+.B Mouse
+To determine the mouse cursor color.
+.PP
+.TP 8
+.B MenuBackground
+To determine the menu background color in menulife.
+.PP
+.TP 8
+.B MenuForeground
+To determine the menu text color in menulife.
+.PP
+.TP 8
+.B MenuFont
+To determine menu text font.
+.PP
+.TP 8
+.B MenuMouse
+To determine the menu mouse cursor color in menulife.
+.SH COOKIE
+The cookie monster wants you to give it a ``cookie'', of course.
+.SH ENVIRONMENT
+DISPLAY        This program gets the display to use by default from this variable.
+.SH AUTHOR
+Bob Scheifler, MIT Laboratory for Computer Science.
+Many of the demos are ripoffs:
+balls, bounce, circle, circles, lines, plaid, slide, tetra, wallpaper, and xor
+were taken from Lucasfilm,
+web was taken from Steve Ward,
+and qix from Symbolics.
+Menulife written by Paul Johnson, MIT Laboratory for Computer Science.
+.br
+Copyright (c) 1985, Massachusetts Institute of Technology
+.SH "SEE ALSO"
+X(1), xterm(1), xwm(1)
diff --git a/usr/contrib/X/man/xfax.1 b/usr/contrib/X/man/xfax.1
new file mode 100644 (file)
index 0000000..73cd48a
--- /dev/null
@@ -0,0 +1,60 @@
+.TH XFAX 1 "12 December 1985" "X Version 10"
+.SH NAME
+xfax - display a FAX file in an X window
+.SH SYNOPSIS
+.B xfax
+[ options ] [ =\fIgeometry\fP ] [ \fIhost\fP:\fInumber\fP ] file
+.SH DESCRIPTION
+.I Xfax
+displays a Dacom 450/500 Facsimile file (see NIC RFC 803) in an X window.
+By default, the host and display number are extracted from the
+environment variable ``DISPLAY'', but one can specify a different host in
+the command line.
+The window is created in the usual way using a geometry specification
+or using a mouse button.  Clicking left creates a full screen window.
+With the center button, depress the button to define one corner of the window,
+move the cursor to where the opposite corner of the window should be
+and release the button.
+.PP
+Decoding the file usually takes no more than a minute, and then the file
+is displayed.  You can move around in the file by pressing the center button
+in one spot, moving somewhere, and releasing the button.  The spot you
+pointed at first will move to the spot you pointed at last.
+.SH OPTIONS
+On color displays, colors can be specified in the command line:
+.PP
+.nf
+       \fB-fg=\fP\fIcolor\fP           foreground
+       \fB-bg=\fP\fIcolor\fP           background
+       \fB-bd=\fP\fIcolor\fP           border
+       \fB-ms=\fP\fIcolor\fP           mouse
+.fi
+.SH X DEFAULTS
+.PP
+.TP 8
+.B Background
+To determine the background color.
+.PP
+.TP 8
+.B Border
+To determine the border color.
+.PP
+.TP 8
+.B BorderWidth
+To determine the border width.
+.PP
+.TP 8
+.B Foreground
+To determine the foreground color.
+.PP
+.TP 8
+.B Mouse
+To determine the mouse cursor color.
+.SH ENVIRONMENT
+DISPLAY        This program gets the display to use by default from this variable.
+.SH AUTHOR
+Bob Scheifler, MIT Laboratory for Computer Science.
+.br
+Copyright (c) 1985, Massachusetts Institute of Technology
+.SH "SEE ALSO"
+X(1)
diff --git a/usr/contrib/X/man/xfd.1 b/usr/contrib/X/man/xfd.1
new file mode 100644 (file)
index 0000000..820c662
--- /dev/null
@@ -0,0 +1,103 @@
+.TH XFD 1 "1 January 1986" "X Version 10"
+.SH NAME
+xfd - X window system font displayer
+.SH SYNOPSIS
+.B xfd
+[ =\fIgeometry\fP ] [ \fIhost\fP:\fInumber\fP ] [ options ] fontname
+.SH DESCRIPTION
+.I Xfd
+creates a window which displays all characters in the named font.  The
+characters are displayed in increasing ASCII order, 8 to a line, from
+the first to the last character defined in the font.
+.PP
+The font name is interpreted by the X server.  On a VAX, if the name
+does not begin with ``/'', the X server adds the suffix ``.onx'' to it and
+looks up the font file in the directory \fI/usr/new/lib/X/font/\fP.  If
+the name does begin with ``/'', the X server treats it as an absolute
+pathname of a file containing a font.
+.PP
+If no font name is given on the command line, 
+.I xfd
+displays the font ``vtsingle''.
+.PP
+The window stays around until the xfd process is killed  or a mouse button is pressed on the window.
+.SH "OPTIONS"
+.PP
+.TP 8
+.B \fIhost\fP:\fIdisplay\fP
+Normally,
+.I xfd
+gets the host and display number to use from the environment
+variable ``DISPLAY''.  One can, however specify them explicitly.
+The
+.I host
+specifies which machine to create the window on, and
+the
+.I display
+argument specifies the display number.
+For example,
+``orpheus:1'' creates a shell window on display one on the machine
+orpheus.
+.PP
+.TP 8
+.B \-bw \fIborderwidth\fP
+Allows you to specify the width of the window border in pixels.
+.TP 8
+.B \-rv
+The screen will be displayed with black characters on a white background,
+rather than the default white on black.
+.PP
+.TP 8
+.B \-fg \fIcolor\fP
+On color displays, determines the color of the text.
+.PP
+.TP 8
+.B \-bg \fIcolor\fP
+On color displays, determines the color of the background.
+.PP
+.TP 8
+.B \-bd \fIcolor\fP
+On color displays, determines the color of the border.
+.PP
+.TP 8
+.B \=\fIgeometry\fP
+.I Xfd
+will also take a standard geometry specification (see X(1)).
+.SH "X DEFAULTS"
+.I Xfd
+uses a number of standard default values.
+.PP
+.TP 8
+.B BorderWidth
+Set the border width of the window.
+.PP
+.TP 8
+.B BorderColor
+Set the border color of the window.
+.PP
+.TP 8
+.B ReverseVideo
+If ``on'', reverse the definition of foreground and background color.
+.PP
+.TP 8
+.B Foreground
+Set the text color.
+.PP
+.TP 8
+.B Background
+Set the background color.
+.SH FILES
+/usr/new/lib/X/font/*.onx
+.SH "SEE ALSO"
+X(1), X(8C), xterm(1)
+.SH ENVIRONMENT
+DISPLAY        -       To find out which X you are using.
+.SH BUGS
+It should display the name of the font somewhere.
+.SH AUTHORS
+Ron Newman, MIT Project Athena,
+Jim Gettys, DEC, MIT Project Athena
+.br
+Copyright (c) 1984, 1985 by Massachusetts Institute of Technology.
+.br
+See X(1) for a complete copyright notice.
diff --git a/usr/contrib/X/man/xhost.1 b/usr/contrib/X/man/xhost.1
new file mode 100644 (file)
index 0000000..258fdcb
--- /dev/null
@@ -0,0 +1,48 @@
+.TH XHOST 1 "25 January 1986" "X Version 10"
+.SH NAME
+xhost - X window system access control program
+.SH SYNOPSIS
+.B xhost
+[+-]host ...
+.SH DESCRIPTION
+.I Xhost
+is used to add and delete hosts to the list of machines X will accept
+connections from.
+This is an elementary form of privacy control, since otherwise X would
+be willing to create windows for anyone on the internet.
+It is only sufficient for a workstation (single user) environment,
+though it does limit the worst abuses.
+.PP
+If you want to set up hosts that you always trust, you can
+specify them in your login file, or you can specify the hosts
+in the file \fI/etc/X*.hosts\fP,
+where * is the number of the display on the machine.
+.PP
+Specifying a host name (with an optional leading plus sign)
+adds that host to the list; use a leading minus sign to delete
+a host.
+.PP
+DECnet nodes should be specified as names with trailing ``::''.
+.PP
+This program can only be executed on the machine the display is
+connected to.
+.PP
+It is possible to remove the current host from the access list. 
+Be warned that you can't undo this without logging out.
+.PP
+.I Xhost
+with no arguments will print the current hosts allowed to access your
+display.
+.SH FILES
+/etc/X*.hosts
+.SH "SEE ALSO"
+X(8C), xterm(1)
+.SH ENVIRONMENT
+DISPLAY        -       To find out which X you are using.
+.SH AUTHOR
+Copyright 1985 by Massachusetts Institute of Technology.
+.br
+See \fIX(1)\fP for a complete copyright notice.
+.br
+Bob Scheifler, MIT Laboratory for Computer Science,
+Jim Gettys, MIT Project Athena (DEC).
diff --git a/usr/contrib/X/man/ximpv.1 b/usr/contrib/X/man/ximpv.1
new file mode 100644 (file)
index 0000000..c2b4337
--- /dev/null
@@ -0,0 +1,167 @@
+.TH XIMPV 1 "30 August 1985" "X Version 10"
+.SH NAME
+ximpv \- Imprint (Impress) Previewer for the X Window System
+.SH SYNOPSIS
+.B ximpv
+[=\fIgeometry\fP] [-p#] [-rv] [-fg \fIcolor\fP] [-bg \fIcolor\fP] [-bd \fIcolor\fP] [-ms \fIcolor\fP] [\fIhost\fP:\fIdisplay\fP] file
+.SH DESCRIPTION
+.I Ximpv
+is a program which runs under the X window system. It
+is used to preview images which is destined for an Imagen laser
+printer.
+.PP
+The 
+.I -p# 
+option, if used, will set the number of pages you can back up to #. Default
+is five pages. Zero (or no number) runs faster as the pages do not have to be 
+transferred to disk.
+.PP
+If the 
+.I file 
+given to ximpv is correct a square will appear on the
+screen indicating text is about to appear.
+If no 
+.I file 
+is given stdin must be from a pipe or an error message is printed
+and the program aborted.
+.PP
+The pages of the file are displayed in the order.
+Only about 2/3 of a page can be displayed at once (this is because
+of aspect ratio differences).
+.SH ARGUMENTS
+.PP
+.TP 8
+.B -bd \fIcolor\fP
+Specify the border color.
+.PP
+.TP 8
+.B -ms \fIcolor\fP
+Specify the mouse color.
+.PP
+.TP 8
+.B -fg \fIcolor\fP
+Specify the foreground color.
+.PP
+.TP 8
+.B -bg \fIcolor\fP
+Specify the background color.
+.PP
+.TP 8
+.B -bw \fIwidth\fP
+Specify the width of the border.
+.PP
+.TP 8
+.B -rv
+Cause \fIximpv\fP
+to produce all output in black-on-white instead of white-on-black.
+.PP
+.TP 8
+.B =\fIgeometry\fP
+The previewer window is created with the specified
+size specified by the geometry specification.
+See \fIX(1)\fP for details of this specification.
+.SH MOUSE
+.PP
+Clicking the right button will display the next window full, moving to the
+next page as needed.  Clicking the middle button will move to the opposite
+end of the current page.  Clicking the left button will
+display the previous window full, moving to the previous page as needed.
+.PP
+Clicking the right button with the Shift key held down will display the next
+window full to the right.
+Clicking the middle button with the Shift key held down will move to the
+opposite side of the current page.  Clicking the left button with the Shift
+key held down will display the previous window full to the left.
+.SH KEYBOARD
+.PP
+The user may move up and down the page
+with the numeric pad keys:
+.nf
+.br
+.ta 1.2i 1.8i 2.5i
+       fine    medium  coarse
+.br
+up page           7       8       9
+.sp
+down page         1       2       3
+.br
+.fi
+The numeric pad keys can also be used for horizontal motion:
+.nf
+.ne 3
+.br
+       left    center  right
+.br
+horizontal        4       5       6
+.fi
+.br
+.DT
+.PP
+You may also move forward or back in the document by using:
+.br
+.B -
+for back a page,
+.br
+.B up-arrow
+for back a window full,
+.br
+.B .
+for forward a page,
+.br
+.B down-arrow
+for forward a window full,
+.br
+.B ,
+or
+.B +
+for forward to next new page.
+.br
+You may also move left and right in the document by small amounts using the
+left and right arrow keys.
+.br
+The only other functional keys are the CNTRL
+.B -D 
+key and the CNTRL
+.B -C
+key, which exit the program.
+.SH X DEFAULTS
+.PP
+Accepts the following defaults:
+.PP
+.TP 8
+.B BorderWidth
+Set the border width of the window.
+.PP
+.TP 8
+.B ReverseVideo
+If ``on'', reverse the definition of foreground and background color.
+.PP
+.TP 8
+.B Foreground
+Set the text/graphics color.
+.PP
+.TP 8
+.B Background
+Set the background color.
+.PP
+.TP 8
+.B Border
+Set the border color.
+.PP
+.TP 8
+.B Mouse
+Set the mouse cursor color.
+.SH "SEE ALSO"
+X(1), xproof(1), xdvi(1)
+.SH ENVIRONMENT
+Uses the environment variable ``DISPLAY'' to specify which bit map display
+terminal to use.
+.SH FILES
+/usr/tmp/impvXXXXXX    circular buffer of screen images
+.SH "SEE ALSO"
+X(1).
+.SH "AUTHOR"
+Steven Sutphen and Ted Bentley, University of Alberta
+Changes and enhancements for X by
+Bob Scheifler, MIT Laboratory for Computer Science, and Jim Gettys,
+DEC, Project Athena.
diff --git a/usr/contrib/X/man/xinit.1 b/usr/contrib/X/man/xinit.1
new file mode 100644 (file)
index 0000000..81157fa
--- /dev/null
@@ -0,0 +1,63 @@
+.TH XINIT 1 "25 January 1986" "X Version 10"
+.SH NAME
+xinit - X window system initializer
+.SH SYNOPSIS
+.B xinit
+[[client] options] [-- [server] [display] options]
+.SH DESCRIPTION
+.I Xinit
+is intended to be used when the X window system server is not run automatically
+from \fIinit(8)\fP,
+and the window system must be started from a shell running on
+the display.  This might be true, for example, if a normal login is run in a
+glass-tty emulator on a workstation console, so that different window systems
+can easily be run on the display at different times.
+.PP
+\fIXinit\fP starts up the server and a single client application,
+which is typically
+\fIxterm(1)\fP.
+When the client eventually terminates, \fIxinit\fP automatically kills off
+the server and then itself terminates.
+.PP
+By default, 
+\fIxinit\fP expects the server to exist in an executable named ``X'' in
+the search path, 
+and for \fIxterm(1)\fP to also exist in the search path.  
+It starts
+up the X server on display 0, and then starts up
+.br
+       xterm =+1+1 -n login unix:0
+.br
+.PP
+A different client and/or server can be specified in the command line, and
+command line options can be passed to both the server and the client.  The
+client and its options come first in the command line.  The server and its
+options must be preceded by ``--''.
+If the first argument to xinit begins with `/' or a letter, it is taken to
+be the client program to use instead of xterm, and none of the default xterm
+options are used.  Otherwise, the first and subsequent arguments are
+simply appended as further options to the default \fIxterm\fP command line.
+.PP
+Following the ``--'' argument,
+if the next argument begins with `/' or a letter,
+it is taken to be the server program to use instead of ``X''.  If the next
+argument begins with a digit, it is taken to be the display number; otherwise
+display 0 is assumed.  The remaining arguments are added as options to the
+server command line.
+.PP
+Examples:
+.sp
+xinit =80x65+10+10 -fn 8x13 -j -fg white -bg navy
+.br
+xinit -e widgets -- Xsun -l -c
+.br
+xinit rsh fasthost cpupig workstation:1 -- 1 -a 2 -t 5
+.br
+.SH AUTHOR
+Copyright (c) 1986 by Massachusetts Institute of Technology.
+.br
+See \fIX(1)\fP for a complete copyright notice.
+.br
+Bob Scheifler, MIT Laboratory for Computer Science
+.SH "SEE ALSO"
+X(8C), xterm(1)
diff --git a/usr/contrib/X/man/xload.1 b/usr/contrib/X/man/xload.1
new file mode 100644 (file)
index 0000000..0cb283a
--- /dev/null
@@ -0,0 +1,167 @@
+.TH XLOAD 1 "18 August 1985" "X Version 10"
+.SH NAME
+xload - X window system load average display
+.SH SYNOPSIS
+.B xload
+[ option ] ...
+.SH DESCRIPTION
+.I xload 
+continuously displays the system load average under the
+.I X
+window system.
+.I xload
+creates a window in which the load average is represented as a bar graph
+with n divisions. Each division represents one unit of load average.
+The name of the host is displayed in the upper left corner.
+.PP
+.I xload
+understands the following options:
+.PP
+.TP 8
+.B \-bd \fIcolor\fP
+Specify the border color.  On monochrome displays, should be ``white'', ``black'',
+or ``gray''; gray is the default.
+.PP
+.TP 8
+.B \-bg \fIcolor\fP
+Specify the background color.  On monochrome displays, should be ``white'' or
+``black''; black is the default.
+.PP
+.TP 8
+.B \-bw \fIpixels\fP
+Specify the width in pixels of the border around the
+.I xload
+window. The default value is 3 pixels.
+.PP
+.TP 8
+.B \-fg \fIcolor\fP
+Specify the graph color.  On monochrome displays, should be ``white'' or ``black'';
+white is the default.
+.PP
+.TP 8
+.B \-fn \fIfontname\fP
+The hostname will be displayed in the specified font (if none
+is specified, this defaults to 6x10).
+.PP
+.TP 8
+.B \-hl \fIcolor\fP
+Specify the hostname and scale line color; the default is to make it the same
+as the graph color.
+.PP
+.TP 8
+.B \-rv
+Cause
+.I xload
+to produce all output in black-on-white instead of white-on-black.
+.PP
+.TP 8
+.B \-fw
+Cause
+.I xload
+to produce all output in white-on-black instead of black-on-white.
+.PP
+.TP 8
+.B \-scale \fIinteger\fP
+Specify the minimum number of divisions on the graph (default 1).
+.I Xload
+is free to use more divisions if the load gets too high to display,
+but it will never use fewer divisions than this.
+.PP
+.TP 8
+.B \-update \fIseconds\fP
+Specify the frequency in seconds with which
+.I xload
+updates its display (except if the
+.I xload
+window is obscured and then exposed, immediate redisplay occurs).  The default
+update frequency is 5 seconds.  Specification of a frequency
+less than 5 seconds is ignored and the default frequency is used instead.
+.PP
+.TP 8
+.B =\fIgeometry\fP
+The load graph window is created with the specified
+size and location
+determined
+by the supplied geometry specification.
+See \fIX(1)\fP for a full explanation.
+.PP
+.TP 8
+.B \[\fIhost\fP]:\[\fIdisplay\fP]
+Normally,
+.I xload
+gets the host and display number to use from the environment
+variable ``DISPLAY''.  Either or both can be specified with this option.
+.I host
+specifies which machine to create the
+.I xload
+window on, and
+.I display
+specifies the display number.
+For example,
+``mit-grape-nehi:0'' creates an
+.I xload
+on display 0 on machine mit-grape-nehi. Either value can be defaulted
+by omission but ``:'' is necessary to specify one or both.
+.SH X DEFAULTS
+.PP
+.TP 8
+.B Foreground
+Set the graph color.
+.PP
+.TP 8
+.B Background
+Set the background color.
+.PP
+.TP 8
+.B BodyFont
+Set the hostname font.
+.PP
+.TP 8
+.B Border
+Set the internal border padding.
+.PP
+.TP 8
+.B BorderColor
+Set the border color.
+.PP
+.TP 8
+.B BorderWidth
+Set the border width of the window.
+.PP
+.TP 8
+.B Highlight
+Set the hostname and scale line color.
+.PP
+.TP 8
+.B ReverseVideo
+If ``on'', reverse the definition of foreground and background color.
+.PP
+.TP 8
+.B Scale
+Set the minimum scale.
+.PP
+.TP 8
+.B Update
+Set the update interval.
+.SH ENVIRONMENT
+DISPLAY - to get the default host and display number.
+.SH SEE ALSO
+X(10, xwm(1), X(8C), mem(4), select(2)
+.SH DIAGNOSTICS
+Unable to open display or create window. Unable to open /dev/kmem.
+Unable to query window for dimensions. Various X errors.
+.SH BUGS
+.I xload
+requires the ability to open and read /dev/kmem. On most systems, this requires
+the suid bit set with root ownership or the sgid bit set and membership in 
+the same group as /dev/kmem. 
+.SH AUTHORS
+K. Shane Hartman (MIT-LCS), Stuart A. Malone (MIT-LCS)
+.br
+Host name feature added by Jim Gettys (MIT-Athena).
+Scale feature added by Bob Scheifler (MIT-LCS).
+Automatic rescaling feature added by Stuart A. Malone (MIT-LCS).
+.br
+Copyright (c) 1985, Massachusetts Institute of Technology.
+.br
+See X(1) for a complete copyright notice.
diff --git a/usr/contrib/X/man/xnwm.1 b/usr/contrib/X/man/xnwm.1
new file mode 100644 (file)
index 0000000..abca101
--- /dev/null
@@ -0,0 +1,309 @@
+.TH XNWM 1 "19 July 1985" "X Version 10"
+.SH NAME
+xnwm - X window system manager process
+.SH SYNOPSIS
+.B xnwm
+[ -cmsnftv2 ] [ @\fIborder\fP ] [ %\fIiconDelta\fP ]
+.br
+       [ fm=\fIfont\fP ] [ fi=\fIfont\fP ] [ fs=\fIfont\fP ]
+.br
+       [ l=\fIop\fP ] [ m=\fIop\fP ] [ r=\fIop\fP ]
+.br
+       [ \fIhost\fP:\fIdisplay\fP ] [ =\fIgeometry\fP ]
+.SH DESCRIPTION
+.PP
+The window manager is a process that allows the user of a display running the
+X window system to manipulate the windows on the screen.  X implements the
+`desktop model' of overlapping windows;
+.I xnwm
+allows windows to be moved, iconified, and resized, allows the order of the
+windows in the `stack' of overlapping windows to be manipulated, and allows
+the keyboard focus to be attached to a window.  X allows windows to contain
+other windows, but
+.I xnwm
+only manipulates the top-level windows and not any of the subwindows.
+.PP
+.I Xnwm
+takes arguments
+.I host
+and
+.I display,
+which refer the the host and display number.
+For example `xnwm amadeus:1' would start up the window manager
+on display one on the machine amadeus.
+By default,
+.I xnwm
+uses the host and display number stored in
+the environment variable DISPLAY, and therefore they are not normally
+specified.
+.PP
+.I Xnwm
+has 2 modes of operation, `normal' and `popup',  In normal mode
+.I xnwm
+creates a menu window across the top of the screen.  To perform an
+action, you click any mouse button in the appropriate menu box and then click
+the same button in the window you wish to affect.
+.I Xnwm
+also reserves certain button/key
+combinations and interprets them as operations on existing windows.
+The key combination is specified in the command line with some subset of
+the options:
+.B -c
+(Control),
+.B -m
+(Meta), and
+.B -s
+(Shift).  For example, if you specify the options
+.B -cm
+then the Control and Meta keys must be down at the time a mouse button is
+depressed.
+The option
+.B -n
+(None) means that no buttons need be held down.  This is discouraged
+since it means that applications will never receive unshifted mouse
+clicks.
+If no combination is specified in the command line, Meta is assumed.
+Note:  the key combination is not necessary when using functions from the
+menu; it is only needed with the assigned button functions to distinguish
+window manager operations from operations destined for the application
+running within the window.
+.PP
+The window manager normally takes control of the screen at various
+times to assure that the screen image remains correct while performing
+window manager operations.  When this happens, requests from other
+applications are temporarily suspended until the window manager
+finishes the operation.  The option
+.B -f
+(no freeze) disables this.  If this option is specified, window
+outlines for
+.I Move
+and
+.I Resize
+will flicker rather than remaining solid, and the background behind
+popup windows (see later) will take longer to redraw.
+.PP
+The options
+.B -t
+(thin), 
+.B -v
+(vertical), and
+.B -2
+(2 rows) control the format of the menu bar.  In the absence of any of
+these, the menu extends across the entire screen.  If the
+.B -t
+option is given, the menu bar will not extend fully across the screen;
+instead there will be room at the right (convenient for, for example, a clock
+window).  If the
+.B -v
+option is used, the menu windows are stacked vertically instead of spread
+horizontally.  The
+.B -2
+option causes the menu windows to be in two rows, allowing room for a
+terminal window the height of the screen while still allowing menu access.
+Either of the last two options automatically selects the
+.B -t
+option.  The menu is located in the upper left corner of the screen by
+default, but its location can be set with the
+.B =\fIgeometry\fP
+option as usual with X applications.  (Notice that there is no size
+component, position information is used only.)
+.PP
+.I Xnwm
+will use reverse video for the menu, the cursor, icon text, and the
+frame around selected windows if the
+.B -r
+(reverse) option is used.
+.PP
+The border width around selected windows can be changed with the
+.B @
+argument; the default is 5 pixels.
+.PP
+The default font for displaying text is ``8x13''.  You can specify a different
+font with the
+.B fm=
+(Menu font),
+.B fi=
+(Icon font), and the
+.B fs=
+(Size window font) options.
+.PP
+Initially, the left, middle, and right mouse buttons are bound to the
+operations
+.I Select, Raise,
+and
+.I Move.
+You can change these bindings with
+the
+.B l=
+(left),
+.B m=
+(middle), and
+.B r=
+(right) arguments.  Each should be followed by one of the letters "srmilzc",
+representing, respectively,
+.I Select, Raise, Move, Iconify, Lower, resiZe,
+and
+.I Circulate.
+They may also be followed by nothing, in which case no function
+is bound to that key.
+.PP
+Clicking any button that is not bound to the
+.I Select
+function in the background will cause the menu window to become
+visible if it has become covered by other windows.  Double clicking the
+background will cause the menu to move back to its original position.
+.PP
+In popup mode, the menu window is not normally displayed, but instead `pops
+up' when a particular button is pressed.  To get popup mode, bind the letter
+``p'' to any of the three buttons as described above.  (You may also bind the
+other buttons as desired.)  Whenever the bound button is clicked while the
+appropriate combination of control, meta, and shift keys is depressed, or
+any time a button that is not bound to the
+.I Select
+function is clicked in the background, the menu will appear beneath
+the cursor.  You may then select any menu function you wish; after the
+operation is completed the menu will disappear.  To make the menu disappear
+without performing any operation, just move the cursor out of the menu area.
+Note:  the mouse button bound to the popup function may not be rebound using
+.B Assign.
+Using popup mode with complicated screen images and with no freeze (the
+.B -f
+option) may cause some difficulties
+if the menu obscures the image, since the applications will have to redraw
+their windows after the menu goes away.
+.PP
+The available commands are described below.  For any of these
+commands, if you press a button to start a command, and then want to abort
+the command, simply press one of the other buttons before releasing the
+first button.
+.PP
+.B Select
+attaches the keyboard to a window, i.e., keyboard input will go
+to that window (hierarchy) even when the mouse is outside the window.
+It also
+.B Raises
+the selected window.  Selecting the background will detach the keyboard from
+any window (actually, it attaches it to the background window).  If no window
+is selected the keyboard input will go to the window which currently contains
+the mouse cursor.  The selected window is highlighted by drawing a partial
+frame around the window.  Selecting an icon allows the icon name to be
+edited: the delete key deletes the last character, control-U deletes the
+entire name, and other characters are appended to the current name.  Typing a
+return restores the input focus to the most recent non-icon window selected.
+.PP
+.B Raise
+raises the window to the top of any stack of overlapping windows.
+.PP
+.B Move
+is used to move a window.
+If you apply it to a window, an outline will be moved with
+the mouse; when you release the button, the window will be moved.
+.PP
+.B (De)Iconify
+will make a window into an icon.  If the mouse is moved more than a threshold
+amount, or this is the first time the window has been iconified, the icon will
+appear at the location on the screen where the button is released.  Otherwise,
+the icon will reappear at its previous location.  This threshold may be
+changed with the
+%\fIiconDelta\fP
+option.  Giving a negative value will disable this effect.  The default is 5
+pixels.
+.B (De)Iconify
+will make the original window reappear at its former position on the screen
+if it is applied to an icon.  The name displayed in the icon can be edited by
+.B Selecting
+the icon.
+.PP
+.B Lower
+will `push' the window you point at to the bottom of any
+stack of overlapping windows.
+.PP
+.B Resize
+is used to resize a window by moving a corner or an edge.
+If you apply it to a window, a rubber banded outline of the window will be
+displayed and moving the mouse will change its size, leaving the opposite
+corner or other edges fixed.  The corner or edge to be moved depends on the
+where the mouse is when the button is pressed.  Imagine the window divided
+with grid of nine rectangles.  If the mouse is in one of the four corner
+rectangles or the center rectangle, then the corner closest to the mouse
+will be moved; otherwise, the closest edge will be moved.  When the button
+is released, the window will be resized.
+.PP
+.B Circulate
+causes the lowest window in the stack of overlapping windows to be
+.B Raised
+; successive applications will reveal every window in turn.
+.PP
+.B Assign
+allows you to change the button bindings; to use it click any button in the
+Assign menu window and then click the same button in any other function to
+assign that function to that button.  To remove the assignment from a button,
+double click the
+.B Assign
+window.
+.SH X DEFAULTS AND OPTION SUMMARY
+.TP 8
+.B MenuFont (fm=\fIname\fP)
+Set the default font for the menu.
+.TP 8
+.B SizeFont (fs=\fIname\fP)
+Set the default font for the size window.
+.TP 8
+.B IconFont (fi=\fIname\fP)
+Set the default font for icons.
+.\" The @ causes problems in a .TP, so the next one is done out by hand
+.PP
+.B FrameWidth (@\fIvalue\fP)
+.RS 8
+Set the width of the frame around selected windows.
+.RE
+.TP 8
+.B IconifyDelta (%\fIvalue\fP)
+Set the threshold for moving icons.
+.TP 8
+.B ReverseVideo (-r)
+Sets reverse video for the menu, icons, selection border, and cursor.
+.TP 8
+.B MenuFormat (-tv2)
+Sets the format of the menu; should be some subset of
+.B tv2
+meaning thin, vertical, or 2 rows.
+.TP 8
+.B Freeze (-f)
+If set to ``off'', disables
+.I xnwm
+taking control of the screen during operations.
+.TP 8
+.B KeyCombination (-csmln)
+Sets the keys required to specify 
+.I xnwm
+operations; should be some subset of
+.B csmln
+meaning control, shift, meta, lock, and none.
+.TP 8
+.B LeftButton (l=value)
+Sets the default left button function; should be one of
+.B srmilzcp
+.TP 8
+.B MiddleButton (m=value)
+Sets the default middle button function; should be one of
+.B srmilzcp
+.TP 8
+.B RightButton (r=value)
+Sets the default right button function; should be one of
+.B srmilzcp
+.TP 8
+.B Geometry (={+-}xoff{+-}yoff)
+Sets the location of the menu.
+.SH FILES
+.nf
+.ta \w'/usr/athena/lib/vs/font        'u
+/usr/new/lib/X/font            directory of fonts
+.fi
+.SH ENVIRONMENT
+DISPLAY        - to get default host and display number
+.SH "SEE ALSO"
+X(8C)
+.SH AUTHOR
+Paul Asente, Stanford University, using some algorithms originally by
+Bob Scheifler, MIT Laboratory for Computer Science
diff --git a/usr/contrib/X/man/xpr.1 b/usr/contrib/X/man/xpr.1
new file mode 100644 (file)
index 0000000..6775628
--- /dev/null
@@ -0,0 +1,145 @@
+.TH XPR 1 "27 August 1985" "X Version 10"
+.SH NAME
+xpr \- print X window dump
+.SH SYNOPSIS
+.B xpr
+[
+.B \-scale
+.I scale
+] [
+.B \-height
+.I inches
+] [
+.B \-width
+.I inches
+] [
+.B \-left
+.I inches
+] [
+.B \-top
+.I inches
+] [
+.B \-header
+.I string
+] [
+.B \-trailer
+.I string
+] [
+.B \-landscape
+] [
+.B \-portrait
+] [
+.B \-output
+.I filename
+] [
+.B \-append
+.I filename
+] [
+.B \-noff
+] [
+.B \-split
+.I n
+] [
+.B \-device
+.I dev
+] [
+.I filename
+]
+.SH DESCRIPTION
+
+.I Xpr
+takes as input an X window dump file produced by
+.IR xwd (1)
+and formats it for output on the LN03 or LA100 printer.  If no file
+argument is given, the standard input is used.  By default, \fIxpr\fP
+prints the largest possible representation of the window on the
+output page.  Options allow the user to add headers and trailers,
+specify margins, adjust the scale and orientation, and append
+multiple window dumps to a single output file.  Output is to
+standard output unless 
+.B \-output
+is specified.
+.sp 1
+.ne 8
+.B Command Options
+.sp 1
+.IP "\fB\-scale\fP \fIscale\fP"
+Affects the size of the window on the page.  The LN03 is able to
+translate each bit in a window pixel map into a grid of a specified size.
+For example each bit might translate into a 3x3 grid.  This would be
+specified by \fB\-scale\fP \fI3\fP.  By default a window is printed 
+with the largest scale that will fit onto the page for the specified
+orientation.
+.IP "\fB\-height\fP \fIinches\fP"
+Specifies the maximum height of the window on the page.
+.IP "\fB\-width\fP \fIinches\fP"
+Specifies the maximum width of the window.
+.IP "\fB\-left\fP \fIinches\fP"
+Specifies the left margin in inches.  Fractions
+are allowed.  By default the window is centered in the page.
+.IP "\fB\-top\fP \fIinches\fP"
+Specifies the top margin for the picture in inches.  Fractions are
+allowed.
+.IP "\fB\-header\fP \fIheader\fP"
+Specifies a header string to be printed above the window.
+.IP "\fB\-trailer\fP \fItrailer\fP"
+Specifies a trailer string to be printed below the window.
+.IP "\fB\-landscape\fP"
+Forces the window to printed in landscape mode.  By default
+a window is printed such that its longest side follows the long side of
+the paper.
+.IP "\fB\-portrait\fP"
+Forces the window to be printed in portrait mode.  By default
+a window is printed such that its longest side follows the long side of
+the paper.
+.IP "\fB\-output\fP \fIfilename\fP"
+Specifies an output file name.  If this option is not specified, standard
+output is used.
+.IP "\fB\-append\fP \fIfilename\fP"
+Specifies a filename previously produced by \fIxpr\fP to which the window
+is to be appended.
+.IP "\fB\-noff\fP"
+When specified in conjunction with \fB\-append\fP, the window will appear
+on the same page as the previous window.
+.IP "\fB\-split\fP \fIn\fP"
+This option allows the user to split a window onto several pages.  
+This might be necessary for very large windows that would otherwise
+cause the printer to overload and print the page in an obscure manner.
+.IP "\fB\-device\fP \fIdevice\fP"
+Specifies the device on which the file will be printed.  Currently only
+the LN03 and LA100 are supported.
+.SH SEE ALSO
+xwd(1), xdpr(1), xwud(1), X(1)
+.SH LIMITATIONS
+
+The current version of \fIxpr\fP can generally  print out on  the LN03
+most X  windows that are not   larger than two-thirds   of the screen.
+For example, it will be able to print out a  large Emacs  window,  but
+it will usually fail when trying to print out the  entire screen.  The
+LN03 has memory  limitations that can cause it  to  incorrectly  print
+very   large or complex    windows.    The two   most common    errors
+encountered  are ``band  too  complex'' and ``page  memory exceeded.''
+In the first case, a window may have  a particular six  pixel row that
+contains too many  changes (from black to  white to black).  This will
+cause the printer to drop part of the line  and possibly  parts of the
+rest of the page.  The printer will flash the  number `1' on its front
+panel when this problem occurs.  A  possible solution  to this problem
+is to increase the scale of the picture, or to split the picture  onto
+two  or  more pages.   The second problem,   ``page memory exceeded,''
+will occur if the picture contains too much  black, or if the  picture
+contains    complex half-tones such   as   the  background  color of a
+display.  When this   problem occurs  the  printer will  automatically
+split the picture  into two or  more pages.   It may  flash the number
+`5' on  its from panel.   There  is no easy  solution to this problem.
+It will probably be  necessary to either  cut  and paste, or rework to
+application to produce a less complex picture.
+
+\fIXpr\fP provides some support  for the  LA100.   However, there  are
+several limitations on its use: The picture will  always be printed in
+portrait mode (this  may  be  changed  in the future;)   there   is no
+scaling; and the aspect ratio will be slightly off.
+.SH AUTHOR
+.PP
+Copyright 1985, Massachusetts Institute of Technology
+.PP
+Michael R. Gretzinger, MIT Project Athena
diff --git a/usr/contrib/X/man/xrefresh.1 b/usr/contrib/X/man/xrefresh.1
new file mode 100644 (file)
index 0000000..6dd45f7
--- /dev/null
@@ -0,0 +1,35 @@
+.TH XREFRESH 1 "October 25" "X Version 10"
+.SH NAME
+xrefresh - refresh all windows on the screen.
+.SH SYNOPSIS
+.B "xrefresh"
+[ \fIhost\fP:\fIdisplay\fP ]
+.SH DESCRIPTION
+.PP
+.I Xrefresh
+is a trivial X program to cause your screen to be completely repainted.
+.I Xrefresh
+just throws a window over the whole screen and unmaps it, causing refresh
+events to be sent to all applications.
+.SH ARGUMENT SUMMARY
+.B "\fIhost\fP:\fIdisplay\fP"
+This  argument  allow  you  to  specify the host and display number on
+which to display the window dump.  For example ``xrefresh orpheus:1''
+would specify that the dump will appear on display `1' on the machine
+`orpheus'.  By default,
+.I xrefresh
+uses the host and display number stored in the environment variable
+DISPLAY, and therefore this argument is not normally specified.
+.SH ENVIRONMENT
+.PP
+.TP 8
+DISPLAY - To get default host and display number.
+.SH SEE ALSO
+X(1), uwm(1), X(8)
+.SH AUTHOR
+.PP
+Copyright 1985, Massachusetts Institute of Technology.
+.PP
+Jim Gettys, Digital Equipment Corp., MIT Project Athena
+
+
diff --git a/usr/contrib/X/man/xshell.1 b/usr/contrib/X/man/xshell.1
new file mode 100644 (file)
index 0000000..8ad51ab
--- /dev/null
@@ -0,0 +1,229 @@
+.TH XSHELL 1 "31 October 1985" "X Version 10"
+.SH NAME
+xshell - X Window System, key/button command exec
+.SH SYNOPSIS
+.B xshell
+[ \fIoptions\fP ] [ \fIhost\fP:\fIdisplay\fP ] ...
+.SH DESCRIPTION
+.I Xshell
+is a program for starting up X applications with a single key or button
+stroke.  It displays a scallop shell icon in which button and key
+presses stand for different commands.  The user can bind a command string
+to any key or button by inserting a line like the following in his or her 
+\fI.Xdefaults\fP file:
+.PP
+.nf
+    xshell.action.keyname:   command to be exec'ed
+.fi
+.PP
+Keynames are simply letters, numbers, and symbols as they appear on the
+keyboard (e.g. a, $, 9), or one of the following special names (taken from 
+the X keyboard definitions):
+.PP
+.nf
+    KEYPAD0              FUNC1            E1
+    KEYPAD.              FUNC2            E2
+    ENTER                FUNC3            E3
+    KEYPAD1              FUNC4            E4
+    KEYPAD2              FUNC5            E5
+    KEYPAD3              FUNC6            E6
+    KEYPAD4              FUNC7            LEFTARROW
+    KEYPAD5              FUNC8            RIGHTARROW
+    KEYPAD6              FUNC9            DOWNARROW
+    KEYPAD,              FUNC10           UPARROW
+    KEYPAD7              FUNC11           SHIFT
+    KEYPAD8              FUNC12           CONTROL
+    KEYPAD9              FUNC13           LOCK
+    KEYPAD-              FUNC14           SYMBOL
+    PF1                  FUNC15
+    PF2                  FUNC16
+    PF3                  FUNC17
+    PF4                  FUNC18
+    LEFTBUTTON           FUNC19
+    MIDDLEBUTTON         FUNC29
+    RIGHTBUTTON
+
+.fi
+.PP
+Thus, the following `.Xdefaults' definitions specify that the Left Button
+will spawn a terminal window, the Middle Button an editor, the Right Button
+a calculator, $ a Bourne shell, and # a superuser shell:
+.PP
+.nf
+    xshell.action.LeftButton:       xterm =80x65-0+0 -fn 6x10
+    xshell.action.MiddleButton:     xted =80x65+0-0 
+    xshell.action.RightButton:      xterm =20x20-0-0 -fn 6x10 -e dc
+    xshell.action.$:                xterm =80x65+0+0 -fn 6x10 -e sh
+    xshell.action.#:                xterm =80x65+0+0 -fn 6x10 -e su
+.fi
+.PP
+.I Xshell
+breaks the command string up into words by removing all white space (i.e.
+tabs and spaces) and uses the vfork() and execvp() system calls to spawn
+off the command.  A more complicated parsing algorithm could easily be
+added, but the current method is adequate (and fast and memory efficient).
+.PP
+One thing to keep in mind is that 
+.I xshell
+is NOT a window manager.  It was written to make popping up frequently used
+utilities as painless as possible (how many times have you found that you
+need just 1 more window....).  It might make a nice addition to some of
+the more verbose window managers, but it runs quite nicely as a separate
+program.
+
+.SH ARGUMENTS
+.PP
+.I Xshell
+is designed to be somewhat compatible with 
+.I xclock
+in the arguments that it takes.  However, 
+.I xshell 
+will allow you to abbreviate its longer flags to any length you chose.  Thus,
+the \-reverse flag can be spelled out, given as \-rev, or even just \-r:
+.PP
+.TP 10
+.B \-fg \fIcolor\fP
+On color displays, determines the color of the foreground.
+.PP
+.TP 10
+.B \-bg \fIcolor\fP
+On color displays, determines the color of the background.
+.PP
+.TP 10
+.B \-bd \fIcolor\fP
+On color displays, determines the color of the border.
+.PP
+.TP 10
+.B \-bw \fIpixels\fP
+Specify the width in pixels of the border around the
+.I xshell
+window.
+.PP
+.TP 10
+.B \-v\[olume\] \fIn\fP
+Volume for calls to \fIXFeep\fP, used when errors (such as unbound key) are found.
+.PP
+.TP 10
+.B \-f\[lash\] \fIn\fP
+Number of times to flash the shell window to acknowledge a button or key press.
+.PP
+.TP 10
+.B \-d\[elay\] \fIn\fP
+One-hundredths of a second to wait between flashs (default is 5).
+.PP
+.TP 10
+.B \-r\[everse\]
+Reverse video (swap foreground and background).
+.PP
+.TP 10
+.B \-q\[uiet\]
+Do not `feep' on errors (see volume).
+.PP
+.TP 10
+.B \-s\[mall\]
+Use a smaller (48x48) version of the shell icon.  The default icon is 96x96.
+.PP
+.TP 10
+.B =\fIgeometry\fP
+By default 
+.I xshell
+will create a window the size of whatever icon you select; the standard X
+window geometry argument will override this.
+See \fIX(1)\fP for details.
+.PP
+.TP 10
+.B \fIhost\fP:\fIdisplay\fP
+specifies the display on which to put the
+.I xshell
+window.  This overrides the DISPLAY environment variable.
+
+.SH X DEFAULTS
+.PP
+To make invoking 
+.I xshell
+easier, each of the flags listed above may be specified in the user's
+\fI.Xdefaults\fP file:
+.PP
+.TP 10
+.B Foreground
+gives the foreground color.
+.PP
+.TP 10
+.B Background
+gives the background color.
+.PP
+.TP 10
+.B Border
+gives the border color.
+.PP
+.TP 10
+.B BorderWidth
+gives the border width.
+.PP
+.TP 10
+.B ReverseVideo
+if "on", the shell icon should be white on black instead of black on white.
+.PP
+.TP 10
+.B Volume
+gives the volume to use in calls to XFeep().
+.PP
+.TP 10
+.B Flash
+gives the number of times to flash the shell window to acknowledge key or
+button presses.
+.PP
+.TP 10
+.B Delay
+gives hundredths of a second to wait in between flashes.
+.PP
+.TP 10
+.B Quiet
+prevents 
+.I xshell
+from feeping at you when you mistype.
+.PP
+.TP 10
+.B IconSize
+if "small", a halfsize (48x48) version of the scallopshell is used.
+.PP
+.TP 10
+.B WindowGeometry
+gives the shell window size using standard X =WxH+X+Y notation.
+
+.SH ENVIRONMENT
+.PP
+.PP
+.TP 10
+.B DISPLAY
+To get the default host and display number.
+
+.SH SEE ALSO
+xwm(1), xnwm(1), X(1), execl(3), vfork(2)
+.SH DIAGNOSTICS
+If 
+.B \-quiet
+is not given on the command line or
+``xshell.Quiet: on''
+does not appear in the user's \fI.Xdefaults\fP,
+.I xshell
+will `feep' if a key or button is pressed for which there is no definition
+in the \fI.Xdefaults\fP file.
+.SH AUTHOR
+.PP
+Copyright 1985, Cognition Inc.
+.PP
+Jim Fulton (Cognition Inc.)
+.SH BUGS
+.I Xshell
+uses the XGetDefault call to fetch the command string for a given key.  Thus,
+you cannot bind the colon (``:'') character to a command.
+.PP
+A more `user-friendly' interface could include dialog boxes that the user
+could pop up to type in a command directly so that a full shell doesn't have
+to be started.  Then again, it is nice and compact now and if you really 
+need to do that more than once you should use a real shell.
+.PP
+This program along with
+\fIxwm(1)\fP and \fIxnwm\fP have been mostly superceded by \fIuwm(1)\fP.
+
diff --git a/usr/contrib/X/man/xtext.3x b/usr/contrib/X/man/xtext.3x
new file mode 100644 (file)
index 0000000..8c3439d
--- /dev/null
@@ -0,0 +1,145 @@
+.TH XTEXT 3X "August 12 1985" "X Version 10"
+.SH NAME
+Xtext \- routines to provide simple text output windows
+.SH SYNOPSIS
+.nf
+.B #include <X/Xlib.h>
+.B #include <X/Xtext.h>
+.PP
+.fi
+.B TextWindow *TextCreate(width, height, x, y, parent, fontname, bwidth,
+.br
+.B             fgpixel, bgpixel, bordercolor, fastscroll);
+.br
+.B int height, width, x, y,
+.B bwidth, fgpixel, bgpixel, fastscroll;
+.nf
+.B Window parent;
+.B char *fontname;
+.B Pixmap bordercolor;
+.PP
+.B TextDestroy(t);
+.B TextWindow *t;
+.PP
+.B TextClear(t);
+.B TextWindow *t;
+.PP
+.B TextRedisplay(t);
+.B TextWindow *t;
+.PP
+.B int TextEvent(t, e);
+.B TextWindow *t;
+.B XEvent *e;
+.PP
+.B TextPutString(t, str);
+.B TextWindow *t;
+.B char *str;
+.PP
+.B TextPutChar(t, ch);
+.B TextWindow *t;
+.B char ch;
+.PP
+.fi
+.B TextPrintf(t, format
+.B  [ , arg ] ... )
+.nf
+.B TextWindow *t;
+.B char *format;
+.SH DESCRIPTION
+These functions provide a simple interface to text output windows.
+.PP
+.I TextCreate
+creates a window that is
+.I width
+characters wide and
+.I height
+characters high.  It is located with its upper left hand corner located
+at the point
+.I x, y
+in the window
+.I parent.
+The foreground (i.e. the characters) is in the color
+.I fgpixel
+and the background is the color
+.I bgpixel.
+The border is
+.I bwidth
+pixels wide and filled with the Pixmap
+.I bordercolor.
+If
+.I fastscroll
+is nonzero, text containing multiple newlines is displayed with a single
+jump scroll rather than with a single scroll for each newline.
+.PP
+The structure
+.I TextWindow
+is defined in
+\fI/usr/include/X/Xtext.h\fP.
+The only field that should be of interest to most applications is
+.I w,
+the X Window id of the created window.  This is quite useful if the
+application wishes to map the created window.
+.PP
+.I TextDestroy
+destroys the window described by its argument.  The window is also
+destroyed automatically if the process creating it is terminated.
+.PP
+.I TextClear
+clears the window described by its argument.
+.PP
+.I TextRedisplay
+redisplays the window described by its argument.
+.PP
+.I TextEvent
+handles the event passed to it.  It returns 0 if it was an event
+the library knows how to deal with, and 1 if it was an event of an
+unknown type; the latter should only happen if the application has
+changed the event mask for the window.  Any event that the application
+receives that has as its
+.I window
+the window id of the text window should be passed to
+.I TextEvent
+for handling.  Scrolling text generates an event per line of events, so the
+application should check for them frequently.
+.PP
+.I TextPutString
+prints its string in its window.  The character '\\n' (newline) is
+treated specially, and any other character is taken from the font.
+If the string contains multiple newlines, a single scroll is done for
+each line unless the
+.I fastscroll
+argument was non-zero in the call to
+.I TextCreate.
+.PP
+.I TextPutChar
+is similar to
+.I TextPutString
+but only prints a single character.  Again, newline is treated
+specially.
+.PP
+.I TextPrintf
+is similar to the standard function
+.I printf
+except that it prints its result in the specified window.  The
+resulting string is passed to
+.I TextPutString.
+See also the 
+.B BUGS
+section at the end of this page.
+.SH "SEE ALSO"
+printf(3S), xterm(1), X(8C)
+.SH AUTHOR
+Paul Asente, Stanford University
+.SH BUGS
+\fITextPrintf\fP will truncate the output if the resulting string is more than
+2048 characters long.
+.PP
+Since X operates asynchronously, it is possible to get way ahead of the
+server.  This means that it may be quite a while between when a scroll
+happens on the screen and when \fIXtext\fP gets around to filling in areas
+that couldn't be scrolled normally.  This should only happen if the
+application issues a great many output requests very quickly, or if it
+doesn't get around to receiving the events \fIXtext\fP needs to fill these
+areas in.  Also, some strange TCP bugs are invoked if an application
+which has gotten far ahead of the X server is stopped (as with a
+control-Z).
diff --git a/usr/contrib/X/man/xwd.1 b/usr/contrib/X/man/xwd.1
new file mode 100644 (file)
index 0000000..ef0c408
--- /dev/null
@@ -0,0 +1,84 @@
+.TH XWD 1 "27 July 1985" "X Version 10"
+.SH NAME
+xwd - X Window System, window image dumper.
+.SH SYNOPSIS
+.B "xwd"
+[ -debug ] [ -help ] [ -nobdrs ] [ -out \fIfile\fP ] [ -z ] [ \fIhost\fP:\fIdisplay\fP ]
+.SH DESCRIPTION
+.PP
+.I Xwd
+is an X Window System window image dumping utility.
+.I Xwd
+allows X users to store window images in a specially formated
+window dump file.  This file can then  be  read  by  various  other  X
+utilities for redisplay, printing, editing, formatting, archiving,
+image processing etc..  The target window is selected by clicking the 
+mouse   in   the  desired  window.   The keyboard bell is rung once
+at the beginning of the dump and twice when the dump is completed.
+This is a preliminary version of what promises to be a very useful utility.
+The  window dump file format is currently under development no guarantee of
+upward compatibility is made.
+.SH ARGUMENT SUMMARY
+.PP
+.TP 8
+.B "-help"
+Print out the `Usage:' command syntax summary.
+.PP
+.TP 8
+.B "-nobdrs"
+This argument specifies that the window dump  should  not  include  the
+pixels that compose the X window border.  This is useful in situations
+where you may wish to include the  window  contents in a document 
+as an illustration.
+.PP
+.TP 8
+.B "-out \fIfile\fP"
+This argument allows the user to explicitly specify the output
+file on the command line.  The default is to output to standard out.
+.PP
+.TP 8
+.B "-z"
+This argument specifies that the output file should be in  `Z'  pixmap
+format.    The   default  is  `XY'  pixmap format.  `Z' format is only
+valid on color displays.
+.PP
+.TP 8
+.B "\fIhost\fP:\fIdisplay\fP"
+This  argument  allow  you  to  specify the host and display number on
+which to find the target window.  For example `xwd orpheus:1'
+would specify that the target window is on display `1' on the machine
+`orpheus'.  By default,
+.I xwd
+uses the host and display number stored in the environment variable
+DISPLAY, and therefore this argument is not normally specified.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+To get default host and display number.
+.SH FILES
+.PP
+.TP 8
+.B XWDFile.h
+X Window Dump File format definition file.
+.SH FUTURE PLANS
+If time ever presents itself...
+.PP
+.TP 8
+.B 1.
+Install complete color support.
+.PP
+.TP 8
+.B 2.
+Completely rework the `XWDFile' dump file format.
+.PP
+.TP 8
+.B 3.
+Completely rework the corresponding xwud window undumper program.
+.SH SEE ALSO
+xwud(1), xpr(1), xdpr(1), X(1)
+.SH AUTHOR
+.PP
+Copyright 1985, Massachusetts Institute of Technology.
+.PP
+Tony Della Fera, Digital Equipment Corp., MIT Project Athena
diff --git a/usr/contrib/X/man/xwininfo.1 b/usr/contrib/X/man/xwininfo.1
new file mode 100644 (file)
index 0000000..ed47283
--- /dev/null
@@ -0,0 +1,122 @@
+.TH XWININFO 1 "27 July 1985" "X Version 10"
+.SH NAME
+xwininfo - X Window System, window information summarizer.
+.SH SYNOPSIS
+.B "xwininfo"
+[ -children ] [ -help ] [ -id \fIid\fP ] [ -int ] [ -root ] [ \fIhost\fP:\fIdisplay\fP ]
+.SH DESCRIPTION
+.PP
+.I Xwininfo
+is  a  utility  for  displaying  X  window information summaries.  All
+pertinent window  information  is  displayed  in  an  easily  readable
+format.   The  user has the option of selecting the target window with
+the mouse (by clicking any mouse button in the desired window)  or  by
+specifying its' window id on the command line with the \fB-id\fP argument.
+There is also a special \fB-root\fP argument to quickly obtain information
+on X's root window.  The following is a sample summary taken with
+the \fB-children\fP argument specified.
+
+xwininfo ==> Please select the window you wish
+         ==> information on by clicking the
+         ==> mouse in that window.
+
+xwininfo ==> Window name: ' X Root Window '
+         ==> Window id: 0x10031
+         ==> Parent window id: 0x0
+         ==> Number of children: 13
+         ====> Child window id: 0xb00046
+         ====> Child window id: 0xb2004f
+         ====> Child window id: 0x630051
+         ====> Child window id: 0x5f0055
+         ====> Child window id: 0x5c0058
+         ====> Child window id: 0x55005c
+         ====> Child window id: 0x53005e
+         ====> Child window id: 0x510060
+         ====> Child window id: 0x42000c
+         ====> Child window id: 0x43000b
+         ====> Child window id: 0x3d0011
+         ====> Child window id: 0xa0028
+         ====> Child window id: 0x500061
+         ==> Associated window id: 0x0
+         ==> Window type: IsOpaque
+         ==> Window state: IsMapped
+         ==> Upper left X: 0
+         ==> Upper left Y: 0
+         ==> Width: 1088
+         ==> Height: 864
+         ==> Border width: 0
+         ==> Resize base width: 0
+         ==> Resize base height: 0
+         ==> Resize width increment: 1
+         ==> Resize height increment: 1
+         ==> Root absolute mouse X Position: 691
+         ==> Root absolute mouse Y Position: 261
+         ==> Target relative mouse X Position: 691
+         ==> Target relative mouse Y Position: 261
+
+.SH ARGUMENT SUMMARY
+.PP
+.TP 8
+.B "-children"
+This  argument  specifies that
+.I xwininfo
+should list the window ids' of
+target  window's  children.   Only  the  first  level  of  the  window
+hierarchy is shown (i.e., immediate children of the target window).
+.PP
+.TP 8
+.B "-help"
+Print out the 'Usage:' command syntax summary.
+.PP
+.TP 8
+.B "-id \fIid\fP"
+This argument allows the user to specify a target  window  \fIid\fP  on  the
+command  line rather than using the mouse to select the target window.
+This is very useful in  debugging  X  applications  where  the  target
+window is not mapped to the screen or where the use of the mouse might
+be impossible or interfere with the application.
+.PP
+.TP 8
+.B "-int"
+This argument specifies that all X window ids should be  displayed  as
+integer values.  The default is to display them as hexadecimal values.
+.PP
+.TP 8
+.B "-root"
+This  argument  specifies  that  X's root window is the target window.
+This is useful in situations  where  the  root  window  is  completely
+obscured.
+.PP
+.TP 8
+.B "\fIhost\fP:\fIdisplay\fP"
+This  argument  allow  you  to  specify the host and display number on
+which to find the target window.  For example `xwininfo orpheus:1'
+would specify that the target window is on display `1' on the machine
+`orpheus'.  By default,
+.I xwininfo
+uses  the  host  and display number stored in the environment variable
+DISPLAY, and therefore this argument is not normally specified.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+To get default host and display number.
+.SH SEE ALSO
+X(1)
+.SH FUTURE PLANS
+If time ever presents itself...
+.PP
+.TP 8
+.B 1.
+Provide a `-geometry' argument that prints out the window's dimensions
+in X window geometry format (i.e., =WxH+X+Y)
+.PP
+.TP 8
+.B 2.
+Provide a `-depth' argument that allows  recursive  traversal  of  the
+window hierarchy to some arbitrary depth.
+.SH AUTHOR
+.PP
+Copyright 1985, Massachusetts Institute of Technology.
+.PP
+Tony Della Fera, Digital Equipment Corp., MIT Project Athena
diff --git a/usr/contrib/X/man/xwm.1 b/usr/contrib/X/man/xwm.1
new file mode 100644 (file)
index 0000000..72c6a83
--- /dev/null
@@ -0,0 +1,256 @@
+.TH XWM 1 "14 July 1985" "X Version 10"
+.SH NAME
+xwm - X Window System, window manager process
+.SH SYNOPSIS
+.B "xwm"
+[ -cfgmrsz ] [ +\fIfunction\fP ] [ @\fIdelta\fP ] [ fn=\fIfont\fP ] [ fi=\fIfont\fP ]
+[ \fIhost\fP:\fIdisplay\fP ]
+.SH DESCRIPTION
+.PP
+The window manager allows you to use the mouse to push a window to the
+top or bottom of the stack, turn a  window  into  an  icon,  resize  a
+window,  move a window elsewhere on the screen, attach the keyboard to
+a window (hierarchy) and circulate the window hierarchy.   The  window
+manager only manipulates top-level windows (i.e., direct decendents of
+the  root  window),  not  their  subwindows,  so  in  the   following,
+references to window refer only to top-level windows.
+.PP
+Since
+.I xwm
+does  not  have  a  window  of  its  own  it steals certain button/key
+combinations and interprets them as operations  on  existing  windows.
+The  key combination is specified on the command line with some subset
+of the options:
+.B "`c'"
+(control),
+.B "`s'"
+(shift),
+.B "`m'"
+(meta) and
+.B "`n'"
+(no-key). For example, if you specify the options
+.B "-cm"
+then the Control and Meta keys must be down at the time a mouse button
+is  depressed.   If  no  combination is specified in the command line,
+Meta is the default.  If
+.B "`n'"
+is specified anywhere in the option list all keys will be ignored.
+.PP
+For  each  mouse button, a different command is performed depending on
+whether the button is `clicked' or `moved', i.e., whether the mouse is
+moved  between  the  press  and  release  of  the button.  Some actual
+movement is allowed before the mouse  is  really  considered  to  have
+moved,  the  amount  of  movement  is settable (see below).  The mouse
+buttons perform the  commands  described  below.   For  any  of  these
+commands,  if  you press a button to start a command, and then want to
+abort the command, simply  press  one  of  the  other  buttons  before
+releasing the first button.  As each command is  being  performed  the
+mouse cursor will be changed to indicate which command is in effect.
+.PP
+If  the  left  button is clicked in a window it will `push' the window
+you are pointing at to the bottom of any stack of overlapping windows.
+If  clicked  on  the  root window a `circulate down' operation will be
+performed on the root  window  moving  the  top  most  window  in  the
+hierarchy to the bottom.  For any of these operations the mouse cursor
+will be a `dot'.
+.PP
+The left button will also `iconify' the window you point at if  it  is
+pressed  down  and then moved. When you release the button, the window
+will be made into an icon at  the  current  mouse  location.   If  the
+window  being iconified has its own icon, then that icon will be used.
+If not
+.I xwm
+will create and maintain its own text  icon  using  the  name  of  the
+window   as   the initial text.  For any of these operations the mouse
+cursor will be an `icon' cursor.
+.PP
+The name displayed in an 
+.I xwm
+owned text icon can be edited at any time
+by   placing   the   mouse   cursor  in  the  icon  and typing.  Note:
+Modifying text displayed in an icon window will modify the name of the
+window associated with that icon. The  delete  key  deletes  the  last
+character,  Control-U  deletes  the  entire  name,  any other printing
+characters are appended to the current name.  When the mouse cursor in
+an
+.I xwm
+text icon it will be a `text' cursor (`I bar' cursor).
+.PP
+If  you  click  the middle button on an icon, the window you iconified
+will reappear in its previous position on the screen and the icon will
+disappear.   For  this  operation  the  mouse cursor will be an `arrow
+cross' cursor.
+.PP
+The  middle button is used to resize a window by moving a corner or an
+edge.  If you press it on a window, a rubber  banded  outline  of  the
+window  will  be  displayed  (and a grid if you specify the `g' option
+explained below) and moving the mouse will change  its  size,  leaving
+the  opposite  corner  or other edges fixed.  The corner or edge to be
+moved depends on the where the mouse is when the  button  is  pressed.
+Imagine the window divided with grid of nine rectangles (the same grid
+that the `g' option displays).  If the mouse is in  one  of  the  four
+corner  rectangles or the center rectangle, then the corner closest to
+the mouse will be moved; otherwise, the closest edge  will  be  moved.
+When the button is released,  the  window  will   be   resized.    For
+these operations the mouse cursor will be an `arrow cross' cursor.
+.PP
+The  middle  button  can  also  be  used  to focus keyboard input to a
+specific window i.e., keyboard input will go to the  specified  window
+(hierarchy)  even  when  the  mouse is outside the window.  If the 'f'
+option is specified clicking the middle button twice on a window  will
+attach the keyboard to that window.  Clicking the middle button on the
+background will detach the keyboard  from  any  window  (actually,  it
+attaches  it  to the background window).  For this operation the mouse
+cursor will be an 'arrow cross' cursor.
+.PP
+The right button, if clicked in a window, will `pull' the  window  you
+are  pointing  at  to the top of any stack of overlapping windows.  If
+clicked on  the  root  window  a  `circulate  up'  operation  will  be
+performed  moving  the bottom most window in the hierarchy to the top.
+For these operations the mouse cursor will be a `circle' cursor.
+.PP
+The right button will also move the window you are pointing at  if  it
+is  pressed down and then moved.  An outline of the window (and a grid
+if you specified the 'g' option) will appear, and will move  with  the
+mouse  cursor.   When you release the right button, the window will be
+moved to the current location of the outline.  For this operation  the
+mouse cursor will be a 'circle' cursor.
+.SH OPTION SUMMARY:
+.PP
+.TP 8
+.B "c"
+The 
+.B "`c'"
+(control) option specifies that the Control key must be held down for 
+.I xwm
+to listen to mouse button operations.
+.PP
+.TP 8
+.B "f"
+The
+.B "`f'"
+(focus) option specifies that a double-click on the middle button will
+focus keyboard input events to the specified window.
+.PP
+.TP 8
+.B "g"
+The
+.b "`g'"
+(grid)  option  turns  on  a  tick-tack-toe  like  grid  that  will be
+displayed inside the `window box' during window  movement  and  resize
+operations.
+.PP
+.TP 8
+.B "m"
+The 
+.B "`m'"
+(meta)  option  specifies  that the Meta key must be held down for
+.I xwm
+to listen to mouse button operations.
+.PP
+.TP 8
+.B "n"
+The 
+.B "`n'"
+(no-key)  option  specifies  no  keys may be down when performing mouse
+button operation.
+.PP
+.TP 8
+.B "r"
+The
+.B "`r'"
+(reverse) option indicates that icons should  be  displayed  as  white
+text  on  a  black  background,  rather  than  black  text  on a white
+background.
+.PP
+.TP 8
+.B "s"
+The 
+.B "`s'"
+(shift) options indicates that the Shift key must be held down for 
+.I xwm
+to listen to mouse button operations.
+.PP
+.TP 8
+.B "z"
+The
+.B "`z'"
+(zap) option turns on a special `zap' effect that is intended to  draw
+your  attention  to  icons as they are created and windows as they are
+moved.
+.SH ARGUMENT SUMMARY:
+.PP
+.TP 8
+.B "+\fIfunction\fP"
+This argument allows you to specify a  cursor  display  function.   It
+should  be  followed  by an integer specifying the code of the display
+function.  See the Xlib document for details of  available  functions.
+The default function is GXcopy.
+.PP
+.TP 8
+\fB@\fP\fIdelta\fP
+This  argument  allows you to specify a mouse \fIdelta\fP value.  This value
+determines how far the mouse must move with a button down  before  the
+iconify,  move and  change operations begin.  The default is 5 pixels.
+Note that if you define  a  large  delta,  you  can  still  make  fine
+adjustments by first moving far away and then moving back.
+.PP
+.TP 8
+.B "fn=\fIfont\fP"
+This  argument  allow  you  to specify a text \fIfont\fP to be used in pop up
+information display.  The default font is 6x10.
+.PP
+.TP 8
+.B "fi=\fIfont\fP"
+This  argument  allow  you  to specify an icon text font.  The default
+font is 6x10.
+.PP
+.TP 8
+.B "\fIhost\fP:\fIdisplay\fP"
+This argument allow you to specify the the host and display number  on
+which
+.I xwm
+will operate.  For example `xwm orpheus:1' would start up  the  window
+manager on display one on the machine orpheus.  By default,
+.I xwm
+uses
+the host  and  display  number  stored  in  the  environment  variable
+DISPLAY,  and  therefore this argument is not normally specified.  The
+window manager can be running anywhere, and you can run more than  one
+manager per display (provided that they do not attempt to use the same
+mouse button / key combinations, see below).
+.SH X DEFAULTS
+.PP
+.TP 8
+.B BodyFont
+Set the default font for information display.
+.PP
+.TP 8
+.B IconFont
+Set the default font for text icons.
+.PP
+.TP 8
+.B InternalBorder
+Set the space between the text and window border in text icons.
+.PP
+.TP 8
+.B BorderWidth
+Set the border width of text icons.
+.PP
+.TP 8
+.B ReverseVideo
+Display text icons in reverse video?
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+To get default host and display number.
+.SH SEE ALSO
+X(1), X(8C)
+.SH AUTHOR
+.PP
+Copyright 1985, Massachusetts Institute of Technology.
+.PP
+Tony Della Fera, DEC MIT Project Athena
+.PP
+Based upon previous `xwm' by Bob Scheifler, MIT Laboratory for Computer Science
diff --git a/usr/contrib/X/man/xwud.1 b/usr/contrib/X/man/xwud.1
new file mode 100644 (file)
index 0000000..cce9895
--- /dev/null
@@ -0,0 +1,78 @@
+.TH XWUD 1 "27 July 1985" "X Version 10"
+.SH NAME
+xwud - X Window System, window image undumper
+.SH SYNOPSIS
+.B "xwud"
+[ -debug ] [ -help ] [ -in \fIfile\fP ] [ \fIhost\fP:\fIdisplay\fP ]
+.SH DESCRIPTION
+.PP
+.I Xwud
+is an X Window System window image undumping utility.
+.I Xwud
+allows X users to display window images that were saved in a specially
+formatted window dump file.   The window  image  will  appear  at  the
+coordinates of the original window from which the dump was taken.
+This is a crude version of a more advanced utility that will be released
+in the near future.  The window dump file format is currently under
+development no guarantee of upward compatibility is made.
+.PP
+.B NOTE:
+Windows dumped in `Z' pixmap format can only be undumped on a
+color display!
+.SH ARGUMENT SUMMARY
+.PP
+.TP 8
+.B "-help"
+Print out the `Usage:' command syntax summary.
+.PP
+.TP 8
+.B "-in \fIfile\fP"
+This argument allows the user to explicitly specify the input 
+file on the command line.  The default is to take input from standard in.
+.PP
+.TP 8
+.B "\fIhost\fP:\fIdisplay\fP"
+This  argument  allow  you  to  specify the host and display number on
+which to display the window dump.  For example `xwud orpheus:1'
+would specify that the dump will appear on display `1' on the machine
+`orpheus'.  By default,
+.I xwud
+uses the host and display number stored in the environment variable
+DISPLAY, and therefore this argument is not normally specified.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+To get default host and display number.
+.SH FILES
+.PP
+.TP 8
+.B XWDFile.h
+X Window Dump File format definition file.
+.SH BUGS
+.PP
+Will fail on many implementations due to memory limitations.
+This program is a quick and dirty hack.
+Does not know how to handle color to monochrome at all.
+.SH FUTURE PLANS
+.PP
+If time ever presents itself...
+.PP
+.TP 8
+.B 1.
+Install complete color support.
+.PP
+.TP 8
+.B 2.
+Completely rework the 'XWDFile' dump file format.
+.SH SEE ALSO
+xwd(1), xpr(1), xdpr(1), X(1)
+.SH AUTHOR
+.PP
+Copyright 1985, Massachusetts Institute of Technology.
+.PP
+See \fIX(1)\fP for a full copyright notice.
+.PP
+Tony Della Fera, Digital Equipment Corp., MIT Project Athena
+
+
diff --git a/usr/contrib/apl/lib/Makefile b/usr/contrib/apl/lib/Makefile
new file mode 100644 (file)
index 0000000..5c144f4
--- /dev/null
@@ -0,0 +1,15 @@
+#      %M%     %I%     %E%
+#
+DESTDIR=
+ALL=   AW anovaws aw base editws fftws getws gradesys \
+       graph2ws graphws iows news ngradesys plotws shapews
+
+all:   ;
+
+install: all
+       -mkdir ${DESTDIR}/usr/new/lib/apl
+       for i in ${ALL}; do \
+               (install -c -m 644 $$i ${DESTDIR}/usr/new/lib/apl/$$i); \
+       done
+
+clean: ;
diff --git a/usr/contrib/cpm/src/Makefile b/usr/contrib/cpm/src/Makefile
new file mode 100644 (file)
index 0000000..7e85a72
--- /dev/null
@@ -0,0 +1,124 @@
+#      Makefile        1.10    86/01/12
+#
+DEST         = /usr/new
+
+CFLAGS       = -O -DVAX ${DFLAG} $(HELPFILE)
+
+EXTHDRS              = /usr/include/ctype.h \
+               /usr/include/stdio.h
+
+HDRS         = command.h \
+               cpmfio.h \
+               cpmio.h
+
+HELPFILE      = -DHELPFILE=\"/usr/new/lib/cpm.hlp\"
+
+LDFLAGS              = 
+
+LIBLIST       =
+
+LIST         = ls -C
+
+LOADER       = cc
+
+MAKEFILE      = Makefile
+
+OBJS         = bitmap.o \
+               blockio.o \
+               cclose.o \
+               ccreat.o \
+               cfillbuf.o \
+               cflsbuf.o \
+               cmdhdl.o \
+               copen.o \
+               copy.o \
+               cpm.o \
+               delete.o \
+               dirhdl.o \
+               extent.o \
+               ffc.o \
+               gensktab.o \
+               hexdmp.o \
+               interact.o \
+               physio.o \
+               pip.o \
+               rename.o
+
+PRINT        = pr
+
+PROGRAM              = cpm
+
+SRCS         = bitmap.c \
+               blockio.c \
+               cclose.c \
+               ccreat.c \
+               cfillbuf.c \
+               cflsbuf.c \
+               cmdhdl.c \
+               copen.c \
+               copy.c \
+               cpm.c \
+               delete.c \
+               dirhdl.c \
+               extent.c \
+               ffc.c \
+               gensktab.c \
+               hexdmp.c \
+               interact.c \
+               physio.c \
+               pip.c \
+               rename.c
+
+$(PROGRAM):     $(OBJS) $(LIBLIST)
+               @echo -n "Loading $(PROGRAM) ... "
+               @$(LOADER) $(LDFLAGS) $(OBJS) $(LIBLIST) -o $(PROGRAM)
+               @echo "done"
+
+debug:;                @echo DFLAG = -g -DDEBUG > Makefile.tmp00
+               @cat makefile >>Makefile.tmp00
+               @make -f Makefile.tmp00
+               @rm -f Makefile.tmp00
+
+clean:;                @rm -f $(OBJS)
+
+install:       $(PROGRAM)
+               @echo Installing $(PROGRAM) in $(DEST)
+               @install -s $(PROGRAM) $(DESTDIR)$(DEST)
+               @cp cpm.hlp ${DESTDIR}$(DEST)/lib
+
+depend:;       @mkmf PROGRAM=$(PROGRAM) DEST=$(DEST)
+
+index:;                @ctags -wx $(HDRS) $(SRCS)
+
+print:;                @$(PRINT) $(HDRS) $(SRCS)
+
+program:        $(PROGRAM)
+
+strip:;                @strip $(PROGRAM)
+
+tags:           $(SRCS); @ctags $(SRCS)
+
+update:                $(DEST)/$(PROGRAM)
+
+$(DEST)/$(PROGRAM): $(SRCS) $(LIBLIST)
+               @make -f $(MAKEFILE) DEST=$(DEST) install
+###
+bitmap.o: /usr/include/stdio.h cpmio.h
+blockio.o: /usr/include/stdio.h cpmio.h
+cclose.o: /usr/include/stdio.h cpmio.h cpmfio.h
+ccreat.o: /usr/include/stdio.h cpmio.h cpmfio.h
+cfillbuf.o: /usr/include/stdio.h cpmio.h cpmfio.h
+cflsbuf.o: /usr/include/stdio.h cpmio.h cpmfio.h
+cmdhdl.o: /usr/include/ctype.h /usr/include/stdio.h cpmio.h
+copen.o: /usr/include/stdio.h cpmio.h cpmfio.h
+copy.o: /usr/include/stdio.h cpmio.h cpmfio.h
+cpm.o: /usr/include/stdio.h cpmio.h cpmfio.h
+delete.o: /usr/include/stdio.h cpmio.h cpmfio.h
+dirhdl.o: /usr/include/stdio.h cpmio.h
+extent.o: /usr/include/stdio.h cpmio.h cpmfio.h
+gensktab.o: /usr/include/stdio.h cpmio.h
+hexdmp.o: /usr/include/stdio.h cpmio.h cpmfio.h
+interact.o: /usr/include/stdio.h command.h
+physio.o: /usr/include/stdio.h cpmio.h
+pip.o: /usr/include/stdio.h cpmio.h cpmfio.h
+rename.o: /usr/include/stdio.h cpmio.h cpmfio.h
diff --git a/usr/contrib/hyper/hylog/Makefile b/usr/contrib/hyper/hylog/Makefile
new file mode 100644 (file)
index 0000000..48e1978
--- /dev/null
@@ -0,0 +1,29 @@
+#
+# $Header: Makefile,v 2.8 84/10/10 04:43:51 steveg Exp $
+# $Locker:  $
+#
+CFLAGS=-O
+USRINCLUDE=/usr/include
+
+all: hylog hyelog
+
+.l.o:
+       lex -v $*.l
+       mv lex.yy.c $*.c
+       ${CC} -c ${CFLAGS} $*.c
+
+.c.o:
+       ${CC} -c ${CFLAGS} $*.c
+
+hyelog: hyelog.c ${USRINCLUDE}/vaxif/if_hyreg.h ${USRINCLUDE}/vaxif/if_hy.h
+       ${CC} ${CFLAGS} -o hyelog hyelog.c
+
+hylog: hylog.c ${USRINCLUDE}/vaxif/if_hyreg.h ${USRINCLUDE}/vaxif/if_hy.h
+       ${CC} ${CFLAGS} -o hylog hylog.c
+
+install: all
+       install -s hylog ${DESTDIR}/usr/new/hylog
+       install -s hyelog ${DESTDIR}/usr/new/hyelog
+
+clean:
+       -rm -f *.o hylog hyelog
diff --git a/usr/contrib/hyper/hyroute/Makefile b/usr/contrib/hyper/hyroute/Makefile
new file mode 100644 (file)
index 0000000..84bba25
--- /dev/null
@@ -0,0 +1,39 @@
+#
+# $Header: Makefile,v 2.8 84/10/10 04:56:16 steveg Exp $
+# $Locker:  $
+#
+CFLAGS=-O
+LPR=lprw
+USRINCLUDE=/usr/include
+
+all: hyroute
+
+.l.o:
+       lex -v $*.l
+       mv lex.yy.c $*.c
+       ${CC} -c ${CFLAGS} $*.c
+
+.c.o:
+       ${CC} -c ${CFLAGS} $*.c
+
+hyroute: hyr_main.o hyr_lex.o
+       ${CC} ${CFLAGS} -o hyroute hyr_main.o hyr_lex.o -ll
+
+install: hyroute
+       install -s hyroute ${DESTDIR}/usr/new/hyroute
+
+hyr_main.o:    hyr_main.c hyr_sym.h ${USRINCLUDE}/vaxif/if_hy.h
+hyr_lex.o:     hyr_lex.l hyr_sym.h
+
+clean:
+       -rm -f *.o hyroute hyr_lex.c
+
+print:
+       cat -n Makefile | fold -128 | pr -h `pwd`/Makefile >/usr/tmp/hyr_print
+       cat -n README | fold -128 | pr -h `pwd`/README >>/usr/tmp/hyr_print
+       cat -n test.input | fold -128 | pr -h `pwd`/test.input >>/usr/tmp/hyr_print
+       cat -n hyr_sym.h | fold -128 | pr -h `pwd`/hyr_sym.h >>/usr/tmp/hyr_print
+       cat -n hyr_lex.l | fold -128 | pr -h `pwd`/hyr_lex.l >>/usr/tmp/hyr_print
+       cat -n hyr_main.c | fold -128 | pr -h `pwd`/hyr_main.c >>/usr/tmp/hyr_print
+       ${LPR} /usr/tmp/hyr_print
+       rm /usr/tmp/hyr_print
diff --git a/usr/contrib/icon/Makefile b/usr/contrib/icon/Makefile
new file mode 100644 (file)
index 0000000..4dcea7c
--- /dev/null
@@ -0,0 +1,168 @@
+everything:    all
+
+what:
+               @echo "what do you want to make?"
+
+Icon:
+               cd bin;                 make
+               cd tran;                make
+               cd link;                make
+               cd operators;           make
+               cd functions;           make
+               cd lib;                 make
+               cd rt;                  make
+               cd iconx;               make
+               cp tran/itran link/ilink iconx/iconx bin
+               cd bin;                 strip icont itran ilink iconx
+               cd pilib;               make
+
+Pidemo:
+               cd pidemo;              ../icon-pi
+
+Alltest:
+               cd samples;             make All
+
+Stdtest:
+               cd samples;             make Std
+
+Settest:
+               cd samples;             make Set
+
+Xpxtest:
+               cd samples;             make Xpx
+
+Libtest:
+               cd libtest;             make All
+
+Pitest:
+               cd libtest;             Functest
+
+Porttest:
+               cd port;                make All
+
+Testsuite:
+               cd test;                make All
+
+Library:
+               cd src;                 make All
+               cd pifuncs;             make All
+
+Listall:
+               @cd bin;                make Listall
+               @cd iconx;              make Listall
+               @cd h;                  make Listall
+               @cd tran;               make Listall
+               @cd link;               make Listall
+               @cd rt;                 make Listall
+               @cd functions;          make Listall
+               @cd operators;          make Listall
+               @cd lib;                make Listall
+
+List:
+               @cd bin;                make -s List
+               @cd iconx;              make -s List
+               @cd h;                  make -s List
+               @cd tran;               make -s List
+               @cd link;               make -s List
+               @cd rt;                 make -s List
+               @cd functions;          make -s List
+               @cd operators;          make -s List
+               @cd lib;                make -s List
+
+Clean:
+               cd tran;                make Clean
+               cd link;                make Clean
+               cd operators;           make Clean
+               cd functions;           make Clean
+               cd lib;                 make Clean
+               cd rt;                  make Clean
+               cd iconx;               make Clean
+               cd bin;                 make Clean
+               cd pifuncs;             make Clean
+               cd samples;             make Clean
+               cd test;                make Clean
+               cd libtest;             make Clean
+               cd port;                make Clean
+
+#
+# Stuff for 4.3bsd
+#
+ILIB=$(DESTDIR)/usr/new/lib/icon
+IBIN=$(DESTDIR)/usr/new/lib/icon/5.9.0
+INEW=$(DESTDIR)/usr/new
+
+all:   Icon
+
+setup-new:
+       Icon-setup -vax -interpex -host gethost -vfork -xpx -sets \
+               -ibin $(IBIN)
+
+setup-pwd:
+       Icon-setup -vax -interpex -host gethost -vfork -xpx -sets
+       
+install: all
+       -mkdir $(ILIB)
+       -mkdir $(IBIN)
+       cp bin/itran bin/ilink bin/iconx bin/icont $(IBIN)
+       cp bin/icont $(INEW)
+       cp icon-pi $(INEW)
+       cp docs/icont.1 $(DESTDIR)/usr/man/mann/icont.n
+       cp docs/icon-pi.1 $(DESTDIR)/usr/man/mann/icon-pi.n
+       
+clean: Clean
+
+#  The entries here and in other Makefiles that start with "Dist" are
+#  used only at the University of Arizona for preparing the Icon system
+#  for distribution. The program gcomp, which is used to specify
+#  files not to remove, is from the Icon program library.
+
+Dist-build:
+               Icon-setup -vax -interpex -host gethost -vfork -xpx -sets
+               make Icon
+
+Dist-test:
+               make Alltest
+               make Library
+               make Pidemo
+               make Libtest
+               make Pitest
+               make Testsuite
+               make Porttest
+               cd port;                make Linkcheck
+
+Dist-setup:
+               cd samples;             make Dist-setup
+               cd test;                make Dist-setup
+               cd port;                make Dist-setup
+               cd libtest;             make Dist-setup
+
+Dist-clean:
+               cd tran;                make Dist-clean
+               cd link;                make Dist-clean
+               cd operators;           make Dist-clean
+               cd functions;           make Dist-clean
+               cd lib;                 make Dist-clean
+               cd rt;                  make Dist-clean
+               cd iconx;               make Dist-clean
+               cd h;                   make Dist-clean
+               cd pifuncs;             make Dist-clean
+               cd pilib;               make Dist-clean
+               cd samples;             make Dist-clean
+               cd port;                make Dist-clean
+               cd test;                make Dist-clean
+               cd libtest;             make Dist-clean
+               cd src;                 make Dist-clean
+               cd docs;                make Dist-clean
+               cd man;                 make Dist-clean
+               cd book;                make Dist-clean
+               rm -f ibin/*
+               touch ibin/.placeholder
+               rm -f ilib/*
+               touch ilib/.placeholder
+               rm -rf pidemo/*
+               touch pidemo/.placeholder
+               rm -f .BK* .CK* .emacs*
+               rm -rf `gcomp bin functions h iconx lib link operators \
+                  rt tran docs samples Icon-setup Makefile book libtest \
+                  port test *.gen pidemo ibin ilib pifuncs src man pilib`
+               cd bin;                 make Dist-clean
diff --git a/usr/contrib/mkmf/man/mann/mkmf.n b/usr/contrib/mkmf/man/mann/mkmf.n
new file mode 100644 (file)
index 0000000..ef23400
--- /dev/null
@@ -0,0 +1,320 @@
+.TH MKMF 1 "28 June 1985"
+.\" $Header: mkmf.n,v 1.8 86/01/12 00:53:14 lepreau Exp $
+.UC 4
+.SH NAME
+mkmf \- makefile editor
+.SH SYNOPSIS
+.B mkmf
+[\fB\-acdil\fR] [\fB\-f \fRmakefile] [\fB\-F \fRtemplate] [macroname=value ...]
+.SH DESCRIPTION
+.I Mkmf
+creates a makefile that tells the
+.I make
+command how to construct and maintain programs and libraries.
+After gathering up all the source code file names in the current working
+directory and inserting them into the makefile,
+.I mkmf
+scans source code files for included
+files and generates dependency information which is appended to the makefile.
+Source code files are identified by their file name suffixes.
+.I Mkmf
+knows about the following suffixes:
+.LP
+.nf
+.ta 1.5i +1i
+       .c      C
+       .e      Efl
+       .F      Fortran
+       .f      Fortran
+       .h      Include files
+       .i      Pascal include files
+       .l      Lex or Lisp
+       .o      Object files
+       .p      Pascal
+       .r      Ratfor
+       .s      Assembler
+       .y      Yacc
+.fi
+.DT
+.LP
+.I Mkmf
+checks for an existing makefile before creating one. If no
+.B \-f
+option is present, the makefiles `makefile' and `Makefile' are tried
+in order.
+.LP
+After the makefile has been created, arbitrary changes can be made using
+a regular text editor.
+.I Mkmf
+can also be used to re-edit the macro definitions in the makefile, regardless
+of changes that may have been made since it was created.
+.LP
+By default,
+.I mkmf
+creates a program makefile. To create a makefile that deals with libraries,
+the
+.B \-l
+option must be used.
+.LP
+\fBMake Requests\fR
+.LP
+Given a makefile created by
+.I mkmf,
+.I make
+recognizes the following requests:
+.IP \fBall\fR 15
+Compile and load a program or library.
+.IP \fBclean\fR
+Remove all unnecessary files.
+.IP \fBdepend\fR
+Edit the makefile and regenerate the dependency information.
+.IP \fBextract\fR
+Extract all the object files from the library and place them in the
+same directory as the source code files. The library is not altered.
+.IP \fBindex\fR
+Print an index of functions on standard output.
+.IP \fBinstall\fR
+Compile and load the program or library and move it to its destination
+directory.
+.IP \fBlibrary\fR
+Compile and load a library.
+.IP \fBprint\fR
+Print source code files on standard output.
+.IP \fBtags\fR
+Create a tags file for the
+.I ex
+editor, for C, Pascal, and Fortran source code files.
+.IP \fBprogram\fR
+Compile and link a program.
+.IP \fBupdate\fR
+Recompile only if there are source code files that are newer than the
+program or library, link and install the program or library. In the case
+of an out-of-date library, all the object files are extracted from the
+library before any recompilation takes place.
+.LP
+Several requests may be given simultaneously. For example, to
+compile and link a program,
+move the program to its destination directory, and remove
+any unnecessary object files:
+.IP
+make program install clean
+.LP
+\fBMacro Definitions\fR
+.LP
+.I Mkmf
+understands the following macro definitions:
+.IP CFLAGS 15
+C compiler flags. After searching for included files in the directory
+currently being processed,
+.I mkmf
+searchs in directories named in
+.B \-I
+compiler options, and then in the `/usr/include' directory.
+.IP DEST
+Directory where the program or library is to be installed.
+.IP EXTHDRS
+List of included files external to the current directory.
+.I Mkmf
+automatically updates this macro definition in the makefile if dependency
+information is being generated.
+.IP FFLAGS
+Fortran compiler flags. After searching for included files in the directory
+currently being processed,
+.I mkmf
+searchs in directories named in
+.B \-I
+compiler options, and then in the `/usr/include' directory.
+.IP HDRS
+List of included files in the current directory.
+.I Mkmf
+automatically updates this macro definition in the makefile.
+.IP LIBRARY
+Library name. This macro also implies the
+.B \-l
+option.
+.IP LIBS
+List of libraries needed by the link editor to resolve external references.
+.IP MAKEFILE
+Makefile name.
+.IP OBJS
+List of object files.
+.I Mkmf
+automatically updates this macro definition in the makefile.
+.IP PROGRAM
+Program name.
+.IP SRCS
+List of source code files.
+.I Mkmf
+automatically updates this macro definition in the makefile.
+.IP SUFFIX
+List of additional file name suffixes for
+.I mkmf
+to know about.
+.LP
+Both these and any other macro definitions already within the makefile may
+be replaced by definitions on the command line in the form
+.I "macroname=value".
+For example, to change the C compiler flags, the program name, and the
+destination directory in the makefile, the user might type the following line:
+.LP
+.nf
+       mkmf  ``CFLAGS=\-I../include  \-O''  PROGRAM=mkmf  DEST=/usr/new
+.fi
+.LP
+Note that macro definitions like CFLAGS with blanks in them
+must be enclosed in double quote `"' marks.
+.LP
+\fBFile Name Suffixes\fR
+.LP
+.I Mkmf
+can be instructed to recognize additional file name suffixes, or ignore ones
+that it already knows about, by specifying suffix descriptions in
+the SUFFIX macro definition. Each suffix description takes the
+form `.\fIsuffix:tI\^\fR' where
+.I t
+is a character indicating the contents of the file (s = source file,
+o = object file, h = header file, x = executable file) and
+.I I
+is an optional character indicating the include syntax for included
+files (C = C syntax, F = Fortran, Efl, and Ratfor syntax, P = Pascal
+syntax). The following table describes
+the default configuration for
+.I mkmf:
+
+.nf
+.ta 1.5i +1i
+       .c:sC   C
+       .e:sF   Efl
+       .F:sF   Fortran
+       .f:sF   Fortran
+       .h:h    Include files
+       .i:h    Pascal include files
+       .l:sC   Lex or Lisp
+       .o:o    Object files
+       .p:sP   Pascal
+       .r:sF   Ratfor
+       .s:s    Assembler
+       .y:sC   Yacc
+.fi
+.DT
+.LP
+For example, to change the object file suffix to .obj, undefine the Pascal
+include file suffix, and prevent Fortran files from being scanned for
+included files, the SUFFIX macro definition might look like:
+.IP
+\&"SUFFIX = .obj:o  .i:  .f:s"
+.LP
+\fBInclude Statement Syntax\fR
+.LP
+The syntax of include statements for C, Fortran, and Pascal source code are
+of the form
+.IP \fB\C:\fR
+#include "\fIfilename\fR"
+.RS
+where # must be the first character in the line.
+.RE
+.IP \fB\Fortran:\fR
+include '\fIfilename\fR'
+.RS
+INCLUDE '\fIfilename\fR'
+.br
+where the include statement starts in column 7.
+.RE
+.IP \fB\Pascal:\fR
+#include "\fIfilename\fR"
+.RS
+#INCLUDE "\fIfilename\fR"
+.br
+where # must be the first character in the line.
+.RE
+.LP
+\fBUser-Defined Templates\fR
+.LP
+If
+.I mkmf
+can not find a makefile within the current directory, it normally uses
+one of the standard makefile templates, `p.Makefile' or `l.Makefile', in
+/usr/new/lib unless the user has alternative `p.Makefile'
+or `l.Makefile' template files in a directory $PROJECT/lib where
+$PROJECT is the absolute pathname of the directory assigned to the PROJECT
+environment variable.
+.SH OPTIONS
+.IP \fB\-a\fR
+When searching a directory for source and include files, also consider files
+which have names beginning with periods.  By default, 
+.I mkmf
+ignores
+file names which have leading "dots," such as those of
+backup files created by some
+editors.
+.IP \fB\-c\fR
+Suppress `creating
+.I makefile
+from ...' message.
+.IP \fB\-d\fR
+Turn
+.B off
+scanning of source code for `include' files. Old dependency information
+is left untouched in the makefile.
+.IP "\fB\-f \fImakefile\fR"
+Specify an alternative
+.I makefile
+file name. The default file name is `Makefile'.
+.IP \fB\-i\fR
+Cause
+.I mkmf
+to prompt the user for the name of the program or library, and the
+directory where it is to be installed. If a carriage return is typed
+in response to each of these queries,
+.I mkmf
+will assume that the default program name is
+.I a.out
+or the default library name is
+.I lib.a,
+and the destination directory is the current directory.
+.IP \fB\-l\fR
+Force the makefile to be a library makefile.
+.IP "\fB\-F \fItemplate\fR"
+Specify an alternative makefile
+.I template
+file name. The default program makefile template is `p.Makefile'
+and the default library makefile template is `l.Makefile'.
+.I Mkmf
+normally looks for
+.I template 
+in /usr/new/lib or $PROJECT/lib. However,
+.I template
+can be specified as an absolute pathname.
+.SH FILES
+.nf
+.ta \w'/usr/new/lib/p.Makefile'u+.5i
+/usr/new/lib/p.Makefile        Standard program makefile template.
+/usr/new/lib/l.Makefile        Standard library makefile template.
+$PROJECT/lib/p.Makefile        User-defined program makefile template.
+$PROJECT/lib/l.Makefile        User-defined library makefile template.
+.fi
+.DT
+.SH "SEE ALSO"
+ar(1), ctags(1), ex(1), ld(1), ls(1), make(1)
+.sp
+Feldman, S.I., "Make \- A Program for Maintaining Computer Programs"
+.sp
+Walden, K., "Automatic Generation of Make Dependencies", \fISoftware\-Practice
+and Experience\fP, vol. 14, no. 6, pp. 575-585, June 1984.
+.SH DIAGNOSTICS
+Exit status 0 is normal. Exit status 1 indicates an error.
+.SH AUTHOR
+Peter J. Nicklin
+.SH BUGS
+The name of the makefile is included as a macro definition within the
+makefile and must be changed if the makefile is renamed.
+.LP
+Since executable files are dependent on libraries, standard library
+abbreviations must be expanded to full pathnames within the LIBS macro
+definition in the makefile.
+.LP
+Generated dependency information appears after a line in the makefile
+beginning with `###'. This line must
+.B not
+be removed, nor must any other information be inserted in the makefile
+below this line.
diff --git a/usr/contrib/mkmf/src/Mkmf.c b/usr/contrib/mkmf/src/Mkmf.c
new file mode 100644 (file)
index 0000000..8c67ca9
--- /dev/null
@@ -0,0 +1,202 @@
+static char *rcsid = "$Header: Mkmf.c,v 1.7 86/01/12 00:48:26 lepreau Exp $";
+#include "sccsid.h"
+/*
+ * mkmf - makefile editor
+ *
+ * Author: Peter J. Nicklin
+ */
+#include "Mkmf.h"
+#include "getarg.h"
+#include "hash.h"
+#include "null.h"
+#include "path.h"
+#include "target.h"
+#include "slist.h"
+#include "suffix.h"
+#include "system.h"
+#include "yesno.h"
+
+char *L_MAKEFILE = "l.Makefile";       /* default library makefile template */
+char OBJSFX[SUFFIXSIZE] = ".o";                /* default object suffix */
+char *P_MAKEFILE = "p.Makefile";       /* default program makefile template */
+char *PGN = "mkmf";                    /* program name */
+int CFLAG = YES;                       /* makefile creation message flag */
+int AFLAG = NO;                                /* accept src files w/ leading dots? */
+int DEPEND = 1;                                /* dependency analysis? */
+SLIST *HEADLIST;                       /* header file name list */
+SLIST *LIBLIST;                                /* library pathname list */
+SLIST *SRCLIST;                                /* source file name list */
+HASH *MDEFTABLE;                       /* macro definition table */
+
+char *DEFRULE[] =                      /* default preprocessor rules */
+       {
+#include "defaultrul.h"
+       NULL
+       };
+
+SUFFIX DEFSFX[] =                      /* default suffix list */
+       {
+#include "defaultsfx.h"
+       NULL, 0
+       };
+
+main(argc, argv)
+       int argc;
+       char **argv;
+{
+       char *mfname = NULL;            /* makefile name */
+       char mfpath[PATHSIZE];          /* makefile template pathname */
+       HASHBLK *htb;                   /* hash table block */
+       HASHBLK *htinstall();           /* install hash table entry */
+       HASHBLK *htlookup();            /* find hash table entry */
+       int buildliblist();             /* build list of library pathnames */
+       int buildruletable();           /* build table of preprocessor rules */
+       int buildsfxtable();            /* build table of suffixes */
+       int buildsrclist();             /* build list of source file names */
+       int findmf();                   /* find makefile */
+       int status = 0;                 /* exit status */
+       int storemacro();               /* store macro definition */
+       short iflag = NO;               /* interactive flag */
+       TARGET target;                  /* type of makefile target */
+       void answer();                  /* install answer in macro def table */
+       void editmf();                  /* edit makefile */
+
+       target.type = target.dest = VUNKNOWN;
+
+       {
+       register char *s;               /* option pointer */
+       while (--argc > 0 && **++argv == '-')
+               {
+               for (s = argv[0]+1; *s != '\0'; s++)
+                       switch (*s)
+                               {
+                               case 'F':
+                                       P_MAKEFILE = L_MAKEFILE = GETARG(s);
+                                       if (P_MAKEFILE==NULL || *P_MAKEFILE=='\0')
+                                               {
+                                               warn("missing template name");
+                                               status = 1;
+                                               }
+                                       goto endfor;
+                               case 'a':
+                                       AFLAG = YES;
+                                       break;
+                               case 'c':
+                                       CFLAG = NO;
+                                       break;
+                               case 'd':
+                                       /* turn OFF dependency analysis */
+                                       DEPEND = 0;
+                                       break;
+                               case 'f':
+                                       mfname = GETARG(s);
+                                       if (mfname == NULL || *mfname == '\0')
+                                               {
+                                               warn("missing makefile name");
+                                               status = 1;
+                                               }
+                                       goto endfor;
+                               case 'i':
+                                       iflag = YES;
+                                       break;
+                               case 'l':
+                                       target.type = VLIBRARY;
+                                       break;
+                               default:
+                                       badopt(**argv, *s);
+                                       status = 1;
+                                       goto endfor;
+                               }
+               endfor: continue;
+               }
+       }
+       
+       /* initialize macro definition table */
+       MDEFTABLE = htinit(MDEFTABLESIZE);
+
+       /* get command line macro definitions */
+       for (; argc > 0; argc--, argv++)
+               if (storemacro(*argv) == NO)
+                       {
+                       warns("%s not a macro definition", *argv);
+                       status = 1;
+                       }
+
+       if (status == 1)
+               {
+               usage("[-cdil] [-f makefile] [-F template] [macroname=value...]");
+               exit(1);
+               }
+
+
+       /* determine the makefile name */
+       if (mfname == NULL)
+               if ((htb = htlookup(MMAKEFILE, MDEFTABLE)) != NULL)
+                       mfname = htb->h_def;
+               else if (FILEXIST("makefile"))
+                       mfname = "makefile";
+               else if (FILEXIST("Makefile"))
+                       mfname = "Makefile";
+               else
+                       mfname = "Makefile";
+       if (htinstall(MMAKEFILE, mfname, VREADWRITE, MDEFTABLE) == NULL)
+               exit(1);
+
+
+       /* find the makefile (template) and load useful macro definitions */
+       if (target.type == VUNKNOWN)
+               {
+               if (htlookup(MPROGRAM, MDEFTABLE) != NULL)
+                       target.type = VPROGRAM;
+               else if (htlookup(MLIBRARY, MDEFTABLE) != NULL)
+                       target.type = VLIBRARY;
+               }
+       if (findmf(mfname, mfpath, &target) == NO)
+               exit(1);
+       
+
+       /* interactive option */
+       if (iflag == YES)
+               {
+               if (htlookup(MPROGRAM, MDEFTABLE) == NULL &&
+                   htlookup(MLIBRARY, MDEFTABLE) == NULL)
+                       if (target.type == VPROGRAM)
+                               {
+                               printf("program name? ");
+                               answer(MPROGRAM, VREADWRITE);
+                               }
+                       else if (target.type == VLIBRARY)
+                               {
+                               printf("library name? ");
+                               answer(MLIBRARY, VREADWRITE);
+                               }
+               if (htlookup(MDESTDIR, MDEFTABLE) == NULL && target.dest == VDESTDIR)
+                       {
+                       printf("destination directory? ");
+                       answer(MDESTDIR, VREADWRITE);
+                       }
+               }
+
+       /* build the suffix table */
+       if (buildsfxtable() == NO)
+               exit(1);
+
+       /* build the rule table */
+       if (buildruletable() == NO)
+               exit(1);
+
+       /* build the source code and header file name lists */
+       if (buildsrclist() == NO)
+               exit(1);
+       
+
+       /* build the library pathname list */
+       if (buildliblist() == NO)
+               exit(1);
+
+
+       /* edit makefile */
+       editmf(mfname, mfpath);
+
+       exit(0);
+}
diff --git a/usr/contrib/mkmf/src/buildlist.c b/usr/contrib/mkmf/src/buildlist.c
new file mode 100644 (file)
index 0000000..64d3485
--- /dev/null
@@ -0,0 +1,251 @@
+/* $Header: buildlist.c,v 1.3 86/01/12 00:49:30 lepreau Exp $ */
+
+/*
+ * Author: Peter J. Nicklin
+ */
+#include <sys/types.h>
+#include <sys/dir.h>
+#include <stdio.h>
+#include <ctype.h>
+#include "Mkmf.h"
+#include "hash.h"
+#include "null.h"
+#include "path.h"
+#include "slist.h"
+#include "suffix.h"
+#include "system.h"
+#include "yesno.h"
+
+/*
+ * buftolist() copies the items from a buffer to a singly-linked list.
+ * Returns integer YES if successful, otherwise NO.
+ */
+buftolist(buf, list)
+       char *buf;                      /* item buffer */
+       SLIST *list;                    /* receiving list */
+{
+       char *gettoken();               /* get next token */
+       char *slappend();               /* append file name to list */
+       char token[MAXNAMLEN];          /* item buffer */
+
+       while ((buf = gettoken(token, buf)) != NULL)
+               {
+               if (slappend(token, list) == NULL)
+                       return(NO);
+               }
+       return(YES);
+}
+
+
+
+/*
+ * buildliblist() reads library pathnames from the LIBLIST macro
+ * definition, and adds them to the library pathname list. Libraries
+ * may be specified as `-lx'. Returns integer YES if successful,
+ * otherwise NO.
+ */
+buildliblist()
+{
+       extern SLIST *LIBLIST;          /* library pathname list */
+       extern HASH *MDEFTABLE;         /* macro definition table */
+       HASHBLK *htb;                   /* hash table block */
+       HASHBLK *htlookup();            /* find hash table entry */
+       int libbuftolist();             /* load library pathnames into list */
+       SLIST *slinit();                /* initialize singly-linked list */
+       void htrm();                    /* remove hash table entry */
+
+       LIBLIST = NULL;
+       if ((htb = htlookup(MLIBLIST, MDEFTABLE)) != NULL)
+               {
+               LIBLIST = slinit();
+               if (libbuftolist(htb->h_def, LIBLIST) == NO)
+                       return(NO);
+               }
+       htrm(MLIBLIST, MDEFTABLE);
+       return(YES);
+}
+
+
+
+/*
+ * buildsrclist() takes source and header file names from command line
+ * macro definitions or the current directory and appends them to source
+ * or header file name lists as appropriate. Returns integer YES if
+ * if successful, otherwise NO.
+ */
+buildsrclist()
+{
+       extern HASH *MDEFTABLE;         /* macro definition table */
+       extern SLIST *HEADLIST;         /* header file name list */
+       extern SLIST *SRCLIST;          /* source file name list */
+       char *slappend();               /* append file name to list */
+       HASHBLK *headhtb;               /* HEADERS macro hash table block */
+       HASHBLK *htlookup();            /* find hash table entry */
+       HASHBLK *srchtb;                /* SOURCE macro hash table block */
+       int buftolist();                /* copy items from buffer to list */
+       int needheaders = 1;            /* need header file names */
+       int needsource = 1;             /* need source file names */
+       int read_dir();                 /* read dir for source and headers */
+       int slsort();                   /* sort singly-linked list */
+       int strcmp();                   /* string comparison */
+       SLIST *slinit();                /* initialize singly-linked list */
+
+       HEADLIST = slinit();
+       SRCLIST = slinit();
+
+       /* build lists from command line macro definitions */
+       if ((headhtb = htlookup(MHEADERS, MDEFTABLE)) != NULL)
+               {
+               if (buftolist(headhtb->h_def, HEADLIST) == NO)
+                       return(NO);
+               needheaders--;
+               }
+       if ((srchtb = htlookup(MSOURCE, MDEFTABLE)) != NULL)
+               {
+               if (buftolist(srchtb->h_def, SRCLIST) == NO)
+                       return(NO);
+               needsource--;
+               }
+       
+       /* read the current directory to get source and header file names */
+       if (needheaders || needsource)
+               if (read_dir(needheaders, needsource) == NO)
+                       return(NO);
+
+       if (slsort(strcmp, SRCLIST) == NO)
+               return(NO);
+       if (slsort(strcmp, HEADLIST) == NO)
+               return(NO);
+       return(YES);
+}
+
+
+
+/*
+ * expandlibpath() converts a library file specified by `-lx' into a full
+ * pathname. /lib and /usr/lib are searched for the library in the form
+ * libx.a. An integer YES is returned if the library was found, otherwise NO.
+ * A library file which doesn't begin with `-' is left unchanged.
+ */
+expandlibpath(libpath)
+       char *libpath;                  /* library pathname buffer */
+{
+       char *lib;                      /* /lib library pathname template */
+       char *strcpy();                 /* string copy */
+       char *usrlib;                   /* /usr/lib library pathname template */
+       int i;                          /* library pathname index */
+
+       lib = "/lib/libxxxxxxxxxxxxxxxxxxxxxxxxx";
+       usrlib = "/usr/lib/libxxxxxxxxxxxxxxxxxxxxxxxxx";
+
+       if (libpath[0] == '-' && libpath[1] == 'l')
+               {
+               for (i = 0; libpath[i+2] != '\0' && i < 22; i++)
+                       {
+                       lib[i+8] = libpath[i+2];
+                       usrlib[i+12] = libpath[i+2];
+                       }
+               lib[i+8] = usrlib[i+12] = '.';
+               lib[i+9] = usrlib[i+13] = 'a';
+               lib[i+10] = usrlib[i+14] = '\0';
+               if (FILEXIST(lib))
+                       {
+                       strcpy(libpath, lib);
+                       return(YES);
+                       }
+               else if (FILEXIST(usrlib))
+                       {
+                       strcpy(libpath, usrlib);
+                       return(YES);
+                       }
+               else
+                       return(NO);
+               }
+       return(YES);
+}
+
+
+
+/*
+ * libbuftolist() appends each library pathname specified in libbuf to
+ * the liblist library pathname list.
+ */
+libbuftolist(libbuf, liblist)
+       char *libbuf;                   /* library pathname buffer */
+       SLIST *liblist;                 /* library pathname list */
+{
+       char *gettoken();               /* get next token */
+       char libpath[PATHSIZE];         /* library file pathname */
+       char *slappend();               /* append file name to list */
+       int expandlibpath();            /* -lx -> full library pathname */
+
+       while ((libbuf = gettoken(libpath, libbuf)) != NULL)
+               {
+               if (expandlibpath(libpath) == NO)
+                       {
+                       warns("can't find library %s", libpath);
+                       return(NO);
+                       }
+               if (slappend(libpath, liblist) == NULL)
+                       return(NO);
+               }
+       return(YES);
+}
+
+
+
+/*
+ * read_dir() reads filenames from the current directory and adds them
+ * to the source or header file name lists as appropriate. Returns
+ * integer YES if successful, otherwise NO.
+ */
+read_dir(needheaders, needsource)
+       int needheaders;                /* need header file names */
+       int needsource;                 /* need source file names */
+{
+       extern int AFLAG;               /* accept src files w/ leading dots? */
+       extern SLIST *HEADLIST;         /* header file name list */
+       extern SLIST *SRCLIST;          /* source file name list */
+       char *rindex();                 /* find last occurrence of character */
+       char *slappend();               /* append file name to list */
+       char *suffix;                   /* pointer to file name suffix */
+       char *p;                        /* beginning of file name component */
+       DIR *dirp;                      /* directory stream */
+       DIR *opendir();                 /* open directory stream */
+       int lookupsfx();                /* get suffix type */
+       int sfxtyp;                     /* type of suffix */
+       struct direct *dp;              /* directory entry pointer */
+       struct direct *readdir();       /* read a directory entry */
+
+       if ((dirp = opendir(CURDIR)) == NULL)
+               {
+               warn("can't open current directory");
+               return(NO);
+               }
+       for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp))
+               if ((suffix = rindex(dp->d_name, '.')) != NULL)
+                       {
+                       if ((p = rindex(dp->d_name, '/')) != NULL)
+                               p++;
+                       else
+                               p = dp->d_name;
+                       if (*p == '.' && (AFLAG == 0))
+                               continue;
+                       suffix++;
+                       sfxtyp = lookupsfx(suffix);
+                       if (sfxtyp == SFXSRC)
+                               {
+                               if (needsource)
+                                       if (slappend(dp->d_name, SRCLIST) == NULL)
+                                               return(NO);
+                               }
+                       else if (sfxtyp == SFXHEAD)
+                               {
+                               if (needheaders)
+                                       if (slappend(dp->d_name, HEADLIST) == NULL)
+                                               return(NO);
+                               }
+                       }
+       closedir(dirp);
+       return(YES);
+}
diff --git a/usr/contrib/rn/Makefile.SH b/usr/contrib/rn/Makefile.SH
new file mode 100644 (file)
index 0000000..8946f44
--- /dev/null
@@ -0,0 +1,123 @@
+case $CONFIG in
+    '') . config.sh ;;
+esac
+echo "Extracting Makefile (with variable substitutions)"
+cat >Makefile <<!GROK!THIS!
+# $Header: Makefile.SH,v 4.4 85/05/13 17:21:18 lwall Exp $
+#
+# $Log:        Makefile.SH,v $
+# Revision 4.3.1.2  85/05/13  17:21:18  lwall
+# System V make needs space before line-continuing backslash.
+# 
+# Revision 4.3.1.1  85/05/10  11:30:15  lwall
+# Branch for patches.
+# 
+# Revision 4.3  85/05/01  11:33:26  lwall
+# Baseline for release with 4.3bsd.
+# 
+
+CC = $cc
+rnbin = \${DESTDIR}$rnbin
+rnlib = \${DESTDIR}$rnlib
+mansrc = \${DESTDIR}$mansrc
+manext = $manext
+CFLAGS = $iandd -O
+LDFLAGS = $iandd
+NDIRC = $ndirc
+NDIRO = $ndiro
+
+libs = $ndirlib $termlib $jobslib
+!GROK!THIS!
+cat >>Makefile <<'!NO!SUBS!'
+
+public = rn newsetup newsgroups Pnews Rnmail
+private = norm.saver mbox.saver ng.help art.help pager.help subs.help makedir filexp Pnews.header
+manpages = rn.1 Pnews.1 Rnmail.1 newsetup.1 newsgroups.1
+util = Makefile makedepend newsnews
+
+h1 = addng.h art.h artio.h artsrch.h backpage.h bits.h cheat.h common.h
+h2 = final.h head.h help.h init.h intrp.h kfile.h last.h ndir.h ng.h
+h3 = ngdata.h ngsrch.h ngstuff.h only.h rcln.h rcstuff.h
+h4 = respond.h rn.h search.h sw.h term.h util.h
+
+h = $(h1) $(h2) $(h3) $(h4)
+
+c1 = addng.c art.c artio.c artsrch.c backpage.c bits.c cheat.c
+c2 = final.c head.c help.c init.c intrp.c kfile.c last.c $(NDIRC) ng.c
+c3 = ngdata.c ngsrch.c ngstuff.c only.c rcln.c rcstuff.c
+c4 = respond.c rn.c search.c sw.c term.c util.c
+
+c = $(c1) $(c2) $(c3) $(c4)
+
+obj1 = addng.o art.o artio.o artsrch.o backpage.o bits.o cheat.o
+obj2 = final.o head.o help.o init.o intrp.o kfile.o last.o $(NDIRO) ng.o
+obj3 = ngdata.o ngsrch.o ngstuff.o only.o rcln.o rcstuff.o
+obj4 = respond.o rn.o search.o sw.o term.o util.o
+
+obj = $(obj1) $(obj2) $(obj3) $(obj4)
+
+lintflags = -phbvxac
+
+add1 = Makefile.old Pnews Rnmail art.help
+add2 = bsd config.h config.sh eunice filexp
+add3 = loc makedepend makedir mbox.saver newsetup
+add4 = newsgroups newsnews ng.help norm.saver pager.help
+add5 = pdp11 rn subs.help usg v7
+
+addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5)
+
+# grrr
+SHELL = /bin/sh
+
+.c.o:
+       $(CC) -c $(CFLAGS) $*.c
+
+all: $(public) $(private) $(util)
+       touch all
+
+rn: $(obj)
+       $(CC) $(LDFLAGS) $(obj) $(libs) -o rn
+
+# if a .h file depends on another .h file...
+$(h):
+       touch $@
+
+install: rn
+# won't work with csh
+       export PATH || exit 1
+       - mv $(rnbin)/rn $(rnbin)/rn.old
+       - if test `pwd` != $(rnbin); then cp $(public) $(rnbin); fi
+       cd $(rnbin); chmod 755 $(public)
+       chmod 755 makedir
+       - ./makedir `./filexp $(rnlib)`
+       - if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi
+       cd `./filexp $(rnlib)`; chmod 755 $(private)
+       - if test ! -f `./filexp $(rnlib)/newsnews`; then cp newsnews `./filexp $(rnlib)`; fi
+       - if test `pwd` != $(mansrc); then \
+for page in $(manpages); do \
+cp $$page $(mansrc)/`basename $$page .1`.$(manext); \
+done; \
+fi
+
+clean:
+       rm -f *.o
+
+realclean:
+       rm -f rn *.o core $(addedbyconf)
+
+# The following lint has practically everything turned on.  Unfortunately,
+# you have to wade through a lot of mumbo jumbo that can't be suppressed.
+# If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
+# for that spot.
+
+lint:
+       lint $(lintflags) $(defs) $(c) > rn.fuzz
+
+depend:
+       makedepend
+
+# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
+$(obj):
+       @ echo "You haven't done a "'"make depend" yet!'; exit 1
+!NO!SUBS!
+$eunicefix Makefile
diff --git a/usr/contrib/spms/Makefile b/usr/contrib/spms/Makefile
new file mode 100644 (file)
index 0000000..257dab2
--- /dev/null
@@ -0,0 +1,9 @@
+# Makefile to bootstrap SPMS
+
+all:;          @cd bin; pmake
+
+clean:;                @cd bin; pclean
+
+depend:;       @cd bin; pdepend
+
+install:;      cd bin; pinstall $(DESTDIR)
diff --git a/usr/contrib/spms/bin/pinstall b/usr/contrib/spms/bin/pinstall
new file mode 100755 (executable)
index 0000000..d753e38
--- /dev/null
@@ -0,0 +1,56 @@
+#! /bin/csh -f
+#
+# Install SPMS Software Project Management System
+#
+
+# DESTDIR is the one possible arg
+set D =
+if ($#argv > 0) set D = $1
+
+if (!(-d $D/usr/new)) then
+       echo "$D/usr/new: No such directory"
+       exit(1)
+endif
+if (!(-d $D/usr/new/lib)) then
+       echo "$D/usr/new/lib: No such directory"
+       exit(1)
+endif
+if (!(-d $D/usr/man/mann)) then
+       echo "$D/usr/man/mann: No such directory"
+       exit(1)
+endif
+
+cd ..
+setenv PROJECT $cwd
+
+set PATH = (/usr/new /usr/ucb /bin /usr/bin)
+
+#install libraries
+foreach p (libhash libpdb libslist libspms libtree)
+       cd $PROJECT/src/lib/$p/src
+       sed -e '/###/,$d' < Makefile > $$Mf
+       mv $$Mf Makefile
+       make install
+end
+
+#install lib programs & data files in /usr/new/lib
+foreach p (pgrep phelp)
+       cd $PROJECT/src/lib/$p
+       sed -e '/###/,$d' < Makefile > $$Mf
+       mv $$Mf Makefile
+       make DEST=${D}/usr/new/lib install
+end
+
+#install programs in /usr/new
+cd $PROJECT/src/bin
+foreach p (*)
+       cd $PROJECT/src/bin/$p
+       sed -e '/###/,$d' < Makefile > $$Mf
+       mv $$Mf Makefile
+       make DEST=${D}/usr/new install
+end
+
+#install manual pages in /usr/man/mann
+cp $PROJECT/man/mann/*.n $D/usr/man/mann
+
+exit(0)
diff --git a/usr/src/games/monop/Makefile b/usr/src/games/monop/Makefile
new file mode 100644 (file)
index 0000000..d13b8cb
--- /dev/null
@@ -0,0 +1,86 @@
+#
+# Nifty foo monopoly maker
+#      Program:  Ken Arnold
+#      Makefile:  K.S.
+#
+DESTDIR=
+DATFILES=brd.dat mon.dat prop.dat
+CFILES=        monop.c cards.c execute.c getinp.c houses.c jail.c misc.c morg.c \
+       print.c prop.c rent.c roll.c spec.c strcmp.c trade.c
+OBJS=  monop.o cards.o execute.o getinp.o houses.o jail.o misc.o morg.o \
+       print.o prop.o rent.o roll.o spec.o strcmp.o trade.o strings.o
+HEADERS=monop.h deck.h
+BINDIR=        ${DESTDIR}/usr/games
+LIBDIR=        ${DESTDIR}/usr/games/lib
+LIB=
+CFLAGS=        -O -w
+DAT=   brd.dat monop.dat prop.dat
+CC=    cc
+XSTR=  xstr
+ED=    ed
+AS=    as
+RM=    rm -f
+CTAGS= ctags
+
+#
+# Be cool about compiling strings.
+#
+.c.o:
+       ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
+       ${CC} -c ${CFLAGS} x.c
+       mv x.o $*.o
+
+it:    monop cards.pck
+
+monop: ${OBJS}
+       ${CC} -o monop -n ${OBJS} ${LIB}
+
+install: monop cards.pck
+       ${RM} ${BINDIR}/monop ${LIBDIR}/cards.pck
+       install -s monop ${BINDIR}
+       mv cards.pck ${LIBDIR}
+
+new:   clean ctags monop
+
+strings.o: strings
+       ${XSTR}
+       ${CC} -S xs.c
+       ${ED} - < :rofix xs.s
+       ${AS} -o strings.o xs.s
+       ${RM} xs.s xs.c
+
+monop.o: ${DATFILES} monop.def
+       ${CC} -E ${CFLAGS} monop.c | ${XSTR} -c -
+       ${CC} -c ${CFLAGS} x.c
+       mv x.o monop.o
+
+cards.o: deck.h
+       ${CC} -E ${CFLAGS} cards.c | ${XSTR} -c -
+       ${CC} -c ${CFLAGS} x.c
+       mv x.o cards.o
+
+newone:
+       ${CC} -o monop ${CFLAGS} ${CFILES} ${LIB}
+
+ctags:
+       ${CTAGS} ${CFILES} monop.h deck.h monop.def initdeck.c
+
+cards.pck: initdeck cards.inp
+       ./initdeck
+
+initdeck: initdeck.c deck.h
+       ${CC} -o initdeck ${CFLAGS} initdeck.c ${LIB}
+
+monop.tar:
+       tar crvf monop.tar ${CFILES} ${DATFILES} ${HEADERS} :rofix Makefile cards.inp initdeck.c monop.def monop.ext
+
+clean:
+       ${RM} ${OBJS} monop core tags x.c x.o monop.tar initdeck cards.pck errs
+       cp /dev/null strings
+
+printall:
+       -/usr/bin/eecs/pr monop.h deck.h monop.def monop.ext ${CFILES} ${DATFILES} | /usr/bin/lpr
+       -/usr/bin/lpq
+
+lint:
+       lint ${CFILES} > lint.out ;