This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Shouldn't getopt_long() return : here?


"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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]