pmccabe2html: bug fixes: don't skip last input line; quote filename in shell command
authorTorsten Scheck <Torsten.Scheck@Leica-Microsystems.com>
Wed, 10 Nov 2010 08:15:44 +0000 (09:15 +0100)
committerSimon Josefsson <simon@josefsson.org>
Thu, 11 Nov 2010 11:06:01 +0000 (12:06 +0100)
* build-aux/pmccabe2html: Fixed a off-by-one error, so last input line is
also considered for output. Quoted function name in shell command, so
temporary files for functions like MyClass::operator() are removed
correctly without errors.

Signed-off-by: Simon Josefsson <simon@josefsson.org>
ChangeLog
build-aux/pmccabe2html

index 33a4304..edb4fe5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-11  Torsten Scheck  <Torsten.Scheck@Leica-Microsystems.com> (tiny change)
+
+       * build-aux/pmccabe2html: Fixed a off-by-one error, so last input
+       line is also considered for output. Quoted function name in shell
+       command, so temporary files for functions like MyClass::operator()
+       are removed correctly without errors.
+
 2010-11-09  Bruno Haible  <bruno@clisp.org>
 
        * doc/posix-functions/strerror.texi: List more failing platforms.
index 330b647..1a4cdd1 100644 (file)
@@ -144,7 +144,7 @@ function html_fnc_table (caption,
                     num_lines_p,
                     first_line_p,
                     file_p)
-    for (nfnc = 1; nfnc < nfuncs; nfnc++)
+    for (nfnc = 1; nfnc <= nfuncs; nfnc++)
     {
         html_fnc(nfnc,
                  fname_p,
@@ -425,7 +425,7 @@ function html_fnc (nfun,
                 print codeline
             }
             close(fname nfun "_fn.txt")
-            system("rm " fname nfun "_fn.txt")
+            system("rm " "'" fname "'" nfun "_fn.txt")
             print "</pre>"
             print "</div>"
             print "</td>"
@@ -653,7 +653,7 @@ function wiki_fnc_table (caption,
                     num_lines_p,
                     first_line_p,
                     file_p)
-    for (nfnc = 1; nfnc < nfuncs; nfnc++)
+    for (nfnc = 1; nfnc <= nfuncs; nfnc++)
     {
         wiki_fnc(nfnc,
                  fname_p,