From 16a563656b05ebbdad0b34fc857315a720c15c59 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Tue, 22 Oct 2013 20:08:05 +0200 Subject: [PATCH] Removed unused function. --- src/main.c | 41 ----------------------------------------- src/main.h | 2 -- 2 files changed, 43 deletions(-) diff --git a/src/main.c b/src/main.c index 339bc57..6d49db6 100644 --- a/src/main.c +++ b/src/main.c @@ -314,47 +314,6 @@ void vb_update_urlbar(const char *uri) gtk_label_set_text(GTK_LABEL(vb.gui.statusbar.left), uri); } -/** - * Analyzes the given input string for known prefixes (':set ', ':open ', '/', - * ...) and set the given prefix pointer to the found prefix and the given - * suffix pointer to the suffix. - */ -VbInputType vb_get_input_parts(const char* input, unsigned int use, - const char **prefix, const char **clean) -{ - static const struct { - VbInputType type; - const char *prefix; - unsigned int len; - } types[] = { - {VB_INPUT_OPEN, ":o ", 3}, - {VB_INPUT_TABOPEN, ":t ", 3}, - {VB_INPUT_OPEN, ":open ", 6}, - {VB_INPUT_TABOPEN, ":tabopen ", 9}, - {VB_INPUT_SET, ":set ", 5}, - {VB_INPUT_BOOKMARK_ADD, ":bma ", 5}, - {VB_INPUT_BOOKMARK_ADD, ":bookmark-add ", 14}, - {VB_INPUT_COMMAND, ":", 1}, - {VB_INPUT_SEARCH_FORWARD, "/", 1}, - {VB_INPUT_SEARCH_BACKWARD, "?", 1}, - }; - for (unsigned int i = 0; i < LENGTH(types); i++) { - /* process only those types given with use */ - if (!(types[i].type & use)) { - continue; - } - if (!strncmp(input, types[i].prefix, types[i].len)) { - *prefix = types[i].prefix; - *clean = input + types[i].len; - return types[i].type; - } - } - - *prefix = NULL; - *clean = input; - return VB_INPUT_UNKNOWN; -} - void vb_quit(void) { const char *uri = GET_URI(); diff --git a/src/main.h b/src/main.h index 30eabb7..e79e0a9 100644 --- a/src/main.h +++ b/src/main.h @@ -332,8 +332,6 @@ void vb_update_statusbar(void); void vb_update_status_style(void); void vb_update_input_style(void); void vb_update_urlbar(const char *uri); -VbInputType vb_get_input_parts(const char* input, unsigned int use, - const char **prefix, const char **clean); gboolean vb_download(WebKitWebView *view, WebKitDownload *download, const char *path); void vb_quit(void); -- 2.20.1