This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Fwd: [about getopt] a simple option request
- From: Leaveye <leaveye dot guo at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Thu, 13 Oct 2011 21:48:24 +0800
- Subject: Fwd: [about getopt] a simple option request
- References: <CADeoudfrdQMx57nY6zyTMZV+fr6j4MDkk7CKdjvUtOz159Zg1Q@mail.gmail.com>
---------- 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
users need to remember the
additional and useless delemeters, or have to convert the string to
avoid some syntax error.
if the multi-parameter-option is usable, all people will be happier.
e.g.
Â... --connect HOST PORT ...
or
Â... --connect HOST PORT OptionalPORT ...
through it may increase the complexity and difficulty of getopt(), but
future work and product will be better.
i did not find the maillist, so directly mail to this address, reply
to my own mail address please.
regards.
--
Levi