On Tue, Mar 24, 2009 at 10:26:55AM -0500, Jeffrey Middleton wrote:
> Max recommended using getopt (and getopt_long if available).

AFAIK, Windows doesn't even have getopt, let alone getopt_long.  I don't
know if mpc still compiles for Windows (it used to), but I do think that
should be a goal.

Not that I'm recommending using them, but there are alternatives to
getopt.  argp and popt come to mind, although the former is basically
part of glibc, and the latter might not be maintained anymore.  But a
quick search reveals there's a bunch of others as well.  Even glib has
some option parsing functions.

Of course, the downside is you have to depend on an external library, or
bundle third party code.  And frankly, mpc's options aren't complex
enough to need anything like that.  I'd just stick with writing your own
parser.  Hell, half the code for it is already there. :P

Attachment: pgpAsQmmBKT2E.pgp
Description: PGP signature

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to