help-gengetopt
[Top][All Lists]
Advanced

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

Re: [help-gengetopt] cmdline_file_save accepts file handler instead


From: Lorenzo Bettini
Subject: Re: [help-gengetopt] cmdline_file_save accepts file handler instead
Date: Tue, 23 Oct 2007 15:55:33 +0200
User-agent: Mozilla-Thunderbird 2.0.0.4 (X11/20070828)

Papp Gyozo (VBuster) wrote:
Actually, I'm still reluctant in considering mal"formed" a good argument since it is not consistent with command line arguments, where " must be escaped...

can we discuss a little bit on this?

Yes, of course. Actually my concern is how to avoid enclosing quotes as many 
place as possible. You know our customers were a little bit frustrated when 
they found that thay had to give their registration keys and usernames in 
qoutes. (It sounds a silly but actually they are *the* customers who pays for 
this stufff.)

Anyway, why must those string be quoted? Because they contain spaces and/or 
single quote (apostrphe) in names generally. Let's have a look at the source we 
have:

@@ -702,9 +720,11 @@
             }
         }
       else
-        { /* read up the remaining part up to a delimiter */
-          next_token = strcspn (farg, " \t\r\n#\'\"");

First we may omit '\t' and ' ' (space) here to allow "multi word" options. And 
we need special care about '\'' to suffice my needs. Am I right?

So I'll probably come up with a new patch soon which accepts these lines but 
does not break the compatibility much with older versions.

I was only concerned about the behavior of "

probably

foo"

should be considered an error just like

"foo

shouldn't it?

However, are you saying that we can still use " to enclose multi word arguments, and let these words contain ' without escaping?

cheers
        Lorenzo



--
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
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]