Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jan 2009 17:04:33 +0100
From:      Andrea Di Pasquale <spikey.it@gmail.com>
To:        current@freebsd.org
Subject:   Options handler for userspace programs
Message-ID:  <354C4317-4471-47A6-9B52-EF53D753D1B8@gmail.com>

next in thread | raw e-mail | index | archive | help
Hi Tim! I written new options parser for argv, string and
environment variable.

optsscan_argv()		/* handle argv */
optsscan_strenv()	/* handle string or env var */

They include getopt(), getopt_long() and
getopt_long_only() functionalities in two types of functions.
So, you can handle only short options, short and long
options and only long options, all in two types of functions.
Obviously, you can to handle an argument, with this syntax:

Short options:

	-o
	-o arg
	-o= arg
	-o=arg

Long options:

	--option
	--option argument
	--option= argument
	--option=argument

Link to tarball:

	http://jo666.altervista.org/optsscan.tar.gz

Here, you can find optsscan code and a main example.

Thank you,
regards,

Andrea



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?354C4317-4471-47A6-9B52-EF53D753D1B8>