bug-global
[Top][All Lists]
Advanced

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

fix for bug in 4.5.2 global.c


From: Robert Fitzgerald
Subject: fix for bug in 4.5.2 global.c
Date: Mon, 05 May 2003 23:26:38 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312


Hi

I found a problem in 4.5.2 of global.c and have fixed it, I believe.

I have attached a file (rob_bugfix_global.4.5.2.diff) that shows the 'diff -c' output between the original 4.5.2 file & my fixed version.

(I think this is the correct way to send 'patches' - if not, apologies).

Anyway, it really is a '2-line fix' ;-)

Some details :

I have a source structure like ...

devroot
   |----
        -----myLib1 (GTAGS, etc)
        |
        -----myLib2 (GTAGS, etc)
        |
        -----myProduct1 (GTAGS, etc)
        |
        -----myProduct2 (GTAGS, etc)

myLib1 & myLib2 are in-house libraries that are used as part of myProduct1 & myProduct2 but that are maintained separately.

I set GTAGSLIBPATH to be "~/devroot/myLib1:~/devroot/myLib2"
and tried to use 'global -ax' in the myProduct.. dirs
eg.
        ~/devroot/myProcuct1/source/global -ax myLib1Func


global (gtags) read the env var correctly, and found the relevant
function correctly (in the correct lib dir) but the output was corrupt

Basically, when trying to write the fullpath of the source file, it overwrote the beginning of the output string rather than the middle.

With my fix, this now works correctly -- and so do my gtags-mode searches etc in EMacs.

Take a look and see what you think ...
This fixes my specific prob. but you may see some other potential
fixes.  Feel free to contact me if you have any questions/comments.

I am a big fan of GLOBAL, keep up the good work.

Best Regards

Rob Fitzgerald

********
**
** there are 10 types of people in the world - those who understand
** binary  numbers, and those who don't.
**
********

*** global.c.4.5.2      Mon May  5 23:01:40 2003
--- global.c.patched    Mon May  5 23:01:31 2003
***************
*** 489,494 ****
--- 489,496 ----
                                strbuf_puts(pathfilter, " --absolute ");
                        else            /* relative path name */
                                strbuf_puts(pathfilter, " --relative ");
+                         if (xflag)
+                             strbuf_puts(pathfilter, " --cxref ");
                        strbuf_puts(pathfilter, lib);
                        strbuf_putc(pathfilter, ' ');
                        strbuf_puts(pathfilter, cwd);

reply via email to

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