#include "options.h"
#include "stats.h"
#include "util.h"
#include "search.h"
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <limits.h>
Functions | |
void | options_usage (void) |
Print options usage. More... | |
int | options_read (const char *option, const char *value) |
Read an option. More... | |
static const char * | option_parse (const char *line, char *option, char *value, int size) |
parse an option from a string More... | |
void | options_parse (const char *file) |
parse options from a file More... | |
void | options_bound (void) |
Keep options between realistic values. More... | |
void | options_dump (FILE *f) |
Print all global options. More... | |
void | options_free (void) |
free allocated resources. More... | |
Variables | |
Options | options |
|
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.
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. |
void options_bound | ( | void | ) |
Keep options between realistic values.
void options_dump | ( | FILE * | f | ) |
Print all global options.
f | output stream. |
void options_free | ( | void | ) |
free allocated resources.
void options_parse | ( | const char * | file | ) |
parse options from a file
file | Option file name. |
int options_read | ( | const char * | option, |
const char * | value | ||
) |
Read an option.
option | Option name. |
value | Option value. |
void options_usage | ( | void | ) |
Print options usage.
Options options |
global options with default value