This is the mail archive of the libc-help@sourceware.org mailing list for the glibc 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] |
---------- Forwarded message ---------- From: Leaveye<leaveye.guo@gmail.com> Date: 2011/10/12 Subject: [about getopt] a simple option request
hi all,
upon some projects run over, some user and developer reports that a option accept more than one parameter is needed.
currently, users can only use {--connect HOST:PORT} or {--connect "HOST PORT"}. in either way, developers need to handwriting some ugly strtok()s and
There really isn't a generic way to do that. What you are asking for is an option argument type of, say, "host-port" that stores its result in some structure, that perhaps varies based on IPv6 vs. IPv4. Use an extensible option parser: http://www.gnu.org/software/autogen/autoopts.html That one even spits out your man page and texi invoking chapter for you.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |