commit 5d5b90082829e3ce1072250355588739e38be346
parent c5a720f5811089c47ef88844676ac548ef075d27
Author: Kyle Milz <kmilz@ucalgary.ca>
Date: Sat, 13 Oct 2012 16:57:23 -0600
remove more unused functions.
Diffstat:
2 files changed, 3 insertions(+), 95 deletions(-)
diff --git a/src/commands.c b/src/commands.c
@@ -508,9 +508,10 @@ open_arg(const Arg *arg, void *data)
*(p + 1) = '\0';
len = strlen(s);
new = NULL;
- /* check for external handlers */
+ /* check for external handlers
if (open_handler(s))
- return TRUE;
+ return TRUE;
+ */
/* check for search engines */
p = strchr(s, ' ');
if (p) { /* check for search engines */
diff --git a/src/utilities.c b/src/utilities.c
@@ -725,49 +725,6 @@ count_list(Listelement *elementlist)
return n;
}
-/* split the string at the first occurence of whitespace and return the
- * position of the second half.
- * Unlike strtok, the substrings can be empty and the second string is
- * stripped of trailing and leading whitespace.
- * Return -1 if `string' contains no whitespace */
-static int split_string_at_whitespace(char *string)
-{
- int index = strcspn(string, "\n\t ");
- if (string[index] != '\0') {
- string[index++] = 0;
- // g_strstrip(string+index);
- return index;
- }
- return -1;
-}
-
-/* return TRUE, if the string contains exactly one unescaped %s and no other
- * printf directives */
-static Eina_Bool sanity_check_search_url(const char *string)
-{
- int was_percent_char = 0, percent_s_count = 0;
-
- for (; *string; string++) {
- switch (*string) {
- case '%':
- was_percent_char = !was_percent_char;
- break;
- case 's':
- if (was_percent_char)
- percent_s_count++;
- was_percent_char = 0;
- break;
- default:
- if (was_percent_char)
- return FALSE;
- was_percent_char = 0;
- break;
- }
- }
-
- return !was_percent_char && percent_s_count == 1;
-}
-
void make_searchengines_list(Searchengine *searchengines, int length)
{
int i;
@@ -857,56 +814,6 @@ process_line(const char *line, void *data)
return success;
}
-Eina_Bool
-open_handler(char *uri) {
- /*
- char *argv[64];
- char *p = NULL, *arg, arg_temp[MAX_SETTING_SIZE], *temp, temp2[MAX_SETTING_SIZE] = "", *temp3;
- int j;
- Eina_List *l;
-
- p = strchr(uri, ':');
- if (p) {
- if (dynamic_uri_handlers != NULL) {
- for (l = dynamic_uri_handlers; l; l = eina_list_next(l)) {
- URIHandler *s = (URIHandler *)l->data;
- if (strlen(uri) >= strlen(s->handle) && strncmp(s->handle, uri, strlen(s->handle)) == 0) {
- if (strlen(s->handler) > 0) {
- arg = (uri + strlen(s->handle));
- strncpy(temp2, s->handler, MAX_SETTING_SIZE);
- temp = strtok(temp2, " ");
- j = 0;
- while (temp != NULL) {
- if (strstr(temp, "%s")) {
- temp3 = temp;
- memset(arg_temp, 0, MAX_SETTING_SIZE);
- while (strncmp(temp3, "%s", 2) != 0) {
- strncat(arg_temp, temp3, 1);
- temp3++;
- }
- strcat(arg_temp, arg);
- temp3++;
- temp3++;
- strcat(arg_temp, temp3);
- argv[j] = arg_temp;
- } else {
- argv[j] = temp;
- }
- temp = strtok(NULL, " ");
- j++;
- }
- argv[j] = NULL;
- // g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
- }
- return TRUE;
- }
- }
- }
- }
- */
- return FALSE;
-}
-
void
parse(const char *buf)
{