bug-global
[Top][All Lists]
Advanced

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

[PATCH] add verbosity level to htags


From: Hideki IWAMOTO
Subject: [PATCH] add verbosity level to htags
Date: Tue, 20 May 2003 02:05:11 +0900

Htags outputs a lot of messages, when -v option is specified.
It needs a lot of disk spaces for saving. And it is hard for man to read it.
The appended patch is changed so that a verbosity level may be controlled by 
the number of -v.
-vv is equivalent to the present -v.

Index: htags/htags.in
===================================================================
RCS file: /cvsroot/global/global/htags/htags.in,v
retrieving revision 1.121
diff -u -r1.121 htags.in
--- htags/htags.in      14 May 2003 00:32:36 -0000      1.121
+++ htags/htags.in      19 May 2003 16:43:47 -0000
@@ -606,7 +606,8 @@
 #
 # options check.
 #
-$'aflag = $'cflag = $'Dflag = $'fflag = $'Fflag = $'gflag = $'nflag = $'sflag 
= $'Sflag = $'vflag = $'wflag = '';
+$'aflag = $'cflag = $'Dflag = $'fflag = $'Fflag = $'gflag = $'nflag = $'sflag 
= $'Sflag = $'wflag = '';
+$'vflag = 0;
 $show_version = 0;
 $show_help = 0;
 $map_file = 1;
@@ -667,7 +668,7 @@
        } elsif ($opt =~ /^--no-javascript$/) {
                $'use_javascript = 0;
        } elsif ($opt =~ /^--verbose$/) {
-               $'vflag = 'v';
+               $'vflag++;
        } elsif ($opt =~ /^--warning$/) {
                $'wflag = 'w';
        } elsif ($opt =~ /^--caution$/) {
@@ -715,7 +716,7 @@
                if ($opt =~ /n/) { $'nflag = 'n'; }
                if ($opt =~ /o/) { $'oflag = 'o'; }
                if ($opt =~ /s/) { $'sflag = 's'; }
-               if ($opt =~ /v/) { $'vflag = 'v'; }
+               while ($opt =~ s/v//) { $'vflag++; }
                if ($opt =~ /w/) { $'wflag = 'w'; }
                if ($opt =~ /t/) {
                        $opt = shift;
@@ -737,7 +738,7 @@
 }
 if ($show_version) {
        local($command) = 'global --version';
-       $command .= ' --verbose' if ($vflag);
+       $command .= ' --verbose' if ($'vflag);
        $command .= ' htags';
        system($command);
        exit 0;
@@ -1417,7 +1418,7 @@
                        local($tag) = split;
                        if ($prev ne $tag) {
                                $count++;
-                               print STDERR " [$count] adding $kind $tag\n" if 
($'vflag);
+                               print STDERR " [$count] adding $kind $tag\n" if 
($'vflag >= 2);
                                if ($writing && !$'dynamic) {
                                        print FILE &'list_end;
                                        print FILE $'body_end, "\n";
@@ -1517,7 +1518,7 @@
                $count++;
                chop;
                local($tag) = $_;
-               print STDERR " [$count/$total] adding $tag\n" if ($'vflag);
+               print STDERR " [$count/$total] adding $tag\n" if ($'vflag >= 2);
                if ($'aflag && ($alpha eq '' || $tag !~ /^$alpha/)) {
                        if ($alpha) {
                                print ALPHA "</OL>\n";
@@ -1659,7 +1660,7 @@
                }
                $count++;
                s!^\./!!;
-               print STDERR " [$count] adding $_\n" if ($'vflag);
+               print STDERR " [$count] adding $_\n" if ($'vflag >= 2);
                @push = split('/');
                $file = pop(@push);
                @pop  = @dirstack;
@@ -2075,7 +2076,7 @@
                $count++;
                local($path) = $_;
                $path =~ s/^\.\///;
-               print STDERR " [$count/$total] converting $path\n" if ($'vflag);
+               print STDERR " [$count/$total] converting $path\n" if ($'vflag 
>= 2);
                $path = &'path2url($path);
                &convert'src2html($_, "$dist/$'SRCS/$path", $notsource);
        }
Index: htags/manual.in
===================================================================
RCS file: /cvsroot/global/global/htags/manual.in,v
retrieving revision 1.43
diff -u -r1.43 manual.in
--- htags/manual.in     6 May 2003 12:40:09 -0000       1.43
+++ htags/manual.in     19 May 2003 16:43:48 -0000
@@ -105,7 +105,7 @@
                The @arg{title} of this hypertext. The default is the last
                component of the current directory.
        @address@hidden, @option{--verbose}}
-               Verbose mode.
+               Verbose mode. Further -v's increase the verbosity level.
        @address@hidden, @option{--warning}}
                Print warning messages.
        @address@hidden

----
Hideki IWAMOTO  address@hidden





reply via email to

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