help-gengetopt
[Top][All Lists]
Advanced

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

Re: [help-gengetopt] option name collision with builtin 'include' specia


From: Lorenzo Bettini
Subject: Re: [help-gengetopt] option name collision with builtin 'include' special directive
Date: Tue, 26 Oct 2010 16:51:17 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11) Gecko/20101006 Lightning/1.0b2 Thunderbird/3.1.5

On 10/26/2010 04:31 PM, Papp Gyozo (VBuster) wrote:
Hi there,

Since version 2.19, it is possible to include other files (i.e., other 
configuration files) in a configuration file, by using the include syntax:

      include "filename"

http://www.gnu.org/software/gengetopt/gengetopt.html#Configuration-files

Actually, we've run into the issue that our product has an option with same name: 
"include".

My concerns are:
- gengetopt runs fine without prompting there could be a potential problem.
- gengetopt has no option to disable this feature or rename the builtin 
directive.
   Ot at least I can't see, in this case please point it out to me.

Unfortunately, we are in crazy hurry to publish the version of our product and 
we must keep backward compatibility, too. So changing the application is not 
option this time again.

Hi there

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.

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"...

hope to hear from you soon
cheers
        Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net



reply via email to

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