From owner-man-jp-reviewer@jp.FreeBSD.org Sat Aug 31 03:28:39 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g7UISdn17063;
	Sat, 31 Aug 2002 03:28:39 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from ccn.aitai.ne.jp (dns.ccn-net.ne.jp [211.1.192.71] (may be forged))
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g7UISb317056
	for <man-jp-reviewer@jp.FreeBSD.org>; Sat, 31 Aug 2002 03:28:37 +0900 (JST)
	(envelope-from ohsawa@ccn.aitai.ne.jp)
Received: (qmail 15291 invoked by alias); 31 Aug 2002 03:28:36 +0900
Received: (qmail 15238 invoked by uid 0); 31 Aug 2002 03:28:19 +0900
Received: from unknown (HELO ccn.aitai.ne.jp) ([172.20.237.44])
          (envelope-sender <ohsawa@ccn.aitai.ne.jp>)
          by www.ccn-net.ne.jp (qmail-ldap-1.03) with SMTP
          for <man-jp-reviewer@jp.FreeBSD.org@fixme>; 31 Aug 2002 03:28:19 +0900
Message-ID: <3D6FB943.C6B20003@ccn.aitai.ne.jp>
From: OHSAWA Chitoshi <ohsawa@ccn.aitai.ne.jp>
X-Mailer: Mozilla 4.75 [ja] (Windows NT 5.0; U)
X-Accept-Language: ja
MIME-Version: 1.0
To: man-jp-reviewer@jp.FreeBSD.org,
   "\
	=?iso-2022-jp?B?GyRCS1lAbkJnODVEeRsoQg==?=\
	=?iso-2022-jp?B?GyRCJGEbKEI=?=" <horikawa@jp.FreeBSD.org>
References: <3D6BCE70.D7AE3BF@ccn.aitai.ne.jp> <20020829.235054.74751395.horikawa@attbi.com>
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Reply-To: man-jp-reviewer@jp.FreeBSD.org
Precedence: list
Date: Sat, 31 Aug 2002 03:28:19 +0900
X-Sequence: man-jp-reviewer 4235
Subject: [man-jp-reviewer 4235] Re: unifdef.1 (v 1.4.2.6)
Errors-To: owner-man-jp-reviewer@jp.FreeBSD.org
Sender: owner-man-jp-reviewer@jp.FreeBSD.org
X-Originator: ohsawa@ccn.aitai.ne.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020829

$BBg_7!w4tIl$G$9!#(B

# $B$J$s$H$+(B 4.7R $B$N(B code freeze $B$K4V$K9g$$$=$&$G$9!#(B
# man page $B$O$^$@@h$J$s$@$1$I(B(^_^;)

> $BKY@n$G$9!#(B

$B$*@$OC$K$J$j$^$7$?!#(B

> > directive : $B!V;XNa!W$HLu$7$^$7$?$,:#0l$D(B...
> > # $B%3%^%s%I!"L?Na!"!D$I$l$b:#$R$H$D$G$$$C$=$N$3$H(B
> > #$B!V%G%#%l%/%F%#%V!W$H$+(B
> $B;XNa$N$^$^$G$bNI$$$H;W$$$^$9$,!"(Bdoc/ja_JP.eucJP/man $B2<$G$O(B
> $B!V%G%#%l%/%F%#%V!W$H$5$l$F$$$k$3$H$,B?$$$h$&$G$9!#(B

