Print this page
Latest round of fixes per RM and AL.  Fix bugs found in man.c.
feedback from Hans
mandoc import

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man5/man.5
          +++ new/usr/src/man/man5/man.5
   1      -'\" te
   2    1  .\" Copyright (c) 1995, Sun Microsystems, Inc.
   3    2  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4    3  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5    4  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6      -.TH MAN 5 "Jan 30, 1995"
   7      -.SH NAME
   8      -man \- macros to format Reference Manual pages
   9      -.SH SYNOPSIS
  10      -.LP
  11      -.nf
  12      -\fBnroff\fR \fB-man\fR \fIfilename\fR...
  13      -.fi
  14      -
  15      -.LP
  16      -.nf
  17      -\fBtroff\fR  \fB-man\fR \fIfilename\fR...
  18      -.fi
  19      -
  20      -.SH DESCRIPTION
  21      -.sp
  22      -.LP
        5 +.Dd "Jul 19, 2014"
        6 +.Dt MAN 5
        7 +.Os
        8 +.Sh NAME
        9 +.Nm man
       10 +.Nd macros to format Reference Manual pages
       11 +.Sh SYNOPSIS
       12 +.Nm mandoc
       13 +.Fl T Ar man
       14 +.Ar
       15 +.Nm nroff
       16 +.Fl man
       17 +.Ar
       18 +.Nm troff
       19 +.Fl man
       20 +.Ar
       21 +.Sh DESCRIPTION
  23   22  These macros are used to lay out the reference pages in this manual. Note: if
  24      -\fIfilename\fR contains format input for a preprocessor, the commands shown
       23 +.Ar file
       24 +contains format input for a preprocessor, the commands shown
  25   25  above must be piped through the appropriate preprocessor. This is handled
  26      -automatically by the \fBman\fR(1) command. See the ``Conventions'' section.
  27      -.sp
  28      -.LP
  29      -Any text argument \fIt\fR may be zero to six words. Quotes may be used to
  30      -include SPACE characters in a "word".  If \fItext\fR is empty, the special
       26 +automatically by the
       27 +.Xr man 1
       28 +command. See the
       29 +.Sx Conventions
       30 +section.
       31 +.Lp
       32 +Any text argument
       33 +.Ar t
       34 +may be zero to six words. Quotes may be used to
       35 +include SPACE characters in a
       36 +.Qq word .
       37 +If
       38 +.Ar text
       39 +is empty, the special
  31   40  treatment is applied to the next input line with text to be printed. In this
  32      -way \fB\&.I\fR may be used to italicize a whole line, or \fB\&.SB\fR may be
  33      -used to make small bold letters.
  34      -.sp
  35      -.LP
       41 +way
       42 +.Nm \&.I
       43 +may be used to italicize a whole line, or
       44 +.Nm \&.SB
       45 +may be used to make small bold letters.
       46 +.Lp
  36   47  A prevailing indent distance is remembered between successive indented
  37   48  paragraphs, and is reset to default value upon reaching a non-indented
  38      -paragraph.  Default units for indents \fIi\fR are ens.
  39      -.sp
  40      -.LP
       49 +paragraph.  Default units for indents
       50 +.Nm i
       51 +are ens.
       52 +.Lp
  41   53  Type font and size are reset to default values before each paragraph, and after
  42   54  processing font and size setting macros.
  43      -.sp
  44      -.LP
  45      -These strings are predefined by \fB-man\fR:
  46      -.sp
  47      -.ne 2
  48      -.na
  49      -\fB\fB\e*R\fR\fR
  50      -.ad
  51      -.RS 8n
  52      -`\(rg', `(Reg)' in \fBnroff\fR.
  53      -.RE
  54      -
  55      -.sp
  56      -.ne 2
  57      -.na
  58      -\fB\fB\e*S\fR\fR
  59      -.ad
  60      -.RS 8n
       55 +.Pp
       56 +These strings are predefined by
       57 +.Nm -man :
       58 +.Bl -tag -width Ds
       59 +.It Nm \e*R
       60 +.Sq \(rg ,
       61 +.Sq (Reg)
       62 +in
       63 +.Nm nroff .
       64 +.It Nm \e*S
  61   65  Change to default type size.
  62      -.RE
  63      -
  64      -.SS "Requests"
  65      -.sp
  66      -.LP
       66 +.El
       67 +.Sh "Requests"
  67   68  * n.t.l. = next text line; p.i. = prevailing indent
  68      -.sp
  69      -
  70      -.sp
  71      -.TS
  72      -c c c c
  73      -c c c c .
  74      -\fIRequest\fR   \fICause\fR     \fIIf no\fR     \fIExplanation\fR
  75      -        \fIBreak\fR     \fIArgument\fR  
  76      -\fB\&.B \fR\fIt\fR      no      \fIt\fR=n.t.l.* Text is in bold font.
  77      -\fB\&.BI \fR\fIt\fR     no      \fIt\fR=n.t.l.  Join words, alternating bold and italic.
  78      -\fB\&.BR \fR\fIt\fR     no      \fIt\fR=n.t.l.  Join words, alternating bold and roman.
  79      -\fB\&.DT\fR     no      \&.5i 1i...     Restore default tabs.
  80      -\fB\&.HP \fR\fIi\fR     yes     \fIi\fR=p.i.*   T{
  81      -Begin paragraph with hanging indent. Set prevailing indent to \fIi\fR.
  82      -T}
  83      -\fB\&.I \fR\fIt\fR      no      \fIt\fR=n.t.l.  Text is italic.
  84      -\fB\&.IB \fR\fIt\fR     no      \fIt\fR=n.t.l.  Join words, alternating italic and bold.
  85      -\fB\&.IP \fR\fIx i\fR   yes     \fIx\fR=""      Same as \fB\&.TP\fR with tag \fIx\fR.
  86      -\fB\&.IR \fR\fIt\fR     no      \fIt\fR=n.t.l.  T{
  87      -Join words, alternating italic and roman.
  88      -T}
  89      -\fB\&.IX \fR\fIt\fR     no      -       Index macro, for SunSoft internal use.
  90      -\fB\&.LP\fR     yes     -       T{
  91      -Begin left-aligned paragraph. Set prevailing indent to .5i.
  92      -T}
  93      -\fB\&.P\fR      yes     -       Same as \fB\&.LP\fR.
  94      -\fB\&.PD \fR\fId\fR     no      \fId\fR=.4v     T{
  95      -Set vertical distance between paragraphs.
  96      -T}
  97      -\fB\&.PP\fR     yes     -       Same as \fB\&.LP\fR.
  98      -\fB\&.RE\fR     yes     -       T{
  99      -End of relative indent. Restores prevailing indent.
 100      -T}
 101      -\fB\&.RB \fR\fIt\fR     no      \fIt\fR=n.t.l.  Join words, alternating roman and bold.
 102      -\fB\&.RI \fR\fIt\fR     no      \fIt\fR=n.t.l.  T{
 103      -Join words, alternating roman and italic.
 104      -T}
 105      -\fB\&.RS \fR\fIi\fR     yes     \fIi\fR=p.i.    T{
 106      -Start relative indent, increase indent by \fIi\fR. Sets prevailing indent to .5i for nested indents.
 107      -T}
 108      -\fB\&.SB \fR\fIt\fR     no      -       T{
 109      -Reduce size of text by 1 point, make text bold.
 110      -T}
 111      -\fB\&.SH \fR\fIt\fR     yes     -       Section Heading.
 112      -\fB\&.SM \fR\fIt\fR     no      \fIt\fR=n.t.l.  Reduce size of text by 1 point.
 113      -\fB\&.SS \fR\fIt\fR     yes     \fIt\fR=n.t.l.  Section Subheading.
 114      -\fB\&.TH \FR\FIN S "f d, m\fR"
 115      -\fB\&.TH \fR\fIn s d f m\fR     yes     -       T{
 116      -Begin reference page \fIn\fR, of of section \fIs\fR; \fId\fR is the date of the most recent change.  If present, \fIf\fR is the left page footer; \fIm\fR is the main page (center) header.  Sets prevailing indent and tabs to .5i.
 117      -T}
 118      -\fB\&.TP \fR\fIi\fR     yes     \fIi\fR=p.i.    T{
 119      -Begin indented paragraph, with the tag given on the next text line. Set prevailing indent to \fIi\fR.
 120      -T}
 121      -\fB\&.TX \fR\fIt \fR\fIp\fR     no      -       T{
 122      -Resolve the title abbreviation \fIt\fR; join to punctuation mark (or text) \fIp\fR.
 123      -T}
 124      -.TE
 125      -
 126      -.SS "Conventions"
 127      -.sp
 128      -.LP
 129      -When formatting a manual page, \fBman\fR examines the first line to determine
       69 +.Bl -column ".TH n s d f m" "Cause " "t=n.t.l.*" "Explanation " -offset Ds
       70 +.It Sy Request  Sy Cause        Sy "If No"      Sy Explanation
       71 +.It ""  Sy Break        Sy "Argument"   ""
       72 +.It Nm \&.B Ar "t"      no      Ar t Ns =n.t.l.*        Text is in bold font.
       73 +.It Nm \&.BI Ar t       no      Ar t Ns =n.t.l. Join words, alternating bold and italic.
       74 +.It Nm \&.BR Ar t       no      Ar t Ns =n.t.l. Join words, alternating bold and roman.
       75 +.It Nm \&.DT    no      Li \&.5i 1i...  Restore default tabs.
       76 +.It Nm \&.HP Ar i       yes     Ar i Ns =p.i.*  "Begin paragraph with hanging indent. Set prevailing indent to" Ar i .
       77 +.It Nm \&.I Ar t        no      Ar t Ns =n.t.l. Text is italic.
       78 +.It Nm \&.IB Ar t       no      Ar t Ns =n.t.l. Join words, altenrating italic and bold.
       79 +.It Nm \&.IP Ar x Ar i  yes     Ar x Ns =""     Same as
       80 +.Nm \&.TP
       81 +with tag
       82 +.Ar x .
       83 +.It Nm \&.IR Ar t       no      Ar t Ns =n.t.l. Join words, alternating italic and roman.
       84 +.It Nm \&.IX Ar t       no      -       Index macro, not used (obsolete).
       85 +.It Nm \&.LP    yes     -       Begin left-aligned paragraph. Set prevailing indent to .5i.
       86 +.It Nm \&.P     yes     -       Same as
       87 +.Nm \&.LP .
       88 +.It Nm \&.PD Ar d       no      Ar d Ns =.4v    Set vertical distance between paragraphs.
       89 +.It Nm \&.PP    yes     -       Same as
       90 +.Nm \&.LP .
       91 +.It Nm \&.RE    yes     -       End of relative indent. Restores prevailing indent.
       92 +.It Nm \&.RB Ar t       no      Ar t Ns =n.t.l. Join words, alternating roman and bold.
       93 +.It Nm \&.RI Ar t       no      Ar t Ns =n.t.l. Join words, alternating roman and italic.
       94 +.It Nm \&.RS Ar i       yes     Ar i Ns =p.i.   Start relative indent, increase indent by Ar i .
       95 +Sets prevailing indent to .5i for nested indents.
       96 +.It Nm \&.SB Ar t       no      -       Reduce size of text by 1 point, make text bold.
       97 +.It Nm \&.SH Ar t       yes     -       Section Heading.
       98 +.It Nm \&.SM Ar t       no      Ar t Ns =n.t.l. Reduce size of text by 1 point.
       99 +.It Nm \&.SS Ar t       yes     Ar t Ns =n.t.l. Section Subheading.
      100 +.It Nm \&.TH Ar n s d f m       yes     -       Begin reference page Ar n , No of section Ar s ; Ar d No is the date of the most recent change.  If present, Ar f No is the left page footer; Ar m No is the main page (center) header.  Sets prevailing indent and tabs to .5i.
      101 +.It Nm \&.TP Ar i       yes     Ar i Ns =p.i.   Begin indented paragraph, with the tag given on the next text line. Set prevailing indent to
      102 +.Ar i .
      103 +.It Nm \&.TX Ar t p     no      -       Resolve the title abbreviation Ar t ; No join to punctuation mark (or text) Ar p .
      104 +.El
      105 +.Ss "Conventions"
      106 +When formatting a manual page,
      107 +.Nm
      108 +examines the first line to determine
 130  109  whether it requires special processing. For example a first line consisting of:
 131      -.sp
 132      -.LP
 133      -\fB\&'\e" t\fR
 134      -.sp
 135      -.LP
 136      -indicates that the manual page must be run through the \fBtbl\fR(1)
      110 +.Lp
      111 +.Dl \&'\e" t
      112 +.Lp
      113 +indicates that the manual page must be run through the
      114 +.Xr tbl 1
 137  115  preprocessor.
 138      -.sp
 139      -.LP
      116 +.Lp
 140  117  A typical manual page for a command or function is laid out as follows:
 141      -.sp
 142      -.ne 2
 143      -.na
 144      -\fB\&.TH\fI TITLE \FR[1-9]\FR " , "
 145      -.ad
 146      -.RS 23n
      118 +.Bl -tag -width ".SH RETURN VALUES"
      119 +.
      120 +.It Nm \&.TH Ar title Op "1-9"
      121 +.
 147  122  The name of the command or function, which serves as the title of the manual
 148  123  page. This is followed by the number of the section in which it appears.
 149      -.RE
 150      -
 151      -.sp
 152      -.ne 2
 153      -.na
 154      -\fB\&.SH NAME\fR
 155      -.ad
 156      -.RS 23n
      124 +.
      125 +.It Nm SH NAME
      126 +.
 157  127  The name, or list of names, by which the command is called, followed by a dash
 158  128  and then a one-line summary of the action performed. All in roman font, this
 159      -section contains no \fBtroff\fR(1) commands or escapes, and no macro requests.
 160      -It is used to generate the \fBwindex\fR database, which is used by the
 161      -\fBwhatis\fR(1) command.
 162      -.RE
 163      -
 164      -.sp
 165      -.ne 2
 166      -.na
 167      -\fB\&.SH SYNOPSIS\fR
 168      -.ad
 169      -.RS 23n
 170      -.sp
 171      -.ne 2
 172      -.na
 173      -\fBCommands:\fR
 174      -.ad
 175      -.RS 13n
      129 +section contains no
      130 +.Xr troff 1
      131 +commands or escapes, and no macro requests.
      132 +It is used to generate the database used by the
      133 +.Xr whatis 1
      134 +command.
      135 +.
      136 +.It Nm SH SYNOPSIS
      137 +.Bl -tag -width "Functions:"
      138 +.It Sy Commands:
 176  139  The syntax of the command and its arguments, as typed on the command line.
 177  140  When in boldface, a word must be typed exactly as printed.  When in italics, a
 178  141  word can be replaced with an argument that you supply. References to bold or
 179  142  italicized items are not capitalized in other sections, even when they begin a
 180  143  sentence.
 181      -.sp
      144 +.Lp
 182  145  Syntactic symbols appear in roman face:
 183      -.sp
 184      -.ne 2
 185      -.na
 186      -\fB[ ]\fR
 187      -.ad
 188      -.RS 13n
      146 +.Bl -tag -width "   "
      147 +.It Op " "
 189  148  An argument, when surrounded by brackets is optional.
 190      -.RE
 191      -
 192      -.sp
 193      -.ne 2
 194      -.na
 195      -\fB|\fR
 196      -.ad
 197      -.RS 13n
      149 +.It |
 198  150  Arguments separated by a vertical bar are exclusive. You can supply only one
 199  151  item from such a list.
 200      -.RE
 201      -
 202      -.sp
 203      -.ne 2
 204      -.na
 205      -\fB\&.\|.\|.\fR
 206      -.ad
 207      -.RS 13n
      152 +.It \&.\|.\|.
 208  153  Arguments followed by an ellipsis can be repeated. When an ellipsis follows a
 209  154  bracketed set, the expression within the brackets can be repeated.
 210      -.RE
 211      -
 212      -.RE
 213      -
 214      -.sp
 215      -.ne 2
 216      -.na
 217      -\fBFunctions:\fR
 218      -.ad
 219      -.RS 14n
 220      -If required, the data declaration, or \fB#include\fR directive, is shown first,
      155 +.El
      156 +.It Sy Functions:
      157 +If required, the data declaration, or
      158 +.Li #include
      159 +directive, is shown first,
 221  160  followed by the  function declaration. Otherwise, the function declaration is
 222  161  shown.
 223      -.RE
 224      -
 225      -.RE
 226      -
 227      -.sp
 228      -.ne 2
 229      -.na
 230      -\fB\&.SH DESCRIPTION\fR
 231      -.ad
 232      -.RS 23n
      162 +.El
      163 +.
      164 +.It Nm \&.SH DESCRIPTION
      165 +.
 233  166  A narrative overview of the command or function's external behavior. This
 234  167  includes how it interacts with files or data, and how it handles the standard
 235  168  input, standard output and standard error. Internals and implementation details
 236  169  are normally omitted. This section attempts to provide a succinct overview in
 237  170  answer to the question, "what does it do?"
 238      -.sp
      171 +.Lp
 239  172  Literal text from the synopsis appears in constant width, as do literal
 240  173  filenames and references to items that appear elsewhere in the  reference
 241  174  manuals. Arguments are italicized.
 242      -.sp
      175 +.Lp
 243  176  If a command interprets either subcommands or an input grammar, its command
 244      -interface or input grammar is normally described in a \fBUSAGE\fR section,
 245      -which follows the \fBOPTIONS\fR section.  The  \fBDESCRIPTION\fR section only
      177 +interface or input grammar is normally described in a
      178 +.Nm USAGE
      179 +section, which follows the
      180 +.Nm OPTIONS
      181 +section.  The
      182 +.Nm DESCRIPTION
      183 +section only
 246  184  describes the behavior of the command itself, not that of subcommands.
 247      -.RE
 248      -
 249      -.sp
 250      -.ne 2
 251      -.na
 252      -\fB\&.SH OPTIONS\fR
 253      -.ad
 254      -.RS 23n
      185 +.
      186 +.It Nm \&.SH OPTIONS
      187 +.
 255  188  The list of options along with a description of how each affects the command's
 256  189  operation.
 257      -.RE
 258      -
 259      -.sp
 260      -.ne 2
 261      -.na
 262      -\fB\&.SH RETURN VALUES\fR
 263      -.ad
 264      -.RS 23n
      190 +.
      191 +.It Nm \&.SH RETURN VALUES
      192 +.
 265  193  A list of the values the library routine will return to the calling  program
 266  194  and the conditions that cause these values to be returned.
 267      -.RE
 268      -
 269      -.sp
 270      -.ne 2
 271      -.na
 272      -\fB\&.SH EXIT STATUS\fR
 273      -.ad
 274      -.RS 23n
      195 +.
      196 +.It Nm \&.SH EXIT STATUS
      197 +.
 275  198  A list of the values the utility will return to the calling  program or shell,
 276  199  and the conditions that cause these values to be  returned.
 277      -.RE
 278      -
 279      -.sp
 280      -.ne 2
 281      -.na
 282      -\fB\&.SH FILES\fR
 283      -.ad
 284      -.RS 23n
      200 +.
      201 +.It Nm \&.SH FILES
      202 +.
 285  203  A list of files associated with the command or function.
 286      -.RE
 287      -
 288      -.sp
 289      -.ne 2
 290      -.na
 291      -\fB\&.SH SEE ALSO\fR
 292      -.ad
 293      -.RS 23n
      204 +.
      205 +.It Nm \&.SH SEE ALSO
      206 +.
 294  207  A comma-separated list of related manual pages, followed by references to other
 295  208  published materials.
 296      -.RE
 297      -
 298      -.sp
 299      -.ne 2
 300      -.na
 301      -\fB\&.SH DIAGNOSTICS\fR
 302      -.ad
 303      -.RS 23n
      209 +.
      210 +.It Nm \&.SH DIAGNOSTICS
      211 +.
 304  212  A list of diagnostic messages and an explanation of each.
 305      -.RE
 306      -
 307      -.sp
 308      -.ne 2
 309      -.na
 310      -\fB\&.SH BUGS\fR
 311      -.ad
 312      -.RS 23n
      213 +.
      214 +.It Nm \&.SH BUGS
      215 +.
 313  216  A description of limitations, known defects, and possible problems associated
 314  217  with the command or function.
 315      -.RE
 316      -
 317      -.SH FILES
 318      -.sp
 319      -.ne 2
 320      -.na
 321      -\fB\fB/usr/share/lib/tmac/an\fR \fR
 322      -.ad
 323      -.RS 27n
 324      -
 325      -.RE
 326      -
 327      -.sp
 328      -.ne 2
 329      -.na
 330      -\fB\fB/usr/share/man/windex\fR\fR
 331      -.ad
 332      -.RS 27n
 333      -
 334      -.RE
 335      -
 336      -.SH SEE ALSO
 337      -.sp
 338      -.LP
 339      -\fBman\fR(1), \fBnroff\fR(1), \fBtroff\fR(1), \fBwhatis\fR(1)
 340      -.sp
 341      -.LP
 342      -Dale Dougherty and   Tim O'Reilly, \fIUnix\fR \fIText\fR \fIProcessing\fR
      218 +.El
      219 +.Sh FILES
      220 +.Pa /usr/share/man/whatis
      221 +.Sh NOTES
      222 +The
      223 +.Nm
      224 +package should not be used for new documentation.  The
      225 +.Xr mdoc 5 ,
      226 +package is preferred, as it uses semantic markup rather than physical markup.
      227 +.Sh CODE SET INDEPENDENCE
      228 +When processed with
      229 +.Xr mandoc 1 ,
      230 +this package is Code Set Independent. However, when processed with
      231 +legacy tools such as
      232 +.Xr nroff 1
      233 +and
      234 +.Xr troff 1 ,
      235 +the use of multi-byte characters may not be supported.
      236 +.Sh INTERFACE STABILITY
      237 +.Nm Obsolete Committed .
      238 +The
      239 +.Xr mdoc 5
      240 +package should be used instead.
      241 +.Sh SEE ALSO
      242 +.Xr eqn 1 ,
      243 +.Xr man 1 ,
      244 +.Xr mandoc 1 ,
      245 +.Xr nroff 1 ,
      246 +.Xr troff 1 ,
      247 +.Xr tbl 1 ,
      248 +.Xr whatis 1 ,
      249 +.Xr mdoc 5 ,
      250 +.Rs
      251 +.%A Dale Dougherty and Tim O'Reilly
      252 +.%B Unix Text Processing
      253 +.Re
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX