#include "options.h"
#include "stats.h"
#include "util.h"
#include "search.h"
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <limits.h>
Go to the source code of this file.
|
| void | options_usage (void) |
| | Print options usage.
|
| |
| int | options_read (const char *option, const char *value) |
| | Read an option.
|
| |
| static const char * | option_parse (const char *line, char *option, char *value, int size) |
| | parse an option from a string
|
| |
| void | options_parse (const char *file) |
| | parse options from a file
|
| |
| void | options_bound (void) |
| | Keep options between realistic values.
|
| |
| void | options_dump (FILE *f) |
| | Print all global options.
|
| |
| void | options_free (void) |
| | free allocated resources.
|
| |
◆ option_parse()
| static const char * option_parse |
( |
const char * | line, |
|
|
char * | option, |
|
|
char * | value, |
|
|
int | size ) |
|
static |
parse an option from a string
A line of the form: "[set] option [=] value" is parse into two strings: option and value. The "set" and "=" are optionnal. This function assume all string sizes are sufficient.
- Parameters
-
| line | The string to parse. |
| option | A string to be filled with the option name. |
| value | A string to be filled with the option value. |
| size | option & value string capacity. |
- Returns
- remaining of the string.
◆ options_bound()
| void options_bound |
( |
void | | ) |
|
Keep options between realistic values.
◆ options_dump()
| void options_dump |
( |
FILE * | f | ) |
|
Print all global options.
- Parameters
-
◆ options_free()
| void options_free |
( |
void | | ) |
|
free allocated resources.
◆ options_parse()
| void options_parse |
( |
const char * | file | ) |
|
parse options from a file
- Parameters
-
◆ options_read()
| int options_read |
( |
const char * | option, |
|
|
const char * | value ) |
Read an option.
- Parameters
-
| option | Option name. |
| value | Option value. |
- Returns
- The number of arguments read (0, 1 or 2).
◆ options_usage()
| void options_usage |
( |
void | | ) |
|
◆ options
global options with default value