Coda Distributed File System
Classes | Macros | Typedefs | Functions
parser.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cmd
 
struct  argcmd
 

Macros

#define HISTORY   100 /* Don't let history grow unbounded */
 
#define MAXARGS   100
 

Typedefs

typedef struct cmd command_t
 
typedef struct argcmd argcmd_t
 

Functions

void Parser_init (const char *, command_t *)
 
void Parser_commands (void)
 
void Parser_qhelp (int, char **)
 
void Parser_help (int, char **)
 
void Parser_exit (int, char **)
 
int Parser_execarg (int argc, char **argv, argcmd_t cmds[])
 
void execute_line (char *line)
 
int Parser_uint (char *, unsigned int *)
 
char * Parser_getstr (const char *prompt, const char *deft, char *res, size_t len)
 
int Parser_getint (const char *prompt, long min, long max, long deft, int base)
 
int Parser_getbool (const char *prompt, int deft)
 
long Parser_intarg (const char *inp, const char *prompt, int deft, int min, int max, int base)
 
char * Parser_strarg (char *inp, const char *prompt, const char *deft, char *answer, int len)
 
int Parser_arg2int (const char *inp, long *result, int base)
 

Macro Definition Documentation

◆ HISTORY

#define HISTORY   100 /* Don't let history grow unbounded */

◆ MAXARGS

#define MAXARGS   100

Typedef Documentation

◆ argcmd_t

typedef struct argcmd argcmd_t

◆ command_t

typedef struct cmd command_t

Function Documentation

◆ execute_line()

void execute_line ( char *  line)

◆ Parser_arg2int()

int Parser_arg2int ( const char *  inp,
long *  result,
int  base 
)

◆ Parser_commands()

void Parser_commands ( void  )

◆ Parser_execarg()

int Parser_execarg ( int  argc,
char **  argv,
argcmd_t  cmds[] 
)

◆ Parser_exit()

void Parser_exit ( int  ,
char **   
)

◆ Parser_getbool()

int Parser_getbool ( const char *  prompt,
int  deft 
)

◆ Parser_getint()

int Parser_getint ( const char *  prompt,
long  min,
long  max,
long  deft,
int  base 
)

◆ Parser_getstr()

char * Parser_getstr ( const char *  prompt,
const char *  deft,
char *  res,
size_t  len 
)

◆ Parser_help()

void Parser_help ( int  argc,
char **  argv 
)

◆ Parser_init()

void Parser_init ( const char *  prompt,
command_t cmds 
)

◆ Parser_intarg()

long Parser_intarg ( const char *  inp,
const char *  prompt,
int  deft,
int  min,
int  max,
int  base 
)

◆ Parser_qhelp()

void Parser_qhelp ( int  ,
char **   
)

◆ Parser_strarg()

char * Parser_strarg ( char *  inp,
const char *  prompt,
const char *  deft,
char *  answer,
int  len 
)

◆ Parser_uint()

int Parser_uint ( char *  s,
unsigned int *  val 
)