bug-global
[Top][All Lists]
Advanced

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

[PATCH] fix anchor lines in other files


From: Hideki IWAMOTO
Subject: [PATCH] fix anchor lines in other files
Date: Tue, 10 Jun 2003 08:28:22 +0900

Htags was changed recently so that getlinks might be used for other files.
Since @ANCHORS, $LAST, and $FIRST are not cleared, invalid links is inserted 
now.

Index: htags/htags.in
===================================================================
RCS file: /cvsroot/global/global/htags/htags.in,v
retrieving revision 1.138
diff -u -r1.138 htags.in
--- htags/htags.in      9 Jun 2003 16:16:32 -0000       1.138
+++ htags/htags.in      9 Jun 2003 23:16:43 -0000
@@ -2166,7 +2166,7 @@
        #
        # load tags belonging to this file.
        #
-       &anchor'load($file) unless ($notsource);
+       &anchor'load($file, $notsource);
        $command = "$'gtags --expand -$tabs ";
        $command .= ($'w32) ? "\"$file\"" : "'$file'";
        open(SRC, "$command |") || &'error("cannot fork.");
@@ -2584,16 +2584,21 @@
 # load: load anchors belonging to specified file.
 #
 #      i)      $file   source file
+#      i)      $notsource 1: isn't source, 0: source.
 #      go)     FIRST   first definition
 #      go)     LAST    last definition
 #
 sub load {
-       local($file) = @_;
-       local(@keys);
+       local($file, $notsource) = @_;
 
        @ANCHORS = ();
        $FIRST = $LAST = 0;
 
+       if ($notsource) {
+               return;
+       }
+
+       local(@keys);
        foreach $db (&'get_taglist()) {
                local($option) = &'get_option($db);
                local($pipein) = "global -fn$option ";

----
Hideki IWAMOTO  address@hidden





reply via email to

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