Re: test -n STRING and test STRING differ

2004-09-05 Thread Paul Eggert
Dan Jacobson <[EMAIL PROTECTED]> writes: > Please add a warning. There's already a warning in the coreutils documentation, but I made it a bit more explicit as follows: 2004-09-05 Paul Eggert <[EMAIL PROTECTED]> * doc/coreutils.texi (String tests): Improve quality of warning about

Re: test -n STRING and test STRING differ

2004-09-05 Thread Dan Jacobson
Paul> I don't see any bug. Well, you've got to admit that docs like [-n] STRING the length of STRING is nonzero `-n STRING' `STRING' True if the length of STRING is nonzero. and bash's -n STRING STRING True if string is not emp

Re: sort ignoring human readable suffixes

2004-09-05 Thread Paul Eggert
Lucas Nussbaum <[EMAIL PROTECTED]> writes: > So 12345K < 1M, but I think it is acceptable if > properly documented (no software will never output 12345K). Unfortunately some software does output "12345K". For example: $ echo '' | dd bs=1 seek=12641279 of=big 1+0 records in 1+0 records out $ ls

Re: test -n STRING and test STRING differ

2004-09-05 Thread Paul Eggert
Dan Jacobson <[EMAIL PROTECTED]> writes: > The docs make it look like test -n STRING and test STRING do the > same. However, > $ /usr/bin/test ``; echo $? > 1 > $ /usr/bin/test -n ``; echo $? > 0 > $ test ``; echo $? > 1 > $ test -n ``; echo $? > 0 Those test cases are misleading, since they use

stty option-parsing minor code cleanups

2004-09-05 Thread Paul Eggert
While fixing the aforementioned bugs I noticed some minor cleanup possibilities in stty.c and installed this patch. 2004-09-05 Paul Eggert <[EMAIL PROTECTED]> * src/stty.c (recover_mode): Arg is now char const *, not char *. (main): Use STDIN_FILENO, not 0. Simplify opti

stty option-parsing bug fixes

2004-09-05 Thread Paul Eggert
While looking into coreutils's use of getopt, I noticed some bugs in stty (not too surprising, as hacky as it is). I installed this patch to fix the bugs I found, and clean up the code a bit. 2004-09-05 Paul Eggert <[EMAIL PROTECTED]> * src/stty.c (valid_options): Remove. (main