Re: Allow equal after a short option

2008-03-09 Thread Wayne Davison
On Sat, Mar 08, 2008 at 12:10:52PM -0500, Jeff Johnson wrote: Running test test1 - 9. Test test1 -2 foo failed with: arg1: 0 arg2: rest: foo != arg1: 0 arg2: foo I can get that failure if the line I added does not replace the prior assignment (which makes it affect the case where

Re: Allow equal after a short option

2008-03-09 Thread Wayne Davison
On Sun, Mar 09, 2008 at 07:10:21PM -0400, Jeff Johnson wrote: Your original patch for -c=foo is now checked in. Cool! You should also be able to uncomment the extra tests now. ..wayne.. __ POPT Library

Bug with equal in abutting short option

2008-03-08 Thread Wayne Davison
Popt has a bug where a short option with an abutting arg is parsed incorrectly if there is an equal sign in the arg. This can be seen using the test1 executable: % ./test1 -2foo-bar arg1: 0 arg2: foo-bar % ./test1 -2foo=bar test1: bad argument -2foo=bar: invalid numeric value % ./test1 -21=bar

Re: Allow equal after a short option

2008-03-08 Thread Wayne Davison
On Sat, Mar 08, 2008 at 12:10:52PM -0500, Jeff Johnson wrote: Test test1 -2 foo failed with: arg1: 0 arg2: rest: foo != arg1: 0 arg2: foo I'm not seeing that error with the CVS version. I do note that my prior patch to fix the longArg pointer (e.g. ./test1 -2foo=bar) isn't there, but even

Any interest in eliminating sprintf(), strcpy(), and strcat()?

2008-03-08 Thread Wayne Davison
In rsync I eliminated all use of sprintf(), strcpy(), and strcat(), replacing them with snprintf(), strlcpy(), and strlcat(). Would you be interested in such changes if appropriate compatibility functions were defined? For instance, I could imagine a configure test to see if snprintf() returns a

Re: Allow equal after a short option

2008-03-08 Thread Wayne Davison
On Sat, Mar 08, 2008 at 06:11:09PM -0500, Jeff Johnson wrote: Hmmm, we appear to have different behavior wrto echo. Your patch changes testit.sh to include an explicit --, which (when I last fixed testit.sh like 3 weeks ago) does not appear in the output I am (and was) seeing. I tried it on