Skip to main content

optparse.h

C API reference for the header optparse.h.

Public API

Enum: optparse_argtype

Canonical path: optparse.h#enum:optparse_argtype

Declared in: optparse.h

Signature

enum optparse_argtype { OPTPARSE_NONE, OPTPARSE_REQUIRED, OPTPARSE_OPTIONAL };

Function: optparse

Canonical path: optparse.h#optparse

Declared in: optparse.h

Signature

int optparse(struct optparse *options, const char *optstring);

Function: optparse_arg

Canonical path: optparse.h#optparse_arg

Declared in: optparse.h

Signature

char *optparse_arg(struct optparse *options);

Function: optparse_init

Canonical path: optparse.h#optparse_init

Declared in: optparse.h

Signature

void optparse_init(struct optparse *options, char **argv);

Function: optparse_long

Canonical path: optparse.h#optparse_long

Declared in: optparse.h

Signature

int
optparse_long(struct optparse *options,
const struct optparse_long *longopts,
int *longindex);

Struct: optparse

Canonical path: optparse.h#struct:optparse

Declared in: optparse.h

Signature

struct optparse {
char **argv;
int permute;
int optind;
int optopt;
char *optarg;
char errmsg[64];
int subopt;
};

Struct: optparse_long

Canonical path: optparse.h#struct:optparse_long

Declared in: optparse.h

Signature

struct optparse_long {
const char *longname;
int shortname;
enum optparse_argtype argtype;
};