shishi-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU shishi branch, master, updated. shishi-1-0-2-38-g67f0134


From: Mats Erik Andersson
Subject: [SCM] GNU shishi branch, master, updated. shishi-1-0-2-38-g67f0134
Date: Fri, 04 Jul 2014 14:09:33 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU shishi".

http://git.savannah.gnu.org/cgit/shishi.git/commit/?id=67f0134780d458a69d070788b00838c6a3e600d9

The branch, master has been updated
       via  67f0134780d458a69d070788b00838c6a3e600d9 (commit)
       via  bc6dd4888abc4bef1b4fc1671515cc7f1bc1affa (commit)
      from  dd5e536c2a2a41e3e384b4ea3879cbf4204f3d40 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 67f0134780d458a69d070788b00838c6a3e600d9
Author: Mats Erik Andersson <address@hidden>
Date:   Tue Jul 1 13:19:19 2014 +0200

    gdoc: No blank line without previous content.
    
    Make sure some text has been accepted before applying
    a blank line replacement.  Suppress warnings in function
    listing mode.  While answering a mode query, reply with
    a bare name list for easy scripting.

commit bc6dd4888abc4bef1b4fc1671515cc7f1bc1affa
Author: Mats Erik Andersson <address@hidden>
Date:   Tue Jul 1 00:23:23 2014 +0200

    gdoc: Informational output.
    
    Count lines in each file, not the processed total.
    Include name of file in warnings and infos.

-----------------------------------------------------------------------

Summary of changes:
 doc/gdoc |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/doc/gdoc b/doc/gdoc
index d4f5f93..548d7ed 100755
--- a/doc/gdoc
+++ b/doc/gdoc
@@ -207,7 +207,7 @@ my %highlights_sgml = (
        $type_env       => '<envar>$1</envar>',
        $type_param     => '<parameter>$1</parameter>',
 );
-my $blankline_sgml = "</para><para>\n";
+my $blankline_sgml = "</para><para>";
 
 # these are pretty rough
 my %highlights_man = (
@@ -378,6 +378,9 @@ sub just_highlight {
     }
 
     foreach my $line (split "\n", $contents) {
+       # Never add a blank line without previous content.
+       next    if not $line and not $ret;
+
        if ($line eq ""){
            $ret = $ret . $lineprefix . $blankline;
        } else {
@@ -947,10 +950,11 @@ sub dump_function {
 
            if ($param ne "void" and not $parameters{$param}) {
                $parameters{$param} = "-- undescribed --";
-               print STDERR 'Warning(', $lineno - 1, '): ',
+               print STDERR "Warning($scanned_file:", $lineno - 1, '): ',
                             'Function parameter "', $param, '" ',
                             'is not described by "', $docname, '".',
-                            "\n";
+                            "\n"
+                   if $output_mode ne 'listfunc';
            }
 
            push @parameterlist, $param;
@@ -959,16 +963,16 @@ sub dump_function {
 #          print STDERR "param = '$param', type = '$type'\n";
        }
     } else {
-       print STDERR 'Warning(', $lineno - 1, '): ',
+       print STDERR "Warning($scanned_file:", $lineno - 1, '): ',
                     'Cannot understand prototype: ',
                     "'$prototype'.\n";
        return;
     }
 
-    print STDERR 'Warning(', $lineno - 1, '): ',
+    print STDERR "Warning($scanned_file:", $lineno - 1, '): ',
                 'Defines "', $function_name, '"',
                 ', but "', $docname, '" was documented.', "\n"
-       if $docname ne $function_name;
+       if $output_mode ne 'listfunc' and $docname ne $function_name;
 
     if ($function_only==0 || defined($function_table{$function_name})) {
        output_function({'function' => $function_name,
@@ -1005,13 +1009,13 @@ GetOptions(%opts)
     or pod2usage( -exitval => 1, -verbose => 0, -output => \*STDERR);
 
 if ($output_mode eq '?' or $output_mode eq 'help') {
-    print "Available modes: @known_modes\n";
+    print "@known_modes\n";
     exit 0;
 }
 
 if (not grep m/^$output_mode$/, @known_modes) {
     print STDERR 'Not a supported mode: ', "$output_mode\n",
-                'Use one of: ', "@known_modes\n";
+                'Available modes: ', "@known_modes\n";
     exit 1;
 }
 
@@ -1058,6 +1062,7 @@ foreach my $file (@ARGV) {
     }
 
     $scanned_file = $file;
+    $lineno = 0;
 
     my $state = 0;     # State of parser automata.
 
@@ -1078,11 +1083,13 @@ foreach my $file (@ARGV) {
                    $function_purpose = "";
                }
                if ($verbose) {
-                   print STDERR "Info($lineno): Scanning doc for $function\n";
+                   print STDERR "Info($scanned_file:$lineno): ",
+                                "Scanning docs for func '$function'.\n";
                }
            } else {
-               print STDERR "Warning($lineno): Cannot understand '$_' on line 
$lineno",
-               " - I thought it was a doc line\n";
+               print STDERR "Warning($scanned_file:$lineno): ",
+                            "Cannot understand '$_' on line $lineno",
+                            " - I thought it was a doc line.\n";
                $state = 0;
            }
        } elsif ($state == 2) { # look for head: lines, and include content
@@ -1123,7 +1130,8 @@ foreach my $file (@ARGV) {
                }
            } else {
                # i dont know - bad line?  ignore.
-               print STDERR "Warning($lineno): Bad line: $_\n";
+               print STDERR "Warning($scanned_file:$lineno): ",
+                            "Bad line: $_\n";
            }
        } elsif ($state == 3) { # scanning for function { (end of prototype)
            if (m#\s*/\*\s+MACDOC\s*#io) {


hooks/post-receive
-- 
GNU shishi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]