31,7 → 31,7 |
*/ |
|
/** @file |
* Generic application parsing functions. |
* Generic command line arguments parsing functions. |
*/ |
|
#ifndef __NET_APP_PARSE__ |
44,10 → 44,11 |
void print_unrecognized( int index, const char * parameter ); |
|
/** Parses the next parameter as an integral number. |
* Uses the offseted actual parameter if the offset is set or the next one if not. |
* The actual parameter is pointed by the index. |
* Parses the offseted actual parameter value if the offset is set or the next one if not. |
* @param argc The total number of the parameters. Input parameter. |
* @param argv The parameters. Input parameter. |
* @param index The actual parameter index. Input/output parameter. |
* @param index The actual parameter index. The index is incremented by the number of processed parameters. Input/output parameter. |
* @param value The parsed parameter value. Output parameter. |
* @param name The parameter name to be printed on errors. Input parameter. |
* @param offset The value offset in the actual parameter. If not set, the next parameter is parsed instead. Input parameter. |
58,10 → 59,12 |
int parse_parameter_int( int argc, char ** argv, int * index, int * value, const char * name, int offset ); |
|
/** Parses the next parameter as a character string. |
* Uses the offseted actual parameter if the offset is set or the next one if not. |
* The actual parameter is pointed by the index. |
* Uses the offseted actual parameter value if the offset is set or the next one if not. |
* Increments the actual index by the number of processed parameters. |
* @param argc The total number of the parameters. Input parameter. |
* @param argv The parameters. Input parameter. |
* @param index The actual parameter index. Input/output parameter. |
* @param index The actual parameter index. The index is incremented by the number of processed parameters. Input/output parameter. |
* @param value The parsed parameter value. Output parameter. |
* @param name The parameter name to be printed on errors. Input parameter. |
* @param offset The value offset in the actual parameter. If not set, the next parameter is parsed instead. Input parameter. |
71,11 → 74,13 |
int parse_parameter_string( int argc, char ** argv, int * index, char ** value, const char * name, int offset ); |
|
/** Parses the next named parameter as an integral number. |
* The actual parameter is pointed by the index. |
* Uses the offseted actual parameter if the offset is set or the next one if not. |
* Translates the parameter using the parse_value function. |
* Increments the actual index by the number of processed parameters. |
* @param argc The total number of the parameters. Input parameter. |
* @param argv The parameters. Input parameter. |
* @param index The actual parameter index. Input/output parameter. |
* @param index The actual parameter index. The index is incremented by the number of processed parameters. Input/output parameter. |
* @param value The parsed parameter value. Output parameter. |
* @param name The parameter name to be printed on errors. Input parameter. |
* @param offset The value offset in the actual parameter. If not set, the next parameter is parsed instead. Input parameter. |