1 .\" $NetBSD: doc2html,v 1.61 2009/05/12 18:07:54 plunky Exp $
3 .\" Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
32 The first section of this package processes a large subset of the -mdoc macro
33 functions into HTML. All of the commonly used requests are implemented.
35 The second section implements -man (-man.old) macros. These are trivial
39 The initial purpose of these macros is to support distrib/notes.
40 It's very close, but not quite ready to do all of the man pages.
42 See src/distrib/notes/Makefile.inc for important groff command
43 examples. For HTML generation it is important to turn off overstrike
44 modes with -P-b -P-u -P-o.
48 There are a few internal macros and other symbols that don't contain
51 Need a tbl(1) command that generates html tables from tbl(1)
52 input. (Partially written.) For now, we just switch into <pre>
53 mode on .TS or .PS. Tbl input is very uncommon these days, anyway.
54 (-mdoc has the .Bl -column list, which eliminates most requirements
57 We should probably end all the html pages with an upward
58 pointing "contents" link, except right now there is nothing
61 We need "intro" or "contents" pages for each man/man? (man/html?)
64 WARNING! If you add a callable macro (or define an old one that
65 was missing) it MUST have a doc2html@@ alias. (Scan for @@ to see.)
68 .if dError .Error - multiple inclusion of doc2html
87 . ds doc-stack-rq-\\n[doc-stackp] \\$1
88 . nr doc-stack-ln-\\n[doc-stackp] \\n[.c]
93 . ie \\n[doc-stackp]<=0 .Error Extraneous \\$1 request
94 . el .nr doc-stackp -1
95 . ds doc-pop-tmp1 \\*[doc-stack-rq-\\n[doc-stackp]]
96 . if !
\a\\*[doc-pop-tmp1]
\a\\$1
\a \{\
97 . tm Need \\*[doc-pop-tmp1] before \\$1
98 . Error See line \\n[doc-stack-ln-\\n[doc-stackp]]
104 . ie \\w
\a\\V[\\$1]
\a .nr \\$1 \\V[\\$1]
111 . ie \\w
\a\\V[\\$1]
\a .ds \\$1 \\V[\\$1]
116 .doc-rlookup DOC_DEBUG_MODE 0
117 .doc-rlookup DOC_XR 0
118 .doc-slookup DOC_MANROOT ..
132 . it 1 doc-center-step
139 . if \\n[center-on] </center>
146 . ie \\n[center-on]<=0 .end-center
147 . el .it 1 doc-center-step
161 .ds body-params bgcolor="#FFFFFF" text="#000000"
168 .ds doc-punct { . , : ; ( ) [ ] }
172 .\" default EOL after .An
173 .\" can be changed with .An -nosplit
177 .ds tN <font\ size="-1">
179 .ds Px \\*(tNPOSIX\\*(aa
185 . ds MANROOT \V[MANROOT]
186 . if !\w
\a\*[MANROOT]
\a .ds MANROOT ..
193 .if \\n[DOC_DEBUG_MODE] \\$*
196 . as document-title " \\$*
199 . as document-title " \\$*
202 . as document-title " \\$*
205 .\"----------------------------------------------------------------------
206 .\" troff requests we delete
210 .\" troff requests we translate
218 . if \\n[in-pre]=0 <br>
222 . el .ie '\\$1'1' <br>
224 . if !\\n[in-pre] <pre>
226 . if \\n[sp-tmp]>0 .sp-real \\n[sp-tmp]u
227 . if !\\n[in-pre] </pre>
230 .\" Although the above probably works, the following is a lot simpler. It
231 .\" reduces the request to 1v, but why would you put more than one adjacent
232 .\" blank line in an html document anyway?
234 . ie \\n[center-on] <!-- -->
238 . DEBUG .tm end-preformat \\n[in-pre]
239 . if \\n[in-pre] </pre>
252 .\"----------------------------------------------------------------------
253 .\" Magic to open and close <body> and <html>
256 . if \\w
\a\\n[.z]
\a .ab ERROR, unclosed quotation from line \
258 . br-real \" should be unnecessary...we have fill turned off
259 . fl \" more paranoia
270 \\*[document-title]\\$*
273 <style type="text/css">
275 body { margin-left:4%; }
277 color: maroon; padding: 4pt; margin-left: -4%;
278 border: solid; border-width: thin; width: 100%;
279 background: rgb(204,204,255)
284 <body \\*[body-params]>
285 \\*[dot-de] init-html
289 . if \\n[.$]<1 .ab #\\n[.c]: Usage: .Lk href [ anchortext/punct ] ...
291 . ds doc-anchortext \\$1
294 . doc-checkpunct \\$1 \\*[doc-punct]
295 . if !\\n[doc-ispunct] \{\
296 . ds doc-anchortext \\$1
300 . ds doc-anchor <a href="\\*[doc-href]">\\*[doc-anchortext]</a>
302 . doc-checkpunct \\$1 \\*[doc-punct]
303 . if !\\n[doc-ispunct] .ab #\\n[.c]: .link ... '$1' -- Huh?
308 . nr doc-tmp-2 \\w^G\\*[doc-anchortext]^G
309 . nr doc-tmp-2 \\n[doc-tmp-2]/\\w'0'
310 . if \\n[doc-tmp-2]>=30 .ds doc-tmp1 D1
311 . \\*[doc-tmp1] \\*[doc-anchor]
315 .\"<a href="mailto:\\$1">\\$1</a>\\$2\\$3\\$4
341 . doc-checkpunct \\$1 \\*[doc-punct]
342 . ie !\\n[doc-ispunct] .as doc-tmp-1 " \\$1
346 <a href="#\\*[doc-tmp-1]">\\*[doc-tmp-1]</a>\\$1\\$2\\$3\\$4\\$5\\$6
355 .de doc-conditional-break
356 . if \\n[.c]>(\\n[doc-markbreak]+1) <br>
357 . nr doc-markbreak \\n[.c]
362 . doc-conditional-break
363
370 . doc-conditional-break
371
383 . if '\\$1'-literal' \{\
388 . if '\\$1'-offset' \{\
392 . ds start-display <dl compact><dt><dd>
395 . if '\\$1'-file' \{\
396 . ds get-file so \\$2
403 . if \\n[Bd-offset] <dl compact><dt><dd>
404 . if \\n[Bd-literal] <code>
405 <pre>\\" HOW DO WE GET RID OF THIS NEWLINE??
412 . if \\n[Bd-literal] </code>
413 . if \\n[Bd-offset] </dl>
418 . ds list-start UNKNOWN
421 . if '\\$1'-width' \{\
426 . if '\\$1'-column' \{\
427 . ds list-start <center><table>
428 . ds list-end </table></center>
429 . ds list-tag-prefix <tr><td>
434 . if '\\$1'-bullet' \{\
437 . ds list-tag-prefix <p>
438 . ds list-pp-prefix <li>
442 . if '\\$1'-dash' \{\
445 . ds list-tag-prefix <p>
446 . ds list-pp-prefix <dd>-
450 . if '\\$1'-enum' \{\
453 . ds list-tag-prefix <p>
454 . ds list-pp-prefix <li>
458 . if '\\$1'-nested' \{\
459 . \" this should suffice
463 . if '\\$1'-hyphen' \{\
466 . ds list-tag-prefix <p>
467 . ds list-pp-prefix <dd>-
471 . if '\\$1'-item' \{\
474 . ds list-tag-prefix <p>
475 . ds list-pp-prefix <dd>
480 . ds list-start <dl compact>
482 . ds list-tag-prefix <p><dt>
483 . ds list-pp-prefix <dd>
487 . if '\\$1'-diag' \{\
488 . ds list-start <dl compact>
490 . ds list-tag-prefix <p><dt>
491 . ds list-pp-prefix <dd>
495 . if '\\$1'-hang' \{\
496 . ds list-start <dl compact>
498 . ds list-tag-prefix <p><dt>
499 . ds list-pp-prefix <dd>
503 . if '\\$1'-ohang' \{\
506 . ds list-tag-prefix <p><dt>
507 . ds list-pp-prefix <dd>
511 . if '\\$1'-offset' \{\
512 . \" FIXME -- this isn't implemented
517 . if '\\$1'-compact' \{\
522 . if '\\$1'-inset' \{\
525 . ds list-tag-prefix <p><dt>
526 . ds list-pp-prefix <dd>
530 . ab Unknown .Bl list parameter \\$1 (#\\n(.c)
533 . if \\n[bl-is-compact] \{\
534 . if '\\*[list-tag-prefix]'<p>' .ds list-tag-prefix
535 . if '\\*[list-tag-prefix]'<p><dt>' .ds list-tag-prefix <dt>
537 . if '\\*[list-start]'UNKNOWN' .ab \
538 Unknown .Bl list type \\$1 (#\\n(.c)
539 . push-list-level start end tag-prefix pp-prefix
545 . ds list-\\$1-\\n[list-level] \\*[list-\\$1]
554 . as doc-pcresult <tr><td colspan=9>
561 . as doc-pcresult \\*[list-tag-prefix-\\n[list-level]]
563 . as doc-pcresult \\*[list-pp-prefix-\\n[list-level]]
568 \\*[list-end-\\n[list-level]]
572 .if !\\n(.$==1 .tm Usage: .Lb [library name]
573 .if "\\$1"libarm32" \&ARM32 Architecture Library (libarm32, -larm32)
574 .if "\\$1"libi386" \&i386 Architecture Library (libi386, -li386)
575 .if "\\$1"libm68k" \&m68k Architecture Library (libm68k, -lm68k)
576 .if "\\$1"libbluetooth" \&Bluetooth Library (libbluetooth, -lbluetooth)
577 .if "\\$1"libc" \&Standard C Library (libc, -lc)
578 .if "\\$1"libcdk" \&Curses Development Kit Library (libcdk, -lcdk)
579 .if "\\$1"libcompat" \&Compatibility Library (libcompat, -lcompat)
580 .if "\\$1"libcrypt" \&Crypt Library (libcrypt, -lcrypt)
581 .if "\\$1"libcurses" \&Curses Library (libcurses, -lcurses)
582 .if "\\$1"libedit" \&Command Line Editor Library (libedit, -ledit)
583 .if "\\$1"libevent" \&Event Notification Library (libevent, -levent)
584 .if "\\$1"libform" \&Curses Form Library (libform, -lform)
585 .if "\\$1"libintl" \&Internationalized Message Handling Library (libintl, -lintl)
586 .if "\\$1"libipsec" \&IPsec Policy Control Library (libipsec, -lipsec)
587 .if "\\$1"libkvm" \&Kernel Data Access Library (libkvm, -lkvm)
588 .if "\\$1"libm" \&Math Library (libm, -lm)
589 .if "\\$1"libmagic" \&Magic Number Recognition Library (libmagic, -lmagic)
590 .if "\\$1"libmenu" \&Curses Menu Library (libmenu, -lmenu)
591 .if "\\$1"libossaudio" \&OSS Audio Emulation Library (libossaudio, -lossaudio)
592 .if "\\$1"libpcap" \&Packet Capture Library (libpcap, -lpcap)
593 .if "\\$1"libpci" \&PCI Bus Access Library (libpci, -lpci)
594 .if "\\$1"libpmc" \&Performance Counters Library (libpmc, -lpmc)
595 .if "\\$1"libposix" \&POSIX Compatibility Library (libposix, -lposix)
596 .if "\\$1"libpthread" \&POSIX Thread Library (libpthread, -lpthread)
597 .if "\\$1"libresolv" \&DNS Resolver Library (libresolv, -lresolv)
598 .if "\\$1"librt" \&POSIX Real-time Library (librt, -lrt)
599 .if "\\$1"libtermcap" \&Termcap Access Library (libtermcap, -ltermcap)
600 .if "\\$1"libusbhid" \&USB Human Interface Devices Library (libusbhid, -lusbhid)
601 .if "\\$1"libutil" \&System Utilities Library (libutil, -lutil)
602 .if "\\$1"libz" \&Compression Library (libz, -lz)
607 . ds doc-cp-tmp1 \\$1
611 . if
\a\\*[doc-cp-tmp1]
\a\\$1
\a .nr doc-ispunct 1
616 .\" Parsed and Callable macros
618 .\" Internal structure: `recurse' and `mode-*-{on,off}'
622 .DEBUG .tm r \\n[r-lvl] __\\*[doc-pcresult]==\\$@__
624 . doc-checkpunct \\$1 \\*[doc-punct]
625 . if \\n[doc-ispunct] \{\
626 . as doc-punct-result \\$1
630 . nr is-request \\A'\\$1'
631 . if \\n[is-request] \{\
632 . if ddoc2html@@\\$1 .nr is-request 1
633 . if !ddoc2html@@\\$1 .nr is-request 0
635 . ie \\n[is-request] \{\
636 . ds recurse-tmp1 \\$1
638 . \\*[recurse-tmp1] \\$@
642 .DEBUG .tm r \\n[r-lvl] __\\*[doc-pcresult]+\\$1==\\$@__
643 . \" a random word, so output saved punctuation
644 . \" (normally saved until level 0 mode closure )
645 . if \\w
\a\\*[doc-pcresult]
\a \{\
646 . as doc-pcresult \\*[close-mode]
647 . as doc-pcresult \\*[doc-punct-result]
648 . as doc-pcresult \\*[open-mode]
649 . ds doc-punct-result
651 . if \\n[doc-dosep] .as doc-pcresult \\*[sepstring]
653 . as doc-pcresult \\$1
667 \\*[dot-de] mode-\\$1-on
668 . DEBUG .tm mode-\\$1-on <\\\\$@>
669 . rn close-mode xclose-mode
672 . as doc-pcresult \\\\*[xclose-mode]\\$2
674 \\*[dot-de] mode-\\$1-off
675 . DEBUG .tm mode-\\$1-off <\\\\$@>
676 . as doc-pcresult \\\\*[close-mode]
681 . as doc-pcresult \\$1
682 . if \\n[r-lvl]=0 \{\\*[doc-pcresult]\\*[doc-punct-result]
683 . ds doc-punct-result
690 .make-mode bold <b> </b>
691 .make-mode code <code> </code>
692 .make-mode em <em> </em>
693 .make-mode i <i> </i>
694 .make-mode caps <font\ size="-1"> </font>
695 .make-mode null \& \&
696 .make-mode function <code> </code>
711 . if \\n[doc-dosep] .as doc-pcresult \~
712 . as doc-pcresult \\$1
716 . as doc-pcresult \\*[close-mode]
738 . as doc-pcresult \&[
751 . as doc-pcresult FreeBSD
756 . ds Nm-result \\*[Nm-save]
758 . ie '\\$1'' .br-real
761 . if '\\*[Nm-save]'' .ds Nm-save \\$1
766 . as doc-pcresult \\*[Nm-result]
779 . if '\\$1'-nosplit' \{\
784 . as doc-pcresult \\*[an-eol]
788 . as doc-pcresult <a href="\\$1">\\$1</a>
794 . as doc-pcresult <a href="mailto:\\$1">\\$1</a>
800 . as doc-pcresult <td>
805 . doc-checkpunct \\$1 \\*[doc-punct]
806 . if !\\n[doc-ispunct] \{\
807 . as doc-pcresult \\$1
810 . as doc-pcresult BSD
815 . as doc-pcresult NetBSD
820 . as doc-pcresult OpenBSD
825 . as doc-pcresult UNIX
835 . as doc-pcresult \\$1
850 . if \\n[r-lvl]&\\n[doc-dosep] .as doc-pcresult \\*[sepstring]
851 . as doc-pcresult \\$1
862 . if \\n[r-lvl]&\\n[doc-dosep] .as doc-pcresult \\*[sepstring]
864 . ie \\n[quote-level]=1 \{\
868 . nr quotation_line \\n[.c]
879 . if \\w
\a\\n[.z]
\a=0 .Error no quotation is open
881 . if \\n[quote-level]=0 \{\
891 . as doc-pcresult \\$1\\*[quotation]\\
900 . doc-quote-open \\$2
905 . DEBUG .tm CLOSE 1,\\\\$@,
907 . DEBUG .tm CLOSE 2,\\\\$@,\\$3,
908 . recurse \\\\$@ \\$3
912 . doc-start-quote \\$2
918 .\" generate Aq Ao Ac Bq Bo Bc Brq Bro Brc Dq Do Dc
919 .\" Pq Po Pc Qq Qo Qc Sq So Sc Oo Oc
920 .make-quoter A < >
922 .make-quoter Br \&{ }
923 .make-quoter D \&`` ''
930 . ab Line \\n[.c], Error: \\$*
933 . as doc-pcresult <br><br>
941 . as doc-pcresult "\\$1
946 . ds sepstring , \" (need the space)
948 . as doc-pcresult \\*[close-mode])
954 . as doc-pcresult "\\$1
987 . if
\a\\$2
\a1
\a .nr have-sec 1
988 . if
\a\\$2
\a2
\a .nr have-sec 1
989 . if
\a\\$2
\a3
\a .nr have-sec 1
990 . if
\a\\$2
\a4
\a .nr have-sec 1
991 . if
\a\\$2
\a5
\a .nr have-sec 1
992 . if
\a\\$2
\a6
\a .nr have-sec 1
993 . if
\a\\$2
\a7
\a .nr have-sec 1
994 . if
\a\\$2
\a8
\a .nr have-sec 1
995 . if
\a\\$2
\a9
\a .nr have-sec 1
996 . ie \\n[DOC_XR]:(\\n[have-sec]=0) \{\
998 . ie \\n[have-sec]=0 .as doc-pcresult \\$1
999 . el .as doc-pcresult \\$1(\\$2)
1004 . if
\a\\*[Xr-tmp]
\aindex
\a .ds Xr-tmp xindex
1005 . as doc-pcresult <a href="\\*[DOC_MANROOT]/html\\$2/\\$1.html">
1006 . ie \\w
\a\\$2
\a=0 .as doc-pcresult \\$1
1007 . el .as doc-pcresult \\$1(\\$2)
1008 . as doc-pcresult </a>
1040 . as doc-pcresult <br>
1083 I used to have a caps-code mode for Er. But <code> apparently
1084 already implies a small mode or maybe actually small caps mode.
1094 . tm The .St (expand standard name) macro requires >= 1 arg
1099 . if "\\$1"-ansiC" \{\
1100 . ds std-tmp1 \&ANSI X3.159-1989
1101 . as std-tmp1 " \"exactly one space
1102 . as std-tmp1 (``ANSI C89'')
1104 . if "\\$1"-ansiC-89" \{\
1105 . ds std-tmp1 \&ANSI X3.159-1989
1106 . as std-tmp1 " \"exactly one space
1107 . as std-tmp1 (``ANSI C89'')
1109 . if "\\$1"-isoC" \{\
1110 . ds std-tmp1 \&ISO/IEC 9899:1990
1111 . as std-tmp1 " \"exactly one space
1112 . as std-tmp1 (``ISO C90'')
1114 . if "\\$1"-isoC-90" \{\
1115 . ds std-tmp1 \&ISO/IEC 9899:1990
1116 . as std-tmp1 " \"exactly one space
1117 . as std-tmp1 (``ISO C90'')
1119 . if "\\$1"-isoC-amd1" \{\
1120 . ds std-tmp1 \&ISO/IEC 9899/AMD1:1990
1121 . as std-tmp1 " \"exactly one space
1122 . as std-tmp1 (``ISO C90'')
1124 . if "\\$1"-isoC-tcor1" \{\
1125 . ds std-tmp1 \&ISO/IEC 9899/TCOR1:1990
1126 . as std-tmp1 " \"exactly one space
1127 . as std-tmp1 (``ISO C90'')
1129 . if "\\$1"-isoC-tcor2" \{\
1130 . ds std-tmp1 \&ISO/IEC 9899/TCOR2:1990
1131 . as std-tmp1 " \"exactly one space
1132 . as std-tmp1 (``ISO C90'')
1134 . if "\\$1"-isoC-99" \{\
1135 . ds std-tmp1 \&ISO/IEC 9899:1999
1136 . as std-tmp1 " \"exactly one space
1137 . as std-tmp1 (``ISO C99'')
1139 .\" POSIX Part 1: System API
1140 . if "\\$1"-p1003.1" \{\
1141 . ds std-tmp1 \&IEEE Std 1003.1
1142 . as std-tmp1 " \"exactly one space
1143 . as std-tmp1 (``\\*(Px.1'')
1145 . if "\\$1"-p1003.1-88" \{\
1146 . ds std-tmp1 \&IEEE Std 1003.1-1988
1147 . as std-tmp1 " \"exactly one space
1148 . as std-tmp1 (``\\*(Px.1'')
1150 . if "\\$1"-p1003.1-90" \{\
1151 . ds std-tmp1 \&ISO/IEC 9945-1:1990
1152 . as std-tmp1 " \"exactly one space
1153 . as std-tmp1 (``\\*(Px.1'')
1155 . if "\\$1"-iso9945-1-90" \{\
1156 . ds std-tmp1 \&ISO/IEC 9945-1:1990
1157 . as std-tmp1 " \"exactly one space
1158 . as std-tmp1 (``\\*(Px.1'')
1160 . if "\\$1"-p1003.1b-93" \{\
1161 . ds std-tmp1 \&IEEE Std 1003.1b-1993
1162 . as std-tmp1 " \"exactly one space
1163 . as std-tmp1 (``\\*(Px.1'')
1165 . if "\\$1"-p1003.1c-95" \{\
1166 . ds std-tmp1 \&IEEE Std 1003.1c-1995
1167 . as std-tmp1 " \"exactly one space
1168 . as std-tmp1 (``\\*(Px.1'')
1170 . if "\\$1"-p1003.1i-95" \{\
1171 . ds std-tmp1 \&IEEE Std 1003.1i-1995
1172 . as std-tmp1 " \"exactly one space
1173 . as std-tmp1 (``\\*(Px.1'')
1175 . if "\\$1"-p1003.1-96" \{\
1176 . ds std-tmp1 \&ISO/IEC 9945-1:1996
1177 . as std-tmp1 " \"exactly one space
1178 . as std-tmp1 (``\\*(Px.1'')
1180 . if "\\$1"-iso9945-1-96" \{\
1181 . ds std-tmp1 \&ISO/IEC 9945-1:1996
1182 . as std-tmp1 " \"exactly one space
1183 . as std-tmp1 (``\\*(Px.1'')
1185 . if "\\$1"-p1003.1g-2000" \{\
1186 . ds std-tmp1 \&IEEE Std 1003.1g-2000
1187 . as std-tmp1 " \"exactly one space
1188 . as std-tmp1 (``\\*(Px.1'')
1190 . if "\\$1"-p1003.1-2001" \{\
1191 . ds std-tmp1 \&IEEE Std 1003.1-2001
1192 . as std-tmp1 " \"exactly one space
1193 . as std-tmp1 (``\\*(Px.1'')
1195 . if "\\$1"-p1003.1-2004" \{\
1196 . ds std-tmp1 \&IEEE Std 1003.1-2004
1197 . as std-tmp1 " \"exactly one space
1198 . as std-tmp1 (``\\*(Px.1'')
1200 . if "\\$1"-p1003.1-2008" \{\
1201 . ds std-tmp1 \&IEEE Std 1003.1-2008
1202 . as std-tmp1 " \"exactly one space
1203 . as std-tmp1 (``\\*(Px.1'')
1205 .\" POSIX Part 2: Shell and Utilities
1206 . if "\\$1"-p1003.2" \{\
1207 . ds std-tmp1 \&IEEE Std 1003.2
1208 . as std-tmp1 " \"exactly one space
1209 . as std-tmp1 (``\\*(Px.2'')
1211 . if "\\$1"-p1003.2-92" \{\
1212 . ds std-tmp1 \&IEEE Std 1003.2-1992
1213 . as std-tmp1 " \"exactly one space
1214 . as std-tmp1 (``\\*(Px.2'')
1216 . if "\\$1"-p1003.2a-92" \{\
1217 . ds std-tmp1 \&IEEE Std 1003.2a-1992
1218 . as std-tmp1 " \"exactly one space
1219 . as std-tmp1 (``\\*(Px.2'')
1221 . if "\\$1"-iso9945-2-93" \{\
1222 . ds std-tmp1 \&ISO/IEC 9945-2:1993
1223 . as std-tmp1 " \"exactly one space
1224 . as std-tmp1 (``\\*(Px.2'')
1227 . if "\\$1"-susv2" \{\
1228 . ds std-tmp1 \&Version 2 of the Single UNIX Specification
1229 . as std-tmp1 " \"exactly one space
1230 . as std-tmp1 (``SUSv2'')
1232 . if "\\$1"-svid4" \{\
1233 . ds std-tmp1 \&System V Interface Definition,
1234 . as std-tmp1 " \"exactly one space
1235 . as std-tmp1 \&Fourth Edition
1236 . as std-tmp1 " \"exactly one space
1237 . as std-tmp1 (``SVID4'')
1239 . if "\\$1"-xbd5" \{\
1240 . ds std-tmp1 X/Open System Interface Definitions Issue 5
1241 . as std-tmp1 " \"exactly one space
1242 . as std-tmp1 (``\\*(tNXBD5\\*(aa'')
1244 . if "\\$1"-xcu5" \{\
1245 . ds std-tmp1 X/Open Commands and Utilities Issue 5
1246 . as std-tmp1 " \"exactly one space
1247 . as std-tmp1 (``\\*(tNXCU5\\*(aa'')
1249 . if "\\$1"-xcurses4.2" \{\
1250 . ds std-tmp1 X/Open Curses, Issue 4, Version 2
1251 . as std-tmp1 " \"exactly one space
1252 . as std-tmp1 (``\\*(tNXCURSES4.2\\*(aa'')
1254 . if "\\$1"-xns5" \{\
1255 . ds std-tmp1 X/Open Networking Services Issue 5
1256 . as std-tmp1 " \"exactly one space
1257 . as std-tmp1 (``\\*(tNXNS5\\*(aa'')
1259 . if "\\$1"-xns5.2" \{\
1260 . ds std-tmp1 X/Open Networking Services Issue 5.2
1261 . as std-tmp1 " \"exactly one space
1262 . as std-tmp1 (``\\*(tNXNS5.2\\*(aa'')
1264 . if "\\$1"-xpg3" \{\
1265 . ds std-tmp1 X/Open Portability Guide Issue 3
1266 . as std-tmp1 " \"exactly one space
1267 . as std-tmp1 (``XPG3'')
1269 . if "\\$1"-xpg4" \{\
1270 . ds std-tmp1 X/Open Portability Guide Issue 4
1271 . as std-tmp1 " \"exactly one space
1272 . as std-tmp1 (``XPG4'')
1274 . if "\\$1"-xpg4.2" \{\
1275 . ds std-tmp1 X/Open Portability Guide Issue 4, Version 2
1276 . as std-tmp1 " \"exactly one space
1277 . as std-tmp1 (``XPG4.2'')
1279 . if "\\$1"-xsh5" \{\
1280 . ds std-tmp1 X/Open System Interfaces and Headers Issue 5
1281 . as std-tmp1 " \"exactly one space
1282 . as std-tmp1 (``\\*(tNXSH5\\*(aa'')
1285 . if "\\$1"-ieee754" \{\
1286 . ds std-tmp1 \&IEEE Std 754-1985
1288 . if "\\$1"-ieee1275-94" \{\
1289 . ds std-tmp1 \&IEEE Std 1275-1994
1290 . as std-tmp1 " \"exactly one space
1291 . as std-tmp1 (``Open Firmware'')
1293 . if "\\$1"-iso8802-3" \{\
1294 . ds std-tmp1 \&ISO/IEC 8802-3:1989
1296 . if "\\*[std-tmp1]"ERROR" .Error no such std: .St \\$*
1298 . as doc-pcresult \~\\*[std-tmp1]\~
1304 I've observed that <code> does decent things with caps, and it should
1305 be reminiscent of the old typewriter-style unix logos.
1309 . if "\\$1"32v" Version 32V <code>AT&T UNIX</code>\\$2
1310 . if "\\$1"V" \<code>AT&T</code> System V <code>UNIX</code>\\$2
1311 . if "\\$1"V.1" <code>AT&T</code> System V.1 <code>UNIX</code>\\$2
1312 . if "\\$1"V.2" <code>AT&T</code> System V.2 <code>UNIX</code>\\$2
1313 . if "\\$1"V.3" <code>AT&T</code> System V.3 <code>UNIX</code>\\$2
1314 . if "\\$1"V.4" <code>AT&T</code> System V.4 <code>UNIX</code>\\$2
1315 . if "\\$1"v1" Version 1 <code>AT&T UNIX</code>\\$2
1316 . if "\\$1"v5" Version 5 <code>AT&T UNIX</code>\\$2
1317 . if "\\$1"v6" Version 6 <code>AT&T UNIX</code>\\$2
1318 . if "\\$1"v7" Version 7 <code>AT&T UNIX</code>\\$2
1321 . if "\\$1"32v" Version 32V <code>AT&T UNIX</code>
1322 . if "\\$1"V" <code>AT&T</code> System V <code>UNIX</code>
1323 . if "\\$1"V.1" <code>AT&T</code> System V.1 <code>UNIX</code>
1324 . if "\\$1"V.2" <code>AT&T</code> System V.2 <code>UNIX</code>
1325 . if "\\$1"V.3" <code>AT&T</code> System V.3 <code>UNIX</code>
1326 . if "\\$1"V.4" <code>AT&T</code> System V.4 <code>UNIX</code>
1327 . if "\\$1"v1" Version 1 <code>AT&T UNIX</code>
1328 . if "\\$1"v5" Version 5 <code>AT&T UNIX</code>
1329 . if "\\$1"v6" Version 6 <code>AT&T UNIX</code>
1330 . if "\\$1"v7" Version 7 <code>AT&T UNIX</code>
1333 . if 1 <code>AT&T UNIX</code>
1336 .\"----------------------------------------------------------------------
1338 .\" There must be a doc2html alias for all callable macros
1340 .als doc2html@@Dd Dd
1341 .als doc2html@@Dt Dt
1342 .als doc2html@@Os Os
1343 .als doc2html@@br br
1344 .als doc2html@@sp sp
1345 .als doc2html@@fi fi
1346 .als doc2html@@nf nf
1347 .als doc2html@@Sh Sh
1348 .als doc2html@@Ss Ss
1349 .als doc2html@@Pp Pp
1350 .als doc2html@@D1 D1
1351 .als doc2html@@Dl Dl
1352 .als doc2html@@Bd Bd
1353 .als doc2html@@Ed Ed
1354 .als doc2html@@Bl Bl
1355 .als doc2html@@It It
1356 .als doc2html@@El El
1357 .als doc2html@@Fl Fl
1358 .als doc2html@@Cm Cm
1359 .als doc2html@@Op Op
1360 .als doc2html@@Em Em
1361 .als doc2html@@Fx Fx
1362 .als doc2html@@Ox Ox
1363 .als doc2html@@Nm Nm
1364 .als doc2html@@Nd Nd
1365 .als doc2html@@At At
1366 .als doc2html@@Bx Bx
1367 .als doc2html@@Nx Nx
1368 .als doc2html@@Ux Ux
1369 .als doc2html@@Ql Ql
1370 .als doc2html@@Pf Pf
1371 .als doc2html@@Ns Ns
1372 .als doc2html@@Ft Ft
1373 .als doc2html@@Fn Fn
1374 .als doc2html@@Fo Fo
1375 .als doc2html@@Fc Fc
1376 .als doc2html@@Ar Ar
1377 .als doc2html@@Ic Ic
1378 .als doc2html@@Fa Fa
1379 .als doc2html@@Xr Xr
1380 .als doc2html@@Dv Dv
1381 .als doc2html@@Ic Ic
1382 .als doc2html@@Pa Pa
1383 .als doc2html@@Tn Tn
1384 .als doc2html@@Fd Fd
1385 .als doc2html@@Va Va
1386 .als doc2html@@Li Li
1387 .als doc2html@@Sy Sy
1388 .als doc2html@@Me Me
1389 .als doc2html@@Ev Ev
1390 .als doc2html@@Cd Cd
1391 .als doc2html@@St St
1392 .als doc2html@@Er Er
1393 .als doc2html@@Aq Aq
1394 .als doc2html@@Ao Ao
1395 .als doc2html@@Ac Ac
1396 .als doc2html@@Bq Bq
1397 .als doc2html@@Bo Bo
1398 .als doc2html@@Bc Bc
1399 .als doc2html@@Brq Brq
1400 .als doc2html@@Bro Bro
1401 .als doc2html@@Brc Brc
1402 .als doc2html@@Dq Dq
1403 .als doc2html@@Do Do
1404 .als doc2html@@Dc Dc
1405 .als doc2html@@Qq Qq
1406 .als doc2html@@Qo Qo
1407 .als doc2html@@Qc Qc
1408 .als doc2html@@Pq Pq
1409 .als doc2html@@Po Po
1410 .als doc2html@@Pc Pc
1411 .als doc2html@@Sq Sq
1412 .als doc2html@@So So
1413 .als doc2html@@Sc Sc
1414 .als doc2html@@Oo Oo
1415 .als doc2html@@Oc Oc
1416 .als doc2html@@Ta Ta
1417 .als doc2html@@Mt Mt
1418 .als doc2html@@Lk Lk
1419 .als doc2html@@No No
1420 .als doc2html@@An An
1424 . tm Hint: Should this have been .Em ...?
1425 . Error end-macro (.em) respecification is not allowed.
1429 ----------------------------------------------------------------------
1430 ----------------------------------------------------------------------
1431 ----------------------------------------------------------------------
1432 THESE ARE THE -man (-man.old) MACRO FUNCTIONS
1434 Internal symbols relating to -man are prefixed with mo-
1435 The body-params string used with -mdoc2html is used here as well.
1439 . nr mo-section \\$2
1444 <h3 id="\\$*"> \\$* </h3>
1449 <h4 id="\\$*"> \\$* </h4>
1452 . ie \\n(.$ <b>\&\\$*</b>
1459 . ie \\n(.$ <i>\&\\$*</i>
1462 . it 1 mo-end-italic
1473 . it 1 mo-end-smallcaps
1476 .de mo-end-smallcaps
1480 . mo-try-link \\$1 \\$2
1481 . if !\\n[mo-did-link] \{\
1483 . while \\n(.$>=2 \{\
1484 . as mo-bi-tmp1 <b>\\$1</b><i>\\$2</i>
1488 . as mo-bi-tmp1 \\$*
1493 . mo-try-link \\$1 \\$2
1494 . if !\\n[mo-did-link] \{\
1496 . while \\n(.$>=2 \{\
1497 . as mo-bi-tmp1 <b>\\$1</b>\\$2
1501 . as mo-bi-tmp1 \\$*
1506 . mo-try-link \\$1 \\$2
1507 . if !\\n[mo-did-link] \{\
1509 . while \\n(.$>=2 \{\
1510 . as mo-bi-tmp1 <i>\\$1</i><b>\\$2</b>
1514 . as mo-bi-tmp1 \\$*
1519 . mo-try-link \\$1 \\$2
1520 . if !\\n[mo-did-link] \{\
1522 . while \\n(.$>=2 \{\
1523 . as mo-bi-tmp1 <i>\\$1</i>\\$2
1527 . as mo-bi-tmp1 \\$*
1532 \&<<font size=-1>CTRL/</font>\\$*>
1558 . if !\\n[mo-in-dl] <dl compact>
1565 . if \\n[mo-in-dl] </dl>
1578 . if \\w'\\*[\\$2]' \{\