From owner-man-jp-reviewer@jp.FreeBSD.org Mon Oct 25 05:51:03 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id i9OKp3f54895;
	Mon, 25 Oct 2004 05:51:03 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from smtp.eos.ocn.ne.jp (eos.ocn.ne.jp [222.146.51.150])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet id i9OKp3854888
	for <man-jp-reviewer@jp.FreeBSD.org>; Mon, 25 Oct 2004 05:51:03 +0900 (JST)
	(envelope-from hrs@FreeBSD.org)
Received: from delta.allbsd.org (p61110-adsao12honb4-acca.tokyo.ocn.ne.jp [220.96.143.110])
	by smtp.eos.ocn.ne.jp (Postfix) with ESMTP id D3C3F5A2E
	for <man-jp-reviewer@jp.FreeBSD.org>; Mon, 25 Oct 2004 05:51:02 +0900 (JST)
Received: from localhost (alph.allbsd.org [192.168.0.10])
	by delta.allbsd.org (8.12.9p2/8.12.9) with ESMTP id i9OKYrbU030909
	for <man-jp-reviewer@jp.FreeBSD.org>; Mon, 25 Oct 2004 05:34:55 +0900 (JST)
	(envelope-from hrs@FreeBSD.org)
Message-Id: <20041025.053031.133439269.hrs@eos.ocn.ne.jp>
To: man-jp-reviewer@jp.FreeBSD.org
From: Hiroki Sato <hrs@FreeBSD.org>
In-Reply-To: <200410211615.BAA01070@kces1.koganemaru.co.jp>
References: <20041021.140116.78717443.hrs@eos.ocn.ne.jp>
	<200410211615.BAA01070@kces1.koganemaru.co.jp>
X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530  FFD7 4F2C D3D8 2793 CF2D
X-Mailer: Mew version 4.1 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Multipart/Signed; protocol="application/pgp-signature";
 micalg=pgp-sha1;
 boundary="--Security_Multipart(Mon_Oct_25_05_30_31_2004_286)--"
Content-Transfer-Encoding: 7bit
Reply-To: man-jp-reviewer@jp.FreeBSD.org
Precedence: list
Date: Mon, 25 Oct 2004 05:30:31 +0900
X-Sequence: man-jp-reviewer 4705
Subject: [man-jp-reviewer 4705] Re: groff_trace.7
Sender: owner-man-jp-reviewer@jp.FreeBSD.org
X-Originator: hrs@FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+041021

----Security_Multipart(Mon_Oct_25_05_30_31_2004_286)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

$B:4F#!wEl5~M}2JBg3X$G$9!#(B

Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> wrote
  in <200410211615.BAA01070@kces1.koganemaru.co.jp>:

