From owner-man-jp-reviewer@jp.FreeBSD.org Sun Feb 15 23:57:45 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id i1FEvjD13228;
	Sun, 15 Feb 2004 23:57:45 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from mail504.nifty.com (mail504.nifty.com [202.248.37.212])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet id i1FEviO13223
	for <man-jp-reviewer@jp.FreeBSD.org>; Sun, 15 Feb 2004 23:57:44 +0900 (JST)
	(envelope-from matsui@kuramae.ne.jp)
Received: from localhost (eatkyo329213.adsl.ppp.infoweb.ne.jp [219.104.110.213])by mail504.nifty.com with ESMTP id i1FEvRbP002415
	for <man-jp-reviewer@jp.FreeBSD.org>; Sun, 15 Feb 2004 23:57:29 +0900
Message-Id: <20040215.235726.74755479.matsui@kuramae.ne.jp>
To: man-jp-reviewer@jp.FreeBSD.org
From: Takayuki Matsui <matsui@kuramae.ne.jp>
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Sun_Feb_15_23:57:26_2004_819)--"
Content-Transfer-Encoding: 7bit
Reply-To: man-jp-reviewer@jp.FreeBSD.org
Precedence: list
Date: Sun, 15 Feb 2004 23:57:26 +0900
X-Sequence: man-jp-reviewer 4557
Subject: [man-jp-reviewer 4557] gcov.1
Sender: owner-man-jp-reviewer@jp.FreeBSD.org
X-Originator: matsui@kuramae.ne.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+040130

----Next_Part(Sun_Feb_15_23:57:26_2004_819)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

