summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/prefs.c3
-rw-r--r--src/uicmd.cc4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/prefs.c b/src/prefs.c
index cd13aac8..fbd17f33 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -18,7 +18,7 @@
#define PREFS_FONT_CURSIVE "URW Chancery L"
#define PREFS_FONT_FANTASY "DejaVu Sans" /* TODO: find good default */
#define PREFS_FONT_MONOSPACE "DejaVu Sans Mono"
-#define PREFS_SEARCH_URL "http://duckduckgo.com/lite/?kp=-1&q=%s"
+#define PREFS_SEARCH_URL "dd http://duckduckgo.com/lite/?kp=-1&q=%s"
#define PREFS_NO_PROXY "localhost 127.0.0.1"
#define PREFS_SAVE_DIR "/tmp/"
#define PREFS_HTTP_REFERER "host"
@@ -79,7 +79,6 @@ void a_Prefs_init(void)
prefs.save_dir = dStrdup(PREFS_SAVE_DIR);
prefs.search_urls = dList_new(16);
dList_append(prefs.search_urls, dStrdup(PREFS_SEARCH_URL));
- dList_append(prefs.search_urls, NULL); /* flags a default search URL */
prefs.search_url_idx = 0;
prefs.show_back = TRUE;
prefs.show_bookmarks = TRUE;
diff --git a/src/uicmd.cc b/src/uicmd.cc
index e09bbf60..e1100219 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -669,7 +669,7 @@ static char *UIcmd_find_search_str(const char *str)
for (p = 0; p < dList_length(prefs.search_urls); p++) {
const char *search =
(const char *)dList_nth_data(prefs.search_urls, p);
- if (strncasecmp(str, search, len) == 0) {
+ if (search && strncasecmp(str, search, len) == 0) {
prefs.search_url_idx = p;
url = UIcmd_make_search_str(str + len + 1);
break;
@@ -920,7 +920,7 @@ static int UIcmd_save_file_check(const char *name)
int ch;
ds = dStr_sized_new(128);
dStr_sprintf(ds,
- "The file:\n %s (%d Bytes)\nalready exists. What do we do?",
+ "The file:\n %s (%d Bytes)\nalready exists. What do we do?",
name, (int)ss.st_size);
ch = a_Dialog_choice("Dillo Save: File exists!", ds->str,
"Abort", "Continue", "Rename", NULL);