#include "notae.h"
FUNCTION c_parsepar( argc, argv, parms, scmdlist, list )
long argc; char *argv[]; struct PARAMETER *parms; char *scmdlist[]; char list[][CMLEN];
Number of string entries in argv[]. Value is passed to main().
Array containing the strings the user entered on the unix command line. This array is passed to main() and has been parsed by the shell.
This structure contains the definition of the parameters for the specific application and is defined in the local module getargv() function.
List of subcommand names and is defined in the local module getargv() function.
An array of strings containing the parsed parameters and their specifications in the format:
list[0]="subcommand_name" list[1]="parm_name1=parm_val1 parm_val2 parm_val3" ... list[n]="parm_namen=parm_val1"
Using the PARAMETER structure and subcommand list, c_parsepar() looks for matching names in argv[] expanding them if necessary. The corresponding values on the right hand side of the '=' sign are combined with the parameter name into one string. If positional values are specified, these are also combined with the appropriate parameter name. A final check is made to catch obvious parameter type mismatches such as strings instead of floats or integers. The parsed list is returned to the calling function, presumed to be getargv().
c_parsepar() returns
E_SUCC (0) --> success E_FAIL (-1) --> failure