[MPlayer-dev-eng] Re: [PATCH] fix for textultils 2.1 coreutils 5.0 "-1" deprecation

Greg Stark gsstark at mit.edu
Tue Sep 30 21:55:14 CEST 2003


D Richard Felker III <dalias at aerifal.cx> X-DCC-SPAMCHECK.NET-Metrics: mail 1168; From=11 Message-ID=1 Received=1 Body=1 Fuz1=1 Fuz2=1 writes:

> It's just stupid. If the user sets up their system so that it's
> broken, then it's *their* fault, and they should fix it. Unless you're
> *SURE* switching to the sed trick will work correctly on *ALL* systems

Well that's sort of the point of POSIX and POSIXLY_CORRECT. You can be sure
POSIX specified behaviour will work, even on new platforms you've never
personally seen. but have no guarantee whatsoever about other behaviour.
You're entirely dependent on history and personal experience.

> (keep in mind, sed can often have bugs) then there is no point in
> switching to accomodate users who intentionally broke their systems.
> BTW, can you quote something from POSIX where it says -1 is not
> supposed to work??

Actually it's required to work:

http://www.opengroup.org/onlinepubs/007908799/xcu/head.html

-number
 The number argument is a positive decimal integer with the same effect as the
 -n number option.

But it does say:

FUTURE DIRECTIONS

 The obsolescent -number form may be withdrawn in a future issue. Applications
 should use the -n number option.


Perhaps some later version of the spec is out and made this change? Or perhaps
the textutils people are warning people that it will fail in later versions?

-- 
greg



More information about the MPlayer-dev-eng mailing list