n-k> -The
n-k> -.I trace
n-k> -macro package of
n-k>  .BR groff (1)
n-k> -can be a valuable tool for debugging documents written in the roff
n-k> -formatting language.
n-k> +$B$N(B
n-k> +.I trace
n-k> +($B%H%l!<%9(B) $B%^%/%m%Q%C%1!<%8$O!"(Broff $B%U%)!<%^%C%H8@8l$G=q$+$l$?J8=q(B
n-k> +$B$r%G%P%C%0$9$k$?$a$N2ACM$N$"$k%D!<%k$H$J$j$^$9!#(B

 $B$3$l$OBh(B 2 $BJ87?$J$N$G!"!V$J$j$^$9!W$H$$$&Lu8l$OE,@Z$G$O$J$$$H;W$$$^$9!#(B
 $B0UL#$O!VJXMx$K;H$&$3$H$,$G$-$k%D!<%k!W$"$?$j$K$J$j$^$9$,!"(B
 $BIaDL!"$3$N<j$N(B can $B$O>iD9$J$N$GLu=P$7$J$$$3$H$,B?$$$G$9!#(B
 
n-k> -This tracing process is activated by specifying the groff or troff
n-k> -command line option
n-k> -.BR "-m\~trace" .
n-k> -This works also with the
n-k> +$B$3$N%H%l!<%9%W%m%;%9$O!"(Bgroff $B$+(B troff $B%3%^%s%I%i%$%s%*%W%7%g%s(B
n-k> +.BR "-m\~trace"
n-k> +$B$N;XDj$K$h$j3h@-2=$5$l$^$9!#(B
n-k> +$B$3$l$O$5$i$K(B
n-k>  .BR groffer (1)
n-k> -viewer program.
n-k> +$B%S%e!<%"(B ($B1\Mw(B) $B%W%m%0%i%`$GF/$-$^$9!#(B

 $B%W%m%;%9$H$$$&%+%?%+%J8l$O!"(Bfork(2) $B$N%W%m%;%9$H:.F1$7$d$9$$$N$G!"(B
 $B;H$o$J$$J}$,$$$$$G$7$g$&!#$^$?!"8e$m$NJ8$N!V$3$l!W$N;X$9FbMF$,(B
 $BITL@NF$G!"F|K\8l$@$1FI$`$H0UL#ITL@$@$H;W$$$^$9!#(B

n-k> -A finer control can be obtained by including the macro file within the
n-k> -document by the groff macro call
n-k> -.BR ".mso\~trace.tmac" .
n-k> -Only macros that are defined after this line are traced.
n-k> +$B$h$j:Y$+$$@)8f$O!"(Bgroff $B%^%/%m8F$S=P$7(B
n-k> +.BR ".mso\~trace.tmac"
n-k> +$B$K$h$C$FJ8=qFb$N%^%/%m%U%!%$%k$r4^$a$k$3$H$K$h$jF@$k$3$H$,$G$-$^$9!#(B

 the macro file $B$N(B "the" $B$OLu=P$9$Y$-$G$9!#(B

n-k> -If some other macro package should be traced as well it must be specified
n-k> -after
n-k> +$B$"$kB>$N%^%/%m%Q%C%1!<%8$,F1MM$K%H%l!<%9$5$l$k>l9g!"(B
n-k> +$B%3%^%s%I%i%$%s>e$N(B
n-k>  .BR "-m\~trace"
n-k> -on the command line.
n-k> +$B$N8e$G;XDj$5$l$J$1$l$P$J$j$^$;$s!#(B
n-k>  .

 should $B$H(B it $B$rLu=P$9$Y$-$G$9!#$3$3$O<g8l$r0U<1$7$F!"(B
 $BLuJ8$rG=F0BV$K$7$J$$$HF|K\8l$H$7$FIT<+A3$K$J$k$H;W$$$^$9!#(B

n-k> -The macro file
n-k> +$B$=$l$,%f!<%6$K$h$C$F8F$S=P$5$l$k%^%/%m$r$J$K$b4^$s$G$$$J$$$N$G!"(B
n-k> +$B%^%/%m%U%!%$%k(B
n-k>  .B trace.tmac
n-k> -is unusual because it does not contain any macros to be called by a
n-k> -user.
n-k> +$B$OIaDL$G$O$"$j$^$;$s!#(B

 $B$3$N(B it $B$OLu=P$9$Y$-$G$O$J$$$H;W$$$^$9!#(B

n-k> -Instead, the existing macro definition and appending facilities are
n-k> -modified such that they display diagnostic messages.
n-k> +$BBe$o$j$K!"4{B8$N%^%/%mDj5A$HDI2C5!G=$O(B
n-k> +$B$=$l$i$,?GCG%a%C%;!<%8$rI=<($9$k$h$&$K!"(B
n-k> +$B=$@5$5$l$^$9!#(B

 $B$3$N(B instead $B$O5U@\$N0UL#$r;}$C$F$$$^$9$N$G!"!VBe$o$j$K!W$H$$$&Lu8l$O(B
 $BE,@Z$G$O$"$j$^$;$s!#$3$3$b!"<g@a$N<g8l$,L@3N$K$J$C$F$$$J$$$?$a!"(B
 $BF|K\8l$@$1FI$s$G$b0UL#ITL@$K$J$C$F$$$k$H;W$$$^$9!#(B

n-k> -In the following examples, a roff fragment is fed into groff via
n-k> -standard input.
n-k> +$B<!$NNc$K$*$$$F!"(Broff $B%U%i%0%a%s%H$OI8=`F~NO$K$h$C$F(B groff $B$KAw$j9~$^$l$^$9!#(B
n-k> +.\" fed into = $BAw$j9~$`(B

 $B%U%i%0%a%s%H$O%+%?%+%J8l$H$7$FDjCe$7$F$$$J$$$N$G!"Lu=P$9$Y$-$G$9!#(B
 $B$^$?!"F|K\8l$G$O(B feed $B$N<g8l$r>JN,$9$Y$-$G$O$J$$$H;W$$$^$9!#(B

n-k> -As we are only interested in the diagnostic messages (standard error)
n-k> -on the terminal, the normal formatted output (standard output) is
n-k> -redirected into the nirvana device
n-k> -.IR /dev/null .
n-k> -The resulting diagnostic messages are displayed directly below the
n-k> -corresponding example.
n-k> +$BC<Kv>e$N?GCG%a%C%;!<%8(B ($BI8=`%(%i!<(B) $B$K6=L#$r;}$C$F$$$k$@$1$J$N$G!"(B
n-k> +$B@5>o$J%U%)!<%^%C%H$5$l$?=PNO(B ($BI8=`=PNO(B) $B$O%K%k%P!<%J%G%P%$%9(B
n-k> +.IR /dev/null
n-k> +$B$K=PNO@hJQ99$5$l$^$9!#(B

 $B!V%U%)!<%^%C%H$9$k!W!V%K%k%P!<%J!W$O%+%?%+%J8l$H$7$F(B
 $BDjCe$7$F$$$J$$$N$G!"Lu=P$9$Y$-$G$9!#$^$?!"$3$NJ8$b(B
 be redirected $B$N<g8l$r>JN,$9$Y$-$G$O$J$$$H;W$$$^$9!#(B

n-k> +$B7k2L$N?GCG%a%C%;!<%8$O!"2<5-$NBP1~$9$kNc$KD>@\I=<($5$l$^$9!#(B

 $B$3$NItJ,$O!"!V2<5-$NBP1~$9$kNc$KD>@\I=<($9$k!W$G$O$J$/!"(B
 $B!VBP1~$9$kNc$N$9$02<$K<($9!W$,@5$7$$Lu$G$9!#(B

n-k> -The entry and the exit of each macro call is displayed on the terminal
n-k> -(standard output) \[em] together with the arguments (if any).
n-k> +$B%(%s%H%j$H8D!9$N%^%/%m$N8F$S=P$7$N=P8}$OC<Kv(B ($BI8=`=PNO(B)
n-k> +$B$KI=<($5$l$^$9(B \[em] ($B$b$7$"$l$P(B) $B0z?t$H0l=o$K!#(B

 $B%(%s%H%j$O%+%?%+%J8l$H$7$FDjCe$7$F$$$J$$$N$G!"(B
 $BLu=P$9$Y$-$G$9!#(B
 
n-k> -This powerful feature can help to tack down quite complex call stacks.
n-k> +$B$3$N6/NO$JFCD'$O!"$+$J$jJ#;($J8F$S=P$7%9%?%C%/$rDI@W$9$k$3$H$r;Y1g$7$^$9!#(B

 $B$3$3$N(B feature $B$O5!G=$HLu$9$3$H$,B?$$$H;W$$$^$9!#(B

n-k> +$B$3$3$G!"%H%l!<%9$O%3%^%s%I%i%$%s%*%W%7%g%s$K$h$C$F$G$O$J$/(B
n-k> +$BJ8=qFb$G3h@-2=$5$l$^$9!#(B
n-k>  .
n-k> -As tracing was not active when macro
n-k> +$B%^%/%m(B
n-k>  .I before
n-k> -was defined, no call of this macro is protocolled; on the other hand,
n-k> -the macro
n-k> +\." $B$,Dj5A$5$l$?;~!"%H%l!<%9$,3h@-$K$J$C$F$$$J$$$N$G!"(B
n-k> +$B$,Dj5A$5$l$?;~!"%H%l!<%9$,M-8z$K$J$C$F$$$J$$$N$G!"(B
n-k> +.\" $B$3$N%^%/%m$N8F$S=P$7$O%W%m%H%3%k(B ($B;XNa(B) $B$5$l$^$;$s!#(B
n-k> +$B$3$N%^%/%m$N8F$S=P$7$O%H%l!<%9$5$l$^$;$s!#(B
n-k> +$BB>J}$G!"%^%/%m(B
n-k>  .I after
n-k> -is fully protocolled.
n-k> +.\" $B$O40A4$K%W%m%H%3%k(B ($B;XNa(B) $B$5$l$^$9!#(B
n-k> +$B$O40A4$K%H%l!<%9$5$l$^$9!#(B

 be activated $B$KM-8z$r$$$&Lu8l$r$"$F$k$J$i!"B>$NItJ,$b(B
 $B$=$l$KE}0l$9$Y$-$G$9!#8D?ME*$K$O!"!V3h@-2=!W$H$$$&C18l$,(B
 $B%=%U%H%&%'%"$NJ,Ln$G<*Fk@w$_$,$"$k$H$O;W$o$J$$$N$G!"(B
 $BM-8z(B/$BL58z$/$i$$$,Mn$7$I$3$m$@$H;W$C$F$$$^$9!#(B

n-k> +$B$NCf$G0];}$5$l$^$9!#(B

 be kept $B$O!VCV$+$l$F$$$k!&$"$k!WDxEY$N0UL#$G$9!#(B

n-k>  .Env_var $GROFF_TMAC_PATH
n-k> -A colon-separated list of additional tmac directories in which to
n-k> -search for macro files; see
n-k> +$B%^%/%m%U%!%$%k$rC5:w$9$kDI2C$N(B tmac $B%G%#%l%/%H%j$N(B
n-k> +$B%3%m%s$GJ,N%$5$l$?%j%9%H!#(B

 $B!V$N!W$N=EJ#$OHr$1$?J}$,$$$$$H;W$$$^$9!#(B
 $B$3$NItJ,!"F|K\8l$rFI$s$G$bM}2r$G$-$J$$$G$9!#(B

n-k>  .BR groff (7)
n-k> -A short reference for the groff formatting language.
n-k> +groff $B%U%)!<%^%C%H8@8l$N$?$a$NC;$$;2>H!#(B

 $B%j%U%!%l%s%9%^%K%e%"%k$H$$$&I=8=$O!"%+%?%+%J8l$H$7$F(B
 $BDjCe$7$F$$$k$H;W$$$^$9!#$3$3$G;H$o$l$F$$$k(B short $B$O!VC;$$!W$H$$$&$h$j(B
 simple/concise $B$H$$$&0UL#$G$9!#(B

n-k> -A complete reference for all parts of the groff system is found in the
n-k> -groff
n-k> +groff $B%7%9%F%`$N$9$Y$F$NItJ,$N$?$a$N40A4$J;2>H$O(B groff
n-k>  .BR info (1)
n-k> -file.
n-k> +$B%U%!%$%k$G8+$D$1$i$l$^$9!#(B

 be found $B$O!V$"$k!&CV$+$l$F$$$k!W$H$$$&47MQ6g$G$9!#(B

--
| $B:4F#(B $B9-@8!wEl5~M}2JBg3X(B

----Security_Multipart(Mon_Oct_25_05_30_31_2004_286)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQBBfBDrTyzT2CeTzy0RAtP6AKDDbVmJQ9czs/VZDI+5VRJjOUG4ZQCgztVH
au4Hoo50pNhxVM7xRTfTm9Y=
=6/D5
-----END PGP SIGNATURE-----

----Security_Multipart(Mon_Oct_25_05_30_31_2004_286)----
