optionProcess(3)



optionProcess

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO

NAME

optionProcess - this is the main option processing routine

SYNOPSIS

#include <your-opts.h>
cc [...] -o outfile infile.c -lopts [...]

int optionProcess(tOptions* opts, int a_ct, char** a_v);

DESCRIPTION

This is the main entry point for processing options. It is intended that this procedure be called once at the beginning of the execution of a program. Depending on options selected earlier, it is sometimes necessary to stop and restart option processing, or to select completely different sets of options. This can be done easily, but you generally do not want to do this.

The number of arguments processed always includes the program name. If one of the arguments is "--", then it is counted and the processing stops. If an error was encountered and errors are to be tolerated, then the returned value is the index of the argument causing the error. A hyphen by itself ("-") will also cause processing to stop and will not be counted among the processed arguments. A hyphen by itself is treated as an operand. Encountering an operand stops option processing.

opts

program options descriptor

a_ct

program arg count

a_v

program arg vector

RETURN VALUE

the count of the arguments processed

ERRORS

Errors will cause diagnostics to be printed. exit(2) may or may not be called. It depends upon whether or not the options were generated with the "allow-errors" attribute, or if the ERRSKIP_OPTERR or ERRSTOP_OPTERR macros were invoked.

SEE ALSO

The info documentation for the -lopts library.
ao_string_tokenize(3), configFileLoad(3), optionFileLoad(3), optionFindNextValue(3), optionFindValue(3), optionFree(3), optionGetValue(3), optionLoadLine(3), optionMemberList(3), optionNextValue(3), optionOnlyUsage(3), optionRestore(3), optionSaveFile(3), optionSaveState(3), optionUnloadNested(3), optionVersion(3), strequate(3), streqvcmp(3), streqvmap(3), strneqvcmp(3), strtransform(3),




More Linux Commands

manpages/setvtrgb.8.html
setvtrgb(8) - set the virtual terminal RGB colors (ManPage)
The setvtrgb command takes a single argument, either the string vga , or a path to a file containing the red, green, and blue colors to be used by the Linux vir

manpages/dhcpd.leases.5.html
dhcpd.leases(5) - DHCP client lease database (Man Page).....
The Internet Systems Consortium DHCP Server keeps a persistent database of leases that it has assigned. This database is a free-form ASCII file containing a ser

manpages/pamrgbatopng.1.html
pamrgbatopng(1) - convert PAM color/transparency image to PN
This program is part of Netpbm(1) pamrgbatopng reads a PAM image with the RGB_ALPHA tuple type (a color visual image with transparency) and produces an equivale

manpages/mitem_opts.3menu.html
mitem_opts(3menu) - set and get menu item options (ManPage)
The function set_item_opts sets all the given items option bits (menu option bits may be logically-ORed together). The function item_opts_on turns on the given

manpages/Tk_DeleteBindingTable.3.html
Tk_DeleteBindingTable(3) - invoke scripts in response to X e
These procedures provide a general-purpose mechanism for creating and invoking bindings. Bindings are organized in terms of binding tables. A binding table cons

manpages/TAP::Parser::Iterator.3pm.html
TAP::Parser::Iterator(3pm) - Base class for TAP source itera
This is a simple iterator base class that defines TAP::Parsers iterator API . Iterators are typically created from TAP::Parser::SourceHandlers. METHODS Class Me

manpages/keyctl_describe_alloc.3.html
keyctl_describe_alloc(3) - Describe a key - Linux man page
keyctl_describe() describes the attributes of a key as a NUL-terminated string. The caller must have view permission on a key to be able to get a description of

manpages/ModPerl::RegistryBB.3pm.html
ModPerl::RegistryBB(3pm) - Run unaltered CGI scripts persist
ModPerl::RegistryBB is similar to ModPerl::Registry, but does the bare minimum (mnemonic: BB = Bare Bones) to compile a script file once and run it many times,

manpages/gnutls_psk_set_server_dh_params.3.html
gnutls_psk_set_server_dh_params(3) - API function (ManPage)
This function will set the Diffie-Hellman parameters for an anonymous server to use. These parameters will be used in Diffie-Hellman exchange with PSK cipher su

manpages/rec.1.html
rec(1) - Sound eXchange, the Swiss Army knife of audio manip
Introduction SoX reads and writes audio files in most popular formats and can optionally apply effects to them. It can combine multiple input sources, synthesis

manpages/glutDialsFunc.3.html
glutDialsFunc(3) - sets the dial & button box dials callback
glutDialsFunc sets the dial &amp; button box dials callback for the current window. The dial &amp; button box dials callback for a window is called when the window has

manpages/getbkgrnd.3ncurses.html
getbkgrnd(3ncurses) - curses window complex background manip
The bkgrndset and wbkgrndset routines manipulate the background of the named window. The window background is a cchar_t consisting of any combination of attribu





We can't live, work or learn in freedom unless the software we use is free.