converted man page
[unix-history] / usr / src / usr.bin / window / window.1
index f01574f..b7dbbc9 100644 (file)
@@ -1,66 +1,99 @@
-.\" Copyright (c) 1985 The Regents of the University of California.
+.\" Copyright (c) 1985, 1990 The Regents of the University of California.
 .\" All rights reserved.
 .\"
 .\" All rights reserved.
 .\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Edward Wang at The University of California, Berkeley.
+.\" %sccs.include.redist.man%
 .\"
 .\"
-.\" Redistribution and use in source and binary forms are permitted
-.\" provided that the above copyright notice and this paragraph are
-.\" duplicated in all such forms and that any documentation,
-.\" advertising materials, and other materials related to such
-.\" distribution and use acknowledge that the software was developed
-.\" by the University of California, Berkeley.  The name of the
-.\" University may not be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"     @(#)window.1   6.10 (Berkeley) %G%
 .\"
 .\"
-.\"    @(#)window.1    6.9 (Berkeley) %G%
-.\"
-.TH WINDOW 1 ""
-.UC 6
-.SH NAME
-window \- window environment
-.SH SYNOPSIS
-.B window
-[
-.B \-t
-] [
-.B \-f
-] [
-.B \-d
-] [
-.B \-e escape-char
-] [
-.B \-c command
-]
-.SH DESCRIPTION
-\fIWindow\fP implements a window environment on
+.Dd 
+.Dt WINDOW 1
+.Os BSD 4.3
+.Sh NAME
+.Nm window
+.Nd window environment
+.Sh SYNOPSIS
+.Nm window
+.Op Fl t
+.Op Fl f
+.Op Fl d
+.Op Fl e Ar escape-char
+.Op Fl c Ar command
+.Sh DESCRIPTION
+.Nm Window
+implements a window environment on
 ASCII terminals.
 ASCII terminals.
-.PP
+.Pp
 A window is a rectangular portion of the physical terminal
 screen associated with a set of processes.  Its size and
 position can be changed by the user at any time.  Processes
 communicate with their window in the same way they normally
 A window is a rectangular portion of the physical terminal
 screen associated with a set of processes.  Its size and
 position can be changed by the user at any time.  Processes
 communicate with their window in the same way they normally
-interact with a terminal--through their standard input, output,
+interact with a terminal\-through their standard input, output,
 and diagnostic file descriptors.  The window program handles the
 details of redirecting input an output to and from the
 windows.  At any one time, only one window can receive
 input from the keyboard, but all windows can simultaneously send output
 to the display.
 and diagnostic file descriptors.  The window program handles the
 details of redirecting input an output to and from the
 windows.  At any one time, only one window can receive
 input from the keyboard, but all windows can simultaneously send output
 to the display.
-.PP
+.Pp
+When
+.Nm window
+starts up, the commands (see long commands below)
+contained in the file
+.Pa .windowrc
+in the user's home directory are
+executed.  If it does not exist, two equal sized windows spanning
+the terminal screen are created by default.
+.Pp
+The command line options are
+.Tw Fl
+.Tp Fl t
+Turn on terse mode (see
+.Ic terse
+command below).
+.Tp Fl f
+Fast.  Don't perform any startup action.
+.Tp Fl d
+Ignore
+.Pa .windowrc
+and create the two default
+windows instead.
+.Tp Cx Fl e
+.Cx \&\ \&
+.Ar escape-char
+.Cx
+Set the escape character to
+.Ar escape-char  .
+.Ar Escape-char
+can be a single character, or in the form
+.Ic ^X
+where
+.Ar X
+is any character, meaning
+.Cx control\-
+.Ar X  .
+.Cx
+.Tp Cx Fl c
+.Cx \&\ \&
+.Ar command
+.Cx
+Execute the string
+.Ar command
+as a long command (see below)
+before doing anything else.
+.Tp
+.Pp
 Windows can overlap and are framed as necessary.  Each window
 is named by one of the digits ``1'' to ``9''.  This one-character
 identifier, as well as a user definable label string, are displayed
 with the window on the top edge of its frame.  A window can be
 Windows can overlap and are framed as necessary.  Each window
 is named by one of the digits ``1'' to ``9''.  This one-character
 identifier, as well as a user definable label string, are displayed
 with the window on the top edge of its frame.  A window can be
-designated to be in the \fIforeground\fP, in which case it will always be
+designated to be in the
+.Ar foreground  ,
+in which case it will always be
 on top of all normal, non-foreground windows, and can be covered
 only by other foreground windows.  A window need not be completely
 within the edges of the terminal screen.  Thus a large window
 (possibly larger than the screen) may be positioned to show only
 a portion of its full size.
 on top of all normal, non-foreground windows, and can be covered
 only by other foreground windows.  A window need not be completely
 within the edges of the terminal screen.  Thus a large window
 (possibly larger than the screen) may be positioned to show only
 a portion of its full size.
-.PP
+.Pp
 Each window has a cursor and a set of control functions.  Most intelligent
 terminal operations such as line and
 character deletion and insertion are supported.  Display modes
 Each window has a cursor and a set of control functions.  Most intelligent
 terminal operations such as line and
 character deletion and insertion are supported.  Display modes
@@ -69,108 +102,128 @@ supported by the terminal.  In addition,
 similar to terminals with multiple pages of memory,
 each window has a text buffer which can have more lines than the window
 itself.
 similar to terminals with multiple pages of memory,
 each window has a text buffer which can have more lines than the window
 itself.
-.SH OPTIONS
-When \fIwindow\fP starts up, the commands (see long commands below)
-contained in the file \fI.windowrc\fP in the user's home directory are
-executed.  If it does not exist, two equal sized windows spanning
-the terminal screen are created by default.
-.PP
-The command line options are
-.TP
-.B \-t
-Turn on terse mode (see \fIterse\fP command below).
-.TP
-.B \-f
-Fast.  Don't perform any startup action.
-.TP
-.B \-d
-Ignore \fI.windowrc\fP and create the two default
-windows instead.
-.TP
-.B \-e escape-char
-Set the escape character to \fIescape-char\fP.  \fIEscape-char\fP
-can be a single character, or in the form \fI^X\fP where \fIX\fP
-is any character, meaning control-\fIX\fP.
-.TP
-.B \-c command
-Execute the string \fIcommand\fP as a long command (see below)
-before doing anything else.
-.SH "PROCESS ENVIRONMENT"
+.Ss Process Environment
 With each newly created window, a shell program is spawned with its
 process environment tailored to that window.  Its standard input,
 output, and diagnostic file descriptors are bound to one end of either
 With each newly created window, a shell program is spawned with its
 process environment tailored to that window.  Its standard input,
 output, and diagnostic file descriptors are bound to one end of either
-a pseudo-terminal (\fIpty\fP (4)) or a UNIX domain socket
-(\fIsocketpair\fP (4)).  If a pseudo-terminal is used, then its special
-characters and modes (see \fIstty\fP (1)) are copied from the physical
-terminal.  A \fItermcap\fP (5) entry tailored to this window is created
-and passed as environment (\fIenviron\fP (5)) variable
-\fITERMCAP\fP.  The termcap entry contains the window's size and
+a pseudo-terminal
+.Xr (pty 4 )
+or a UNIX domain socket
+.Xr (socketpair 4 ) .
+If a pseudo-terminal is used, then its special
+characters and modes (see
+.Xr stty 1 )
+are copied from the physical
+terminal.  A
+.Xr termcap 5
+entry tailored to this window is created
+and passed as environment
+.Xr (environ 5 )
+variable
+.Ev TERMCAP  .
+The termcap entry contains the window's size and
 characteristics as well as information from the physical terminal,
 such as the existence of underline, reverse video, and other display
 modes, and the codes produced by the terminal's function keys,
 if any.  In addition, the window size attributes of the pseudo-terminal
 are set to reflect the size of this window, and updated whenever
 characteristics as well as information from the physical terminal,
 such as the existence of underline, reverse video, and other display
 modes, and the codes produced by the terminal's function keys,
 if any.  In addition, the window size attributes of the pseudo-terminal
 are set to reflect the size of this window, and updated whenever
-it is changed by the user.  In particular, the editor \fIvi\fP (1) uses
+it is changed by the user.  In particular, the editor
+.Xr vi 1
+uses
 this information to redraw its display.
 this information to redraw its display.
-.SH OPERATION
-.PP
-During normal execution, \fIwindow\fP can be in one of two states:
+.Ss Operation
+During normal execution,
+.Nm window
+can be in one of two states:
 conversation mode and command mode.  In conversation mode, the
 terminal's real cursor is placed at the cursor position of a particular
 window--called the current window--and input from the keyboard is sent
 to the process in that window.  The current window is always
 on top of all other windows, except those in foreground.  In addition,
 it is set apart by highlighting its identifier and label in reverse video.
 conversation mode and command mode.  In conversation mode, the
 terminal's real cursor is placed at the cursor position of a particular
 window--called the current window--and input from the keyboard is sent
 to the process in that window.  The current window is always
 on top of all other windows, except those in foreground.  In addition,
 it is set apart by highlighting its identifier and label in reverse video.
-.PP
-Typing \fIwindow\fP's escape character (normally ^P) in conversation
+.Pp
+Typing
+.Cx Nm window
+.Cx 's
+.Cx
+escape character (normally
+.Ic ^P )
+in conversation
 mode switches it into command mode.  In command mode, the top line of
 mode switches it into command mode.  In command mode, the top line of
-the terminal screen becomes the command prompt window, and \fIwindow\fP
+the terminal screen becomes the command prompt window, and
+.Nm window
 interprets input from the keyboard as commands to manipulate windows.
 interprets input from the keyboard as commands to manipulate windows.
-.PP
+.Pp
 There are two types of commands: short commands are usually one or two
 key strokes; long commands are strings either typed by the user in the
 There are two types of commands: short commands are usually one or two
 key strokes; long commands are strings either typed by the user in the
-command window (see the ``:'' command below), or read from a file (see
-\fIsource\fP below).
-.SH "SHORT COMMANDS"
-Below, \fI#\fP represents one of the digits ``1'' to ``9''
-corresponding to the windows 1 to 9.  \fI^X\fP means control-\fIX\fP,
-where \fPX\fP is any character.  In particular, \fI^^\fP is
-control-^.  \fIEscape\fP is the escape key, or \fI^[\fP.
-.TP
-.B #
-Select window \fI#\fP as the current window
+command window (see the
+.Dq Ic \&:
+command below), or read from a file (see
+.Ic source
+below).
+.Ss Short Commands
+Below,
+.Ar #
+represents one of the digits ``1'' to ``9''
+corresponding to the windows 1 to 9.
+.Ic ^X
+means
+.Cx control\-
+.Ar X  ,
+.Cx
+where
+.Ar X
+is any character.  In particular,
+.Ic ^^
+is
+.Li control\-^.
+.Ar Escape
+is the escape key, or
+.Ic ^\&[
+.Tw Ds
+.Tp Ar #
+Select window
+.Ar #
+as the current window
 and return to conversation mode.
 and return to conversation mode.
-.TP
-.B %#
-Select window \fI#\fP but stay in command mode.
-.TP
-.B ^^
+.Tp Cx Ic %
+.Ar #
+.Cx
+Select window
+.Ar #
+but stay in command mode.
+.Tp Ic ^^
 Select the previous window and return to conversation
 mode.  This is useful for toggling between two windows.
 Select the previous window and return to conversation
 mode.  This is useful for toggling between two windows.
-.TP
-.B escape
+.Tp Ic escape
 Return to conversation mode.
 Return to conversation mode.
-.TP
-.B ^P
-Return to conversation mode and write ^P to the
-current window.  Thus, typing two ^P's in conversation
-mode sends one to the current window.  If the \fIwindow\fP
+.Tp Ic ^P
+Return to conversation mode and write
+.Ic ^P
+to the
+current window.  Thus, typing two
+.Cx Ic ^P
+.Cx \'s
+.Cx
+in conversation
+mode sends one to the current window.  If the
+.Nm window
 escape is changed to some other character, that
 escape is changed to some other character, that
-character takes the place of ^P here.
-.TP
-.B ?
+character takes the place of
+.Ic ^P
+here.
+.Tp Ic ?
 List a short summary of commands.
 List a short summary of commands.
-.TP
-.B ^L
-Redraw the screen.
-.TP
-.B q
-Exit \fIwindow\fP.  Confirmation is requested.
-.TP
-.B ^Z
-Suspend \fIwindow\fP.
-.TP
-.B w
+.Tp Ic ^L
+Refresh the screen.
+.Tp Ic q
+Exit
+.Nm window  .
+Confirmation is requested.
+.Tp Ic ^Z
+Suspend
+.Nm window  .
+.Tp Ic w
 Create a new window.  The user is prompted for the positions
 of the upper left and lower right corners of the window.
 The cursor is placed on the screen and the keys ``h'', ``j'',
 Create a new window.  The user is prompted for the positions
 of the upper left and lower right corners of the window.
 The cursor is placed on the screen and the keys ``h'', ``j'',
@@ -185,83 +238,98 @@ the placement of the new window is indicated by a rectangular
 box drawn on the screen, corresponding to where the new window
 will be framed.  Typing escape at any point
 cancels this command.
 box drawn on the screen, corresponding to where the new window
 will be framed.  Typing escape at any point
 cancels this command.
-.IP
+.Pp
 This window becomes the current window,
 and is given the first available ID.  The default buffer size
 This window becomes the current window,
 and is given the first available ID.  The default buffer size
-is used (see \fIdefault_nline\fP command below).
-.IP
+is used (see
+.Ar default_nline
+command below).
+.Pp
 Only fully visible windows can be created this way.
 Only fully visible windows can be created this way.
-.TP
-.B c#
-Close window \fI#\fP.  The process in the window is sent
-the hangup signal (see \fIkill\fP (1)).  \fICsh\fP (1) should
+.Tp Cx Ic c
+.Ar #
+.Cx
+Close window
+.Ar # .
+The process in the window is sent
+the hangup signal (see
+.Xr kill 1 ) .
+.Xr Csh 1
+should
 handle this signal correctly and cause no problems.
 handle this signal correctly and cause no problems.
-.TP
-.B m#
-Move window \fI#\fP to another location.  A box in the shape
+.Tp Cx Ic m
+.Ar #
+.Cx
+Move window
+.Ar #
+to another location.  A box in the shape
 of the window is drawn on
 the screen to indicate the new position of the window, and the same keys as
 of the window is drawn on
 the screen to indicate the new position of the window, and the same keys as
-those for the \fIw\fP command are used to position the box.  The
+those for the
+.Ic w
+command are used to position the box.  The
 window can be moved partially off-screen.
 window can be moved partially off-screen.
-.TP
-.B M#
-Move window \fI#\fP to its previous position.
-.TP
-.B s#
-Change the size of window \fI#\fP.  The user is prompted
+.Tp Cx Ic M
+.Ar #
+.Cx
+Move window
+.Ar #
+to its previous position.
+.Tp Cx Ic s
+.Ar #
+.Cx
+Change the size of window
+.Ar # .
+The user is prompted
 to enter the new lower right corner of the window.  A box
 is drawn to indicate the new window size.  The same
 to enter the new lower right corner of the window.  A box
 is drawn to indicate the new window size.  The same
-keys used in \fIw\fP and \fIm\fP are used to enter the position.
-.TP
-.B S#
-Change window \fI#\fP to its previous size.
-.TP
-.B ^Y
+keys used in
+.Ic w
+and
+.Ic m
+are used to enter the position.
+.Tp Cx Ic S
+.Ar #
+.Cx
+Change window
+.Ar #
+to its previous size.
+.Tp Ic ^Y
 Scroll the current window up by one line.
 Scroll the current window up by one line.
-.TP
-.B ^E
+.Tp Ic ^E
 Scroll the current window down by one line.
 Scroll the current window down by one line.
-.TP
-.B ^U
+.Tp Ic ^U
 Scroll the current window up by half the window size.
 Scroll the current window up by half the window size.
-.TP
-.B ^D
+.Tp Ic ^D
 Scroll the current window down by half the window size.
 Scroll the current window down by half the window size.
-.TP
-.B ^B
+.Tp Ic ^B
 Scroll the current window up by the full window size.
 Scroll the current window up by the full window size.
-.TP
-.B ^F
+.Tp Ic ^F
 Scroll the current window down by the full window size.
 Scroll the current window down by the full window size.
-.TP
-.B h
+.Tp Ic h
 Move the cursor of the current window left by one column.
 Move the cursor of the current window left by one column.
-.TP
-.B j
+.Tp Ic j
 Move the cursor of the current window down by one line.
 Move the cursor of the current window down by one line.
-.TP
-.B k
+.Tp Ic k
 Move the cursor of the current window up by one line.
 Move the cursor of the current window up by one line.
-.TP
-.B l
+.Tp Ic l
 Move the cursor of the current window right by one column.
 Move the cursor of the current window right by one column.
-.TP
-.B ^S
+.Tp Ic ^S
 Stop output in the current window.
 Stop output in the current window.
-.TP
-.B ^Q
+.Tp Ic ^Q
 Start output in the current window.
 Start output in the current window.
-.TP
-.B :
-Enter a line to be executed as long commands.  Normal line
-editing characters (erase character, erase word, erase line) are
-supported.
-.SH "LONG COMMANDS"
+.Tp Ic :
+Enter a line to be executed as long commands.
+Normal line
+editing characters (erase character, erase word, erase line)
+are supported.
+.Tp
+.Ss Long Commands
 Long commands are a sequence of statements
 parsed much like a programming language, with a syntax
 similar to that of C.  Numeric and string expressions and variables
 are supported, as well as conditional statements.
 Long commands are a sequence of statements
 parsed much like a programming language, with a syntax
 similar to that of C.  Numeric and string expressions and variables
 are supported, as well as conditional statements.
-.PP
+.Pp
 There are two data types: string and number.  A string is a sequence
 of letters or digits beginning with a letter.  ``_'' and ``.'' are
 considered letters.  Alternately, non-alphanumeric characters can
 There are two data types: string and number.  A string is a sequence
 of letters or digits beginning with a letter.  ``_'' and ``.'' are
 considered letters.  Alternately, non-alphanumeric characters can
@@ -270,314 +338,904 @@ with ``\\''.  In addition, the ``\\'' sequences of C are supported,
 both inside and outside quotes (e.g., ``\\n'' is a new line,
 ``\\r'' a carriage return).  For example, these are legal strings:
 abcde01234, "&#$^*&#", ab"$#"cd, ab\\$\\#cd, "/usr/ucb/window".
 both inside and outside quotes (e.g., ``\\n'' is a new line,
 ``\\r'' a carriage return).  For example, these are legal strings:
 abcde01234, "&#$^*&#", ab"$#"cd, ab\\$\\#cd, "/usr/ucb/window".
-.PP
+.Pp
 A number is an integer value in one of three forms:
 a decimal number, an octal number preceded by ``0'',
 or a hexadecimal number preceded by ``0x'' or ``0X''.  The natural
 machine integer size is used (i.e., the signed integer type
 of the C compiler).  As in C, a non-zero number represents
 a boolean true.
 A number is an integer value in one of three forms:
 a decimal number, an octal number preceded by ``0'',
 or a hexadecimal number preceded by ``0x'' or ``0X''.  The natural
 machine integer size is used (i.e., the signed integer type
 of the C compiler).  As in C, a non-zero number represents
 a boolean true.
-.PP
+.Pp
 The character ``#'' begins a comment which terminates at the
 end of the line.
 The character ``#'' begins a comment which terminates at the
 end of the line.
-.PP
+.Pp
 A statement is either a conditional or an expression.  Expression
 statements are terminated with a new line or ``;''.  To continue
 an expression on the next line, terminate the first line with ``\\''.
 A statement is either a conditional or an expression.  Expression
 statements are terminated with a new line or ``;''.  To continue
 an expression on the next line, terminate the first line with ``\\''.
-.SH "CONDITIONAL STATEMENT"
-\fIWindow\fP has a single control structure:
+.Ss Conditional Statement
+.Nm Window
+has a single control structure:
 the fully bracketed if statement in the form
 the fully bracketed if statement in the form
-.nf
-       if <expr> then
-               <statement>
-               . . .
-       elsif <expr> then
-               <statement>
-               . . .
-       else
-               <statement>
-               . . .
-       endif
-.fi
-The \fIelse\fP and \fIelsif\fP parts are optional, and the latter can
-be repeated any number of times.  \fI<Expr>\fP must be numeric.
-.SH EXPRESSIONS
-Expressions in \fIwindow\fP are similar to those in the
+.Pp
+.Ds I
+if <expr> then
+\t<statement>
+\t...
+elsif <expr> then
+\t<statement>
+\t...
+else
+\t<statement>
+\t...
+endif
+.De
+.Pp
+The
+.Ic else
+and
+.Ic elsif
+parts are optional, and the latter can
+be repeated any number of times.
+<Expr>
+must be numeric.
+.Ss Expressions
+Expressions in
+.Nm window
+are similar to those in the
 C language, with most C operators supported on numeric
 operands.  In addition, some are overloaded to operate on strings.
 C language, with most C operators supported on numeric
 operands.  In addition, some are overloaded to operate on strings.
-.PP
+.Pp
 When an expression is used as a statement, its value is discarded
 after evaluation.  Therefore, only expressions with side
 effects (assignments and function calls) are useful as statements.
 When an expression is used as a statement, its value is discarded
 after evaluation.  Therefore, only expressions with side
 effects (assignments and function calls) are useful as statements.
-.PP
+.Pp
 Single valued (no arrays) variables are supported, of both
 numeric and string values.  Some variables are predefined.  They
 are listed below.
 Single valued (no arrays) variables are supported, of both
 numeric and string values.  Some variables are predefined.  They
 are listed below.
-.PP
+.Pp
 The operators in order of increasing precedence:
 The operators in order of increasing precedence:
-.TP
-.B <expr1> = <expr2>
-Assignment.  The variable of name \fI<expr1>\fP, which must be string valued,
-is assigned the result of \fI<expr2>\fP.  Returns the value of \fI<expr2>\fP.
-.TP
-.B <expr1> ? <expr2> : <expr3>
-Returns the value of \fI<expr2>\fP if \fI<expr1>\fP evaluates true
-(non-zero numeric value); returns the value of \fI<expr3>\fP otherwise.  Only
-one of \fI<expr2>\fP and \fI<expr3>\fP is evaluated.  \fI<Expr1>\fP must
+.Tw Fl
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic =
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >
+.Cx
+Assignment.  The variable of name
+.Cx <
+.Va expr1
+.Cx >,
+.Cx
+which must be string valued,
+is assigned the result of
+.Cx <
+.Va expr2
+.Cx >.
+.Cx
+Returns the value of
+.Cx <
+.Va expr2
+.Cx >.
+.Cx
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic ?
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >
+.Cx \&\ \&
+.Ic :
+.Cx \&\ \&
+.Cx <
+.Va expr3
+.Cx >
+.Cx
+Returns the value of
+.Cx <
+.Va expr2
+.Cx >
+.Cx
+if
+.Cx <
+.Va expr1
+.Cx >
+.Cx
+evaluates true
+(non-zero numeric value); returns the value of
+.Cx <
+.Va expr3
+.Cx >
+.Cx
+otherwise.  Only
+one of
+.Cx <
+.Va expr2
+.Cx >
+.Cx
+and
+.Cx <
+.Va expr3
+.Cx >
+.Cx
+is evaluated.
+.Cx <
+.Va Expr1
+.Cx >
+.Cx
+must
 be numeric.
 be numeric.
-.TP
-.B <expr1> || <expr2>
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic \&|\&|
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >
+.Cx
 Logical or.  Numeric values only.  Short circuit evaluation is supported
 Logical or.  Numeric values only.  Short circuit evaluation is supported
-(i.e., if \fI<expr1>\fP evaluates true, then \fI<expr2>\fP is not evaluated).
-.TP
-.B <expr1> && <expr2>
+(i.e., if
+.Cx <
+.Va expr1
+.Cx >
+.Cx
+evaluates true, then
+.Cx <
+.Va expr2
+.Cx >
+.Cx
+is not evaluated).
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic \&&\&&
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >
+.Cx
 Logical and with short circuit evaluation.  Numeric values only.
 Logical and with short circuit evaluation.  Numeric values only.
-.TP
-.B <expr1> | <expr2>
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic \&|
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >
+.Cx
 Bitwise or.  Numeric values only.
 Bitwise or.  Numeric values only.
-.TP
-.B <expr1> ^ <expr2>
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic ^
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >
+.Cx
 Bitwise exclusive or.  Numeric values only.
 Bitwise exclusive or.  Numeric values only.
-.TP
-.B <expr1> & <expr2>
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic \&&
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >
+.Cx
 Bitwise and.  Numeric values only.
 Bitwise and.  Numeric values only.
-.TP
-.B <expr1> == <expr2>, <expr1> != <expr2>
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic =
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >,
+.Cx \&\ \&
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic !=
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >
+.Cx
 Comparison (equal and not equal, respectively).  The boolean
 result (either 1 or 0) of the comparison is returned.  The
 operands can be numeric or string valued.  One string operand
 forces the other to be converted to a string in necessary.
 Comparison (equal and not equal, respectively).  The boolean
 result (either 1 or 0) of the comparison is returned.  The
 operands can be numeric or string valued.  One string operand
 forces the other to be converted to a string in necessary.
-.TP
-.B <expr1> < <expr2>, <expr1> > <expr2>, <expr1> <= <expr2>, <expr1> >= <expr2>
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic <
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >,
+.Cx \&\ \&
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic >
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >,
+.Cx \&\ \&
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic <=
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >,
+.Cx
 Less than, greater than, less than or equal to,
 greater than or equal to.  Both numeric and string values, with
 automatic conversion as above.
 Less than, greater than, less than or equal to,
 greater than or equal to.  Both numeric and string values, with
 automatic conversion as above.
-.TP
-.B <expr1> << <expr2>, <expr1> >> <expr2>
-If both operands are numbers, \fI<expr1>\fP is bit
-shifted left (or right) by \fI<expr2>\fP bits.  If \fI<expr1>\fP is
-a string, then its first (or last) \fI<expr2>\fP characters are
-returns (if \fI<expr2>\fP is also a string, then its length is used
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic <<
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >,
+.Cx \&\ \&
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic >>
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >
+.Cx
+If both operands are numbers,
+.Cx <
+.Va expr1
+.Cx >
+.Cx
+is bit
+shifted left (or right) by
+.Cx <
+.Va expr2
+.Cx >
+.Cx
+bits.  If
+.Cx <
+.Va expr1
+.Cx >
+.Cx
+is
+a string, then its first (or last)
+.Cx <
+.Va expr2
+.Cx >
+.Cx
+characters are
+returns (if
+.Cx <
+.Va expr2
+.Cx >
+.Cx
+is also a string, then its length is used
 in place of its value).
 in place of its value).
-.TP
-.B <expr1> + <expr2>, <expr1> - <expr2>
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic +
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >,
+.Cx \&\ \&
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic -
+.Cx \&\ \&
+.Cx <
+.Va expr2
+.Cx >
+.Cx
 Addition and subtraction on numbers.  For ``+'', if one
 argument is a string, then the other is converted to a string,
 and the result is the concatenation of the two strings.
 Addition and subtraction on numbers.  For ``+'', if one
 argument is a string, then the other is converted to a string,
 and the result is the concatenation of the two strings.
-.TP
-.B <expr1> * <expr2>, <expr1> / <expr2>, <expr1> % <expr2>
+.Tp Cx <
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic \&*
+.Cx \&\ \&<
+.Va expr2
+.Cx >,
+.Cx \&\ \&<
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic \&/
+.Cx \&\ \&<
+.Va expr2
+.Cx >,\&\ \&<
+.Va expr1
+.Cx >,
+.Cx \&\ \&<
+.Va expr1
+.Cx >
+.Cx \&\ \&
+.Ic \&%
+.Cx \&\ \&<
+.Va expr2
+.Cx >
+.Cx
 Multiplication, division, modulo.  Numbers only.
 Multiplication, division, modulo.  Numbers only.
-.TP
-.B -<expr>, ~<expr>, !<expr>, $<expr>, $?<expr>
+.Tp Cx <
+.Va expr
+.Cx >,
+.Cx \&\ \&
+.Ic ~
+.Cx <
+.Va expr
+.Cx >,
+.Cx \&\ \&
+.Ic \&!
+.Cx <
+.Va expr
+.Cx >,
+.Cx \&\ \&
+.Ic \&$
+.Cx <
+.Va expr
+.Cx >,
+.Cx \&\ \&
+.Ic \&$?
+.Cx <
+.Va expr
+.Cx >
+.Cx
 The first three are unary minus, bitwise complement and logical complement
 The first three are unary minus, bitwise complement and logical complement
-on numbers only.  The operator, ``$'', takes \fI<expr>\fP and returns
-the value of the variable of that name.  If \fI<expr>\fP is numeric
-with value \fIn\fP and it appears within an alias macro (see below),
+on numbers only.  The operator, ``$'', takes
+.Cx <
+.Va expr
+.Cx >
+.Cx
+and returns
+the value of the variable of that name.  If
+.Cx <
+.Va expr
+.Cx >
+.Cx
+is numeric
+with value
+.Ar n
+and it appears within an alias macro (see below),
 then it refers to the nth argument of the alias invocation.  ``$?''
 then it refers to the nth argument of the alias invocation.  ``$?''
-tests for the existence of the variable \fI<expr>\fP, and returns 1
+tests for the existence of the variable
+.Cx <
+.Va expr
+.Cx >,
+.Cx
+and returns 1
 if it exists or 0 otherwise.
 if it exists or 0 otherwise.
-.TP
-.B <expr>(<arglist>)
-Function call.  \fI<Expr>\fP must be a string that is the unique
-prefix of the name of a builtin \fIwindow\fP function
+.Tp Cx <
+.Va expr
+.Cx >(<
+.Ar arglist
+.Cx >)
+.Cx
+Function call.
+.Cx <
+.Va Expr
+.Cx >
+.Cx
+must be a string that is the unique
+prefix of the name of a builtin
+.Nm window
+function
 or the full name of a user defined alias macro.  In the case of a builtin
 or the full name of a user defined alias macro.  In the case of a builtin
-function, \fI<arglist>\fP can be in one of two forms:
-.br
-       <expr1>, <expr2>, . . .
-.br
-       argname1 = <expr1>, argname2 = <expr2>, . . .
-.br
+function,
+.Cx <
+.Ar arglist
+.Cx >
+.Cx
+can be in one of two forms:
+.Dl <expr1>, <expr2>, ...
+.Dl argname1 = <expr1>, argname2 = <expr2>, ...
 The two forms can in fact be intermixed, but the result is
 unpredictable.  Most arguments can be omitted; default values will
 The two forms can in fact be intermixed, but the result is
 unpredictable.  Most arguments can be omitted; default values will
-be supplied for them.  The \fIargnames\fP can be unique prefixes
+be supplied for them.  The
+.Ar argnames
+can be unique prefixes
 of the the argument names.  The commas separating
 arguments are used only to disambiguate, and can usually be omitted.
 of the the argument names.  The commas separating
 arguments are used only to disambiguate, and can usually be omitted.
-.IP
+.Pp
 Only the first argument form is valid for user defined aliases.  Aliases
 Only the first argument form is valid for user defined aliases.  Aliases
-are defined using the \fIalias\fP builtin function (see below).  Arguments
+are defined using the
+.Ic alias
+builtin function (see below).  Arguments
 are accessed via a variant of the variable mechanism (see ``$'' operator
 above).
 are accessed via a variant of the variable mechanism (see ``$'' operator
 above).
-.IP
+.Pp
 Most functions return value, but some are used for side effect
 only and so must be used as statements.  When a function or an alias is used
 as a statement, the parenthesis surrounding
 the argument list may be omitted.  Aliases return no value.
 Most functions return value, but some are used for side effect
 only and so must be used as statements.  When a function or an alias is used
 as a statement, the parenthesis surrounding
 the argument list may be omitted.  Aliases return no value.
-.SH "BUILTIN FUNCTIONS"
+.Tp
+.Ss  Builtin Functions
 The arguments are listed by name in their natural
 The arguments are listed by name in their natural
-order.  Optional arguments are in square brackets (``[ ]'').  Arguments
-that have no names are in angle brackets (``<>'').
-An argument meant to be a boolean flag (often named \fIflag\fP)
-can be one of \fIon\fP, \fIoff\fP, \fIyes\fP, \fIno\fP, \fItrue\fP,
-or \fIfalse\fP, with obvious meanings, or it can be a numeric expression,
+order.  Optional arguments are in square brackets
+.Sq Op .
+Arguments
+that have no names are in angle brackets
+.Sq <> .
+An argument meant to be a boolean flag (often named
+.Ar flag )
+can be one of
+.Ar on ,
+.Ar off ,
+.Ar yes ,
+.Ar no ,
+.Ar true ,
+or
+.Ar false ,
+with
+obvious meanings, or it can be a numeric expression,
 in which case a non-zero value is true.
 in which case a non-zero value is true.
-.TP
-.B alias([<string>], [<string-list>])
+.Tw Fl
+.Tp Cx Ic alias
+.Cx \&([<
+.Ar string
+.Cx ]>,
+.Cx \&\ \&[<
+.Ar  string\-list
+.Cx >]\&)
+.Cx
 If no argument is given, all currently defined alias macros are
 If no argument is given, all currently defined alias macros are
-listed.  Otherwise, \fI<string>\fP is defined as an alias,
-with expansion \fI<string-list>\fP.  The previous definition of
-\fI<string>\fP, if any, is returned.  Default for \fI<string-list>\fP
+listed.  Otherwise,
+.Cx <
+.Ar string
+.Cx >
+.Cx
+is defined as an alias,
+with expansion
+.Cx <
+.Ar string\-list
+.Cx > .
+.Cx
+The previous definition of
+.Cx <
+.Ar string
+.Cx >,
+.Cx
+if any, is returned.  Default for
+.Cx <
+.Ar string\-list
+.Cx >
+.Cx
 is no change.
 is no change.
-.TP
-.B close(<window-list>)
-Close the windows specified in \fI<window-list>\fP.  If \fI<window-list>\fP
-is the word \fIall\fP, than all windows are closed.  No value is returned.
-.TP
-.B cursormodes([modes])
-Set the window cursor to \fImodes\fP.  \fIModes\fP is the bitwise
-or of the mode bits defined as the variables \fIm_ul\fP (underline),
-\fIm_rev\fP (reverse video), \fIm_blk\fP (blinking),
-and \fIm_grp\fP (graphics, terminal dependent).  Return
+.Tp Cx Ic close
+.Cx (<
+.Ar window\-list
+.Cx >)
+.Cx
+Close the windows specified in
+.Cx <
+.Ar window\-list
+.Cx >.
+.Cx
+If
+.Cx <
+.Ar window\-list
+.Cx >
+.Cx
+is the word
+.Ar all  ,
+than all windows are closed.  No value is returned.
+.Tp Cx Ic cursormodes
+.Cx \&(
+.Op Ar modes
+.Cx \&)
+.Cx
+Set the window cursor to
+.Ar modes  .
+.Ar Modes
+is the bitwise
+or of the mode bits defined as the variables
+.Ar m_ul
+(underline),
+.Ar m_rev
+(reverse video),
+.Ar m_blk
+(blinking),
+and
+.Ar m_grp
+(graphics, terminal dependent).  Return
 value is the previous modes.  Default is no change.
 value is the previous modes.  Default is no change.
-For example, cursor($m_rev|$m_blk) sets the window cursors to blinking
+For example,
+.Li cursor($m_rev$m_blk)
+sets the window cursors to blinking
 reverse video.
 reverse video.
-.TP
-.B default_nline([nline])
-Set the default buffer size to \fInline\fP.  Initially, it is
+.Tp Cx Ic default_nline
+.Cx \&(
+.Op Ar nline
+.Cx \&)
+.Cx
+Set the default buffer size to
+.Ar nline  .
+Initially, it is
 48 lines.  Returns the old default buffer size.  Default is
 no change.  Using a very large buffer can slow the program down
 considerably.
 48 lines.  Returns the old default buffer size.  Default is
 no change.  Using a very large buffer can slow the program down
 considerably.
-.TP
-.B default_shell([<string-list>])
-Set the default window shell program to \fI<string-list>\fP.  Returns
+.Tp Cx Ic default_shell
+.Cx \&([<
+.Ar string\-list
+.Cx >]\&)
+.Cx
+Set the default window shell program to
+.Cx <
+.Ar string\-list
+.Cx >.
+.Cx
+Returns
 the first string in the old shell setting.  Default is no change.  Initially,
 the first string in the old shell setting.  Default is no change.  Initially,
-the default shell is taken from the environment variable \fISHELL\fP.
-.TP
-.B default_smooth([flag])
-Set the default value of the \fIsmooth\fP argument
-to the command \fIwindow\fP (see below).  The argument
-is a boolean flag (one of \fIon\fP, \fIoff\fP,
-\fIyes\fP, \fIno\fP, \fItrue\fP, \fIfalse\fP, or a number,
+the default shell is taken from the environment variable
+.Ev SHELL  .
+.Tp Cx Ic default_smooth
+.Cx \&(
+.Op Ar flag
+.Cx \&)
+.Cx
+Set the default value of the
+.Ar smooth
+argument
+to the command
+.Nm window
+(see below).  The argument
+is a boolean flag (one of
+.Ar on  ,
+.Ar off  ,
+.Ar yes  ,
+.Ar no  ,
+.Ar true  ,
+.Ar false  ,
+or a number,
 as described above).  Default is no change.
 The old value (as a number) is returned.
 The initial value is 1 (true).
 as described above).  Default is no change.
 The old value (as a number) is returned.
 The initial value is 1 (true).
-.TP
-.B echo([window], [<string-list>])
-Write the list of strings, \fI<string-list>\fP, to \fIwindow\fP, separated
+.Tp Cx Ic echo
+.Cx \&(
+.Op Ar window
+.Cx \&,\&\ \&[<
+.Ar string\-list
+.Cx >]\&)
+.Cx
+Write the list of strings,
+.Cx <
+.Ar string-list
+.Cx >,
+.Cx
+to
+.Nm window  ,
+separated
 by spaces and terminated with a new line.  The strings are only
 displayed in the window, the processes in the window are not
 by spaces and terminated with a new line.  The strings are only
 displayed in the window, the processes in the window are not
-involved (see \fIwrite\fP below).  No value is returned.  Default
+involved (see
+.Ic write
+below).  No value is returned.  Default
 is the current window.
 is the current window.
-.TP
-.B escape([escapec])
-Set the escape character to \fIescape-char\fP.  Returns the old
+.Tp Cx Ic escape
+.Cx \&(
+.Op Ar escapec
+.Cx \&)
+.Cx
+Set the escape character to
+.Ar escape-char  .
+Returns the old
 escape character as a one-character string.  Default is no
 escape character as a one-character string.  Default is no
-change.  \fPEscapec\fP can be a string of a single character, or
-in the form \fI^X\fP, meaning control-\fIX\fP.
-.TP
-.B foreground([window], [flag])
-Move \fIwindow\fP in or out of foreground.  \fIFlag\fP
+change.
+.Ar Escapec
+can be a string of a single character, or
+in the form
+.Fl ^X ,
+meaning
+Cx control\-
+.Ar X
+.Cx .
+.Cx
+.Tp Cx Ic foreground
+.Cx \&(
+.Op Ar window
+.Cx \&,
+.Op Ar flag
+.Cx \&)
+.Cx
+Move
+.Nm window
+in or out of foreground.
+.Ar Flag
 is a boolean value.  The old foreground flag
 is a boolean value.  The old foreground flag
-is returned.  Default for \fIwindow\fP is the current window,
-default for \fIflag\fP is no change.
-.TP
-.B label([window], [label])
-Set the label of \fIwindow\fP to \fIlabel\fP.  Returns the old
-label as a string.  Default for \fIwindow\fP is the current
-window, default for \fIlabel\fP is no change.  To turn
+is returned.  Default for
+.Nm window
+is the current window,
+default for
+.Ar flag
+is no change.
+.Tp Cx Ic label
+.Cx \&(
+.Op Ar window
+.Cx \&,
+.Op Ar label
+.Cx \&)
+.Cx
+Set the label of
+.Nm window
+to
+.Ar label  .
+Returns the old
+label as a string.  Default for
+.Nm window
+is the current
+window, default for
+.Ar label
+is no change.  To turn
 off a label, set it to an empty string ("").
 off a label, set it to an empty string ("").
-.TP
-.B list()
+.Tp Cx Ic list
+.Cx \&( \&)
+.Cx
 No arguments.  List the identifiers and labels of all windows.  No
 value is returned.
 No arguments.  List the identifiers and labels of all windows.  No
 value is returned.
-.TP
-.B select([window])
-Make \fIwindow\fP the current window.  The previous current window
+.Tp Cx Ic select
+.Cx \&(
+.Op Ar window
+.Cx \&)
+.Cx
+Make
+.Nm window
+the current window.  The previous current window
 is returned.  Default is no change.
 is returned.  Default is no change.
-.TP
-.B source(filename)
-Read and execute the long commands in \fIfilename\fP.  Returns
--1 if the file cannot be read, 0 otherwise.
-.TP
-.B terse([flag])
-Set terse mode to \fIflag\fP.  In terse mode, the command window
+.Tp Cx Ic source
+.Cx \&(
+.Ar filename
+.Cx \&)
+.Cx
+Read and execute the long commands in
+.Ar filename  .
+Returns -1 if the file cannot be read, 0 otherwise.
+.Tp Cx Ic terse
+.Cx \&(
+.Op flag
+.Cx \&)
+.Cx
+Set terse mode to
+.Ar flag  .
+In terse mode, the command window
 stays hidden even in command mode, and errors are reported by
 stays hidden even in command mode, and errors are reported by
-sounding the terminal's bell.  \fIFlag\fP can take on the same
-values as in \fIforeground\fP above.  Returns the old terse flag.
+sounding the terminal's bell.
+.Ar Flag
+can take on the same
+values as in
+.Ar foreground
+above.  Returns the old terse flag.
 Default is no change.
 Default is no change.
-.TP
-.B unalias(alias)
-Undefine \fIalias\fP.  Returns -1 if \fIalias\fP does not exist,
+.Tp Cx Ic unalias
+.Cx \&(
+.Ar alias
+.Cx \&)
+.Cx
+Undefine
+.Ar alias  .
+Returns -1 if
+.Ar alias
+does not exist,
 0 otherwise.
 0 otherwise.
-.TP
-.B unset(variable)
-Undefine \fIvariable\fP.  Returns -1 if \fIvariable\fP does not exist,
+.Tp Cx Ic unset
+.Cx \&(
+.Ar variable
+.Cx \&)
+.Cx
+Undefine
+.Ar variable  .
+Returns -1 if
+.Ar variable
+does not exist,
 0 otherwise.
 0 otherwise.
-.TP
-.B variables()
+.Tp Cx Ic variables
+.Cx \&( \&)
+.Cx
 No arguments.  List all variables.  No value is returned.
 No arguments.  List all variables.  No value is returned.
-.TP
-.B window([row], [column], [nrow], [ncol], [nline], [label],
-.B [pty], [frame], [mapnl], [keepopen], [smooth], [shell])
-.br
-Open a window with upper left corner at \fIrow\fP, \fIcolumn\fP
-and size \fInrow\fP, \fIncol\fP.  If \fInline\fP is specified,
+.Tp Cx Ic window
+.Cx \&(
+.Op Ar row
+.Cx \&,
+.Cx \&\ \&
+.Op Ar column
+.Cx \&,
+.Cx \&\ \&
+.Op Ar nrow
+.Cx \&,
+.Cx \&\ \&
+.Op Ar ncol
+.Cx \&,
+.Cx \&\ \&
+.Op Ar nline
+.Cx \&,
+.Cx \&\ \&
+.Op Ar label
+.Cx \&,
+.Cx \&\ \&
+.Cx Op Ar pty
+.Cx \&,
+.Cx
+.Op Ar frame
+.Cx \&,
+.Cx \&\ \&
+.Op Ar mapnl
+.Cx \&,
+.Cx \&\ \&
+.Op Ar keepopen
+.Cx \&,
+.Cx \&\ \&
+.Op Ar smooth
+.Cx \&,
+.Cx \&\ \&
+.Op Ar shell
+.Cx \&).
+.Cx
+Open a window with upper left corner at
+.Ar row  ,
+.Ar column
+and size
+.Ar nrow  ,
+.Ar ncol  .
+If
+.Ar nline
+is specified,
 then that many lines are allocated for the text buffer.  Otherwise,
 the default buffer size is used.  Default values for
 then that many lines are allocated for the text buffer.  Otherwise,
 the default buffer size is used.  Default values for
-\fIrow\fP, \fIcolumn\fP, \fInrow\fP, and \fIncol\fP are, respectively,
+.Ar row  ,
+.Ar column  ,
+.Ar nrow  ,
+and
+.Ar ncol
+are, respectively,
 the upper, left-most, lower, or right-most extremes of the
 the upper, left-most, lower, or right-most extremes of the
-screen.  \fILabel\fP is the label string.
-\fIFrame\fP, \fIpty\fP, and \fImapnl\fP are flag values
-interpreted in the same way as the argument to \fIforeground\fP (see above);
+screen.
+.Ar Label
+is the label string.
+.Ar Frame  ,
+.Ar pty  ,
+and
+.Ar mapnl
+are flag values
+interpreted in the same way as the argument to
+.Ar foreground
+(see above);
 they mean, respectively, put a frame around this window (default true),
 allocate pseudo-terminal for this window rather than socketpair (default
 true), and map new line characters in this window to carriage return
 and line feed (default true if socketpair is used, false otherwise).
 Normally, a window is automatically closed when its process
 they mean, respectively, put a frame around this window (default true),
 allocate pseudo-terminal for this window rather than socketpair (default
 true), and map new line characters in this window to carriage return
 and line feed (default true if socketpair is used, false otherwise).
 Normally, a window is automatically closed when its process
-exits.  Setting \fIkeepopen\fP to true (default false) prevents this
-action.  When \fIsmooth\fP is true, the screen is updated more frequently
+exits.  Setting
+.Ar keepopen
+to true (default false) prevents this
+action.  When
+.Ar smooth
+is true, the screen is updated more frequently
 (for this window) to produce a more terminal-like behavior.
 (for this window) to produce a more terminal-like behavior.
-The default value of \fIsmooth\fP is set by the \fIdefault_smooth\fP
+The default value of
+.Ar smooth
+is set by the
+.Ar default_smooth
 command (see above).
 command (see above).
-\fIShell\fP is a list of strings that will be used as the shell
+.Ar Shell
+is a list of strings that will be used as the shell
 program to place in the window (default is the program specified
 program to place in the window (default is the program specified
-by \fIdefault_shell\fP, see above).  The created window's identifier
+by
+.Ar default_shell  ,
+see above).  The created window's identifier
 is returned as a number.
 is returned as a number.
-.TP
-.B write([window], [<string-list>])
-Send the list of strings, \fI<string-list>\fP, to \fIwindow\fP, separated
+.Tp Cx Ic write
+.Cx \&(
+.Op Ar window
+.Cx \&,\&\ \&[<
+.Ar string\-list
+.Cx >]\&)
+.Cx
+Send the list of strings,
+.Cx <
+.Ar string-list
+.Cx >,
+.Cx
+to
+.Nm window  ,
+separated
 by spaces but not terminated with a new line.  The strings are actually
 given to the window as input.  No value is returned.  Default
 is the current window.
 by spaces but not terminated with a new line.  The strings are actually
 given to the window as input.  No value is returned.  Default
 is the current window.
-.SH "PREDEFINED VARIABLES"
+.Tp
+.Ss Predefined Variables
 These variables are for information only.  Redefining them does
 These variables are for information only.  Redefining them does
-not affect the internal operation of \fIwindow\fP.
-.TP
-.B baud
+not affect the internal operation of
+.Nm window  .
+.Tw Fl
+.Tp Ar baud
 The baud rate as a number between 50 and 38400.
 The baud rate as a number between 50 and 38400.
-.TP
-.B modes
+.Tp Ar modes
 The display modes (reverse video, underline, blinking, graphics)
 The display modes (reverse video, underline, blinking, graphics)
-supported by the physical terminal.  The value of \fImodes\fP is
-the bitwise or of some of the one bit values, \fIm_blk\fP, \fIm_grp\fP,
-\fIm_rev\fP, and \fIm_ul\fP (see below).  These values are useful
-in setting the window cursors' modes (see \fIcursormodes\fP above).
-.TP
-.B m_blk
+supported by the physical terminal.  The value of
+.Ar modes
+is the bitwise or of some of the one bit values,
+.Ar m_blk ,
+.Ar m_grp ,
+.Ar m_rev ,
+and
+.Ar m_ul
+(see below).
+These values are useful
+in setting the window cursors' modes (see
+.Ar cursormodes
+above).
+.Tp Ar m_blk
 The blinking mode bit.
 The blinking mode bit.
-.TP
-.B m_grp
+.Tp Ar m_grp
 The graphics mode bit (not very useful).
 The graphics mode bit (not very useful).
-.TP
-.B m_rev
+.Tp Ar m_rev
 The reverse video mode bit.
 The reverse video mode bit.
-.TP
-.B m_ul
+.Tp Ar m_ul
 The underline mode bit.
 The underline mode bit.
-.TP
-.B ncol
+.Tp Ar ncol
 The number of columns on the physical screen.
 The number of columns on the physical screen.
-.TP
-.B nrow
+.Tp Ar nrow
 The number of rows on the physical screen.
 The number of rows on the physical screen.
-.TP
-.B term
+.Tp Ar term
 The terminal type.  The standard name, found in the second name
 The terminal type.  The standard name, found in the second name
-field of the terminal's \fITERMCAP\fP entry, is used.
-.SH FILES
-.ta 15
-~/.windowrc    startup command file.
-.br
-/dev/[pt]ty[p-t]?      pseudo-terminal devices.
-.SH DIAGNOSTICS
+field of the terminal's
+.Ev TERMCAP
+entry, is used.
+.Sh ENVIRONMENT
+.Nm Window
+utilizes these environment variables:
+.Ev HOME ,
+.Ev SHELL ,
+.Ev TERM ,
+.Ev TERMCAP ,
+.Ev WINDOW_ID .
+.Sh FILES
+.Dw /dev/[pt]ty[pq]?
+.Di L
+.Dp Pa ~/.windowrc
+startup command file.
+.Dp Cx Pa /dev/
+.Op Pa pt
+.Cx ty
+.Op Pa pq
+.Cx ?
+.Cx
+pseudo-terminal devices.
+.Dp
+.Sh HISTORY
+.Nm window
+appeared in 4.3 BSD.
+.Sh DIAGNOSTICS
 Should be self explanatory.
 Should be self explanatory.
-.SH BUGS