commit c785523fcece4a74a6379f3a12b440d11775f723
parent f31ca016a61d61c7b663e75abe3a676a5712dc51
Author: Kyle Milz <kmilz@ucalgary.ca>
Date: Sat, 20 Oct 2012 00:03:43 -0600
commands: remove unused search_tag() function
Diffstat:
3 files changed, 0 insertions(+), 90 deletions(-)
diff --git a/src/commands.c b/src/commands.c
@@ -813,94 +813,6 @@ focus_input(const Arg *arg, void *data)
return EINA_TRUE;
}
-/*
-Eina_Bool
-browser_settings(const Arg *arg, void *data) {
- char line[255];
- if (!arg->s) {
- set_error("Missing argument.");
- return FALSE;
- }
- strncpy(line, arg->s, 254);
- if (process_set_line(line))
- return TRUE;
- else {
- set_error("Invalid setting.");
- return FALSE;
- }
-}
-*/
-
-Eina_Bool
-search_tag(const Arg * a, void *data)
-{
-#if 0
- FILE *f;
- char *filename;
- Window_Data *ad = data;
- const char *tag = a->s;
- char s[BUFFERSIZE], foundtag[40], url[BUFFERSIZE];
- int t, i, intag, k;
-
- if (!tag) {
- /* The user must give us something to load up. */
- set_error("Bookmark tag required with this option.", data);
- return FALSE;
- }
-
- if (strlen(tag) > MAXTAGSIZE) {
- set_error("Tag too long.", data);
- return FALSE;
- }
-
- filename = strdup_printf(BOOKMARKS_STORAGE_FILENAME);
- f = fopen(filename, "r");
- free(filename);
- if (f == NULL) {
- set_error("Couldn't open bookmarks file.", data);
- return FALSE;
- }
- while (fgets(s, BUFFERSIZE-1, f)) {
- intag = 0;
- t = strlen(s) - 1;
- while (isspace(s[t]))
- t--;
- if (s[t] != ']') continue;
- while (t > 0) {
- if (s[t] == ']') {
- if (!intag)
- intag = t;
- else
- intag = 0;
- } else {
- if (s[t] == '[') {
- if (intag) {
- i = 0;
- k = t + 1;
- while (k < intag)
- foundtag[i++] = s[k++];
- foundtag[i] = '\0';
- /* foundtag now contains the tag */
- if (strlen(foundtag) < MAXTAGSIZE && strcmp(tag, foundtag) == 0) {
- i = 0;
- while (isspace(s[i])) i++;
- k = 0;
- while (s[i] && !isspace(s[i])) url[k++] = s[i++];
- url[k] = '\0';
- Arg x = { .i = TargetNew, .s = url };
- open_arg(&x, data);
- }
- }
- intag = 0;
- }
- }
- t--;
- }
- }
-#endif
- return EINA_TRUE;
-}
-
Eina_Bool
list(const Arg *arg, void *data)
{
diff --git a/src/commands.h b/src/commands.h
@@ -6,7 +6,6 @@ Eina_Bool quit(const Arg *, void *);
Eina_Bool add_tab(const Arg *, void *);
Eina_Bool view_source(const Arg *, void *);
Eina_Bool bookmark(const Arg *, void *);
-Eina_Bool search_tag(const Arg *, void *);
Eina_Bool print_frame(const Arg *, void *);
Eina_Bool scroll(const Arg *arg, void *);
Eina_Bool open_remembered(const Arg *, void *);
diff --git a/src/keymap.h b/src/keymap.h
@@ -158,7 +158,6 @@ static Command commands[] = {
{ "re!", navigate, {NavigationForceReload} },
{ "reload", navigate, {NavigationReload} },
{ "reload!", navigate, {NavigationForceReload} },
- { "qt", search_tag, {0} },
{ "st", navigate, {NavigationCancel} },
{ "stop", navigate, {NavigationCancel} },
{ "t", open_arg, {0} },