Le 28/04/2011 15:21, Shigio YAMAGUCHI a écrit :
> Marc Herbert <[email protected]> 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



_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to