1 /* args.h - parse command-line args
5 Copyright 2001 University of Southern California
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
26 int nocheckfordirorfile;
29 typedef struct args args_t;
31 #define ARGS_DEFAULT_CONF_FILE_DIR OPKGETCDIR"/opkg"
32 #define ARGS_DEFAULT_CONF_FILE_NAME "opkg.conf"
33 #define ARGS_DEFAULT_DEST NULL
34 #define ARGS_DEFAULT_VERBOSITY 1
36 void args_init(args_t *args);
37 void args_deinit(args_t *args);
38 int args_parse(args_t *args, int argc, char *argv[]);
39 void args_usage(const char *complaint);