[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-gengetopt] option name collision with builtin 'include' specia
From: |
Tim Post |
Subject: |
Re: [help-gengetopt] option name collision with builtin 'include' special directive |
Date: |
Mon, 01 Nov 2010 13:59:16 +0800 |
Also, anecdotal .. varying case can also be a nightmare. I actually ran
into something where I had to make:
--include (try to include it, fail silently if not found)
--Include (try to include it, log if not found, despite --loglevel)
--INCLUDE (try to include it, bail if not found)
Oh the horror of what people ask me to do.
Anyway, the point is, altering case is just a band-aid :)
Regards,
--Tim
On Mon, 2010-11-01 at 13:52 +0800, Tim Post wrote:
> Hi,
>
> On Tue, 2010-10-26 at 16:51 +0200, Lorenzo Bettini wrote:
>
> > if you're in crazy hurry, I suggest you to manually modify the generated
> > parser and remove the use of "include" as a keyword with another string
> > (e.g., "FOOBAR"), in the line
> >
> > if (!strcmp(fopt,"include")) {
> >
> > this is a dirty hack but at least will keep you going for the moment.
>
> I hit the same wall recently and just changed it to ".include", which
> seemed the most sensible choice of name space to not conflict with other
> programs. I meant to report that, then got busy, then got caught up on
> this list and realized that someone else had :)
>
> > Then, we can think of a solution for this... e.g., using an escape
> > character for options whose name is right "include", e.g., "\include"...
>
> That would work, but I much prefer the simple dot, so that scripts that
> operate on the build tree don't break due to (what they might perceive
> to be) an 'escaped lower case i' :)
>
> Anyway, unless you have seriously exhausted options in a program (i.e.
> -. --, and + no longer cut it), I see no conflict with ".foo" at least
> in my use of gengetopt :)
>
> Regards,
> --Tim
>
>