commit c5a720f5811089c47ef88844676ac548ef075d27
parent 20c6f1a971382f8ffa839bc25c2ec57333965797
Author: Kyle Milz <kmilz@ucalgary.ca>
Date: Sat, 13 Oct 2012 16:51:45 -0600
remove unused function.
Diffstat:
M | src/utilities.c | | | 75 | --------------------------------------------------------------------------- |
1 file changed, 0 insertions(+), 75 deletions(-)
diff --git a/src/utilities.c b/src/utilities.c
@@ -857,81 +857,6 @@ process_line(const char *line, void *data)
return success;
}
-enum ConfigFileError
-read_rcfile(const char *config, void *data)
-{
- int t, linum = 0, index;
- char s[255], *buffer;
- FILE *fpin;
- Eina_Bool found_malformed_lines = FALSE;
- Searchengine *new;
- URIHandler *newhandler;
-
- if (access(config, F_OK) != 0)
- return FILE_NOT_FOUND;
-
- fpin = fopen(config, "r");
- if (fpin == NULL)
- return READING_FAILED;
-
- while (fgets(s, 254, fpin)) {
- linum++;
- /*
- * ignore lines that begin with #, / and such
- */
- if (!isalpha(s[0]))
- continue;
- t = strlen(s);
- s[t - 1] = '\0';
- if (strncmp(s, "searchengine", 12) == 0) {
- buffer = (s + 12);
- while (buffer[0] == ' ')
- buffer++;
- /* split line at whitespace */
- index = split_string_at_whitespace(buffer);
- if (index < 0 || buffer[0] == '\0' || buffer[index] == '\0'
- || !sanity_check_search_url(buffer+index)) {
- fprintf(stderr, "searchengines: syntax error on line %d\n", linum);
- found_malformed_lines = TRUE;
- continue;
- }
- new = malloc(sizeof(Searchengine));
- if (new == NULL) {
- fprintf(stderr, "Memory exhausted while loading search engines.\n");
- exit(EXIT_FAILURE);
- }
- new->handle = strdup(buffer);
- new->uri = strdup(buffer+index);
- dynamic_searchengines = eina_list_prepend(dynamic_searchengines, new);
- } else if (strncmp(s, "handler", 7) == 0) {
- buffer = (s + 7);
- while (buffer[0] == ' ')
- buffer++;
- /* split line at whitespace */
- index = split_string_at_whitespace(buffer);
- if (index < 0 || buffer[0] == '\0' || buffer[index] == '\0'
- || !sanity_check_search_url(buffer+index)) { /* this sanity check is also valid for handler definitions */
- fprintf(stderr, "URI handlers: syntax error on line %d\n", linum);
- found_malformed_lines = TRUE;
- continue;
- }
- newhandler = malloc(sizeof(URIHandler));
- if (newhandler == NULL) {
- fprintf(stderr, "Memory exhausted while loading uri handlers.\n");
- exit(EXIT_FAILURE);
- }
- newhandler->handle = strdup(buffer);
- newhandler->handler = strdup(buffer+index);
- // dynamic_uri_handlers = eina_list_prepend(dynamic_uri_handlers, newhandler);
- } else {
- if (!process_line(s, data))
- found_malformed_lines = TRUE;
- }
- }
- fclose(fpin);
- return found_malformed_lines ? SYNTAX_ERROR : SUCCESS;
-}
-
Eina_Bool
open_handler(char *uri) {
/*