$B>>5o$G$9(B

gcov.1 $B$,0l1~$G$-$^$7$?$N$G%l%S%e!<$r$*4j$$$7$^$9!#(B



$B!V(Bgcov $B$r;H$&>l9g$K$O:GE,2=L5$7$G%3%s%Q%$%k$9$k$Y$-$G$9!#!W(B
$B$G;O$^$kCJMn$K$"$k(B (at the lowest resolution) $B$H$$$&$N$,(B
$B$$$^$$$A2?$,8@$$$?$$$N$+$o$+$i$:!"L5;k$7$F$7$^$$$^$7$?!#(B

$B$=$l$+$i!"(B COPYRIGHT $B$N%;%/%7%g%s$OLu$7$F$"$j$^$;$s!#(B

$B2?$+$*$+$7$$$H$3$m$d(B  man-jp $B$G$N%k!<%k$K30$l$?$H$3$m$,$"$j$^$7$?$i(B
$B8f;XE&$/$@$5$$!#(B

$B$h$m$7$/$*$M$,$$$7$^$9!#(B
--
$B>>5oN4G7!"2#IM;T(B
matsui at kuramae.ne.jp

----Next_Part(Sun_Feb_15_23:57:26_2004_819)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Content-Description: gcov.1.diff
Content-Disposition: inline; filename="gcov.1.diff"

diff -u .tt/gcov.1 gcov.1
--- .tt/gcov.1	Tue Feb  3 11:30:58 2004
+++ gcov.1	Sun Feb 15 23:41:45 2004
@@ -140,153 +140,165 @@
 .IX Title "GCOV 1"
 .TH GCOV 1 "gcc-3.2.2" "2003-02-05" "GNU"
 .UC
-.SH "NAME"
-gcov \- coverage testing tool
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
+.SH "$BL>>N(B"
+gcov \- $B%+%P%l%C%8%F%9%H%D!<%k(B
+.SH "$B=q<0(B"
+.IX Header "$B=q<0(B"
 gcov [\fB\-v\fR|\fB\*(--version\fR] [\fB\-h\fR|\fB\*(--help\fR]
      [\fB\-b\fR|\fB\*(--branch-probabilities\fR] [\fB\-c\fR|\fB\*(--branch-counts\fR]
      [\fB\-n\fR|\fB\*(--no-output\fR] [\fB\-l\fR|\fB\*(--long-file-names\fR]
      [\fB\-f\fR|\fB\*(--function-summaries\fR]
      [\fB\-o\fR|\fB\*(--object-directory\fR \fIdirectory\fR] \fIsourcefile\fR
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\fBgcov\fR is a test coverage program.  Use it in concert with \s-1GCC\s0
-to analyze your programs to help create more efficient, faster
-running code.  You can use \fBgcov\fR as a profiling tool to help
-discover where your optimization efforts will best affect your code.  You
-can also use \fBgcov\fR along with the other profiling tool,
-\&\fBgprof\fR, to assess which parts of your code use the greatest amount
-of computing time.
-.PP
-Profiling tools help you analyze your code's performance.  Using a
-profiler such as \fBgcov\fR or \fBgprof\fR, you can find out some
-basic performance statistics, such as:
+.SH "$B2r@b(B"
+.IX Header "$B2r@b(B"
+\&\fBgcov\fR $B$O!"%+%P%l%C%8%F%9%H$r9T$&%W%m%0%i%`$G$9!#(B
+\s-1GCC\s0 $B$H$$$C$7$g$KMQ$$$k$H!"$"$J$?$N%W%m%0%i%`$r(B
+$B$b$C$H8z2LE*$G9bB.$KF0$/%3!<%I$K$9$k$?$a$N2r@O$,$G$-$^$9!#(B
+\fBgcov\fR $B$r%W%m%U%!%$%j%s%0%D!<%k$H$7$F;H$&$H!"(B
+$B%W%m%0%i%`$r:GE,2=$9$k$K$O(B
+$B$I$3$rD>$9$N$,0lHV8z2LE*$+$r8+$D$1=P$9;v$,$G$-$^$9!#(B
+$B$^$?!"(B \&\fBgprof\fR $B$H$H$b$KMQ$$$k$H!"(B
+$B%3!<%I$N$I$NItJ,$,<B9T;~4V$r$b$C$H$b;H$C$F$$$k$N$+$r(B
+$BD4$Y$k;v$,$G$-$^$9!#(B
+.PP
+$B%W%m%U%!%$%j%s%0%D!<%k$r;H$C$F!"$"$J$?$N%3!<%I$N@-G=$r(B
+$B2r@O$9$k$3$H$,$G$-$^$9!#(B
+\fBgcov\fR $B$d(B \fBgprof\fR $B$N$h$&$J%W%m%U%!%$%i$r;H$&$H!"(B
+$B@-G=$K$+$+$o$k0J2<$N$h$&$J4pACE*$JE}7W>pJs$,F@$i$l$^$9!#(B
 .Ip "\(bu" 4
-how often each line of code executes
+$B%3!<%I$N3F9T$,2?2s<B9T$5$l$k$+!#(B
 .Ip "\(bu" 4
-what lines of code are actually executed
+$B%3!<%I$N$I$NItJ,$,<B:]$K<B9T$5$l$?$N$+!#(B
 .Ip "\(bu" 4
-how much computing time each section of code uses
+$B%3!<%I$N3FItJ,$N<B9T$K$I$l$@$1$N;~4V$,$+$+$C$F$$$k$+!#(B
 .PP
-Once you know these things about how your code works when compiled, you
-can look at each module to see which modules should be optimized.
-\&\fBgcov\fR helps you determine where to work on optimization.
-.PP
-Software developers also use coverage testing in concert with
-testsuites, to make sure software is actually good enough for a release.
-Testsuites can verify that a program works as expected; a coverage
-program tests to see how much of the program is exercised by the
-testsuite.  Developers can then determine what kinds of test cases need
-to be added to the testsuites to create both better testing and a better
-final product.
-.PP
-You should compile your code without optimization if you plan to use
-\&\fBgcov\fR because the optimization, by combining some lines of code
-into one function, may not give you as much information as you need to
-look for `hot spots' where the code is using a great deal of computer
-time.  Likewise, because \fBgcov\fR accumulates statistics by line (at
-the lowest resolution), it works best with a programming style that
-places only one statement on each line.  If you use complicated macros
-that expand to loops or to other control structures, the statistics are
-less helpful\-\-\-they only report on the line where the macro call
-appears.  If your complex macros behave like functions, you can replace
-them with inline functions to solve this problem.
-.PP
-\&\fBgcov\fR creates a logfile called \fI\fIsourcefile\fI.gcov\fR which
-indicates how many times each line of a source file \fI\fIsourcefile\fI.c\fR
-has executed.  You can use these logfiles along with \fBgprof\fR to aid
-in fine-tuning the performance of your programs.  \fBgprof\fR gives
-timing information you can use along with the information you get from
-\&\fBgcov\fR.
-.PP
-\&\fBgcov\fR works only on code compiled with \s-1GCC\s0.  It is not
-compatible with any other profiling or test coverage mechanism.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
+$B%3%s%Q%$%k$5$l$?%3!<%I$,$I$N$h$&$KF0$/$N$+$,$o$+$l$P!"(B
+$B:GE,2=$9$Y$-%b%8%e!<%k$r8+$D$1$i$l$^$9!#(B
+\&\fBgcov\fR $B$r;H$($P!":GE,2=$N$?$a$K$I$3$KNO$r$$$l$l$P$h$$$+$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=P$7$N0l9T$K$7$+>pJs$,=P$^$;$s$+$i!"(B
+$BE}7W>pJs$O$"$^$jLr$KN)$?$J$/$J$C$F$7$^$$$^$9!#(B
+$B$b$7$=$N%^%/%m$,4X?t$N$h$&$K?6$kIq$&$b$N$J$i!"(B
+$B$=$l$r%$%s%i%$%s4X?t$KCV$-49$($k$H$3$NLdBj$r2r7h$G$-$^$9!#(B
+.PP
+\&\fBgcov\fR $B$O(B \fI\fIsourcefile\fI.gcov\fR $B$H$$$&%m%0%U%!%$%k$r:n$j$^$9!#(B
+$B$3$l$K$O(B \fI\fIsourcefile\fI.c\fR $B$H$$$&%=!<%9%U%!%$%k$N$I$N9T$,(B
+$B2?2s<B9T$5$l$?$+$,5-O?$5$l$F$$$^$9!#(B
+$B$3$N%m%0%U%!%$%k$r(B \fBgprof\fR $B$H$$$C$7$g$K;H$($P!"(B
+$B$"$J$?$N%W%m%0%i%`$N@-G=$r%U%!%$%s%A%e!<%K%s%0$9$k=u$1$K$J$j$^$9!#(B
+\fBgprof\fR $B$+$i$O!"(B \&\fBgcov\fR $B$N=PNO$H$$$C$7$g$K;H$($k!"(B
+$B%?%$%_%s%0>pJs$,F@$i$l$^$9!#(B
+.PP
+\&\fBgcov\fR $B$O!"(B \s-1GCC\s0 $B$G%3%s%Q%$%k$5$l$?%3!<%I$N$_$GF0:n$7$^$9!#(B
+$BB>$N%W%m%U%!%$%k$d%F%9%H%+%P%l%C%8$N;EAH$_$H$N8_49$O$"$j$^$;$s!#(B
+.SH "$B%*%W%7%g%s(B"
+.IX Header "$B%*%W%7%g%s(B"
 .Ip "\fB\-h\fR" 4
 .IX Item "-h"
 .PD 0
 .Ip "\fB\*(--help\fR" 4
 .IX Item "help"
 .PD
-Display help about using \fBgcov\fR (on the standard output), and
-exit without doing any further processing.
+\fBgcov\fR $B$N;H$$$+$?$rI8=`=PNO$KI=<($7$F!"(B
+$B%W%m%0%i%`$r=*N;$7$^$9!#(B
+$B$=$l0J30$N=hM}$O$7$^$;$s!#(B
 .Ip "\fB\-v\fR" 4
 .IX Item "-v"
 .PD 0
 .Ip "\fB\*(--version\fR" 4
 .IX Item "version"
 .PD
-Display the \fBgcov\fR version number (on the standard output),
-and exit without doing any further processing.
+\fBgcov\fR $B$N%P!<%8%g%sHV9f$rI8=`=PNO$KI=<($7$F!"(B
+$B%W%m%0%i%`$r=*N;$7$^$9!#(B
+$B$=$l0J30$N=hM}$O$7$^$;$s!#(B
 .Ip "\fB\-b\fR" 4
 .IX Item "-b"
 .PD 0
 .Ip "\fB\*(--branch-probabilities\fR" 4
 .IX Item "branch-probabilities"
 .PD
-Write branch frequencies to the output file, and write branch summary
-info to the standard output.  This option allows you to see how often
-each branch in your program was taken.
+$BJ,4t$N2s?t$r=PNO%U%!%$%k$K=q$-=P$7!"J,4t$N%5%^%j!<$rI8=`=PNO$KI=<($7$^$9!#(B
+$B$3$N%*%W%7%g%s$K$h$j!"%W%m%0%i%`Cf$GJ,4t$,$I$N$/$i$$5/$-$?$+$r(B
+$BD4$Y$k$3$H$,$G$-$^$9!#(B
 .Ip "\fB\-c\fR" 4
 .IX Item "-c"
 .PD 0
 .Ip "\fB\*(--branch-counts\fR" 4
 .IX Item "branch-counts"
 .PD
-Write branch frequencies as the number of branches taken, rather than
-the percentage of branches taken.
+$BJ,4t$,@.N)$7$?3d9g(B ($B%Q!<%;%s%H(B) $B$NBe$o$j$K!"J,4t$N@.N)$7$?2s?t$r=PNO$7$^$9!#(B
 .Ip "\fB\-n\fR" 4
 .IX Item "-n"
 .PD 0
 .Ip "\fB\*(--no-output\fR" 4
 .IX Item "no-output"
 .PD
-Do not create the \fBgcov\fR output file.
+\fBgcov\fR $B=PNO%U%!%$%k$r:n$j$^$;$s!#(B
 .Ip "\fB\-l\fR" 4
 .IX Item "-l"
 .PD 0
 .Ip "\fB\*(--long-file-names\fR" 4
 .IX Item "long-file-names"
 .PD
-Create long file names for included source files.  For example, if the
-header file \fIx.h\fR contains code, and was included in the file
-\&\fIa.c\fR, then running \fBgcov\fR on the file \fIa.c\fR will produce
-an output file called \fIa.c.x.h.gcov\fR instead of \fIx.h.gcov\fR.
-This can be useful if \fIx.h\fR is included in multiple source files.
+$B%$%s%/%k!<%I$5$l$?%=!<%9%U%!%$%k$NL>A0$H$7$FD9$$%U%!%$%kL>$r;H$$$^$9!#(B
+$B$?$H$($P!"%X%C%@%U%!%$%k(B \fIx.h\fR $B$,%3!<%I$r4^$s$G$$$F!"(B
+\&\fIa.c\fR $B$K$h$C$F%$%s%/%k!<%I$5$l$k>l9g!"(B
+\fBgcov\fR $B$r(B \fIa.c\fR $B$KBP$7$F<B9T$9$k$H!"(B
+$B=PNO%U%!%$%k$O(B \fIx.h.gcov\fR $B$G$O$J$/!"(B \fIa.c.x.h.gcov\fR $B$K$J$j$^$9!#(B
+$B$3$l$O!"(B \fIx.h\fR $B$,J#?t$N%U%!%$%k$K%$%s%/%k!<%I$5$l$F$$$k>l9g$KJXMx$G$9!#(B
 .Ip "\fB\-f\fR" 4
 .IX Item "-f"
 .PD 0
 .Ip "\fB\*(--function-summaries\fR" 4
 .IX Item "function-summaries"
 .PD
-Output summaries for each function in addition to the file level summary.
+$B%U%!%$%k%l%Y%k$N%5%^%j$NB>$K!"3F4X?t$K$D$$$F$N%5%^%j$b=PNO$7$^$9!#(B
 .Ip "\fB\-o\fR \fIdirectory\fR" 4
 .IX Item "-o directory"
 .PD 0
 .Ip "\fB\*(--object-directory\fR \fIdirectory\fR" 4
 .IX Item "object-directory directory"
 .PD
-The directory where the object files live.  Gcov will search for \fI.bb\fR,
-\&\fI.bbg\fR, and \fI.da\fR files in this directory.
-.PP
-When using \fBgcov\fR, you must first compile your program with two
-special \s-1GCC\s0 options: \fB\-fprofile-arcs \-ftest-coverage\fR.
-This tells the compiler to generate additional information needed by
-gcov (basically a flow graph of the program) and also includes
-additional code in the object files for generating the extra profiling
-information needed by gcov.  These additional files are placed in the
-directory where the source code is located.
-.PP
-Running the program will cause profile output to be generated.  For each
-source file compiled with \fB\-fprofile-arcs\fR, an accompanying \fI.da\fR
-file will be placed in the source directory.
-.PP
-Running \fBgcov\fR with your program's source file names as arguments
-will now produce a listing of the code along with frequency of execution
-for each line.  For example, if your program is called \fItmp.c\fR, this
-is what you see when you use the basic \fBgcov\fR facility:
+$B%*%V%8%'%/%H%U%!%$%k$N$"$k%G%#%l%/%H%j$r;XDj$7$^$9!#(B
+\fBgcov\fR $B$O!"$3$N%G%#%l%/%H%j$G(B \fI.bb\fR, \&\fI.bbg\fR, \fI.da\fR
+$B%U%!%$%k$rC5$7$^$9!#(B
+.PP
+\fBgcov\fR $B$r;H$&$K$O!":G=i$K$^$:(B \s-1GCC\s0 $B$NFs$D$NFCJL$J%*%W%7%g%s!"(B
+\&\fB\-fprofile-arcs, \-ftest-coverage\fR $B$r;XDj$7$F!"(B
+$B%W%m%0%i%`$r%3%s%Q%$%k$7$J$1$l$P$J$j$^$;$s!#(B
+$B$3$l$K$h$C$F%3%s%Q%$%i$O!"(B
+gcov $B$,I,MW$H$9$kDI2C>pJs(B ($B4pK\E*$K$O%W%m%0%i%`$N%U%m!<%0%i%U(B) $B$r@8@.$7!"(B
+$B$^$?(B gcov $B$,I,MW$H$9$k%W%m%U%!%$%k>pJs$r@8@.$9$k%3!<%I$r(B
+$B%*%V%8%'%/%H%U%!%$%k$K4^$a$^$9!#(B
+$B$3$l$i$NDI2C$N%U%!%$%k$O!"%=!<%9%3!<%I$N$"$k%G%#%l%/%H%j$K:n$i$l$^$9!#(B
+.PP
+$B%W%m%0%i%`$r<B9T$9$k$H!"%W%m%U%!%$%k7k2L$,@8@.$5$l$^$9!#(B
+\fB\-fprofile-arcs\fR $B$r;XDj$7$F%3%s%Q%$%k$7$?%=!<%9%U%!%$%kKh$K!"(B
+$BBP1~$9$k(B \fI.da\fR $B%U%!%$%k$,%=!<%9%G%#%l%/%H%j$K:n$i$l$^$9!#(B
+.PP
+$B%W%m%0%i%`$N%=!<%9%U%!%$%kL>$r0z?t$K$7$F(B \fBgcov\fR $B$r<B9T$9$k$H!"(B
+$B%3!<%I$N3F9T$K<B9T2s?t$r<($7$?%=!<%9%j%9%H$r@8@.$7$^$9!#(B
+$B%W%m%0%i%`L>$r(B \fItmp.c\fR $B$H$9$k$H!"(B
+\fBgcov\fR $B$N4pK\5!G=$O0J2<$N$h$&$K$7$F;H$$$^$9!#(B
 .PP
 .Vb 5
 \&        $ gcc -fprofile-arcs -ftest-coverage tmp.c
@@ -295,8 +307,8 @@
 \&         87.50% of 8 source lines executed in file tmp.c
 \&        Creating tmp.c.gcov.
 .Ve
-The file \fItmp.c.gcov\fR contains output from \fBgcov\fR.
-Here is a sample:
+\fBgcov\fR $B$N=PNO$O(B \fItmp.c.gcov\fR $B$K3JG<$5$l$F$$$^$9!#(B
+$B0J2<$O$=$N%5%s%W%k$G$9!#(B
 .PP
 .Vb 3
 \&                        main()
@@ -317,7 +329,7 @@
 \&                   1        printf ("Success\en");
 \&                   1    }
 .Ve
-When you use the \fB\-b\fR option, your output looks like this:
+\fB\-b\fR $B%*%W%7%g%s$r;H$&$H!"=PNO$O<!$N$h$&$K$J$j$^$9!#(B
 .PP
 .Vb 6
 \&        $ gcov -b tmp.c
@@ -327,7 +339,7 @@
 \&         50.00% of 2 calls executed in file tmp.c
 \&        Creating tmp.c.gcov.
 .Ve
-Here is a sample of a resulting \fItmp.c.gcov\fR file:
+$B0J2<$O!"7k2L$N(B \fItmp.c.gcov\fR $B%U%!%$%k$N%5%s%W%k$G$9!#(B
 .PP
 .Vb 3
 \&                        main()
@@ -355,51 +367,55 @@
 \&        call 0 returns = 100%
 \&                   1    }
 .Ve
-For each basic block, a line is printed after the last line of the basic
-block describing the branch or call that ends the basic block.  There can
-be multiple branches and calls listed for a single source line if there
-are multiple basic blocks that end on that line.  In this case, the
-branches and calls are each given a number.  There is no simple way to map
-these branches and calls back to source constructs.  In general, though,
-the lowest numbered branch or call will correspond to the leftmost construct
-on the source line.
-.PP
-For a branch, if it was executed at least once, then a percentage
-indicating the number of times the branch was taken divided by the
-number of times the branch was executed will be printed.  Otherwise, the
-message ``never executed'' is printed.
-.PP
-For a call, if it was executed at least once, then a percentage
-indicating the number of times the call returned divided by the number
-of times the call was executed will be printed.  This will usually be
-100%, but may be less for functions call \f(CW\*(C`exit\*(C'\fR or \f(CW\*(C`longjmp\*(C'\fR,
-and thus may not return every time they are called.
-.PP
-The execution counts are cumulative.  If the example program were
-executed again without removing the \fI.da\fR file, the count for the
-number of times each line in the source was executed would be added to
-the results of the previous \fIrun\fR\|(s).  This is potentially useful in
-several ways.  For example, it could be used to accumulate data over a
-number of program runs as part of a test verification suite, or to
-provide more accurate long-term information over a large number of
-program runs.
-.PP
-The data in the \fI.da\fR files is saved immediately before the program
-exits.  For each source file compiled with \fB\-fprofile-arcs\fR, the profiling
-code first attempts to read in an existing \fI.da\fR file; if the file
-doesn't match the executable (differing number of basic block counts) it
-will ignore the contents of the file.  It then adds in the new execution
-counts and finally writes the data to the file.
-.Sh "Using \fBgcov\fP with \s-1GCC\s0 Optimization"
-.IX Subsection "Using gcov with GCC Optimization"
-If you plan to use \fBgcov\fR to help optimize your code, you must
-first compile your program with two special \s-1GCC\s0 options:
-\&\fB\-fprofile-arcs \-ftest-coverage\fR.  Aside from that, you can use any
-other \s-1GCC\s0 options; but if you want to prove that every single line
-in your program was executed, you should not compile with optimization
-at the same time.  On some machines the optimizer can eliminate some
-simple code lines by combining them with other lines.  For example, code
-like this:
+$B4pK\%V%m%C%/(B (basic block) $B$K$D$$$F!"(B
+$B4pK\%V%m%C%/$N:G=*9T$N<!$K!"4pK\%V%m%C%/$r=*$o$i$;$?(B
+$BJ,4t$+4X?t8F$S=P$7$K$D$$$F$N9T$rI=<($7$^$9!#(B
+$B$"$k9T$G=*$o$k4pK\%V%m%C%/$,J#?t$"$k>l9g!"(B
+$B$=$N%=!<%99T$KBP$7$FJ#?t$NJ,4t$d4X?t8F$S=P$7$,<($5$l$k;v$,$"$j$^$9!#(B
+$B$3$N>l9g!"$=$l$i$NJ,4t$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r3NG'$7$?$$;~$K$O!"(B
+$B:GE,2=$r;XDj$7$F$O$$$1$^$;$s!#(B
+$B0lIt$N%^%7%s$G$O:GE,2=$K$h$C$FJ#?t$N9T$,0l$D$K$^$H$a$i$l$F$7$^$$!"(B
+$B9T$N6hJL$,L5$/$J$C$F$7$^$&2DG=@-$,$"$j$^$9!#$?$H$($P0J2<$N%3!<%I!"(B
 .PP
 .Vb 4
 \&        if (a != b)
@@ -407,11 +423,11 @@
 \&        else
 \&          c = 0;
 .Ve
-can be compiled into one instruction on some machines.  In this case,
-there is no way for \fBgcov\fR to calculate separate execution counts
-for each line because there isn't separate code for each line.  Hence
-the \fBgcov\fR output looks like this if you compiled the program with
-optimization:
+$B$"$k<o$N%^%7%s$G$O$3$N%3!<%I$O0lL?Na$K%3%s%Q%$%k$9$k;v$,$G$-$^$9!#(B
+$B$=$N>l9g!"3F9T$KBP1~$9$kL?Na%3!<%I$,B8:_$7$J$$$?$a!"(B
+\fBgcov\fR $B$O9T$4$H$N<B9T2s?t$r?t$($k;v$,$G$-$^$;$s!#(B
+$B$7$?$,$C$F%W%m%0%i%`$r:GE,2=$7$?;~$N(B \fBgcov\fR $B$N=PNO$O(B
+$B0J2<$N$h$&$K$J$j$^$9!#(B
 .PP
 .Vb 4
 \&              100  if (a != b)
@@ -419,14 +435,16 @@
 \&              100  else
 \&              100    c = 0;
 .Ve
-The output shows that this block of code, combined by optimization,
-executed 100 times.  In one sense this result is correct, because there
-was only one instruction representing all four of these lines.  However,
-the output does not indicate how many times the result was 0 and how
-many times the result was 1.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf-funding\fR\|(7), \fIgcc\fR\|(1) and the Info entry for \fIgcc\fR.
+$B$3$N=PNO$O!":GE,2=$K$h$C$F7k9g$5$l$?$3$N%3!<%I%V%m%C%/$,(B 100 $B2s(B
+$B<B9T$5$l$?;v$r<($7$F$$$^$9!#(B
+$B;M9T$+$i$J$k%V%m%C%/$,0lL?Na$K$^$H$a$i$l$?$N$G$9$+$i!"(B
+$B$3$l$O$"$k0UL#$G$O@5$7$$$b$N$G$9!#(B
+$B$7$+$7$J$,$i!"7k2L$,(B 0 $B$K$J$C$?2s?t$d(B 1 $B$K$J$C$?2s?t$r!"(B
+$B$3$N=PNO$+$iFI$_<h$k;v$O$G$-$^$;$s!#(B
+.SH "$B4XO"9`L\(B"
+.IX Header "$B4XO"9`L\(B"
+\&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf-funding\fR\|(7),
+\fIgcc\fR\|(1) $B$H(B \fIgcc\fR $B$N(B Info $B%(%s%H%j(B
 .SH "COPYRIGHT"
 .IX Header "COPYRIGHT"
 Copyright (c) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.

----Next_Part(Sun_Feb_15_23:57:26_2004_819)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Content-Description: gcov.1
Content-Disposition: inline; filename="gcov.1"

.\" Automatically generated by Pod::Man version 1.15
.\" Wed Feb  5 03:13:55 2003
.\"
.\" Standard preamble:
.\" ======================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R

.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  | will give a
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used
.\" to do unbreakable dashes and therefore won't be available.  \*(C` and
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
.\" index entries marked with X<> in POD.  Of course, you'll have to process
.\" the output yourself in some meaningful fashion.
.if \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.\"
.\" For nroff, turn off justification.  Always turn off hyphenation; it
.\" makes way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.bd B 3
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ======================================================================
.\"
.IX Title "GCOV 1"
.TH GCOV 1 "gcc-3.2.2" "2003-02-05" "GNU"
.UC
.SH "$BL>>N(B"
gcov \- $B%+%P%l%C%8%F%9%H%D!<%k(B
.SH "$B=q<0(B"
.IX Header "$B=q<0(B"
gcov [\fB\-v\fR|\fB\*(--version\fR] [\fB\-h\fR|\fB\*(--help\fR]
     [\fB\-b\fR|\fB\*(--branch-probabilities\fR] [\fB\-c\fR|\fB\*(--branch-counts\fR]
     [\fB\-n\fR|\fB\*(--no-output\fR] [\fB\-l\fR|\fB\*(--long-file-names\fR]
     [\fB\-f\fR|\fB\*(--function-summaries\fR]
     [\fB\-o\fR|\fB\*(--object-directory\fR \fIdirectory\fR] \fIsourcefile\fR
.SH "$B2r@b(B"
.IX Header "$B2r@b(B"
\&\fBgcov\fR $B$O!"%+%P%l%C%8%F%9%H$r9T$&%W%m%0%i%`$G$9!#(B
\s-1GCC\s0 $B$H$$$C$7$g$KMQ$$$k$H!"$"$J$?$N%W%m%0%i%`$r(B
$B$b$C$H8z2LE*$G9bB.$KF0$/%3!<%I$K$9$k$?$a$N2r@O$,$G$-$^$9!#(B
\fBgcov\fR $B$r%W%m%U%!%$%j%s%0%D!<%k$H$7$F;H$&$H!"(B
$B%W%m%0%i%`$r:GE,2=$9$k$K$O(B
$B$I$3$rD>$9$N$,0lHV8z2LE*$+$r8+$D$1=P$9;v$,$G$-$^$9!#(B
$B$^$?!"(B \&\fBgprof\fR $B$H$H$b$KMQ$$$k$H!"(B
$B%3!<%I$N$I$NItJ,$,<B9T;~4V$r$b$C$H$b;H$C$F$$$k$N$+$r(B
$BD4$Y$k;v$,$G$-$^$9!#(B
.PP
$B%W%m%U%!%$%j%s%0%D!<%k$r;H$C$F!"$"$J$?$N%3!<%I$N@-G=$r(B
$B2r@O$9$k$3$H$,$G$-$^$9!#(B
\fBgcov\fR $B$d(B \fBgprof\fR $B$N$h$&$J%W%m%U%!%$%i$r;H$&$H!"(B
$B@-G=$K$+$+$o$k0J2<$N$h$&$J4pACE*$JE}7W>pJs$,F@$i$l$^$9!#(B
.Ip "\(bu" 4
$B%3!<%I$N3F9T$,2?2s<B9T$5$l$k$+!#(B
.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$^$;$s!#(B
.SH "$B%*%W%7%g%s(B"
.IX Header "$B%*%W%7%g%s(B"
.Ip "\fB\-h\fR" 4
.IX Item "-h"
.PD 0
.Ip "\fB\*(--help\fR" 4
.IX Item "help"
.PD
\fBgcov\fR $B$N;H$$$+$?$rI8=`=PNO$KI=<($7$F!"(B
$B%W%m%0%i%`$r=*N;$7$^$9!#(B
$B$=$l0J30$N=hM}$O$7$^$;$s!#(B
.Ip "\fB\-v\fR" 4
.IX Item "-v"
.PD 0
.Ip "\fB\*(--version\fR" 4
.IX Item "version"
.PD
\fBgcov\fR $B$N%P!<%8%g%sHV9f$rI8=`=PNO$KI=<($7$F!"(B
$B%W%m%0%i%`$r=*N;$7$^$9!#(B
$B$=$l0J30$N=hM}$O$7$^$;$s!#(B
.Ip "\fB\-b\fR" 4
.IX Item "-b"
.PD 0
.Ip "\fB\*(--branch-probabilities\fR" 4
.IX Item "branch-probabilities"
.PD
$BJ,4t$N2s?t$r=PNO%U%!%$%k$K=q$-=P$7!"J,4t$N%5%^%j!<$rI8=`=PNO$KI=<($7$^$9!#(B
$B$3$N%*%W%7%g%s$K$h$j!"%W%m%0%i%`Cf$GJ,4t$,$I$N$/$i$$5/$-$?$+$r(B
$BD4$Y$k$3$H$,$G$-$^$9!#(B
.Ip "\fB\-c\fR" 4
.IX Item "-c"
.PD 0
.Ip "\fB\*(--branch-counts\fR" 4
.IX Item "branch-counts"
.PD
$BJ,4t$,@.N)$7$?3d9g(B ($B%Q!<%;%s%H(B) $B$NBe$o$j$K!"J,4t$N@.N)$7$?2s?t$r=PNO$7$^$9!#(B
.Ip "\fB\-n\fR" 4
.IX Item "-n"
.PD 0
.Ip "\fB\*(--no-output\fR" 4
.IX Item "no-output"
.PD
\fBgcov\fR $B=PNO%U%!%$%k$r:n$j$^$;$s!#(B
.Ip "\fB\-l\fR" 4
.IX Item "-l"
.PD 0
.Ip "\fB\*(--long-file-names\fR" 4
.IX Item "long-file-names"
.PD
$B%$%s%/%k!<%I$5$l$?%=!<%9%U%!%$%k$NL>A0$H$7$FD9$$%U%!%$%kL>$r;H$$$^$9!#(B
$B$?$H$($P!"%X%C%@%U%!%$%k(B \fIx.h\fR $B$,%3!<%I$r4^$s$G$$$F!"(B
\&\fIa.c\fR $B$K$h$C$F%$%s%/%k!<%I$5$l$k>l9g!"(B
\fBgcov\fR $B$r(B \fIa.c\fR $B$KBP$7$F<B9T$9$k$H!"(B
$B=PNO%U%!%$%k$O(B \fIx.h.gcov\fR $B$G$O$J$/!"(B \fIa.c.x.h.gcov\fR $B$K$J$j$^$9!#(B
$B$3$l$O!"(B \fIx.h\fR $B$,J#?t$N%U%!%$%k$K%$%s%/%k!<%I$5$l$F$$$k>l9g$KJXMx$G$9!#(B
.Ip "\fB\-f\fR" 4
.IX Item "-f"
.PD 0
.Ip "\fB\*(--function-summaries\fR" 4
.IX Item "function-summaries"
.PD
$B%U%!%$%k%l%Y%k$N%5%^%j$NB>$K!"3F4X?t$K$D$$$F$N%5%^%j$b=PNO$7$^$9!#(B
.Ip "\fB\-o\fR \fIdirectory\fR" 4
.IX Item "-o directory"
.PD 0
.Ip "\fB\*(--object-directory\fR \fIdirectory\fR" 4
.IX Item "object-directory directory"
.PD
$B%*%V%8%'%/%H%U%!%$%k$N$"$k%G%#%l%/%H%j$r;XDj$7$^$9!#(B
\fBgcov\fR $B$O!"$3$N%G%#%l%/%H%j$G(B \fI.bb\fR, \&\fI.bbg\fR, \fI.da\fR
$B%U%!%$%k$rC5$7$^$9!#(B
.PP
\fBgcov\fR $B$r;H$&$K$O!":G=i$K$^$:(B \s-1GCC\s0 $B$NFs$D$NFCJL$J%*%W%7%g%s!"(B
\&\fB\-fprofile-arcs, \-ftest-coverage\fR $B$r;XDj$7$F!"(B
$B%W%m%0%i%`$r%3%s%Q%$%k$7$J$1$l$P$J$j$^$;$s!#(B
$B$3$l$K$h$C$F%3%s%Q%$%i$O!"(B
gcov $B$,I,MW$H$9$kDI2C>pJs(B ($B4pK\E*$K$O%W%m%0%i%`$N%U%m!<%0%i%U(B) $B$r@8@.$7!"(B
$B$^$?(B gcov $B$,I,MW$H$9$k%W%m%U%!%$%k>pJs$r@8@.$9$k%3!<%I$r(B
$B%*%V%8%'%/%H%U%!%$%k$K4^$a$^$9!#(B
$B$3$l$i$NDI2C$N%U%!%$%k$O!"%=!<%9%3!<%I$N$"$k%G%#%l%/%H%j$K:n$i$l$^$9!#(B
.PP
$B%W%m%0%i%`$r<B9T$9$k$H!"%W%m%U%!%$%k7k2L$,@8@.$5$l$^$9!#(B
\fB\-fprofile-arcs\fR $B$r;XDj$7$F%3%s%Q%$%k$7$?%=!<%9%U%!%$%kKh$K!"(B
$BBP1~$9$k(B \fI.da\fR $B%U%!%$%k$,%=!<%9%G%#%l%/%H%j$K:n$i$l$^$9!#(B
.PP
$B%W%m%0%i%`$N%=!<%9%U%!%$%kL>$r0z?t$K$7$F(B \fBgcov\fR $B$r<B9T$9$k$H!"(B
$B%3!<%I$N3F9T$K<B9T2s?t$r<($7$?%=!<%9%j%9%H$r@8@.$7$^$9!#(B
$B%W%m%0%i%`L>$r(B \fItmp.c\fR $B$H$9$k$H!"(B
\fBgcov\fR $B$N4pK\5!G=$O0J2<$N$h$&$K$7$F;H$$$^$9!#(B
.PP
.Vb 5
\&        $ gcc -fprofile-arcs -ftest-coverage tmp.c
\&        $ a.out
\&        $ gcov tmp.c
\&         87.50% of 8 source lines executed in file tmp.c
\&        Creating tmp.c.gcov.
.Ve
\fBgcov\fR $B$N=PNO$O(B \fItmp.c.gcov\fR $B$K3JG<$5$l$F$$$^$9!#(B
$B0J2<$O$=$N%5%s%W%k$G$9!#(B
.PP
.Vb 3
\&                        main()
\&                        {
\&                   1      int i, total;
.Ve
.Vb 1
\&                   1      total = 0;
.Ve
.Vb 2
\&                  11      for (i = 0; i < 10; i++)
\&                  10        total += i;
.Ve
.Vb 5
\&                   1      if (total != 45)
\&              ######        printf ("Failure\en");
\&                          else
\&                   1        printf ("Success\en");
\&                   1    }
.Ve
\fB\-b\fR $B%*%W%7%g%s$r;H$&$H!"=PNO$O<!$N$h$&$K$J$j$^$9!#(B
.PP
.Vb 6
\&        $ gcov -b tmp.c
\&         87.50% of 8 source lines executed in file tmp.c
\&         80.00% of 5 branches executed in file tmp.c
\&         80.00% of 5 branches taken at least once in file tmp.c
\&         50.00% of 2 calls executed in file tmp.c
\&        Creating tmp.c.gcov.
.Ve
$B0J2<$O!"7k2L$N(B \fItmp.c.gcov\fR $B%U%!%$%k$N%5%s%W%k$G$9!#(B
.PP
.Vb 3
\&                        main()
\&                        {
\&                   1      int i, total;
.Ve
.Vb 1
\&                   1      total = 0;
.Ve
.Vb 5
\&                  11      for (i = 0; i < 10; i++)
\&        branch 0 taken = 91%
\&        branch 1 taken = 100%
\&        branch 2 taken = 100%
\&                  10        total += i;
.Ve
.Vb 9
\&                   1      if (total != 45)
\&        branch 0 taken = 100%
\&              ######        printf ("Failure\en");
\&        call 0 never executed
\&        branch 1 never executed
\&                          else
\&                   1        printf ("Success\en");
\&        call 0 returns = 100%
\&                   1    }
.Ve
$B4pK\%V%m%C%/(B (basic block) $B$K$D$$$F!"(B
$B4pK\%V%m%C%/$N:G=*9T$N<!$K!"4pK\%V%m%C%/$r=*$o$i$;$?(B
$BJ,4t$+4X?t8F$S=P$7$K$D$$$F$N9T$rI=<($7$^$9!#(B
$B$"$k9T$G=*$o$k4pK\%V%m%C%/$,J#?t$"$k>l9g!"(B
$B$=$N%=!<%99T$KBP$7$FJ#?t$NJ,4t$d4X?t8F$S=P$7$,<($5$l$k;v$,$"$j$^$9!#(B
$B$3$N>l9g!"$=$l$i$NJ,4t$d4X?t8F$S=P$7$K$OHV9f$,$U$i$l$^$9!#(B
$B$=$NHV9f$H%=!<%9>e$NMWAG$H$N%^%C%T%s%0$OC1=c$G$O$"$j$^$;$s$,!"(B
$B$b$C$H$b>.$5$$HV9f$r;}$DJ,4t$d4X?t8F$S=P$7$,!"(B
$B%=!<%9>e$G$b$C$H$b:8$K$"$k$N$,IaD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else
\&          c = 0;
.Ve
$B$"$k<o$N%^%7%s$G$O$3$N%3!<%I$O0lL?Na$K%3%s%Q%$%k$9$k;v$,$G$-$^$9!#(B
$B$=$N>l9g!"3F9T$KBP1~$9$kL?Na%3!<%I$,B8:_$7$J$$$?$a!"(B
\fBgcov\fR $B$O9T$4$H$N<B9T2s?t$r?t$($k;v$,$G$-$^$;$s!#(B
$B$7$?$,$C$F%W%m%0%i%`$r:GE,2=$7$?;~$N(B \fBgcov\fR $B$N=PNO$O(B
$B0J2<$N$h$&$K$J$j$^$9!#(B
.PP
.Vb 4
\&              100  if (a != b)
\&              100    c = 1;
\&              100  else
\&              100    c = 0;
.Ve
$B$3$N=PNO$O!":GE,2=$K$h$C$F7k9g$5$l$?$3$N%3!<%I%V%m%C%/$,(B 100 $B2s(B
$B<B9T$5$l$?;v$r<($7$F$$$^$9!#(B
$B;M9T$+$i$J$k%V%m%C%/$,0lL?Na$K$^$H$a$i$l$?$N$G$9$+$i!"(B
$B$3$l$O$"$k0UL#$G$O@5$7$$$b$N$G$9!#(B
$B$7$+$7$J$,$i!"7k2L$,(B 0 $B$K$J$C$?2s?t$d(B 1 $B$K$J$C$?2s?t$r!"(B
$B$3$N=PNO$+$iFI$_<h$k;v$O$G$-$^$;$s!#(B
.SH "$B4XO"9`L\(B"
.IX Header "$B4XO"9`L\(B"
\&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf-funding\fR\|(7),
\fIgcc\fR\|(1) $B$H(B \fIgcc\fR $B$N(B Info $B%(%s%H%j(B
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``\s-1GNU\s0 General Public License'' and ``Funding
Free Software'', the Front-Cover texts being (a) (see below), and with
the Back-Cover Texts being (b) (see below).  A copy of the license is
included in the \fIgfdl\fR\|(7) man page.
.PP
(a) The \s-1FSF\s0's Front-Cover Text is:
.PP
.Vb 1
\&     A GNU Manual
.Ve
(b) The \s-1FSF\s0's Back-Cover Text is:
.PP
.Vb 3
\&     You have freedom to copy and modify this GNU Manual, like GNU
\&     software.  Copies published by the Free Software Foundation raise
\&     funds for GNU development.
.Ve

----Next_Part(Sun_Feb_15_23:57:26_2004_819)----
