NCP_GETOPT

Section: ()
Updated: 06 October 2005
Index Return to Main Contents

 

NAME

ncp_getopt - option parser  

SYNOPSIS

"SYNOPSIS"

int ncp_getopt (const char * caller, char ** options, const struct ncp_option * opts, char ** optopt, char ** optarg, unsigned long * value);  

ARGUMENTS

caller
name of the caller, for error messages
options
the options string
opts
an array of &struct option entries controlling parser operations
optopt
output; will contain the current option
optarg
output; will contain the value (if one exists)
value
output; may be NULL; will be overwritten with the integer value of the current argument.
 

DESCRIPTION

Helper to parse options on the format used by mount (``a=b,c=d,e,f''). Returns opts->val if a matching entry in the 'opts' array is found, 0 when no more tokens are found, -1 if an error is encountered.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 06:21:01 GMT, October 06, 2005