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 - Parses command line flags and arguments SYNOPSIS
getopt format tokens DESCRIPTION
The getopt command is used to parse a list of tokens using a format that specifies expected flags and arguments. A flag is a single ASCII letter and, when followed by a : (colon), is expected to take a modifying argument that may or may not be separated from it by one or more tabs or spaces. (You can include multi-byte characters in arguments, but not as flag letters.) The getopt command completes processing when it has read all tokens or when it encounters the special token -- (double dash). It then out- puts the processed flags, a --, and any remaining tokens. If a token fails to match a flag, getopt writes a message to standard error. NOTES
In the csh, use the following command to run getopt: set argv=`getopt flag_string $*` EXAMPLES
The following is an example of the use of getopt in a skeleton shell script to parse options: #!/bin/sh # parse command line into arguments set -- `getopt a:bc $*` # check result of parsing if [ $? != 0 ] then exit 1 fi while [ $1 != -- ] do case $1 in -a) # set up the -a flag AFLG=1 AARG=$2 shift;; -b) # set up the -b flag BFLG=1;; -c) # set up the -c flag CFLG=1;; esac shift # next flag done shift # skip double dash # now do the work . . . The following are all equivalent arguments to the script: -a ARG -b -c -- A B C -a ARG -bc -- A B C -aARG -b -c -- A B C -b -c -a ARG -- A B C SEE ALSO
Commands: sh(1) Functions: getopt(3) getopt(1)