From a8be16b1ee80f5d1d89b66494ec74af999652c2a Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sat, 13 May 2023 23:50:14 -0400 Subject: debug shortcuts plugin --- plugins/shortcuts/shortcuts.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'plugins/shortcuts/shortcuts.c') diff --git a/plugins/shortcuts/shortcuts.c b/plugins/shortcuts/shortcuts.c index bc25bbf..1af4fda 100644 --- a/plugins/shortcuts/shortcuts.c +++ b/plugins/shortcuts/shortcuts.c @@ -3,23 +3,18 @@ #include #include "../libre_redirect/str_replace_start.h" +#include "../libre_redirect/str_init.h" -#define SHORTCUT_N 20 +#define SHORTCUT_N 41 /* Uncomment for debug */ /* #define DEBUG */ /* Inspired by https://duckduckgo.com/bangs */ -void str_init(char* str, int n) -{ - for (int i = 0; i < n; i++) - str[i] = ' '; - str[n] = '\0'; -} // could also use - int shortcut_expand(const char* uri, char* output) { + printf("SHORTCUT EXPAND!"); int l1 = strlen(uri); int l2 = strlen(output); int len; -- cgit v1.2.3