parse.h File Reference

#include <libc.h>

Go to the source code of this file.

Defines

#define __CONVEN_PARSE_H__   1
#define MAXARGLEN   0x100
#define MAXARGV   0x10
#define PARSE_EZERO   0
#define PARSE_ETOOMANYARGS   1
#define PARSE_EARGTOOLONG   2
#define PARSE_DBLQUOTE   3

Typedefs

typedef void(* t_cmd_fn )(int argc, char **argv)

Functions

int parse (char *buf, int len, t_cmd_fn cmd)


Define Documentation

#define __CONVEN_PARSE_H__   1
 

#define MAXARGLEN   0x100
 

#define MAXARGV   0x10
 

#define PARSE_DBLQUOTE   3
 

#define PARSE_EARGTOOLONG   2
 

#define PARSE_ETOOMANYARGS   1
 

#define PARSE_EZERO   0
 


Typedef Documentation

typedef void(* t_cmd_fn)(int argc, char **argv)
 


Function Documentation

int parse char *  buf,
int  len,
t_cmd_fn  cmd
 

Parses the specified buffer recognizing comments beginning with a sharp sign, double quotes and special quotes <> (for preprocessor catenation). Ignores tabs and whitespaces.

This parser uses a static buffer and so, does not allocate memory.


Generated on Wed May 24 23:05:54 2006 for LSE/OS by  doxygen 1.4.6