aboutsummaryrefslogtreecommitdiff
path: root/src/lutris.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lutris.c')
-rw-r--r--src/lutris.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/lutris.c b/src/lutris.c
index cc6d8c4..df5feef 100644
--- a/src/lutris.c
+++ b/src/lutris.c
@@ -11,10 +11,37 @@
static const struct Command lutris_commands[] = {
#ifdef DEBUG
{ .name = "install", .func = lutris_install, .description = "install a lutris script" },
+ { .name = "debug", .func = lutris_debug, .description = "" },
#endif
{ .name = "info", .func = lutris_info, .description = "show information about a lutris script" },
};
+void func()
+{
+ printf("I got called because $func was found\n");
+}
+
+COMMAND(lutris, debug)
+{
+ struct list_t variables[] = {
+ { .key = "string", .type = value_string, .value.str = "output" },
+ { .key = "func", .type = value_function, .value.func = func },
+ };
+
+ char* str = malloc(255);
+
+ strcpy(str, "$string and $func $fun");
+
+ printf("Input: %s\n", str);
+ parseVar(&str, variables, ARRAY_LEN(variables));
+ printf("Output: %s\n", str);
+
+
+ free(str);
+
+ return 0;
+}
+
COMMAND_GROUP_FUNC(lutris)
COMMAND(lutris, install)