bug-global
[Top][All Lists]
Advanced

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

[PATCH] add option --no-cache-file and configuration variable no_cache_f


From: Hideki IWAMOTO
Subject: [PATCH] add option --no-cache-file and configuration variable no_cache_file
Date: Sun, 25 May 2003 17:47:48 +0900

If there are enough memory, it is not necessary to make tag cache files.

Index: htags/htags.in
===================================================================
RCS file: /cvsroot/global/global/htags/htags.in,v
retrieving revision 1.123
diff -u -r1.123 htags.in
--- htags/htags.in      24 May 2003 14:55:07 -0000      1.123
+++ htags/htags.in      25 May 2003 08:43:20 -0000
@@ -81,7 +81,8 @@
 $'cgi = 1;                                     # 1: make cgi-bin/
 $'definition_header='after';                   # {no|after|before}
 $'other_files = 0;                             # 1: list other files
-$'map_file = 1;
+$'map_file = 1;                                        # generate HTML/MAP
+$'use_cache_file = 1;                          # make temporary db
 #
 # tag
 #
@@ -225,6 +226,9 @@
 if (&'getconf('no_map_file')) {
        $'map_file = 0;
 }
+if (&'getconf('no_cache_file')) {
+       $'use_cache_file = 0;
+}
 if ($var1 = &'getconf('show_position')) {
        $'show_position = $var1;
 }
@@ -657,6 +661,8 @@
                shift;          # --gtagslabel is estimated only once.
        } elsif ($opt =~ /^--no-map-file$/) {
                $'map_file = 0;
+       } elsif ($opt =~ /^--no-cache-file$/) {
+               $'use_cache_file = 0;
        } elsif ($opt =~ /^--line-number$/) {
                $'nflag = 'n';
        } elsif ($opt =~ /^--other$/) {
@@ -2724,6 +2730,9 @@
 #                      other: sized cache
 #
 sub open {
+       unless ($'use_cache_file) {
+               return;
+       }
        $GTAGS  = "$'tmp/htagd$$";
        dbmopen(%GTAGS, $GTAGS, 0600) || &'error("cannot make cache file 
'$GTAGS'.");
        $GRTAGS = "$'tmp/htagr$$";
@@ -2771,6 +2780,9 @@
 # close: close cache
 #
 sub close {
+       unless ($'use_cache_file) {
+               return;
+       }
        if ($GTAGS) {
                dbmclose(%GTAGS);
                unlink("$GTAGS", "$GTAGS.db", "$GTAGS.pag", "$GTAGS.dir");
Index: htags/manual.in
===================================================================
RCS file: /cvsroot/global/global/htags/manual.in,v
retrieving revision 1.47
diff -u -r1.47 manual.in
--- htags/manual.in     24 May 2003 14:55:07 -0000      1.47
+++ htags/manual.in     25 May 2003 08:43:20 -0000
@@ -85,6 +85,9 @@
                Specify the main function name. The default is @code{main}.
        @address@hidden, @option{--line-number}}
                Print the line numbers. By default, doesn't print it.
+       @address@hidden
+               Doesn't put tag cache on temporary database. Instead, htags 
puts it on memory.
+               This uses a lot of memory. Don't specify without enough memory.
        @address@hidden
                Doesn't generate javascript code.
                By default, @name{htags} generates javascript code.
@@ -225,6 +228,8 @@
                Doesn't generate javascript code. By default, @name{htags} 
generates javascript code.
        @address@hidden(boolean)}
                Doesn't generate @file{MAP} file. The default is false.
+       @address@hidden(boolean)}
+               Doesn't put tag cache on temporary database. The default is 
false.
        @address@hidden(string)}
                Suffix for compressed html file. The default is 'ghtml'.
        @address@hidden(string)}

----
Hideki IWAMOTO  address@hidden





reply via email to

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