00001 /* 00002 ** parse.h for in /root/work/lseos-0.2.5/libsys 00003 ** 00004 ** Copyright (c)2004 Vianney Rancurel 00005 ** Login <vianney@epita.fr> 00006 ** 00007 ** Started on Wed Apr 28 13:09:54 2004 Vianney Rancurel 00008 ** Last update Mon Dec 6 12:30:05 2004 Vianney Rancurel 00009 */ 00010 #ifndef __CONVEN_PARSE_H__ 00011 #define __CONVEN_PARSE_H__ 1 00012 #include <libc.h> 00013 00014 typedef void (*t_cmd_fn)(int argc, char **argv); 00015 00016 #define MAXARGLEN 0x100 00017 #define MAXARGV 0x10 00018 #define PARSE_EZERO 0 00019 #define PARSE_ETOOMANYARGS 1 00020 #define PARSE_EARGTOOLONG 2 00021 #define PARSE_DBLQUOTE 3 00022 00023 /* PROTO parse.c */ 00024 /* parse.c */ 00025 int parse(char *buf, int len, t_cmd_fn cmd); 00026 #endif