Classes | Macros | Typedefs | Functions
getopt.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "zhash.h"
#include "zarray.h"
#include "getopt.h"
#include "common/math_util.h"
Include dependency graph for getopt.c:

Go to the source code of this file.

Classes

struct  getopt
 
struct  getopt_option
 

Macros

#define GOO_BOOL_TYPE   1
 
#define GOO_STRING_TYPE   2
 

Typedefs

typedef struct getopt_option getopt_option_t
 

Functions

static char * get_arg_assignment (char *arg)
 
void getopt_add_bool (getopt_t *gopt, char sopt, const char *lname, int def, const char *help)
 
void getopt_add_double (getopt_t *gopt, char sopt, const char *lname, const char *def, const char *help)
 
void getopt_add_int (getopt_t *gopt, char sopt, const char *lname, const char *def, const char *help)
 
void getopt_add_spacer (getopt_t *gopt, const char *s)
 
void getopt_add_string (getopt_t *gopt, char sopt, const char *lname, const char *def, const char *help)
 
getopt_tgetopt_create ()
 
void getopt_destroy (getopt_t *gopt)
 
void getopt_do_usage (getopt_t *gopt)
 
int getopt_get_bool (getopt_t *getopt, const char *lname)
 
double getopt_get_double (getopt_t *getopt, const char *lname)
 
const zarray_tgetopt_get_extra_args (getopt_t *gopt)
 
int getopt_get_int (getopt_t *getopt, const char *lname)
 
const char * getopt_get_string (getopt_t *gopt, const char *lname)
 
char * getopt_get_usage (getopt_t *gopt)
 
static void getopt_modify_string (char **str, char *newvalue)
 
void getopt_option_destroy (getopt_option_t *goo)
 
int getopt_parse (getopt_t *gopt, int argc, char *argv[], int showErrors)
 
int getopt_was_specified (getopt_t *getopt, const char *lname)
 

Macro Definition Documentation

#define GOO_BOOL_TYPE   1

Definition at line 45 of file getopt.c.

#define GOO_STRING_TYPE   2

Definition at line 46 of file getopt.c.

Typedef Documentation

Definition at line 48 of file getopt.c.

Function Documentation

static char* get_arg_assignment ( char *  arg)
static

Definition at line 121 of file getopt.c.

void getopt_add_bool ( getopt_t gopt,
char  sopt,
const char *  lname,
int  def,
const char *  help 
)

Definition at line 326 of file getopt.c.

void getopt_add_double ( getopt_t gopt,
char  sopt,
const char *  lname,
const char *  def,
const char *  help 
)

Definition at line 371 of file getopt.c.

void getopt_add_int ( getopt_t gopt,
char  sopt,
const char *  lname,
const char *  def,
const char *  help 
)

Definition at line 365 of file getopt.c.

void getopt_add_spacer ( getopt_t gopt,
const char *  s 
)

Definition at line 318 of file getopt.c.

void getopt_add_string ( getopt_t gopt,
char  sopt,
const char *  lname,
const char *  def,
const char *  help 
)

Definition at line 376 of file getopt.c.

getopt_t* getopt_create ( )

Definition at line 72 of file getopt.c.

void getopt_destroy ( getopt_t gopt)

Definition at line 94 of file getopt.c.

void getopt_do_usage ( getopt_t gopt)

Definition at line 492 of file getopt.c.

int getopt_get_bool ( getopt_t getopt,
const char *  lname 
)

Definition at line 447 of file getopt.c.

double getopt_get_double ( getopt_t getopt,
const char *  lname 
)

Definition at line 455 of file getopt.c.

const zarray_t* getopt_get_extra_args ( getopt_t gopt)

Definition at line 487 of file getopt.c.

int getopt_get_int ( getopt_t getopt,
const char *  lname 
)

Definition at line 425 of file getopt.c.

const char* getopt_get_string ( getopt_t gopt,
const char *  lname 
)

Definition at line 415 of file getopt.c.

char* getopt_get_usage ( getopt_t gopt)

Definition at line 499 of file getopt.c.

static void getopt_modify_string ( char **  str,
char *  newvalue 
)
static

Definition at line 113 of file getopt.c.

void getopt_option_destroy ( getopt_option_t goo)

Definition at line 84 of file getopt.c.

int getopt_parse ( getopt_t gopt,
int  argc,
char *  argv[],
int  showErrors 
)

Definition at line 147 of file getopt.c.

int getopt_was_specified ( getopt_t getopt,
const char *  lname 
)

Definition at line 477 of file getopt.c.



apriltags2
Author(s): Danylo Malyuta
autogenerated on Fri Oct 19 2018 04:02:33