Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3F2F92F4.7030906@fillmore-labs.com>
Date: Tue, 05 Aug 2003 13:20:20 +0200
From: Patrick Eisenacher <eisenacher@fillmore-labs.com>
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: getopt & output reordering (was: xmlto package install question)
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Authenticated-Sender: eisenacher@fillmore-labs.com
User-Agent: KMail/1.5.9
Organization: Fillmore Labs GmbH  <http://www.fillmore-labs.com/>
X-Complaints-To: abuse@fillmore-labs.com
Note-from-DJ: This may be spam

Talking to Tim Waugh, the author of xmlto, revealed that the order of 
arguments doesn't matter on his system (that's Red Hat, I guess), 
whereas it matters indeed on Cygwin.

Investigating it a bit further revealed that Cygwin's getopt differs 
from what he expected:

> getopt -- o: xmlto -o foo bar
> 
> should output this:
> 
>  -o 'foo' -- 'xmlto' 'bar'

Cygwin's getopt outputs like this:

$ getopt -- o: xmlto -o foo bar
  -- 'xmlto' '-o' 'foo' 'bar'

Checking the archive I found a thread from back in January talking about 
the inability of Cygwin's getopt to do reordering of arguments. I guess 
we're facing here the same issue: the option arguments are not output 
before the non-option arguments.

Was any work done wrt this issue? Is anything planned?

Tim is going to update the xmlto usage information to reflect the proper 
order of arguments.


Patrick

Gerrit P. Haase schrieb:

> usage: xmlto FORMAT [OPTION]... XML
> OPTIONs are:
>   -v              verbose output (-vv for very verbose)
>   -x stylesheet   use the specified stylesheet instead of choosing one
>   -m fragment     use the XSL fragment to customize the stylesheet
>   -o directory    put output in the specified directory instead of
>                   the current working directory
> 
> 
> 
> It only works if you swap 'FORMAT [OPTIONS]' to '[OPTIONS] FORMAT'
> which is what I found in the patch included in the source package.




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

