-.\" $OpenBSD: audioctl.1,v 1.8 2000/03/04 20:41:44 aaron Exp $
+.\" $OpenBSD: audioctl.1,v 1.9 2000/03/10 19:07:21 aaron Exp $
.\" $NetBSD: audioctl.1,v 1.7 1998/04/27 16:55:23 augustss Exp $
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
.Pp
.Dl (audioctl -f /dev/stdout -w blocksize=1024; cat file.au) > /dev/audio
.Sh ENVIRONMENT
+The following environment variables affect the execution of
+.Nm audioctl :
.Bl -tag -width AUDIOCTLDEVICE
.It Ev AUDIOCTLDEVICE
-The audio control device to use.
+Audio control device to use.
+.El
.Sh FILES
.Bl -tag -width /dev/audioctl
.It Pa /dev/audioctl
-.\" $OpenBSD: logname.1,v 1.7 1999/07/02 20:11:45 aaron Exp $
+.\" $OpenBSD: logname.1,v 1.8 2000/03/10 19:07:20 aaron Exp $
.\" $NetBSD: logname.1,v 1.5 1995/07/25 18:31:12 jtc Exp $
.\"
.\" Copyright (c) 1991, 1993
The
.Nm
utility writes the user's login name to standard output followed by
-a newline.
+a newline
+.Pq Ql \en .
.Pp
The
.Nm
-.\" $OpenBSD: look.1,v 1.7 2000/03/06 03:17:39 aaron Exp $
+.\" $OpenBSD: look.1,v 1.8 2000/03/10 19:07:20 aaron Exp $
.\" $NetBSD: look.1,v 1.3 1994/12/23 01:10:59 jtc Exp $
.\"
.\" Copyright (c) 1990, 1993
.Ar file
is not specified, the file
.Pa /usr/share/dict/words
-is used. Only alphanumeric characters are compared and the case of
+is used.
+Only alphanumeric characters are compared and the case of
alphabetic characters is ignored.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl d
-Dictionary character set and order, i.e. only alphanumeric characters
+Dictionary character set and order, i.e., only alphanumeric characters
are compared.
.It Fl f
Ignore the case of alphabetic characters.
.It Fl t Ar termchar
-Specify a string termination character, i.e. only the characters
+Specify a string termination character, i.e., only the characters
in
.Ar string
up to and including the first occurrence of
The
.Nm
utility exits 0 if one or more lines were found and displayed,
-1 if no lines were found, and >1 if an error occurred.
+1 if no lines were found, or >1 if an error occurred.
.Sh FILES
.Bl -tag -width /usr/share/dict/words -compact
.It Pa /usr/share/dict/words
-.\" $OpenBSD: lorder.1,v 1.3 1998/09/26 19:55:02 aaron Exp $
+.\" $OpenBSD: lorder.1,v 1.4 2000/03/10 19:07:20 aaron Exp $
.\" $NetBSD: lorder.1,v 1.5 1995/08/31 22:42:44 jtc Exp $
.\"
.\" Copyright (c) 1990, 1993
which is defined by the second file.
.Pp
The output is normally used with
-.Xr tsort 1
+.Xr tsort 1
when a library is created to determine the optimum ordering of the
object modules so that all references may be resolved in a single
pass of the loader.
-.\" @(#) $OpenBSD: m4.1,v 1.9 2000/01/11 14:06:11 espie Exp $
+.\" @(#) $OpenBSD: m4.1,v 1.10 2000/03/10 19:07:20 aaron Exp $
.\"
.\"
.Dd January 26, 1993
Macro calls have the form name(argument1[, argument2, ..., argumentN]).
.Pp
There cannot be any space following the macro name and the open
-parenthesis '('. If the macro name is not followed by an open
+parenthesis
+.Pq Ql ( .
+If the macro name is not followed by an open
parenthesis it is processed with no arguments.
.Pp
Macro names consist of a leading alphabetic or underscore
possibly followed by alphanumeric or underscore characters, e.g.,
-valid macro names match the pattern [a-zA-Z_][a-zA-Z0-9_]*.
+valid macro names match the pattern
+.Dq [a-zA-Z_][a-zA-Z0-9_]* .
.Pp
-In arguments to macros, leading unquoted space, tab and newline
-characters are ignored. To quote strings, use left and right single
-quotes (e.g., ` this is a string with a leading space'). You can change
-the quote characters with the
+In arguments to macros, leading unquoted space, tab, and newline
+.Pq Ql \en
+characters are ignored.
+To quote strings, use left and right single
+quotes (e.g.,
+.Sq \ this is a string with a leading space ) .
+You can change the quote characters with the
.Ic changequote
built-in macro.
.Pp
.Oc
Define the symbol
.Ar name
-to have some value (or NULL).
+to have some value (or
+.Dv NULL ) .
.It Fl "U" Ns Ar "name"
Undefine the symbol
.Ar name .
to the include path.
.Sh SYNTAX
.Nm m4
-provides the following built-in macros. They may be
-redefined, losing their original meaning.
-Return values are NULL unless otherwise stated.
+provides the following built-in macros.
+They may be redefined, losing their original meaning.
+Return values are null unless otherwise stated.
.Bl -tag -width changequotexxx
.It Ic changecom
-Change the start and end comment sequences. The default is
-the pound sign `#' and the newline character. With no arguments
-comments are turned off. The maximum length for a comment marker is
-five characters.
+Change the start and end comment sequences.
+The default is the pound sign
+.Pq Ql #
+and the newline character.
+With no arguments comments are turned off.
+The maximum length for a comment marker is five characters.
.It Ic changequote
Defines the quote symbols to be the first and second arguments.
-The symbols may be up to five characters long. If no arguments are
+The symbols may be up to five characters long.
+If no arguments are
given it restores the default open and close single quotes.
.It Ic decr
-Decrements the argument by 1. The argument must be a valid numeric string.
+Decrements the argument by 1.
+The argument must be a valid numeric string.
.It Ic define
Define a new macro named by the first argument to have the
-value of the second argument. Each occurrence of $n (where n
-is 0 through 9) is replaced by the n'th argument. $0 is the name
-of the calling macro. Undefined arguments are replaced by a
-NULL string. $# is replaced by the number of arguments; $*
-is replaced by all arguments comma separated; $@ is the same
-as $* but all arguments are quoted against further expansion.
+value of the second argument.
+Each occurrence of
+.Ql $n
+(where
+.Ar n
+is 0 through 9) is replaced by the
+.Ar n Ns 'th
+argument.
+.Ql $0
+is the name of the calling macro.
+Undefined arguments are replaced by a null string.
+.Ql $#
+is replaced by the number of arguments;
+.Ql $*
+is replaced by all arguments comma separated;
+.Ql $@
+is the same as
+.Ql $*
+but all arguments are quoted against further expansion.
.It Ic defn
-Returns the quoted definition for each argument. This can be used to rename
+Returns the quoted definition for each argument.
+This can be used to rename
macro definitions (even for built-in macros).
.It Ic divert
There are 10 output queues (numbered 0-9).
At the end of processing
.Nm m4
concatenates all the queues in numerical order to produce the
-final output. Initially the output queue is 0. The divert
+final output.
+Initially the output queue is 0.
+The divert
macro allows you to select a new output queue (an invalid argument
passed to divert causes output to be discarded).
.It Ic divnum
Prints the first argument on the standard error output stream.
.It Ic eval
Computes the first argument as an arithmetic expression using 32-bit
-arithmetic. Operators are the standard C ternary, arithmetic, logical,
-shift, relational, bitwise, and parentheses operators. You can specify
-octal, decimal, and hexadecimal numbers as in C. The second argument (if
-any) specifies the radix for the result and the third argument (if
-any) specifies the minimum number of digits in the result.
+arithmetic.
+Operators are the standard C ternary, arithmetic, logical,
+shift, relational, bitwise, and parentheses operators.
+You can specify
+octal, decimal, and hexadecimal numbers as in C.
+The second argument (if any)
+specifies the radix for the result and the third argument (if any)
+specifies the minimum number of digits in the result.
.It Ic expr
This is an alias for
.Ic eval .
.It Ic ifdef
If the macro named by the first argument is defined then return the second
-argument, otherwise the third. If there is no third argument,
-the value is NULL. The word `unix' is predefined.
+argument, otherwise the third.
+If there is no third argument, the value is
+.Dv NULL .
+The word
+.Qq unix
+is predefined.
.It Ic ifelse
If the first argument matches the second argument then
.Ic ifelse
returns
-the third argument. If the match fails the three arguments are
+the third argument.
+If the match fails the three arguments are
discarded and the next three arguments are used until there is
-zero or one arguments left, either this last argument or NULL is
-returned if no other matches were found.
+zero or one arguments left, either this last argument or
+.Dv NULL
+is returned if no other matches were found.
.It Ic include
Returns the contents of the file specified in the first argument.
If the file is not found as is, look through the include path:
first the directories specified with
.Fl I
on the command line, then the environment variable
-.Va M4PATH ,
+.Ev M4PATH ,
as a colon-separated list of directories.
Include aborts with an error message if the file cannot be included.
.It Ic incr
-Increments the argument by 1. The argument must be a valid numeric string.
+Increments the argument by 1.
+The argument must be a valid numeric string.
.It Ic index
Returns the index of the second argument in the first argument (e.g.,
-index(the quick brown fox jumped, fox) returns 16). If the second
-argument is not found index returns -1.
+.Ic index(the quick brown fox jumped, fox)
+returns 16).
+If the second
+argument is not found index returns \-1.
.It Ic len
-Returns the number of characters in the first argument. Extra arguments
+Returns the number of characters in the first argument.
+Extra arguments
are ignored.
.It Ic m4exit
Immediately exits with the return value specified by the first argument,
0 if none.
.It Ic m4wrap
-Allows you to define what happens at the final EOF, usually for cleanup
-purposes (e.g., m4wrap("cleanup(tempfile)") causes the macro cleanup to be
+Allows you to define what happens at the final
+.Dv EOF ,
+usually for cleanup purposes (e.g.,
+.Ic m4wrap("cleanup(tempfile)")
+causes the macro cleanup to be
invoked after all other processing is done.)
.It Ic maketemp
-Translates the string XXXXX in the first argument with the current process
-ID leaving other characters alone. This can be used to create unique
+Translates the string
+.Dq XXXXX
+in the first argument with the current process
+ID leaving other characters alone.
+This can be used to create unique
temporary file names.
.It Ic paste
Includes the contents of the file specified by the first argument without
-any macro processing. Aborts with an error message if the file cannot be
+any macro processing.
+Aborts with an error message if the file cannot be
included.
.It Ic popdef
Restores the
.Ic popdef .
.It Ic shift
Returns all but the first argument, the remaining arguments are
-quoted and pushed back with commas in between. The quoting
+quoted and pushed back with commas in between.
+The quoting
nullifies the effect of the extra scan that will subsequently be
performed.
.It Ic sinclude
by the second argument and the length specified by the third argument.
If no third argument is present it returns the rest of the string.
.It Ic syscmd
-Passes the first argument to the shell. Nothing is returned.
+Passes the first argument to the shell.
+Nothing is returned.
.It Ic sysval
Returns the return value from the last
.Ic syscmd .
.It Ic translit
Transliterate the characters in the first argument from the set
-given by the second argument to the set given by the third. You cannot
+given by the second argument to the set given by the third.
+You cannot
use
.Xr tr 1
style abbreviations.
-.\" $OpenBSD: mail.1,v 1.26 2000/03/04 20:02:23 aaron Exp $
+.\" $OpenBSD: mail.1,v 1.27 2000/03/10 19:07:20 aaron Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.Pa /etc/mail.rc
in order unless explicitly told not to by using the
.Fl n
-option. Next, the commands in the user's personal command file
+option.
+Next, the commands in the user's personal command file
.Pa ~/.mailrc
are executed.
.Nm mail
in the header
field
.Dq x .
-The string search is case insensitive. If
+The string search is case insensitive.
+If
.Dq x
is omitted, it will default to the
.Dq Subject
-.\" $OpenBSD: make.1,v 1.27 2000/01/19 17:28:52 espie Exp $
+.\" $OpenBSD: make.1,v 1.28 2000/03/10 19:07:21 aaron Exp $
.\" $NetBSD: make.1,v 1.18 1997/03/10 21:19:53 christos Exp $
.\"
.\" Copyright (c) 1990, 1993
Its input is a list of specifications as to the files upon which programs
and other files depend.
If the file
-.Ql Pa BSDmakefile
+.Pa BSDmakefile
exists, it is read for this list of specifications.
If it does not exist, the files
-.Ql Pa makefile
+.Pa makefile
and
-.Ql Pa Makefile
+.Pa Makefile
are tried in order.
If the file
-.Ql Pa .depend
+.Pa .depend
exists, it is read (see
.Xr mkdep 1) .
.Pp
.It Ar d
Print debugging information about directory searching and caching.
.It Ar f
-Print debugging information about the execution of for loops. Currently a
-no-op.
+Print debugging information about the execution of for loops.
+Currently a no-op.
.It Ar "g1"
Print the input graph before making anything.
.It Ar "g2"
makefiles.
.It Fl f Ar makefile
Specify a makefile to read instead of the default
-.Ql Pa makefile
+.Pa makefile
and
-.Ql Pa Makefile .
+.Pa Makefile .
If
.Ar makefile
is
.It Fl j Ar max_jobs
Specify the maximum number of jobs that
.Nm
-may have running at any one time. Turns compatibility mode off, unless the
+may have running at any one time.
+Turns compatibility mode off, unless the
.Ar B
flag is also specified.
.It Fl k
that do not depend on the target whose creation caused the error.
.It Fl m Ar directory
Specify a directory in which to search for sys.mk and makefiles included
-via the <...> style. Multiple directories can be added to form a search path.
+via the <...> style.
+Multiple directories can be added to form a search path.
This path will override the default system include path:
.Pa /usr/share/mk .
Furthermore, the system include path will be appended to the search path used
.It Fl r
Do not use the built-in rules specified in the system makefile.
.It Fl S
-Stop processing when an error is encountered. Default
-behavior. This is needed to negate the
+Stop processing when an error is encountered.
+Default behavior.
+This is needed to negate the
.Fl k
option during recursive builds.
.It Fl s
is defined,
.Nm
prepends its contents to the current directory name and tries for
-the resulting directory. If that fails,
+the resulting directory.
+If that fails,
.Nm
remains in the current directory.
If
.Nm
checks
.Ev MAKEOBJDIR
-and tries to change into that directory. Should that fail,
+and tries to change into that directory.
+Should that fail,
.Nm
-remains in the current directory. If
+remains in the current directory.
+If
.Ev MAKEOBJDIR
is not defined, it tries to change into the directory named
.Pa obj.${MACHINE}
(see
.Va MACHINE
-variable). If it still has found no special directory,
+variable).
+If it still has found no special directory,
.Nm
next tries the directory named
.Pa obj .
may contain anything that
may be specified on
.Nm make Ns 's
-command line. Its contents are stored in
+command line.
+Its contents are stored in
.Nm make Ns 's
.Va .MAKEFLAGS
variable.
.Xr regex 3 )
and an
.Xr ed 1 Ns \-style
-replacement string. Normally, the first occurrence of the pattern in
-each word of the value is changed. The
+replacement string.
+Normally, the first occurrence of the pattern in
+each word of the value is changed.
+The
.Ql 1
modifier causes the substitution to apply to at most one word; the
.Ql g
modifier causes the substitution to apply to as many instances of the
-search pattern as occur in the word or words it is found in. Note that
+search pattern as occur in the word or words it is found in.
+Note that
.Ql 1
and
.Ql g
.Ar %
then it is assumed that they are
anchored at the end of each word, so only suffixes or entire
-words may be replaced. Otherwise
+words may be replaced.
+Otherwise
.Ar %
is the substring of
.Ar old_string
.Ar new_string
.El
.Sh INCLUDE STATEMENTS, CONDITIONALS AND FOR LOOPS
-Makefile inclusion, conditional structures and for loops reminiscent
+Makefile inclusion, conditional structures and for loops reminiscent
of the C programming language are provided in
.Nm make .
All such structures are identified by a line beginning with a single
.El
.Pp
.Ar expression
-may also be an arithmetic or string comparison. Variable expansion is
+may also be an arithmetic or string comparison.
+Variable expansion is
performed on both sides of the comparison, after which the integral
-values are compared. A value is interpreted as hexadecimal if it is
+values are compared.
+A value is interpreted as hexadecimal if it is
preceded by 0x, otherwise it is decimal; octal numbers are not supported.
-The standard C relational operators are all supported. If after
+The standard C relational operators are all supported.
+If after
variable expansion, either the left or right hand side of a
.Ql Ic ==
or
.El
After the for
.Ar expression
-is evaluated, it is split into words. The
-iteration
+is evaluated, it is split into words.
+The iteration
.Ar variable
is successively set to each word, and substituted in the
.Ic make-rules
If special
.Ic .WAIT
source is appears in a dependency line, the sources that precede it are
-made before the sources that succeed it in the line. Loops are not being
+made before the sources that succeed it in the line.
+Loops are not being
detected and targets that form loops will be silently ignored.
.El
.Sh "SPECIAL TARGETS"
option.
.It Ic .INCLUDES
A list of suffixes that indicate files that can be included in a source
-file. The suffix must have already been declared with
+file.
+The suffix must have already been declared with
.Ic .SUFFIXES ,
any suffix so declared will have the directories on its search path (see
.Ic .PATH )
.It Ic .MAIN
If no target is specified when
.Nm
-is invoked, this target will be built. This is always set, either
+is invoked, this target will be built.
+This is always set, either
explicitly, or implicitly when
.Nm
selects the default target, to give the user a way to refer to the default
.It Ic .PHONY
Apply the
.Ic .PHONY
-attribute to any specified sources. Targets with this attribute are always
+attribute to any specified sources.
+Targets with this attribute are always
considered to be out of date.
.It Ic .PRECIOUS
Apply the
.Pp
The evaluation of
.Ar expression
-in a test is very simple-minded. Currently, the only form that works is
+in a test is very simple-minded.
+Currently, the only form that works is
.Ql .if ${VAR} op something
For instance, you should write tests as
.Ql .if ${VAR} = "string"
Variable handling is incredibly inefficient.
.Pp
The handling of ; and other special characters in tests may be utterly
-bogus. For instance, in
+bogus.
+For instance, in
.Bd -literal
\&A=abcd;c.c
\&.if ${A:R} == "abcd;c"
.Pp
the test will never match, even though the value is correct.
.Pp
-The conditional handler is incredibly lame. Junk such as
+The conditional handler is incredibly lame.
+Junk such as
.Bd -literal
\&.if defined anything goes (A)
.Ed
A will evaluate to a b c d after the loop, not z b c d.
.Sh SEE ALSO
.Xr mkdep 1
+.Pp
+.%T "Make \- A Tutorial" .
.Sh HISTORY
A
.Nm
-.\" $OpenBSD: man.1,v 1.11 1999/09/16 09:37:44 deraadt Exp $
+.\" $OpenBSD: man.1,v 1.12 2000/03/10 19:07:21 aaron Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.Nm
on other operating systems.
.It Fl S Ar subsection
-Specifies the machine-dependent subsection. This overrides the
+Specifies the machine-dependent subsection.
+This overrides the
.Ev MACHINE
-environment variable. See the
+environment variable.
+See the
.Sx ENVIRONMENT
section below.
.It Fl w
.Nm
assumes that the argument is the name of a manual page to be displayed.
.Sh ENVIRONMENT
+The following environment variables affect the execution of
+.Nm man :
.Bl -tag -width MANPATHX
.It Ev MACHINE
As some manual pages are intended only for specific architectures,
people who can't (or don't want to) run the real emacs for one
reason or another, or are not familiar with the
.Xr vi 1
-editor. It is compatible with emacs because there shouldn't
+editor.
+It is compatible with emacs because there shouldn't
be any reason to learn more editor types than emacs or
.Xr vi 1 .
.Pp
-Normal editing commands are very similar to Gnu Emacs. In the
-following examples, ^X means control-X, and M-X means Meta-X,
+Normal editing commands are very similar to Gnu Emacs.
+In the following examples, ^X means control-X, and M-X means Meta-X,
where the Meta key may be either a special key on your keyboard
or the ALT key; otherwise ESC followed by the key X works as well.
.Pp
.Nm
differs primarily in not having special modes for tasks other than
straight editing, e.g., mail and news, and in not having special modes that
-support various programming languages. It does have text justification
-and auto-fill mode. Since it is written completely in C, there is no
-language in which you can write extensions. However, you can rebind
-keys and change some parameters. There are no limits to line length
-or format. Command, buffer, and file name completion and listing can
+support various programming languages.
+It does have text justification
+and auto-fill mode.
+Since it is written completely in C, there is no
+language in which you can write extensions.
+However, you can rebind keys and change some parameters.
+There are no limits to line length or format.
+Command, buffer, and file name completion and listing can
be done using the spacebar and
.Ql ? ,
respectively.
.Nm
will use
.Pa .mg-vt100
-as a startup file. The terminal type startup file is used
-first.
+as a startup file.
+The terminal type startup file is used first.
See the manual for a full list of the commands that can
go in the files.
.Pp
-Here's another example sequence that you may find useful. By default,
+Here's another example sequence that you may find useful.
+By default,
.Dq ()
and
.Dq []
When you type
.Ql ?
to list possible file names, buffer names, etc.,
-a help buffer is created for the possibilities. In Gnu Emacs,
+a help buffer is created for the possibilities.
+In Gnu Emacs,
this buffer goes away the next time you type a real command.
In
.Nm mg ,
-.\" $OpenBSD: midiplay.1,v 1.4 1999/07/02 20:11:46 aaron Exp $
+.\" $OpenBSD: midiplay.1,v 1.5 2000/03/10 19:07:21 aaron Exp $
.\" $NetBSD: midiplay.1,v 1.3 1998/08/13 18:26:36 augustss Exp $
+.\"
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
If no file name is given it will play from standard input, otherwise
it will play the named files.
.Pp
-The program accepts the following options:
+The options are as follows:
.Bl -tag -width Fl
.It Fl d Ar devno
Specifies the number of the MIDI device used for output (as listed
by the
.Fl l
-flag). The default is device 0.
+flag).
+The default is device 0.
.It Fl f Ar file
Specifies the name of the sequencer device.
.It Fl l
.It Fl q
Do not play the MIDI file, just parse it.
.It Fl t Ar tempo
-Specifies the tempo. Default is 100.
+Specifies the tempo.
+Default is 100.
.It Fl v
-Be verbose. If the flag is repeated the verbosity increases.
+Be verbose.
+If the flag is repeated the verbosity increases.
.It Fl x
Play a small sample sound.
.Sh FILES
-.\" $OpenBSD: mkstr.1,v 1.4 1999/10/17 20:24:35 aaron Exp $
+.\" $OpenBSD: mkstr.1,v 1.5 2000/03/10 19:07:21 aaron Exp $
.\" $NetBSD: mkstr.1,v 1.3 1995/09/28 06:22:19 tls Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.Sh BUGS
.Nm mkstr
was intended for the limited architecture of the PDP 11 family.
-Very few programs actually use it. The pascal interpreter,
+Very few programs actually use it.
+The pascal interpreter,
.Xr \&pi 1 ,
and the editor,
.Xr \&ex 1 ,
are two programs that are built this way.
-It is not an efficient method, the error messages
+It is not an efficient method; the error messages
should be stored in the program text.
-.\" $OpenBSD: mktemp.1,v 1.14 2000/03/05 00:28:57 aaron Exp $
+.\" $OpenBSD: mktemp.1,v 1.15 2000/03/10 19:07:22 aaron Exp $
.\"
.\" Copyright (c) 1996, 2000 Todd C. Miller <Todd.Miller@courtesan.com>
.\" All rights reserved.
The
.Nm mktemp
utility takes the given file name template and overwrites a
-portion of it to create a unique file name. The template may be
-any file name with some number of
+portion of it to create a unique file name.
+The template may be any file name with some number of
.Ql X Ns s
appended
to it, for example
.Pa /tmp/temp.XXXXXXXXXX .
+.Pp
The trailing
.Ql X Ns s
are replaced with a combination of the the current process number and
-random letters. The name chosen depends both on the number of
+random letters.
+The name chosen depends both on the number of
.Ql X Ns s
in the template and the number of collisions with pre-existing files.
The number of unique file names
.Nm mktemp
is provided to allow shell scripts to safely use temporary files.
Traditionally, many shell scripts take the name of the program with
-the PID as a suffix and use that as a temporary file name. This
-kind of naming scheme is predictable and the race condition it creates
-is easy for an attacker to win. A safer, though still inferior approach
-is to make a temporary directory using the same naming scheme. While
-this does allow one to guarantee that a temporary file will not be
-subverted, it still allows a simple denial of service attack. For these
-reasons it is suggested that
+the PID as a suffix and use that as a temporary file name.
+This kind of naming scheme is predictable and the race condition it creates
+is easy for an attacker to win.
+A safer, though still inferior approach
+is to make a temporary directory using the same naming scheme.
+While this does allow one to guarantee that a temporary file will not be
+subverted, it still allows a simple denial of service attack.
+For these reasons it is suggested that
.Nm
be used instead.
.Pp
.It Fl d
Make a directory instead of a file.
.It Fl q
-Fail silently if an error occurs. This is useful if
+Fail silently if an error occurs.
+This is useful if
a script does not want error output to go to standard error.
.It Fl u
Operate in
.Dq unsafe
-mode. The temp file will be unlinked before
+mode.
+The temp file will be unlinked before
.Nm
-exits. This is slightly better than
+exits.
+This is slightly better than
.Fn mktemp 3
-but still introduces a race condition. Use of this
-option is not encouraged.
+but still introduces a race condition.
+Use of this option is not encouraged.
.El
-.Sh RETURN VALUES
+.Pp
The
.Nm
utility
.Pp
Or perhaps you don't want to exit if
.Nm
-is unable to create the file. In this case you can protect the
-part of the script thusly.
+is unable to create the file.
+In this case you can protect the part of the script thusly.
.Bd -literal -offset indent
TMPFILE=`mktemp /tmp/$0.XXXXXXXXXX` && {
# Safe to use $TMPFILE in this block
-.\" $OpenBSD: modstat.8,v 1.6 1999/10/05 20:53:09 aaron Exp $
+.\" $OpenBSD: modstat.8,v 1.7 2000/03/10 19:07:22 aaron Exp $
+.\"
.\" Copyright (c) 1993 Christopher G. Demetriou
.\" All rights reserved.
.\"
.It Fl n Ar name
Display the status of only the module with this name.
.El
-.Sh DIAGNOSTICS
+.Pp
The
.Nm
utility exits with a status of 0 on success
-.\" $OpenBSD: msgs.1,v 1.8 2000/03/05 00:28:58 aaron Exp $
+.\" $OpenBSD: msgs.1,v 1.9 2000/03/10 19:07:22 aaron Exp $
.\" $NetBSD: msgs.1,v 1.5 1995/09/28 06:57:39 tls Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.It Fl h
Print the first part of messages only.
.It Fl r
-Disables the ability to save messages or enter the mailer. It is
-assumed that the
+Disables the ability to save messages or enter the mailer.
+It is assumed that the
.Ev PAGER
environment is set to something secure.
.It Fl l
.It Fl p
Pipe long messages through the program specified by the
.Ev PAGER
-environment variable. If
+environment variable.
+If
.Ev PAGER
is null or not defined,
.Xr more 1
Append the current message to the file
.Pa Messages
in the current directory;
-`s\-' will save the previously displayed message. A `s' or `s\-' may
-be followed by a space and a file name to receive the message replacing
-the default ``Messages''.
+.Sq s\-
+will save the previously displayed message.
+An
+.Sq s
+or
+.Sq s\-
+may be followed by a space and a file name to receive the message replacing
+the default
+.Dq Messages .
.It Ic m
A copy of the specified message is placed in a temporary
mailbox and
.It Ic p
The specified message is piped through the program specified by the
.Ev PAGER
-environment variable. If
+environment variable.
+If
.Ev PAGER
is not defined,
.Xr more 1
is used.
.El
.Pp
-The commands `m', `p', and `s' all accept a numeric argument in place of the
+The commands
+.Ic m ,
+.Ic p ,
+and
+.Ic s
+all accept a numeric argument in place of the
.Sq \&- .
.Pp
.Nm msgs
.Pp
The
.Fl s
-option is used for setting up the posting of messages. The line
+option is used for setting up the posting of messages.
+The line
.Pp
.Dl msgs: \&"\&| /usr/bin/msgs \-s\&"
.Pp
.Fl c
option should be placed in
.Pa /etc/crontab
-to run every night. This will remove all messages over 21 days old.
+to run every night.
+This will remove all messages over 21 days old.
A different expiration may be specified on the command line to override
the default.
.Pp
and
.Ev TERM
environment variables for the default home directory and
-terminal type. If defined and non-null, the
+terminal type.
+If defined and non-null, the
.Ev PAGER
variable is invoked as the pagination program.
.Sh FILES
-.\" $OpenBSD: nc.1,v 1.6 1999/06/05 01:21:34 aaron Exp $
+.\" $OpenBSD: nc.1,v 1.7 2000/03/10 19:07:22 aaron Exp $
.\"
.\" Copyright (c) 1996 David Sacerdote
.\" All rights reserved.
(or
.Nm netcat )
utility is used for just about anything under the sun
-involving TCP or UDP. It can open TCP connections, send UDP packets,
+involving TCP or UDP.
+It can open TCP connections, send UDP packets,
listen on arbitrary TCP and UDP ports, do port scanning, and source
-routing. Unlike
+routing.
+Unlike
.Xr telnet 1 ,
.Nm
scripts nicely, and separates error messages onto standard error instead
.Pp
Destination ports can be single integers, names as listed in
.Xr services 5 ,
-or ranges. Ranges are in the form nn-mm, and several separate ports and/or
+or ranges.
+Ranges are in the form nn-mm, and several separate ports and/or
ranges may be specified on the command line.
.Pp
Common uses include:
-.Bl -bullet
+.Pp
+.Bl -bullet -offset indent -compact
.It
simple TCP proxies
.It
.Bl -tag -width Ds
.It Fl e Ar command
Execute the specified command, using data from the network for stdin,
-and sending stdout and stderr to the network. This option is only present if
+and sending stdout and stderr to the network.
+This option is only present if
.Nm
was compiled with the GAPING_SECURITY_HOLE compile time option, since it
allows users to make arbitrary programs available to anyone on the network.
.It Fl g Ar intermediate-host
-Specifies a hop along a loose source routed path. Can be used more than
-once to build a chain of hop points.
+Specifies a hop along a loose source routed path.
+Can be used more than once to build a chain of hop points.
.It Fl G Ar pointer
-Positions the "hop counter" within the list of machines in the path of
-a source routed packet. Must be a multiple of 4.
+Positions the
+.Dq hop counter
+within the list of machines in the path of a source routed packet.
+Must be a multiple of 4.
.It Fl i Ar seconds
Specifies a delay time interval between lines of text sent and received.
Also causes a delay time between connections to multiple ports.
Is used to specify that
.Nm
should listen for an incoming connection, rather than initiate a
-connection to a remote host. Any hostname/IP address and port arguments
+connection to a remote host.
+Any hostname/IP address and port arguments
restrict the source of inbound connections to only that address and
source port.
.It Fl n
names of port numbers from /etc/services.
.It Fl o Ar filename
Create a hexadecimal log of data transferred in the specified file.
-Each line begins with ``<'' or ``>''. ``<'' means "from the net" and ``>''
-means "to the net".
+Each line begins with
+.Ql <
+or
+.Ql > .
+.Ql <
+means
+.Dq from the net
+and
+.Ql >
+means
+.Dq to the net .
.It Fl p Ar port
Specifies the source port
.Nm
Causes
.Nm
to send RFC854 DON'T and WON'T responses to RFC854 DO
-and WILL requests. This makes it possible to use
+and WILL requests.
+This makes it possible to use
.Nm
-to script telnet sessions. The presence of this option can be
+to script telnet sessions.
+The presence of this option can be
enabled or disabled as a compile-time option.
.It Fl u
Use UDP instead of TCP.
ICMP packet indicating that there is no program listening to what it
sends.
.It Fl v
-Verbose. Cause
+Verbose.
+Cause
.Nm
-to display connection information. Using
+to display connection information.
+Using
.Fl v
more than once will cause
.Nm
Specifies that
.Nm
should just scan for listening
-daemons, without sending any data to them. Diagnostic messages about refused
-connections will not be
-displayed unless
+daemons, without sending any data to them.
+Diagnostic messages about refused connections with not be displayed unless
.Fl v
is specified twice.
.Sh EXAMPLES
Wait for the user to type what would normally be command-line
arguments in at stdin.
.It Li "nc example.host 42"
-Open a TCP connection to port 42 of example.host. If the connection
+Open a TCP connection to port 42 of example.host.
+If the connection
fails, do not display any error messages, but simply exit.
.It Li "nc -p 31337 example.host 42"
Open a TCP connection to port 42 of example.host, and use port 31337
-.\" $OpenBSD: newsyslog.8,v 1.17 2000/03/05 00:28:53 aaron Exp $
+.\" $OpenBSD: newsyslog.8,v 1.18 2000/03/10 19:07:22 aaron Exp $
.\"
.\" Copyright (c) 1997, Jason Downs. All rights reserved.
.\"
.Nm
is a program that should be scheduled to run periodically by
.Xr cron 8 .
-When it is executed it archives log files if necessary. If a log file
-is determined to require archiving,
+When it is executed it archives log files if necessary.
+If a log file is determined to require archiving,
.Nm
rearranges the files so that
.Pa logfile
.Pa logfile.1
has the next to last
period's logs in it, and so on, up to a user-specified number of
-archived logs. Optionally the archived logs can be compressed to save
+archived logs.
+Optionally the archived logs can be compressed to save
space.
.Pp
-A log can be archived because of two reasons. The log file can have
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl f Ar config-file
+Use
+.Ar config-file
+instead of
+.Pa /etc/newsyslog.conf
+for the configuration file.
+.It Fl v
+Be verbose.
+In this mode it will print out each log and its
+reasons for either trimming that log or skipping it.
+.It Fl n
+Do not trim the logs, but instead print out what would be done if this option
+were not specified.
+.It Fl r
+Removes the restriction that
+.Nm
+must be running as root.
+Of course,
+.Nm
+will not be able to send a
+.Dv SIGHUP
+signal to
+.Xr syslogd 8 ,
+so this option should only be used in debugging.
+.It Fl m
+Monitoring mode; only entries marked with an
+.Sq M
+in flags are processed,
+and notifications sent if any have changed.
+Without this option, monitored entries are not processed.
+.El
+.Pp
+A log can be archived because of two reasons.
+The log file can have
grown bigger than a preset size in kilobytes, or a preset number of
-hours may have elapsed since the last log archive. The granularity of
+hours may have elapsed since the last log archive.
+The granularity of
.Nm
is dependent on how often it is scheduled to run in
.Xr cron 8 .
When starting up,
.Nm
reads in a configuration file to determine which logs should be looked
-at. By default, this configuration file is
+at.
+By default, this configuration file is
.Pa /etc/newsyslog.conf .
Each line of the file contains information about a particular log file
that should be handled by
.Nm newsyslog .
Each line has five mandatory fields and up to three optional fields, with a
-whitespace separating each field. Blank lines or lines beginning with
-.Ql #
-are ignored. The fields of the configuration file are as
+whitespace separating each field.
+Blank lines or lines beginning with a hash mark
+.Pq Ql #
+are ignored.
+The fields of the configuration file are as
follows:
.Bl -tag -width XXXXXXXXXXXXXXXX
.It logfile name
The full pathname of the system log file to be archived.
.It owner.group of archives (optional)
-Specify an ownership and group for the archive file. The
+Specify an ownership and group for the archive file.
+The
.Ql \&.
is essential, even if the
.Ar owner
or
.Ar group
-field is left blank. The fields may be numeric, or a name which is looked up
+field is left blank.
+The fields may be numeric, or a name which is looked up
in the system password and group databases.
.It mode of logfile & archives
Octal mode of created log files and archives.
Specify the number of archives to be kept besides the log file itself.
.It size of archives
When the size of the log file reaches this point, the log file becomes trimmed
-as described above. If this field is replaced by a
+as described above.
+If this field is replaced by a
.Ql * ,
then the size of
the log file is not taken into account when determining when to trim the
log file.
.It archive interval
-Specify the time separation between the trimming of the log file. If this
-field is replaced by a
+Specify the time separation between the trimming of the log file.
+If this field is replaced by a
.Ql * ,
the number of hours since the last time the
log was trimmed will not be taken into consideration.
The
.Ar flags
field specifies if the archives should have any special processing
-done to the archived log files. The
+done to the archived log files.
+The
.Sq Z
flag will make the archive
files compressed to save space using
.Xr gzip 1
or
.Xr compress 1 ,
-depending on compilation options. The
+depending on compilation options.
+The
.Sq B
flag means that the file is a
binary file, and so the ASCII message which
.Nm
inserts to indicate the fact that the logs have been turned over
-should not be included. The
+should not be included.
+The
.Sq M
flag marks this entry as a monitored
log file.
.It monitor notification (optional)
Specify the account that should receive notification messages if this is
-a monitored log file. Notification messages are sent as email; the operator
+a monitored log file.
+Notification messages are sent as email; the operator
deserves what they get if they mark the
.Xr sendmail 8
log file as monitored.
signal to instead of
.Pa /var/run/syslog.pid .
.It signal (optional)
-Specify the signal to send to the process instead of SIGHUP. Signal names
+Specify the signal to send to the process instead of
+.Dv SIGHUP .
+Signal names
must start with
.Dq SIG
-and be the signal name, not the number. Eg.
+and be the signal name, not the number, e.g.,
.Em SIGUSR1 .
.It command (optional)
Specify a command to run instead of sending a signal to the process.
-The command must be enclosed in double quotes ('"'). You cannot specify
-both a command and a pid file.
-.El
-.Pp
-The options are as follows:
-.Bl -tag -width XXX
-.It Fl f Ar config-file
-Instructs newsyslog to use
-.Ar config-file
-instead of
-.Pa /etc/newsyslog.conf
-for its configuration file.
-.It Fl v
-Places
-.Nm
-in verbose mode. In this mode it will print out each log and its
-reasons for either trimming that log or skipping it.
-.It Fl n
-Causes
-.Nm
-not to trim the logs, but to print out what it would do if this option
-were not specified.
-.It Fl r
-Removes the restriction that
-.Nm
-must be running as root. Of course,
-.Nm
-will not be able to send a
-.Dv SIGHUP
-signal to
-.Xr syslogd 8 ,
-so this option should only be used in debugging.
-.It Fl m
-Places
-.Nm
-in monitoring mode; only entries marked with an
-.Sq M
-in flags are processed,
-and notifications sent if any have changed. Without this option, monitored
-entries are not processed.
+The command must be enclosed in double quotes
+.Pq Ql \&" ) .
+You cannot specify both a command and a PID file.
.El
.Sh FILES
.Bl -tag -width /etc/newsyslog.conf
.Xr syslog 3 ,
.Xr syslogd 8
.Sh AUTHOR
-.Bd -unfilled -offset indent
+.Bd -unfilled
Theodore Ts'o, MIT Project Athena
Copyright 1987, Massachusetts Institute of Technology
.Ed
-.\" $OpenBSD: nice.1,v 1.6 1999/10/17 20:24:33 aaron Exp $
+.\" $OpenBSD: nice.1,v 1.7 2000/03/10 19:07:22 aaron Exp $
.\" $NetBSD: nice.1,v 1.6 1995/08/31 23:30:57 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
priority of
.Ar utility .
.El
-.Sh DIAGNOSTICS
+.Pp
The
.Nm
utility shall exit with one of the following values:
-.Bl -tag -width indent
+.Pp
+.Bl -tag -width indent -offset indent -compact
.It 1\-125
-An error occurred in the
-.Nm
-utility.
+An error occurred.
.It 126
The
.Ar utility
.Sh BUGS
.Nm
is built into
-.Xr csh 1
-with a slightly different syntax than described here. The form
+.Xr csh 1
+with a slightly different syntax than described here.
+The form
.Ql nice +10
nices to positive nice, and
.Ql nice \-10
-.\" $OpenBSD: nm.1,v 1.4 1999/06/05 01:21:35 aaron Exp $
+.\" $OpenBSD: nm.1,v 1.5 2000/03/10 19:07:23 aaron Exp $
.\" $NetBSD: nm.1,v 1.3 1995/08/31 23:41:58 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.Nm
searches for the file
.Pa a.out
-and if present, displays the symbol
-table for
-.Pa a.out .
+and displays its symbol table if it exists.
+.Pp
+The options are as follows:
.Bl -tag -width flag
.It Fl a
Display symbol table entries inserted for use by debuggers.
-.\" $OpenBSD: nohup.1,v 1.5 1999/06/05 01:21:35 aaron Exp $
+.\" $OpenBSD: nohup.1,v 1.6 2000/03/10 19:07:23 aaron Exp $
.\" $NetBSD: nohup.1,v 1.5 1995/08/31 23:35:24 jtc Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
in the current directory.
If standard error is a terminal, it is directed to the same place
as the standard output.
-.Sh ENVIRONMENT
-The following variable is utilized by
-.Nm nohup :
-.Bl -tag -width flag
-.It Ev HOME
-If the output file
-.Pa nohup.out
-cannot be created in the current directory, the
-.Nm nohup
-utility uses the directory named by
-.Ev HOME
-to create the file.
-.El
-.Sh DIAGNOSTICS
+.Pp
The
.Nm nohup
utility shall exit with one of the following values:
-.Bl -tag -width Ds
+.Pp
+.Bl -tag -width Ds -offset indent -compact
.It 126
The
.Ar utility
.Nm nohup
shall be that of
.Ar utility .
+.Sh ENVIRONMENT
+The following environment variables affect the execution of
+.Nm nohup :
+.Bl -tag -width flag
+.It Ev HOME
+If the output file
+.Pa nohup.out
+cannot be created in the current directory, the
+.Nm nohup
+utility uses the directory named by
+.Ev HOME
+to create the file.
+.El
.Sh SEE ALSO
.Xr signal 3
.Sh STANDARDS