Options handler for userspace programs

From: Andrea Di Pasquale <spikey.it_at_gmail.com>
Date: Sun, 11 Jan 2009 17:04:33 +0100
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
Received on Sun Jan 11 2009 - 15:04:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:40 UTC