$B!V%G%#%l%/%F%#%V!W$H$7$F!"=i=P$@$1$O(B
$B!X>r7o%G%#%l%/%F%#%V(B ($BA0=hM};XNa(B) $B!Y$H$7$^$7$?!#(B
> 
> > .Ic #ifdef Ns s
> > $B$N:G8e$N(B s $B$r$H$j$^$7$?!#J#?t7A$K$9$k$?$a$N(B s $B$@$H;W$&$N$G$9$,!"(B
> > $B<h$j=|$$$F@07A$9$k$H5M$^$C$?46$8$K$J$j$^$7$?!#(B
> Ns $B$b:o=|$7$F$_$F$/$@$5$$!#(B

No space $B$NN,$J$N$G$7$g$&$M!#(B
mdoc(7) $B$b$?$^$K$OFI$_JV$5$J$$$H$$$1$^$;$s$M!#(B(~_~)

> > $B%U%C%?9T$K(B
> > FreeBSD 4.5                     April 26, 2002                     FreeBSD 4.5
> > $B$HI=<($5$l$^$9!#(B(~_~?)
> > $B1Q8lHG(B man $B$dB>$N(B jman page $B$@$H(B "FreeBSD 4.6" $B$G$9!#(B
> $B$H$j$"$($:5$$K$7$J$/$FNI$$$N$G$O$J$$$G$7$g$&$+!#$"$H$G8+$F$_$^$9!#(B

$BAjJQ$o$i$:!"%U%C%?$O(B "FreeBSD 4.5" $B$G$9!#(B
$BEvJ}$N4D6-$O(B
$B$G:rF|(B cvsup $B$7$F(B makeworld $B$7$?(B 4-stable $B$G(B
portupgreate $B$bF1;~$K$+$1$^$7$?!#(B
jman $B%3%^%s%I$N%P!<%8%g%sI=<($O(B
jman ,version 1.1-J1.1j
$B$G$9!#(B
$B$h$m$7$/$*4j$$$7$^$9!#(B

> i.e. $B$H(B vice versa $B$K$D$$$F$O!"<-=q$r$R$-$^$7$g$&!#(B

$BN>J}$H$b<-=q$O$R$$$?$N$G$9$,(B ;;;;
i.e. $B$O(B e.g. $B$H:.Mp$7$F$7$^$$$^$7$?!#(B($B:G0-(B)
vice versa $B$NJ}$O$I$3$KLu$79~$s$@$i$h$$$N$N$+J,$+$j$^$;$s$G$7$?!#(B

$B1QJ8$H$N(B diff $B$r$D$1$^$9!#(B
($B85Lu(B (v1.4.2.4) $B$H$N(B diff $B$NJ}$,NI$+$C$?$i$=$A$i$rAw$j$^$9$,(B ?)
-----------------------------------------------------------------------
OHSAWA Chitoshi        mailto:ohsawa@ccn.aitai.ne.jp
MAY THE SOURCE BE WITH YOU!
-----
--- unifdef.1~en_now	Wed Aug 14 22:11:32 2002
+++ unifdef.1	Sat Aug 31 02:06:16 2002
@@ -35,14 +35,15 @@
 .\"     @(#)unifdef.1	8.2 (Berkeley) 4/1/94
 .\"	$dotat: things/unifdef.1,v 1.23 2002/05/14 22:15:03 fanf Exp $
 .\" $FreeBSD: src/usr.bin/unifdef/unifdef.1,v 1.4.2.6 2002/06/21 20:52:32 fanf Exp $
+.\" $FreeBSD: doc/ja_JP.eucJP/man/man1/unifdef.1,v 1.7 2001/08/17 06:18:10 horikawa Exp $
 .\"
 .Dd April 26, 2002
 .Dt UNIFDEF 1
 .Os
-.Sh NAME
+.Sh $BL>>N(B
 .Nm unifdef , unifdefall
-.Nd remove preprocessor conditionals from code
-.Sh SYNOPSIS
+.Nd $B%W%j%W%m%;%C%5>r7o9T$r<h$j=|$/(B
+.Sh $B=q<0(B
 .Nm
 .Op Fl clst
 .Oo
@@ -58,204 +59,177 @@
 .Op Fl I Ns Ar path
 .Ar ...
 .Ar file
-.Sh DESCRIPTION
-The
+.Sh $B2r@b(B
 .Nm
-utility selectively processes conditional
+$B%f!<%F%#%j%F%#$O(B
 .Xr cpp 1
-directives.
-It removes from a file
-both the directives
-and any additional text that they specify should be removed,
-while otherwise leaving the file alone.
-.Pp
-The
-.Nm
-utility acts on
-.Ic #if , #ifdef , #ifndef , #elif , #else ,
-and
-.Ic #endif
-lines,
-and it understands only the commonly-used subset
-of the expression syntax for
+$B$N>r7o%G%#%l%/%F%#%V(B ($BA0=hM};XNa(B) $B$rA*BrE*$K=hM}$7$^$9!#(B
+$B%U%!%$%k$+$i:o=|$9$k$h$&$KFCDj$5$l$?%G%#%l%/%F%#%V$H%F%-%9%H$N(B
+$BN>J}$r:o=|$7$^$9!#(B
+$B$=$&$G$J$$>l9g$O%U%!%$%k$r$=$N$^$^$K$7$F$*$-$^$9!#(B
+.Pp
+.Nm
+$B%f!<%F%#%j%F%#$O(B
+.Ic #if , #ifdef , #ifndef , #elif , #else , #endif
+$B9T$KF/$-$^$9$,!"(B
 .Ic #if
-and
+$B$H(B
 .Ic #elif
-lines.
-Integer values of symbols defined on the command line,
-the
+$B9T$N<0J8K!$N$h$/;H$o$l$k%5%V%;%C%H$7$+M}2r$7$^$;$s!#(B
+$B%3%^%s%I%i%$%s$GDj5A$5$l$?%7%s%\%k$N@0?tCM$d(B
 .Fn defined
-operator applied to symbols defined or undefined on the command line,
-the operators
-.Ic \&! , < , > , <= , >= , == , != , && , || ,
-and parenthesized expressions
-are handled,
-and anything more complicated is passed through unharmed.
+$B%*%Z%l!<%?$,%3%^%s%I%i%$%s$G(B define $B$7$?$j!"(Bundefine $B$7$?%7%s%\%k$d(B
+$B1i;;;R(B
+.Ic \&! , < , > , <= , >= , == , != , && , ||
+$B$H3g8L$G0O$^$l$?<0$r07$&$3$H$,$G$-$^$9!#(B
+$B$h$jJ#;($J$b$N$O$=$N$^$^L5=}$GDL2a$5$;$^$9!#(B
 .Ic #ifdef
-and
+$B$H(B
 .Ic #ifndef
-directives are only processed
-if the symbol is specified on the command line,
-otherwise they are also passed through unchanged.
-.Pp
-The
-.Nm
-utility also understands just enough about C
-to know when one of the directives is inactive
-because it is inside
-a comment,
-or a single or double quote.
-Parsing for quotes is very simplistic:
-when it finds an open quote,
-it ignores everything (except escaped quotes)
-until it finds a close quote, and
-it will not complain if it gets
-to the end of a line and finds no backslash for continuation.
+$B%G%#%l%/%F%#%V$O%7%s%\%k$,%3%^%s%I%i%$%s$G;XDj$5$l$?>l9g$@$1(B
+$B=hM}$5$l$^$9!#$=$NB>$N>l9g$K$OJQ99$5$l$:$K!"AGDL$j$5$;$^$9!#(B
+.Pp
+.Nm
+$B%f!<%F%#%j%F%#$K$O%3%a%s%H$d%7%s%0%k%/%)!<%H$d%@%V%k%/%)!<%H$G(B
+$B0O$^$l$?Cf$GL58z$K$5$l$?%G%#%l%/%F%#%V$bM}2r$9$k$3$H$,$G$-$^$9!#(B
+$B%/%)!<%H$N2r@O$O$?$$$X$s%7%s%W%k$G$9(B :
+$B3+$-%/%)!<%H$,8+$D$+$C$?$H$-!"JD$8%/%)!<%H$,8+$D$+$k$^$G(B
+($B%(%9%1!<%W$5$l$?%/%)!<%H$r=|$$$F(B) $B$9$Y$FL5;k$5$l$^$9!#(B
+$B$b$7!"%P%C%/%9%i%C%7%e$J$7$N2~9T$,8+$D$+$C$F$b(B
+$B7Y9p$7$^$;$s!#(B
 .Pp
-A script called
 .Nm unifdefall
-can be used to remove all conditional
+$B%7%'%k%9%/%j%W%H$O%U%!%$%k$+$i(B
 .Xr cpp 1
-directives from a file.
-It uses
+$B$N>r7o=hM}%G%#%l%/%F%#%V$r$9$Y$F:o=|$9$k$3$H$,$G$-$^$9!#(B
+$B$9$Y$F$N@)8f%7%s%\%k$H$=$NDj5A(B ($B$^$?$OL$Dj5A(B) $B$N%j%9%H$rF@$k$?$a$K!"(B
 .Nm Fl s
-and
+$B$H(B
 .Nm cpp Fl dM
-to get lists of all the controlling symbols
-and their definitions (or lack thereof),
-then invokes
+$B$r;HMQ$7$^$9!#(B
+$B$=$l$+$i$=$N%U%!%$%k$r=hM}$9$k$N$KE,@Z$J0z?t$rIU$1$F(B
 .Nm
-with appropriate arguments to process the file.
+$B$r8F$S=P$7$^$9!#(B
 .Pp
-Available options:
+$BMxMQ2DG=$J%*%W%7%g%s(B :
 .Bl -tag -width indent -compact
 .It Fl D Ns Ar sym Ns Op = Ns Ar val
-Specify that a symbol is defined,
-and optionally specify what value to give it
-for the purpose of handling
+$BDj5A$5$l$k%7%s%\%k$r;XDj$7$^$9!#(B
+$B$^$?!"%*%W%7%g%s$G(B
 .Ic #if
-and
+$B$H(B
 .Ic #elif
-directives.
+$B%G%#%l%/%F%#%V$rA`:n$9$k$?$a$K%7%s%\%k$KM?$($kCM$r;XDj$7$^$9!#(B
 .Pp
 .It Fl U Ns Ar sym
-Specify that a symbol is undefined.
-If the same symbol appears in more than one argument,
-the last occurrence dominates.
+$BL$Dj5A$K$9$k%7%s%\%k$r;XDj$7$^$9!#(B
+$BF1$8%7%s%\%k$rJ#?t;XDj$7$?>l9g$K$O!"(B
+$B:G8e$K;XDj$5$l$?$b$N$,M-8z$K$J$j$^$9!#(B
 .Pp
 .It Fl c
-If the
 .Fl c
-flag is specified,
-then the operation of
+$B%U%i%0$,;XDj$5$l$?>l9g$K$O!"(B
 .Nm
-is complemented,
-i.e., the lines that would have been removed or blanked
-are retained and vice versa.
+$B$NF0:n$O5U$K$5$l$^$9!#(B
+$B$9$J$o$A!":o=|$5$l$k$+6uGr$K$5$l$k9T$r;D$7!"(B
+$B5U$K;D$9$O$:$@$C$?9T$r:o=|$7$^$9!#(B
 .Pp
 .It Fl l
-Replace removed lines with blank lines
-instead of deleting them.
+$B:o=|$5$l$k9T$r:o=|$9$kBe$o$j$K6u9T$KCV$-49$($^$9!#(B
 .Pp
 .It Fl s
-Instead of processing the input file as usual,
-this option causes
+$BDL>o$NF~NO%U%!%$%k$r=hM}$9$kBe$o$C$F!"(B
+$B$3$N%*%W%7%g%s$O(B
 .Nm
-to produce a list of symbols that appear in expressions
-that
+$B$K(B
 .Nm
-understands.
-It is useful in conjunction with the
-.Fl dM
-option of
+$B$,M}2r$9$k<0$K8=$l$?%7%s%\%k$N%j%9%H$r@8@.$5$;$^$9!#(B
+$B$=$l$O!"(B
 .Xr cpp 1
-for creating
+$B$N(B
+.Fl dM
+$B%*%W%7%g%s$H6(NO$7$F(B
 .Nm
-command lines.
+$B$N%3%^%s%I%i%$%s$r@8@.$9$k$N$KM-MQ$G$9!#(B
 .Pp
 .It Fl t
-Disables parsing for C comments and quotes, which is useful
-for plain text.
+C $B8@8l$N%3%a%s%H$H%/%)!<%H$N2r<a$r6X;_$7$^$9!#(B
+$BDL>o$N%F%-%9%H%U%!%$%kEy$K(B
+.Nm
+$B$rE,MQ$9$k>l9g$KM-MQ$G$9!#(B
 .Pp
 .It Fl iD Ns Ar sym Ns Op = Ns Ar val
 .It Fl iU Ns Ar sym
-Ignore
-.Ic #ifdef Ns s .
-If your C code uses
-.Ic #ifdef Ns s
-to delimit non-C lines,
-such as comments
-or code which is under construction,
-then you must tell
-.Nm
-which symbols are used for that purpose so that it will not try to parse
-for quotes and comments
-inside those
-.Ic #ifdef Ns s .
-One specifies ignored symbols with
+.Ic #ifdef
+$B$rL5;k$7$^$9!#(BC $B8@8l$N%3!<%I$G(B
+.Ic #ifdef
+$B$r%3%a%s%H$d:n$j$+$1$N%3!<%I$N$h$&$J(B
+C $B8@8l$G$J$$ItJ,$r6h@Z$k$?$a$KMQ$$$F$$$k>l9g$O!"(B
+.Nm
+$B$,(B
+.Ic #ifdef
+$B$NCf$N%/%)!<%H$d%3%a%s%H$r2r@O$7$J$$$h$&$K(B
+$B$I$N%7%s%\%k$,$=$NL\E*$G;HMQ$5$l$F$$$k$+$r;X<($9$kI,MW$,$"$j$^$9!#(B
+$BL5;k$9$k%7%s%\%k$r;X<($9$kJ}K!$O(B
 .Fl iD Ns Ar sym Ns Oo = Ns Ar val Oc
-and
+$B$d(B
 .Fl iU Ns Ar sym
-similar to
+$B$G!">e5-$N(B
 .Fl D Ns Ar sym Ns Op = Ns Ar val
-and
+$B$d(B
 .Fl U Ns Ar sym
-above.
+$B$HF1MM$G$9!#(B
 .Pp
 .It Fl I Ns Ar path
-Specifies to
 .Nm unifdefall
-an additional place to look for
+$B$KDI2C$N>l=j$K$"$k(B
 .Ic #include
-files.
-This option is ignored by
-.Nm
-for compatibility with
+$B%U%!%$%k$rC5$9$h$&$K;X<($7$^$9!#(B
 .Xr cpp 1
-and to simplify the implementation of
-.Nm unifdefall .
+$B$H$N8_49@-$H(B
+.Nm unifdefall
+$B$N<BAu$r4JC1$K$9$k$?$a$K(B
+.Nm
+$B$O$3$N%*%W%7%g%s$OL5;k$7$^$9!#(B
 .El
 .Pp
-The
 .Nm
-utility copies its output to
+$B%f!<%F%#%j%F%#$O$=$N=PNO$r(B
 .Em stdout
-and will take its input from
-.Em stdin
-if no
+$B$K%3%T!<$7$^$9!#(B
 .Ar file
-argument is given.
+$B0z?t$,;XDj$5$l$J$+$C$?>l9g$O(B
+.Em stdin
+$B$+$iFI$_9~$_$^$9!#(B
 .Pp
-The
 .Nm
-utility works nicely with the
+$B%f!<%F%#%j%F%#$O(B
+.Xr diff 1
+$B$N(B
 .Fl D Ns Ar sym
-option of
-.Xr diff 1 .
-.Sh SEE ALSO
+$B%*%W%7%g%s$H$H$b$K;HMQ$9$k$3$H$,$G$-$^$9!#(B
+.Sh $B4XO"9`L\(B
 .Xr cpp 1 ,
 .Xr diff 1
-.Sh DIAGNOSTICS
+.Sh $B?GCG(B
 .Bl -item
 .It
-Inappropriate elif, else or endif.
+$BITE,@Z$J(B elif, else, endif $B$r8!=P$7$^$9!#(B
 .It
-Premature
+.Ic #ifdef
+$B$N=*N;A0$K(B
 .Tn EOF
-with line numbers of the unterminated
-.Ic #ifdef Ns s .
+$B$r8!=P$7$?>l9g!"$=$N9THV9f$r=PNO$7$^$9!#(B
 .El
-.Pp
-The
-.Nm
-utility exits 0 if the output is an exact copy of the input,
-1 if not, and 2 if in trouble.
-.Sh BUGS
-Expression evaluation is very limited.
-.Pp
-Does not work correctly if input contains nul characters.
-.Sh HISTORY
-The
 .Nm
-command appeared in
-.Bx 4.3 .
+$B%f!<%F%#%j%F%#$O=PNO$,F~NO$HF1$8$K$J$k>l9g(B 0,
+$B$=$&$G$J$1$l$P(B 1, $B%(%i!<;~$K$O(B 2 $B$r=*N;%9%F!<%?%9$H$7$FJV$7$^$9!#(B
+.Sh $B%P%0(B
+$B9=J8I>2A$,$?$$$X$s8BDjE*$G$9!#(B
+.Pp
+nul $BJ8;z$r4^$`F~NO$N>l9g$K$O@5$7$/F0:n$7$^$;$s!#(B
+.Sh $BNr;K(B
+.Nm
+$B$O(B
+.Bx 4.3
+$B$+$iEP>l$7$^$7$?!#(B
