From owner-man-jp-reviewer@jp.FreeBSD.org Wed Aug 28 04:09:51 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g7RJ9p815998;
	Wed, 28 Aug 2002 04:09:51 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from ccn.aitai.ne.jp (mx.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 g7RJ9o315993
	for <man-jp-reviewer@jp.freebsd.org>; Wed, 28 Aug 2002 04:09:51 +0900 (JST)
	(envelope-from ohsawa@ccn.aitai.ne.jp)
Received: (qmail 18854 invoked by alias); 28 Aug 2002 04:09:48 +0900
Received: (qmail 18819 invoked by uid 0); 28 Aug 2002 04:09:37 +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>; 28 Aug 2002 04:09:37 +0900
Message-ID: <3D6BCE70.D7AE3BF@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" <man-jp-reviewer@jp.FreeBSD.org>
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Reply-To: man-jp-reviewer@jp.FreeBSD.org
Precedence: list
Date: Wed, 28 Aug 2002 04:09:36 +0900
X-Sequence: man-jp-reviewer 4233
Subject: [man-jp-reviewer 4233] 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+020820

$BBg_7!w4tIl(B Give up!!? $B$G$9!#(B

$B$9$C$+$j!"CY$/$J$C$F$7$^$$$^$7$?$,!"(Bunifdef.1 $B$G$9!#(B
$B$3$l0J>eJz$($F$$$F$b$h$/$J$k5$G[$,$J$$$N$GDs=P$7$^$9!#(B

$B%3%^%s%I<+BN$,$+$J$j!"?J2=$7$F$$$F%^%K%e%"%k$bBg$-$/(B
$B992~$5$l$F$$$^$9!#(B($B$H8@$C$F$bJ,NL$O$o$:$+$G$9$,(B)
$B=iLu07$$$G%A%'%C%/$r$*4j$$$7$^$9!#(B

$B1QJ8$H$N(B diff$B!!$r$D$1$^$9!#(B
# $B5lLu$H$N(B diff

$B5?LdE@(B :
$BL>>N(B:$B!V%W%j%W%m%;%C%5>r7o9T$r<h$j=|$/!W(B
$B$G$h$$$N$G$7$g$&$+(B?

$B5l(B:
.Sh NAME
.Nm unifdef
.Nd remove ifdef'ed lines

$B?7(B:
.Sh NAME
.Nm unifdef , unifdefall
.Nd remove preprocessor conditionals from code

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

symbol : $B$=$N$^$^!V%7%s%\%k!W$HLu$7$^$7$?$,!"(B
# $BIaDL!V%^%/%m!W$H8F$s$G$$$?$h$&$J5$$,$7$^$9!#5$$N$;$$$+(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

$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$=$NB>!"Lu$,2x$7$=$&$J$H$3$m$K$O%3%a%s%H$N7A$GF~$l$F$"$j$^$9!#(B
# $B$9$3$7!"F|K\8l$bJY6/$7D>$5$J$$$H(B jp-man $B$N$*<jEA$$$b$G$-$J$$$G$9!#(B(~_~;)

$B$h$m$7$/$*4j$$$7$^$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	Wed Aug 28 03:04:06 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,189 @@
 .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;XNa$rA*BrE*$K=hM}$7$^$9!#(B
+$B%U%!%$%k$+$i:o=|$9$k$h$&$KFCDj$5$l$?;XNa$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$NI=$o$9J8K!$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;XNa$O%7%s%\%k$,%3%^%s%I%i%$%s$GDj5A$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$?;XNa$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
+.\" $B85Lu(B
+.\".Pp
+.\"$B%/%)!<%H$N2r@O$OHs>o$KC1=c$G$9!#%/%)!<%H$KAx6x$9$k$H(B
+.\"($B%(%9%1!<%W$5$l$?%/%)!<%H$r=|$$$F(B)
+.\"$BBP1~$9$k%/%)!<%H$,(B
+.\"$B=P8=$9$k$^$G$NItJ,$rA4$FL5;k$7$^$9!#ESCf$G%(%9%1!<%W$5$l$F$$$J$$(B
+.\"$B2~9T$,B8:_$7$F$b7Y9p$O$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};XNa$r$9$Y$F:o=|$9$k$3$H$,$G$-$^$9!#(B
+$B$=$l$O(B controlling symbols $B$H(B $B$=$l$i$NDj5A$N(B
+$B$9$Y$F$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!#$=$l$+$i$=$N%U%!%$%k$r=hM}$9$k$N$K(B
+$BE,@Z$J0z?t$rIU$1$F(B
 .Nm
-with appropriate arguments to process the file.
+$B$r8F$S=P$7$^$9!#(B
+.\" (or lack thereof) $B$,Lu$;$J$$(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;XNa$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$?$H$($P!":o=|$5$l$k$+6uGr$K$5$l$k9T$r;D$7$^$9!#(B
+.\" ???and vice versa $B$,Lu$;$^$;$s(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$kI=8=$K8=$l$?%7%s%\%k$N%j%9%H$r@8@.$5$;$^$9!#(B
+$B$=$l$O!"(B
+./" ???$B%j%9%H$N;v$r;X$9$N$+(B unifdef $B$N$3$H$r;X$9$N$+ITL@(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 Ns
+$B$rL5;k$7$^$9!#(BC $B8@8l$N%3!<%I$G(B
+.Ic #ifdef Ns
+$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 Ns
+$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
+$B%U%!%$%k$rC5$9$h$&$K;X<($7$^$9!#(B
+$B$3$N%*%W%7%g%s$O(B
 .Nm
-for compatibility with
+$B$K$O(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$KL5;k$5$l$^$9!#(B
 .El
 .Pp
-The
 .Nm
+$B%f!<%F%#%j%F%#$O$=$N=PNO$r(B
 utility copies its output to
 .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 $B$^$?$O(B endif $B$r8!=P$7$^$9!#(B
 .It
-Premature
+.Ic #ifdef Ns
+$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
