popt 1.14 (Default branch)


 
Thread Tools Search this Thread
Special Forums News, Links, Events and Announcements Software Releases - RSS News popt 1.14 (Default branch)
# 1  
Old 04-06-2008
popt 1.14 (Default branch)

Popt is a C library for parsing command line parameters. Popt was heavily influenced by the getopt() and getopt_long() functions, but it improves on them by allowing more powerful argument expansion. Popt can parse arbitrary argv[] style arrays and automatically set variables based on command line arguments. Popt allows command line arguments to be aliased via configuration files and includes utility functions for parsing arbitrary strings into argv[] arrays using shell-like rules. License: MIT/X Consortium License Changes:
This release adds POPT_ARG_ARGV to accumulate multiple occurrences of an option string argument into an argv array, and POPT_ARG_LONGLONG to save 64-bit integer option arguments.Image

More...
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. HP-UX

Popt install error

Hello, I am trying to install popt-1.16 on a HP-UX B.11.11 U 9000/800 server. I get the following error after running the ./configure command. config.status: creating po/Makefile make all-recursive Making all in po Making all in . source='popt.c' object='popt.lo'... (1 Reply)
Discussion started by: YogaBija
1 Replies
Login or Register to Ask a Question
getopt(1)						      General Commands Manual							 getopt(1)

Name
       getopt - parse command options

Syntax
       set - - getopt optstring $*

Description
       The  command  breaks  up  options in command lines for easy parsing by Shell procedures and checks for legal options.  The optstring option
       letters are recognized if a letter is followed by a colon, the option expects an argument which may or may not  be  separated  from  it	by
       white space.  For further information, see

       The special option, specified by two minus signs (- -), delimits the end of the options.  If the delimiters are used explicitly, recognizes
       it; otherwise, generates it.  In either case, places the delimiter at the end of the options.  The positional parameters ($1 $2 ...) of the
       shell  are reset so that each option is preceded by a single minus sign (-) and is in its own positional parameter; each option argument is
       also parsed into its own positional parameter.

Examples
       The following code fragment shows how you can process the arguments for a command that can take the options a or b, as well as  the  option
       o, which requires an argument:
       #!/bin/sh5
       set -- getopt abo: $*
       if [ $? != 0 ]
       then
	    echo $USAGE
	    exit 2
       fi
       for i in $*
       do
	    case $i in
	    -a | -b)  FLAG=$i; shift;;
	    -o)  OARG=$2; shift 2;;
	    --)  shift; break;;
	    esac
       done
       This code accepts any of the following as equivalent:
       cmd -aoarg file file
       cmd -a -o arg file file
       cmd -oarg -a file file
       cmd -a -oarg -- file file

Diagnostics
       The command prints an error message on the standard error when it encounters an option letter not included in optstring.

See Also
       sh5(1), getopt(3)

																	 getopt(1)