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.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/apk_applet.h b/src/apk_applet.h
index 8e59390..2f4518b 100644
--- a/src/apk_applet.h
+++ b/src/apk_applet.h
@@ -15,13 +15,6 @@
#include "apk_defines.h"
#include "apk_database.h"
-#if 0
-#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"
-#endif
-
#define __APK_OPTAPPLET "\x00"
#define __APK_OPTGROUP(_name) _name "\x00"
#define __APK_OPT_ENUM(_enum,__desc) _enum,
@@ -45,8 +38,7 @@
struct apk_option_group {
const char *desc;
- int (*parse)(void *ctx, struct apk_db_options *dbopts,
- int opt, const char *optarg);
+ int (*parse)(void *ctx, struct apk_ctx *ac, int opt, const char *optarg);
};
struct apk_applet {
@@ -63,10 +55,13 @@ struct apk_applet {
extern const struct apk_option_group optgroup_global, optgroup_commit, optgroup_signing;
-void apk_help(struct apk_applet *applet);
void apk_applet_register(struct apk_applet *);
+void apk_applet_register_builtin(void);
+struct apk_applet *apk_applet_find(const char *name);
+void apk_applet_help(struct apk_applet *applet, struct apk_out *out);
typedef void (*apk_init_func_t)(void);
+
#define APK_DEFINE_APPLET(x) \
static void __register_##x(void) { apk_applet_register(&x); } \
static apk_init_func_t __regfunc_##x __attribute__((__section__("initapplets"))) __attribute((used)) = __register_##x;