This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
magicka/utils/magimail/src/shared/parseargs.h
2017-03-18 23:04:38 +10:00

25 lines
488 B
C

#ifndef SHARED_PARSEARGS_H
#define SHARED_PARSEARGS_H
#include "shared/types.h"
#define ARGTYPE_END 0
#define ARGTYPE_STRING 1
#define ARGTYPE_BOOL 2
#define ARGFLAG_AUTO 1 /* Keyword does not have to be specified */
#define ARGFLAG_MANDATORY 2 /* Argument cannot be left out */
struct argument
{
uint16_t type;
char *name;
uint16_t flags;
void *data;
};
bool parseargs(struct argument *arg,int argc, char **argv);
void printargs(struct argument *arg);
#endif