summaryrefslogtreecommitdiff
path: root/src/apk_applet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/apk_applet.h')
-rw-r--r--src/apk_applet.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/apk_applet.h b/src/apk_applet.h
index 390ec59..f1bf9b2 100644
--- a/src/apk_applet.h
+++ b/src/apk_applet.h
@@ -17,19 +17,17 @@
#include "apk_defines.h"
#include "apk_database.h"
-struct apk_option {
- int val;
- const char *name;
- int has_arg;
-};
+#define APK_OPTAPPLET "\x00"
+#define APK_OPTGROUP(_name) _name "\x00"
+#define APK_OPT1n(_opt) "\xf0" _opt "\x00"
+#define APK_OPT1R(_opt) "\xaf" "\xf0" _opt "\x00"
+#define APK_OPT2n(_opt, _short) _short _opt "\x00"
+#define APK_OPT2R(_opt, _short) "\xaf" _short _opt "\x00"
struct apk_option_group {
- const char *name;
- int num_options;
- const struct apk_option *options;
-
+ const char *desc;
int (*parse)(void *ctx, struct apk_db_options *dbopts,
- int optch, const char *optarg);
+ int opt, const char *optarg);
};
struct apk_applet {