Diffstat (limited to 'usr.bin/ul/ul.1')
1 files changed, 194 insertions, 0 deletions
diff --git a/usr.bin/ul/ul.1 b/usr.bin/ul/ul.1
new file mode 100644
@@ -0,0 +1,194 @@
+.\" $OpenBSD: ul.1,v 1.16 2016/01/18 17:34:26 schwarze Exp $
+.\" $NetBSD: ul.1,v 1.3 1994/12/07 00:28:23 jtc Exp $
+.\" Copyright (c) 1980, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" @(#)ul.1 8.1 (Berkeley) 6/6/93
+.Dd $Mdocdate: January 18 2016 $
+.Dt UL 1
+.Nd do underlining
+.Op Fl i
+.Op Fl t Ar terminal
+reads the named files (or standard input if none are given)
+and translates various kinds of in-band markup to forms
+appropriate for the terminal in use, as specified
+by the environment variable
+.Xr terminfo 5
+.Xr man 1
+.Fl T Cm ascii ,
+.Fl T Cm utf8 ,
+.Fl T Cm locale
+produce output that
+can handle as input.
+The following control characters are handled in the input stream:
+.Bl -tag -width Ds
+.It backspace (ASCII 0x08)
+Reset the output display column to the beginning of the previous
+character, to prepare for overstriking.
+The display width of the previous character does not matter:
+backing up over a double-width character does not require two
+However, if a double-width character is followed by two backspace
+characters, the second one is discarded, for compatibility with
+.Xr fold 1 .
+.It tabulator (ASCII 0x09)
+Advance the output display column to the next multiple of 8.
+Tabs are always expanded into blanks.
+.It newline (ASCII 0x0a)
+End the current output line.
+.It carriage return (ASCII 0x0d)
+Reset the output display column to the beginning of the line,
+to prepare for overstriking.
+.It shift out (ASCII 0x0e)
+Switch on reverse video mode.
+.It shift in (ASCII 0x0f)
+Switch off reverse video mode.
+.It escape 7 (ASCII 0x1b 0x37)
+Full reverse line feed.
+.It escape 8 (ASCII 0x1b 0x38)
+Half reverse line feed.
+Sometimes used for superscripts.
+.It escape 9 (ASCII 0x1b 0x39)
+Half forward line feed.
+Sometimes used for subscripts.
+The following kinds of markup are handled:
+.Bl -tag -width Ds
+Requested by putting an underscore into the same display cell as
+another character, by using backspace or carriage return characters.
+The usual sequence to request an underlined character is "character
+backspace underscore", but "underscore backspace character" works,
+If the terminal cannot underline, standout mode is tried as a fallback.
+Requested by putting two copies of the same character into the same
+display cell, by using backspace or carriage return characters.
+The usual sequence to request a boldface character is "character
+If the terminal does not provide boldface display, reverse video and
+standout mode are tried as fallbacks.
+.It reverse video
+Switched on and off by the shift out and shift in control characters,
+If the terminal does not provide reverse video, standout mode is
+tried as a fallback.
+If the input text contains markup the terminal cannot handle and
+no working fallback is available, that markup is ignored.
+Non-printable characters and invalid bytes are discarded.
+Unknown escape sequences cause
+to abort with an error message and a non-zero exit code.
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl i
+Markup is not applied.
+Instead, after each output line containing at least one marked-up
+character, an additional line is printed, containing the following
+ASCII codes below each character they apply to:
+.Bl -tag -width 1n -compact
+one half line above the current line (superscript)
+one half line below the current line (subscript)
+more than one kind of markup
+.It Fl t Ar terminal
+Overrides the terminal type specified in the environment with
+.Ar terminal .
+.Bl -tag -width LC_CTYPE
+.It Ev LC_CTYPE
+The character set
+.Xr locale 1 .
+It decides which byte sequences form characters, which characters are
+printable, and how many output display columns each character occupies.
+If set to
+.Qq C ,
+.Qq POSIX ,
+or an unsupported value, each ASCII character except the control
+characters listed above is regarded as a character, and if it is
+printable, of display width 1.
+.It Ev TERM
+Used to relate a tty device
+with its device capability description (see
+.Xr terminfo 5 ) .
+is set at login time, either by the default terminal type
+or as set during the login process by the user in their
+.Xr environ 7 ) .
+.Sh EXIT STATUS
+.Sh SEE ALSO
+.Xr man 1 ,
+.Xr terminfo 5
+command appeared in
+.Bx 3.0 .
+Half reverse and half forward line feeds only work on few terminals,
+and full reverse line feeds aren't very portable, either.
+If more than one kind of markup is applied to the same character,
+all these markups are ignored and standout mode is used instead.