Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Sep 2017 14:49:54 +0800
From:      by <by@meetlost.com>
To:        freebsd-hackers@freebsd.org
Subject:   Parse command line arguments with getopt_long()
Message-ID:  <373D1051-950A-41B1-BB33-55540A1E393A@meetlost.com>

next in thread | raw e-mail | index | archive | help
Hi,

I am writing a program which need parse command line arguments like "--myopt=
ion somevalue", and what I found is getopt_long(). After read the man page, I=
 realize that this function can parse arguments like "--myoption=3Dsomevalue=
", the problem is, the somevalue can be integer only.

Is there any function already there to parse command line arguments with str=
ing values?

If not, I think I need parse argv manually.

by=




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?373D1051-950A-41B1-BB33-55540A1E393A>