#ifndef __ARG_H
#define __ARG_H

#define ERR_ARG_OK 0
#define ERR_ARG_SYNTAX -1
#define ERR_ARG_NOTFOUND -2
#define ERR_ARG_RANGE -3
#define ERR_ARG_FORMAT -4

extern int arg2bool(const char **argv, const char *argname);
extern int arg2int(const char **argv, const char *argname, int *value);
extern int arg2cs(const char **argv, const char *argname, const char **value);

extern int arg_getall(const char **argv, const char *fmt, ...);
extern const char* arg_error(int err);

#endif
