bug-global
[Top][All Lists]
Advanced

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

Re: [PATCH] add option --no-cache-file and configuration variable no_cac


From: Shigio Yamaguchi
Subject: Re: [PATCH] add option --no-cache-file and configuration variable no_cache_file
Date: Thu, 29 May 2003 16:35:49 +0900

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

I have committed your patch except following:

o --no-cache-file option
o documentation.

Thank you!

*** htags.in.orig       Thu May 29 12:34:58 2003
--- htags.in    Thu May 29 16:19:06 2003
***************
*** 81,87 ****
  $'cgi = 1;                                    # 1: make cgi-bin/
  $'definition_header='after';                  # {no|after|before}
  $'other_files = 0;                            # 1: list other files
! $'map_file = 1;
  #
  # tag
  #
--- 81,88 ----
  $'cgi = 1;                                    # 1: make cgi-bin/
  $'definition_header='after';                  # {no|after|before}
  $'other_files = 0;                            # 1: list other files
! $'map_file = 1;                                       # generate HTML/MAP
! $'use_cache_file = 1;                         # make temporary db
  #
  # tag
  #
***************
*** 225,230 ****
--- 226,237 ----
  if (&'getconf('no_map_file')) {
        $'map_file = 0;
  }
+ #
+ # If enough momory exist, set this variable.
+ #
+ if (&'getconf('no_cache_file')) {     # undocumented
+       $'use_cache_file = 0;
+ }
  if ($var1 = &'getconf('show_position')) {
        $'show_position = $var1;
  }
***************
*** 2733,2738 ****
--- 2740,2748 ----
  #                     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$$";
***************
*** 2780,2785 ****
--- 2790,2798 ----
  # close: close cache
  #
  sub close {
+       unless ($'use_cache_file) {
+               return;
+       }
        if ($GTAGS) {
                dbmclose(%GTAGS);
                unlink("$GTAGS", "$GTAGS.db", "$GTAGS.pag", "$GTAGS.dir");
--
Shigio Yamaguchi <address@hidden> - Tama Communications Corporation
Spare mail address: <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3




reply via email to

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