⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmac.doc

📁 早期freebsd实现
💻 DOC
📖 第 1 页 / 共 5 页
字号:
.\" Copyright (c) 1991 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. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. 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..\".\"     @(#)doc	5.8 (Berkeley) 8/5/91.\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be.\" installed as mdoc/doc-* rather than tmac.doc-* (the filename.\" `tmac.doc-common' would be too long); when using groff, the doc-* files.\" are loaded using the `mso' request..\"   .\" .mdoc-parse - attempt to parse troff request arguments.\"     %beginstrip%.if \n(.g \{\.cp 0.ftr C CR.\}.if \n(.g .ig.de sO.so /usr/share/tmac/\\$1...if !\n(.g .ig.de sO.mso mdoc/\\$1...if t \{\.       sO doc-ditroff.\}.if n \{\.       sO doc-nroff.\}.sO doc-common.sO doc-syms.\" NS Db macro - start/stop DEBUG MODE.\" NS Db register DEBUG MODE.\" NS iN register DEBUG MODE (inline if 1, to stderr if 0 (default)).nr Db 0.de Db.ie \\n(.$==0 \{\.	ie \\n(Db==0 \{\.tm DEBUGGING ON.		nr Db 1.	\}.	el \{\.tm DEBUGGING OFF.		nr Db 0.	\}.\}.el \{\.	if "\\$1"on" \{\.tm DEBUGGING ON.		nr Db 1.	\}.	if "\\$1"off" \{\.tm DEBUGGING OFF.		nr Db 0.	\}.\}...\" NS aV macro - parse argument vector (recursive) (.aV arg ... ).\" NS fV macro - parse argument vector (recursive) (.fV).\" NS aC register argument counter (aV/fV).\" NS fV register argument counter (must set to \\n(.$ prior to reuqest) (fV).\" NS A[0-9] argument vector (aV/fV).\" NS C[0-9] reg. arg type(1=macro, 2=arg, 3=punct-suf, 4=punct-pre) (aV/fV).\" NS S[0-9] space vector (sV).\" NS aP register argument pointer (aV).\" NS yU local string used for debugging.\" NS iI local register (indent for inline debug mode).\" NS mN name of calling request (set in each user requestable macro).de aV.nr aC \\n(aC+1.ie "\\$1"|" \{\.	if "\\*(mN"Op" .ds A\\n(aC \fR\\$1\fP.	if "\\*(mN"Ar" .ds A\\n(aC \fR\\$1\fP.	if "\\*(mN"Fl" .ds A\\n(aC \fR\\$1\fP.	if "\\*(mN"Cm" .ds A\\n(aC \fR\\$1\fP.	if "\\*(mN"It" .ds A\\n(aC \fR\\$1\fP.\}.el .ds A\\n(aC \\$1.aU \\n(aC.nr C\\n(aC \\n(aT.s\\n(aT.if \\n(Db \{\.	if \\n(aT==1 .ds yU Executable.	if \\n(aT==2 .ds yU String.	if \\n(aT==3 .ds yU Closing Punctuation or suffix.	if \\n(aT==4 .ds yU Opening Punctuation or prefix.	if \\n(iN==1 \{\.		br.		nr iI \\n(.iu.		in -\\n(iIu.		if \\n(aC==1 \{\\&\fBDEBUG(argv) MACRO:\fP `.\\*(mN' \fBLine #:\fP \\n(.c.		\}\&\t\fBArgc:\fP \\n(aC  \fBArgv:\fP `\\*(A\\n(aC'  \fBLength:\fP \\n(sW\&\t\fBSpace:\fP `\\*(S\\n(aC'  \fBClass:\fP \\*(yU.	\}.	if \\n(iN==0 \{\.		if \\n(aC==1 \{\.			tm DEBUG(argv) MACRO: `.\\*(mN'  Line #: \\n(.c.		\}.		tm \tArgc: \\n(aC  Argv: `\\*(A\\n(aC'  Length: \\n(sW.		tm \tSpace: `\\*(S\\n(aC'  Class: \\*(yU.	\}.\}.ie \\n(.$==1 \{\.	nr aP 0.	ie \\n(dZ==1 \{\.		if \\n(oM>1 .as b1 \\*(S0.	\}.	el \{\.		if \\n(oM>0 \{\.			if \\n(fC==0 .as b1 \\*(S0.		\}.	\}.	ds S0 \\*(S\\n(aC.	if \\n(Db \{\.		if \\n(iN==1 \{\\&MACRO REQUEST: \t.\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9.			br.			in \\n(iIu.		\}.		if \\n(iN==0 \{\.tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9.		\}.	\}.\}.el .aV \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9...de fV.nr aC \\n(aC+1.if "\\*(A\\n(aC"|" \{\.	if "\\*(mN"Op" .ds A\\n(aC \fR\\*(A\\n(aC\fP.	if "\\*(mN"Ar" .ds A\\n(aC \fR\\*(A\\n(aC\fP.	if "\\*(mN"Fl" .ds A\\n(aC \fR\&\\*(A\\n(aC\fP.	if "\\*(mN"Cm" .ds A\\n(aC \fR\\*(A\\n(aC\fP.	if "\\*(mN"It" .ds A\\n(aC \fR\\*(A\\n(aC\fP.\}.aU \\n(aC.nr C\\n(aC \\n(aT.s\\n(aT.if \\n(Db \{\.	if \\n(aT==1 .ds yU Executable.	if \\n(aT==2 .ds yU String.	if \\n(aT==3 .ds yU Closing Punctuation or suffix.	if \\n(aT==4 .ds yU Opening Punctuation or prefix.	if \\n(iN==1 \{\.		br.		nr iI \\n(.iu.		in -\\n(iIu.		if \\n(aC==1 \{\\&\fBDEBUG(fargv) MACRO:\fP `.\\*(mN'  \fBLine #:\fP \\n(.c.		\}\&\t\fBArgc:\fP \\n(aC  \fBArgv:\fP `\\*(A\\n(aC'  \fBLength:\fP \\n(sW\&\t\fBSpace:\fP `\\*(S\\n(aC'  \fBClass:\fP \\*(yU.	\}.	if \\n(iN==0 \{\.		if \\n(aC==1 \{\.			tm DEBUG(fargv) MACRO: `.\\*(mN'  Line #: \\n(.c.		\}.		tm \tArgc: \\n(aC  Argv: `\\*(A\\n(aC'  Length: \\n(sW.		tm \tSpace: `\\*(S\\n(aC'  Class: \\*(yU.	\}.\}.ie \\n(fV==1 \{\.	nr aP 0.	ie \\n(dZ==1 \{\.		if \\n(oM>1 .as b1 \\*(S0.	\}.	el \{\.		if \\n(oM>0 \{\.			if \\n(fC==0 .as b1 \\*(S0.		\}.	\}.	ds S0 \\*(S\\n(aC.	nr fV 0.	if \\n(Db \{\.		ie \\n(iN \{\\&\tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9.			br.			in \\n(iIu.		\}.		el \{\.tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9.		\}.	\}.\}.el \{\.	nr fV \\n(fV-1.	fV.\}...\" NS aX macro - stuff saved strings into `b1' (used by -diag list).de aX.nr aP \\n(aP+1.as b1 \&\\*(A\\n(aP.ie \\n(fV==1 \{\.	nr aP 0.	nr fV 0.\}.el \{\.	as b1 \&\\*(sV.	nr fV \\n(fV-1.	aX.\}...\" NS aI macro - append arg to arg vector: .aI [arg] [type] (used by .En only).de aI.ie \\n(aC<9 \{\.	nr aC \\n(aC+1.	ds A\\n(aC \\$1.	nr C\\n(aC \\$2.	s\\$2.	ds xV S\\n(aC.\}.el \{\.	tm Usage: Too many arguments (maximum of 8 accepted) (#\\n(.c).	tm \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9.\}...\".\" NS aZ macro - print buffer (pB) and clean up arg vectors (aY).de aZ.pB.aY...\" NS aY macro - clean up arg vector.de aY.rm C0 C1 C2 C3 C4 C5 C6 C7 C8 C9.rm A0 A1 A2 A3 A4 A5 A6 A7 A8 A9.rm S1 S2 S3 S4 S5 S6 S7 S8 S9.nr aC 0.nr aP 0...\" NS pB macro - test for end of vector (eol) (print b1 buffer or divert).de pB.ie \\n(dZ==1 \{\.	if \\n(oM==1 \{\&\\*(b1.		rm S0.		ds b1.	\}.	if \\n(oM==0 \{\.		x2.	\}.\}.el \{\.	ie \\n(oM==0 \{\&\\*(b1.		rm S0.		ds b1.	\}.	el \{\.		if ((\\n(sM==1)&(\\n(tP==0)) \{\.			x1.		\}.	\}.\}.hy...\" NS x1 macro - save buffer and divert if tP flag set.\" NS eB diversion string.\" NS b2 string save of buffer.\" NS lK register count of lines read from input file.de x1.nr dZ \\n(dZ+1.ds b2 \\*(b1.ds b1.nr lK \\n(.c.ev 2.fi.di eB...\".\" NS x2 macro - end diversion and print.\" NS b0 string local temporary.de x2.br.di.ev.ie (\\n(.c-\\n(lK>1) \{\.	ds b0 \&\\*(eB\\.	ds b1 \\*(b2\\*(b0\\*(b1.\}.el .ds b1 \\*(b2\\*(b1\&\\*(b1.rm eB b2 b0 b1.nr dZ \\n(dZ-1...\" NS Fl macro - flags (appends - and prints flags).\" NS cF register save current font.\" NS cZ register save current font size.de Fl.as b1 \&\\*(fL.if \\n(aC==0 \{\.	ie \\n(.$==0 \{\.		as b1 \&\|\-\|\fP\s0.		pB.	\}.	el \{\.		ds mN Fl.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9.	\}.\}.if \\n(aC>0 \{\.	ie (\\n(aC-\\n(aP)==0 \{\.		as b1 \&\|\-\fP\s0.		aZ.	\}.	el \{\.		nr aP \\n(aP+1.		ie \\n(C\\n(aP==1 \{\.			as b1 \&\|\-\fP\s0.			\\*(A\\n(aP.		\}.		el \{\.			nr cF \\n(.f.			nr cZ \\n(.s.			if \\n(C\\n(aP==3 \{\.				as b1 \&\|\-\|.			\}.			fR.		\}.	\}.\}...\".\" NS fR macro - Fl flag recursion routine (special handling).\" NS jM local register.\" NS jN local register.\".de fR.hy 0.nr jM \\n(C\\n(aP.ie \\n(jM==1 \{\.	as b1 \&\fP\s0.	\\*(A\\n(aP.\}.el \{\.	nr jN \\n(aP.	ie \\n(jM==2 \{\.		ie !"\\*(A\\n(aP"\\*(Ba" \{\.			ie !"\\*(A\\n(aP"\fR|\fP" \{\.		               ie "\\*(A\\n(aP"-" .as b1 \&\|\-\^\-\|.		               el .as b1 \&\|\-\\*(A\\n(aP.			\}.			el .as b1 \&\\*(A\\n(aP.		\}.		el .as b1 \&\\*(A\\n(aP.	\}.	el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0.	ie \\n(aC==\\n(aP \{\.		if \\n(jM==4 .as b1 \&\|\-.		as b1 \&\fP\s0.		aZ.	\}.	el \{\.		nr aP \\n(aP+1.		ie ((\\n(C\\n(aP==3)&(\\n(C\\n(jN==4)) .as b1 \&\|\-.		el .as b1 \&\\*(S\\n(jN.		fR \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9.	\}.\}.rr jM jN...\".\" NS nR macro - general name recursion routine.\" NS jM local register.\" NS jN local register.de nR.hy 0.nr jM \\n(C\\n(aP.ie \\n(jM==1 \{\.	as b1 \&\f\\n(cF\s\\n(cZ.	\\*(A\\n(aP.\}.el \{\.	nr jN \\n(aP.	ie \\n(jM==2 .as b1 \&\\*(A\\n(aP.	el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0.	ie \\n(aC==\\n(aP \{\.		as b1 \&\f\\n(cF\s\\n(cZ.		aZ.	\}.	el \{\.		nr aP \\n(aP+1.		as b1 \&\\*(S\\n(jN.		nR.	\}.\}.rr jM jN...\" NS Ar macro - command line `argument' macro.\".de Ar.as b1 \\*(aR.if \\n(aC==0 \{\.       ie \\n(.$==0 \{\.		as b1 file\ ...\fP\s0.		pB.	\}.	el \{\.		ds mN Ar.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9.	\}.\}.if \\n(aC>0 \{\.	ie (\\n(aC-\\n(aP)==0 \{\.		as b1 \&file\ ...\fP\s0.		aZ.	\}.	el \{\.		nr aP \\n(aP+1.		ie \\n(C\\n(aP==1 \{\.			as b1 \&file\ ...\fP\s0.			\\*(A\\n(aP.               \}.               el \{\.                       nr cF \\n(.f.			nr cZ \\n(.s.			if \\n(C\\n(aP==3 \{\.				as b1 \&file\ ....			\}.                       nR.		\}.       \}.\}...\" NS Ad macro - Addresses.de Ad.if \\n(aC==0 \{\.       ie \\n(.$==0 .tm Usage: .Ad address ... \\*(Pu (#\\n(.c).	el \{\.		ds mN Ad.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9.	\}.\}.if \\n(aC>\\n(aP \{\.	as b1 \\*(aD.	nr aP \\n(aP+1.       nr cF \\n(.f.	nr cZ \\n(.s.       nR.\}...\" NS Cd macro - Config declaration (for section 4 SYNOPSIS) (not callable).\" needs work - not very translatable.de Cd.if \\n(aC==0 \{\.       ie \\n(.$==0 .tm Usage: .Cd Configuration file declaration (#\\n(.c). 	el \{\.		ds mN Cd.               ds A1 \\$1.               ds A2 \\$2.               ds A3 \\$3.               ds A4 \\$4.               ds A5 \\$5.               ds A6 \\$6.               ds A7 \\$7.               ds A8 \\$8.               ds A9 \\$9. 		nr fV \\n(.$. 		fV.	\}.\}.br.if \\n(aC>\\n(aP \{\.	as b1 \\*(nM.	nr aP \\n(aP+1.       nr cF \\n(.f.	nr cZ \\n(.s.	ie \\n(nS \{\.		if "\\*(mN"Cd" \{\.			rs.			ie \\n(nS>1 .br.			el \{\.				if \\n(iS==0 .nr iS \\n(Dsu.			\}.			in +\\n(iSu.			ti -\\n(iSu.			nr nS \\n(nS+1.		\}.	nR.	in -\\n(iSu.	\}.	el .nR.\}...\" NS Cm macro - Interactive command modifier (flag).de Cm.if \\n(aC==0 \{\.       ie \\n(.$==0 .tm Usage: .Cm Interactive command modifier ... \\*(Pu (#\\n(.c).	el \{\.		ds mN Cm.               ds A1 \\$1.               ds A2 \\$2.               ds A3 \\$3.               ds A4 \\$4.               ds A5 \\$5.               ds A6 \\$6.               ds A7 \\$7.               ds A8 \\$8.               ds A9 \\$9.		nr fV \\n(.$.		fV.	\}.\}.if \\n(aC>\\n(aP \{\.	as b1 \\*(cM.	nr aP \\n(aP+1.       nr cF \\n(.f.	nr cZ \\n(.s.       nR.\}...\" NS Dv macro - define variable.de Dv.if \\n(aC==0 \{\.       ie \\n(.$==0 .tm Usage: .Dv define_variable ... \\*(Pu (#\\n(.c).	el \{\.		ds mN Dv.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9.	\}.\}.if \\n(aC>\\n(aP \{\.	as b1 \\*(eR.	nr aP \\n(aP+1.       nr cF \\n(.f.	nr cZ \\n(.s.       nR.\}...\" NS Em macro - Emphasis.de Em.if \\n(aC==0 \{\.       ie \\n(.$==0 \{\.		tm Usage: .Em text ... \\*(Pu (#\\n(.c).	\}.	el \{\.		ds mN Em.               ds A1 \\$1.               ds A2 \\$2.               ds A3 \\$3.               ds A4 \\$4.               ds A5 \\$5.               ds A6 \\$6.               ds A7 \\$7.               ds A8 \\$8.               ds A9 \\$9.		nr fV \\n(.$.		fV.	\}.\}.if \\n(aC>\\n(aP \{\.	as b1 \\*(eM.	nr aP \\n(aP+1.       nr cF \\n(.f.	nr cZ \\n(.s.       nR.\}...\" NS Er macro - Errnotype.de Er.if \\n(aC==0 \{\.       ie \\n(.$==0 .tm Usage: .Er ERRNOTYPE ... \\*(Pu (#\\n(.c).	el \{\.		ds mN Er.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9.	\}.\}.if \\n(aC>\\n(aP \{\.	as b1 \\*(eR.	nr aP \\n(aP+1.       nr cF \\n(.f.	nr cZ \\n(.s.       nR.\}...\" NS Ev macro - Environment variable.de Ev.if \\n(aC==0 \{\.       ie \\n(.$==0 .tm Usage: .Ev ENVIRONMENT_VARIABLE ... \\*(Pu (#\\n(.c).	el \{\.		ds mN Ev.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9.	\}.\}.if \\n(aC>\\n(aP \{\.	as b1 \\*(eV.	nr aP \\n(aP+1.       nr cF \\n(.f.	nr cZ \\n(.s.       nR.\}...\" NS Fd macro - function declaration - not callable (& no err check).\" NS fD register subroutine test (in synopsis only).\" NS fY register subroutine count (in synopsis only) (fortran only).\" NS fZ register also subroutine count (in synopsis only).de Fd.ds mN Fd.if \\n(nS>0 \{\.\"	if a variable type was the last thing given, want vertical space.	if \\n(fX>0 \{\.		Pp.		nr fX 0.	\}.\"	if a subroutine was the last thing given, want vertical space.	if \\n(fZ>0 \{\.		ie \\n(fD==0 \{\.			Pp.			rs.		\}.		el .br.	\}.	nr fD \\n(fD+1.\}.nr cF \\n(.f.nr cZ \\n(.s\&\\*(fD\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9.br.ft \\n(cF.fs \\n(cZ...\" NS Fr macro - function return value - not callable (at the moment).de Fr.if \\n(aC==0 \{\.       ie \\n(.$==0 .tm Usage: .Fr Function_return_value... \\*(Pu (#\\n(.c).	el \{\.		ds mN Fr.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9.	\}.\}.if \\n(aC>\\n(aP \{\.	as b1 \\*(aR.	nr aP \\n(aP+1.       nr cF \\n(.f.	nr cZ \\n(.s.       nR.\}...\" NS Ic macro - Interactive command.de Ic

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -