|
|
| File: [Development] / inventor / doc / man / macros / Op (download)
Revision 1.1.1.1 (vendor branch), Tue Aug 15 12:56:12 2000 UTC (17 years, 2 months ago) by naaman
Initial check-in based on 2.1.5 (SGI IRIX) source tree. |
.de Op
.
.\" If first arg is "=", set the option list. If it's "+", add to the list.
.\" Otherwise, this marks an optional section. If none of the arguments are
.\" in the option list, we ignore the section, to the next .Op call.
.
. ie '\\$1'=' \{.
. ds Ol \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
. \}
. el .ie '\\$1'+' \{.
. as Ol \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
. \}
. el .ie '\\$2'-' \{.
. nr x 0
. Ox "\\$1" \\*(Ol
. if \\nx \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
. \}
. el .if \\n(.$>0 \{.
. ie '\\*(Ol'' .nr x 1
. el .nr x 0
. if \\nx=0&(\\n(.$>=1) .Ox \\$1 \\*(Ol
. if \\nx=0&(\\n(.$>=2) .Ox \\$2 \\*(Ol
. if \\nx=0&(\\n(.$>=3) .Ox \\$3 \\*(Ol
. if \\nx=0&(\\n(.$>=4) .Ox \\$4 \\*(Ol
. if \\nx=0&(\\n(.$>=5) .Ox \\$5 \\*(Ol
. if \\nx=0&(\\n(.$>=6) .Ox \\$6 \\*(Ol
. if \\nx=0&(\\n(.$>=7) .Ox \\$7 \\*(Ol
. if \\nx=0&(\\n(.$>=8) .Ox \\$8 \\*(Ol
. if \\nx=0&(\\n(.$>=9) .Ox \\$9 \\*(Ol
. if \\nx=0 .ig Op
. \}
..
.
.de Ox
.
.\" The first argument is the option we are looking for, and the remaining
.\" arguments are the option list we should look in. If the first arg
.\" matches the second, which is the start of the option list, we have
.\" a match. Otherwise, if there is a third argument, call ourself again
.\" with that one shifted over into the $2 slot to check it, and so on,
.\" shifting over again until we have worked our way through the entire
.\" option list.
.
. ie '\\$1'\\$2' .nr x 1
. el .if \\n(.$>=3 .Ox \\$1 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..