Re: quotearg improvements

2008-02-13 Thread Jim Meyering
Eric Blake [EMAIL PROTECTED] wrote: I'm committing these three patches as is, plus a fourth. This patch adds ... Hi Eric, Thanks for doing that. I noticed that something about these changes causes trouble with coreutils builds (albeit merely because it runs the new test-quotearg program from

Re: argz.m4: error_t handling wrt argz.h and errno.h

2008-02-13 Thread Bruno Haible
Mike Frysinger wrote: on glibc systems, error_t is defined in errno.h. Yes. But on glibc systems, argz.h exists. Likewise for Cygwin. So? if you try to build on a system that does provide error_t, but not argz.h, the argz replacement module fails to build. What system is this? Please be

Re: quotearg improvements

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 2/13/2008 4:00 AM: | I noticed that something about these changes causes | trouble with coreutils builds (albeit merely because it | runs the new test-quotearg program from gnulib): Aargh. I tested ENABLE_NLS on cygwin,

Re: cut: invalid option -- [BLANKS]

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to [EMAIL PROTECTED] on 2/12/2008 4:34 PM: | $ cut -s' ' | cut: invalid option -- | Try `cut --help' for more information. | | What do you mean, ? | I typed an -s. Give a proper error message. Your problem is that -s does not take an

Re: quotearg improvements

2008-02-13 Thread Jim Meyering
Eric Blake [EMAIL PROTECTED] wrote: present in libintl.h. When coupled with your warning fixes, does this work for you instead? Yep. Thanks.

[PATCH] Don't rely on signed integer overflowing to negative value.

2008-02-13 Thread Jim Meyering
I've just pushed this patch from Lasse Collin. I suppose it's a purely theoretical bug-fix, since provoking the failure would be hard: Even if there exists a system on which one can create INT_MAX groups and make a user a member of so many, you'd wait a _long_ time iterating the O(N^2) process

Re: argz.m4: error_t handling wrt argz.h and errno.h

2008-02-13 Thread Mike Frysinger
On Wednesday 13 February 2008, Ralf Wildenhues wrote: * Mike Frysinger wrote on Wed, Feb 13, 2008 at 05:38:05AM CET: the argz.m4 header checks to see if error_t is defined, but only does so by including the argz.h header. if you try to build on a system that does provide error_t, but not

Re: argz.m4: error_t handling wrt argz.h and errno.h

2008-02-13 Thread Mike Frysinger
On Wednesday 13 February 2008, Ralf Wildenhues wrote: * Mike Frysinger wrote on Wed, Feb 13, 2008 at 07:26:16PM CET: On Wednesday 13 February 2008, Ralf Wildenhues wrote: * Mike Frysinger wrote on Wed, Feb 13, 2008 at 05:38:05AM CET: the argz.m4 header checks to see if error_t is

Re: argz.m4: error_t handling wrt argz.h and errno.h

2008-02-13 Thread Ralf Wildenhues
* Mike Frysinger wrote on Wed, Feb 13, 2008 at 07:26:16PM CET: On Wednesday 13 February 2008, Ralf Wildenhues wrote: * Mike Frysinger wrote on Wed, Feb 13, 2008 at 05:38:05AM CET: the argz.m4 header checks to see if error_t is defined, but only does so by including the argz.h header. if

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Karl Berry
quotearg_colon(a:b) should result in \a:b\ (a:b) rather than \a\\:b\ (a\:b) (ie. keep the displayed output as a valid C string literal Definitely desirable. the c quoting style now outputs \?\\?/\ (??/) rather than \?\\?/\ (?\?/), Sorry, I'm not following this. What's the

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Karl Berry on 2/13/2008 5:45 PM: | | the c quoting style now outputs \?\\?/\ | (??/) rather than \?\\?/\ (?\?/), | | Sorry, I'm not following this. What's the original filename? Consider the original filename of `dir??/file'.

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Karl Berry
Consider the original filename of `dir??/file'. Thanks, I see now. Now I think rms's implicit desire not to map this too strongly to C strings is a a good thing. The goal is to make it easy/unambiguous for programs like Emacs to parse the filenames out of the message. Doing full parsing

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Bruno Haible
Eric Blake wrote: Consider the original filename of `dir??/file'. Before my patch, the c_quoting_style converted it to `dir?\?/file', since `??/' is a trigraph for `\', but that is not a valid C string. Right now, the output is `dir??/file', i.e. two concatenated C strings, so that a C

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 2/13/2008 8:13 PM: | Sorry, but you lost me here. Where did the C trigraphs come into play? Because the quotearg module _already_ did trigraph quoting (try ls - --quoting-style=c for an example). The question is whether

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Karl Berry on 2/13/2008 7:18 PM: | In a nutshell, if the source file name contains : or \ or or any | control character, we enclose it in quotes and escape as needed. | Otherwise, no quotes needed. Wdyt? If my QA_SPLIT_TRIGRAPHS patch

quotearg and trigraphs [was: quotearg improvements]

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 2/13/2008 8:57 PM: | Because the quotearg module _already_ did trigraph quoting (try ls | --quoting-style=c for an example). The question is whether the new | c_maybe style (or if we come up with a better name for it),

Re: filenames in error messages

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 2/13/2008 8:41 PM: | program:embedded colon:, quote\, and spaces:line: message | program:http://example.com/file:line: message | | C escapes means to use the backslash character as escape character. | This is a

Re: filenames in error messages

2008-02-13 Thread Bruno Haible
Eric Blake wrote: If the file name contains problematic characters (including the : in a URL, or non-printable characters), then the file name is surrounded in quotes, and uses C escapes for the problematic characters: program:embedded colon:, quote\, and spaces:line: message