Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Sep 2017 15:33:30 +0800
From:      by <by@meetlost.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Parse command line arguments with getopt_long()
Message-ID:  <F446534E-E00C-482E-8A4E-7FF60FE4E0FC@meetlost.com>
In-Reply-To: <CANCZdfrPr2snga260oH4-4_qTFnd_3fzg9C6qn3UmELJrqNYzw@mail.gmail.com>
References:  <373D1051-950A-41B1-BB33-55540A1E393A@meetlost.com> <CANCZdfrPr2snga260oH4-4_qTFnd_3fzg9C6qn3UmELJrqNYzw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ok, will do that.
Thanks.

by

>=20
> Look at /usr/src/usr.sbin/efivar/efivar.c for an example. It's not restric=
ted to integers.
>=20
> Warner
>=20
>> On Thu, Sep 7, 2017 at 12:49 AM, by <by@meetlost.com> wrote:
>> Hi,
>>=20
>> I am writing a program which need parse command line arguments like "--my=
option somevalue", and what I found is getopt_long(). After read the man pag=
e, I realize that this function can parse arguments like "--myoption=3Dsomev=
alue", the problem is, the somevalue can be integer only.
>>=20
>> Is there any function already there to parse command line arguments with s=
tring values?
>>=20
>> If not, I think I need parse argv manually.
>>=20
>> by
>> _______________________________________________
>> freebsd-hackers@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org=
"
>=20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F446534E-E00C-482E-8A4E-7FF60FE4E0FC>