www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
To: | cygwin AT cygwin DOT com |
From: | "Mikael" <mindcooler AT gmail DOT com> |
Subject: | Re: Shouldn't getopt_long() return : here? |
Date: | Sun, 24 Apr 2005 22:15:30 +0200 |
Lines: | 25 |
Message-ID: | <d4guf2$5em$1@sea.gmane.org> |
References: | <d4govv$lcm$1 AT sea DOT gmane DOT org> <426BFD12 DOT 2060304 AT cwilson DOT fastmail DOT fm> |
X-Complaints-To: | usenet AT sea DOT gmane DOT org |
X-Gmane-NNTP-Posting-Host: | 180.184.204.213.sol.worldonline.se |
X-Newsreader: | Microsoft Outlook Express 6.00.2900.2527 |
X-RFC2646: | Format=Flowed; Response |
X-IsSubscribed: | yes |
"Charles Wilson" wrote: > Mikael wrote: > >> const char *short_options = ""; > > This is your problem. You need to have ':' as the first character in > short_options, if you want the behavior you describe. (Also, if you plan > to handle errors -- including printing the error message yourself -- you > need to set the global variable opterr to 0) > > So, you need > const char *short_options = ":"; > /* opterr = 0; */ /* maybe */ > > -- > Chuck > Thanks Mr Wilson. I need to find a better reference it seems or maybe I'm too stupid to read the online man pages, lol. / Mikael -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |