aboutsummaryrefslogtreecommitdiffstats
path: root/src/apk_applet.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-06-25 15:14:07 +0300
committerTimo Teras <timo.teras@iki.fi>2009-06-25 15:14:07 +0300
commit7a29678aac20ac9e113704f8a5743f6051edef8d (patch)
tree11c9583a66fa5fc1122e6d993b92dc7cd591e237 /src/apk_applet.h
parent3a488564753cee51832b6824128249a99eb4613b (diff)
downloadaports-7a29678aac20ac9e113704f8a5743f6051edef8d.tar.bz2
aports-7a29678aac20ac9e113704f8a5743f6051edef8d.tar.xz
help: auto construct help
And add some more verbosity to the help message.
Diffstat (limited to 'src/apk_applet.h')
-rw-r--r--src/apk_applet.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/apk_applet.h b/src/apk_applet.h
index dba55899d0..2782a92e3d 100644
--- a/src/apk_applet.h
+++ b/src/apk_applet.h
@@ -4,7 +4,7 @@
* Copyright (C) 2008 Timo Teräs <timo.teras@iki.fi>
* All rights reserved.
*
- * This program is free software; you can redistribute it and/or modify it
+ * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. See http://www.gnu.org/ for details.
*/
@@ -24,13 +24,22 @@ struct apk_repository_url {
extern struct apk_repository_url apk_repository_list;
+struct apk_option {
+ int val;
+ const char *name;
+ const char *help;
+ int has_arg;
+ const char *arg_name;
+};
+
struct apk_applet {
const char *name;
- const char *usage;
+ const char *arguments;
+ const char *help;
int context_size;
int num_options;
- struct option *options;
+ struct apk_option *options;
int (*parse)(void *ctx, int optch, int optindex, const char *optarg);
int (*main)(void *ctx, int argc, char **argv);