Subject: Re: bin/32340: rs doesn't parse options POSIXly
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 12/19/2005 19:05:03
The following reply was made to PR bin/32340; it has been noted by GNATS.

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Cc: 
Subject: Re: bin/32340: rs doesn't parse options POSIXly
Date: Mon, 19 Dec 2005 13:40:52 -0500

 On Dec 19,  5:30pm, mlelstv@serpens.de (mlelstv@serpens.de) wrote:
 -- Subject: bin/32340: rs doesn't parse options POSIXly
 
 | >Number:         32340
 | >Category:       bin
 | >Synopsis:       rs doesn't parse options POSIXly
 | >Confidential:   no
 | >Severity:       non-critical
 | >Priority:       low
 | >Responsible:    bin-bug-people
 | >State:          open
 | >Class:          sw-bug
 | >Submitter-Id:   net
 | >Arrival-Date:   Mon Dec 19 17:30:01 +0000 2005
 | >Originator:     mlelstv@serpens.de
 | >Release:        NetBSD 3.0_RC6
 | >Organization:
 | 	
 | >Environment:
 | 	
 | 	
 | System: NetBSD henery 3.0_RC6 NetBSD 3.0_RC6 (HENERY) #9: Sun Dec 18 16:51:20 CET 2005 src@henery:/usr/obj/home/src/sys/arch/i386/compile/HENERY i386
 | Architecture: i386
 | Machine: i386
 | >Description:
 | rs doesn't accept options in a standard matter.
 | 
 | % echo 1 2 3 4 | rs -w 120
 | rs: Width must be a positive integer
 | usage:  rs [ -[csCS][x][kKgGw][N]tTeEnyjhHm ] [ rows [ cols ] ]
 | 
 | % echo 1 2 3 4 | rs -w120
 | 1  2  3  4
 | 
 | The reason is that it does not use getopt but invents its own
 | command line parser that wants option arguments to be padded
 | directly to the option character.
 | 
 | The same is true for all the other options that accept an argument.
 
 Yes, but it needs to be able to parse both -s and -s <arg> for example
 which you cannot do with getopt. What does posix say about this?
 
 christos