#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/param.h>
#include <ctype.h>
#include <sys/stat.h>
#include <unistd.h>
#include <libgen.h>
#include <string.h>
#include "options.h"
Go to the source code of this file.
Defines |
#define | MAX_LINE_LENGTH 10000 |
Functions |
void | display_table (FILE *f, char **table, int rows, int columns, int padding) |
int | get_double (double *p, const char *s) |
int | get_int (int *p, const char *s) |
void | options_banner (const char *message) |
void | options_dump (struct option *options, FILE *f, int write_desc) |
struct option * | options_find (struct option *ops, const char *name) |
int | options_parse_args (struct option *ops, int argc, const char *argv[]) |
int | options_parse_file (struct option *ops, const char *pwd, const char *filename) |
int | options_parse_stream (struct option *ops, const char *pwd, FILE *file) |
void | options_print_help (struct option *options, FILE *f) |
int | options_requires_argument (struct option *o) |
int | options_set (struct option *o, const char *value) |
void | options_set_passed (struct option *o) |
int | options_try_pair (struct option *ops, const char *name, const char *value) |
int | options_valid (struct option *o) |
const char * | options_value_as_string (struct option *o) |
char * | strdup_ (const char *s) |
Variables |
const char * | options_banner_string = "" |
int | options_tolerant = 0 |
static char | options_value_as_string_buf [1000] |
Define Documentation
Function Documentation
void display_table |
( |
FILE * |
f, |
|
|
char ** |
table, |
|
|
int |
rows, |
|
|
int |
columns, |
|
|
int |
padding |
|
) |
| |
Return 1 if ok.
Definition at line 58 of file options.c.
int get_int |
( |
int * |
p, |
|
|
const char * |
s |
|
) |
| |
Return 1 if ok.
Definition at line 47 of file options.c.
User-friendly interface
Definition at line 33 of file options.c.
Finds an option in the array. Returns 0 if not found.
Definition at line 219 of file options.c.
Returns 0 on error
Definition at line 66 of file options.c.
Returns 0 on error
Definition at line 180 of file options.c.
Returns true if the option needs an argument
Definition at line 126 of file options.c.
Returns 0 on error.
Definition at line 242 of file options.c.
Flags the option as passed
Definition at line 120 of file options.c.
Returns 0 on error
Definition at line 228 of file options.c.
Our version of strdup.
Definition at line 38 of file options.c.
Variable Documentation