/* clparse.h - Command Line Parse */

#ifndef  _CLPARSE_
#define  _CLPARSE_

#ifndef  CLP_MAXSTRLEN
#define  CLP_MAXSTRLEN  80
#endif

typedef enum  {
	clp_int, clp_true, clp_false, clp_string}
clp_dtype_t;

typedef struct clp_info_struct  {
	char  *word;
	clp_dtype_t  dtype;
	void  *storage;
	char  *description;
} clp_info_t;

#define  CLP_END  {NULL, 0, NULL, NULL}

extern int  clp_parse(char *argv[], clp_info_t cltab[]);
#define  CLP_NOGOOD  -1

#endif  _CLPARSE_
