bug-global
[Top][All Lists]
Advanced

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

Re: With a wacky macro before it, 'global' appears to miss a function


From: Marc Herbert
Subject: Re: With a wacky macro before it, 'global' appears to miss a function
Date: Fri, 29 Apr 2011 09:11:38 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9

Le 28/04/2011 15:21, Shigio YAMAGUCHI a écrit :
> Marc Herbert <address@hidden> wrote:
>>> Long term, global might need a way to specify ANSI on a file by file
>>> basis for really big code bases.  (since some code bases may contain
>>> both..)
>>
>> Good point, well spotted. This mode should be persisted in the
>> database(s) on a per file basis.
> 
> But "file-based" cannot cover mixed code like follows:
> 
> http://sourceware.org/cgi-bin/cvsweb.cgi/src/sim/m32r/sim-if.c?rev=1.13&content-type=text/x-cvsweb-markup&cvsroot=src

No it would not. And it would not solve world hunger either :-)

I have little mercy for such horribly inconsistent code. Users would
probably have to make a choice between one or the other mode for this
file, whichever works best for it. But they should rather fix the
function prototypes to make this file internally consistent; this
would be a small and harmless change.

Let me re-iterate my preference: I think global should first and
foremost focus on doing a great and reliable job on *decent* code,
using a reasonable number of simple parsing rules, and a minimum
number of options (ideally zero). I LOVE the fact that global
currently works out of the box, in seconds, without any single command
line option to use, and almost no documentation to read. If that
causes global to miss a few dark corner cases then it is no big
deal. Just warn users they should not expect perfection.

>> How difficult would it be to implement a new, incremental "--add"
>> option like this:
>>
>> # Adds specified files in old K&R mode
>> gtags -f "K&R fileset"
>>
>> # Adds in new ANSI mode all files not already known 
>> GTAGSANSI=1 gtags  --add
> 
> Why incremental?

Only because it does not replace the existing database but adds new
files to it instead ("Incrementing" ~= "Adding")


> Is it static information?

Sorry I do not understand this question.

Cheers,

Marc





reply via email to

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