From c0f98c34ce9c05ffee1772209a812f6572c05e55 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 11 Feb 2006 17:44:54 +0100 Subject: [PATCH 1/4] Revert witekfl's e723ddaee631 This is utterly silly and breaks plenty of stuff - Witek, you CAN'T append slashes to all hosts just because some silly referer needs it, everywhere else we NEED the hosts without slashes! --- src/protocol/uri.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/protocol/uri.c b/src/protocol/uri.c index d3979b28b..88020dcc0 100644 --- a/src/protocol/uri.c +++ b/src/protocol/uri.c @@ -460,8 +460,6 @@ struct string * add_uri_to_string(struct string *string, struct uri *uri, enum uri_component components) { - int add_host = 0; - /* Custom or unknown keep the URI untouched. */ if (uri->protocol == PROTOCOL_UNKNOWN) return add_to_string(string, struri(uri)); @@ -488,7 +486,7 @@ add_uri_to_string(struct string *string, struct uri *uri, } if (wants(URI_HOST) && uri->hostlen) { - add_host = 1; + int add_host = 1; #ifdef CONFIG_IPV6 /* Rationale for wants(URI_PORT): The [notation] was invented @@ -552,7 +550,7 @@ add_uri_to_string(struct string *string, struct uri *uri, } /* Only add slash if we need to separate */ - if ((wants(URI_DATA) || wants(URI_POST) || add_host) + if ((wants(URI_DATA) || wants(URI_POST)) && wants(~(URI_DATA | URI_PORT)) && get_protocol_need_slash_after_host(uri->protocol)) add_char_to_string(string, '/'); From 15b52b62e48f98b2accbb6e66f95dd51e1da2b04 Mon Sep 17 00:00:00 2001 From: witekfl Date: Sat, 11 Feb 2006 19:11:50 +0100 Subject: [PATCH 2/4] REFERRER is back --- src/protocol/uri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol/uri.c b/src/protocol/uri.c index 88020dcc0..45dae8c2e 100644 --- a/src/protocol/uri.c +++ b/src/protocol/uri.c @@ -550,7 +550,7 @@ add_uri_to_string(struct string *string, struct uri *uri, } /* Only add slash if we need to separate */ - if ((wants(URI_DATA) || wants(URI_POST)) + if ((wants(URI_DATA) || wants(URI_POST) || components == URI_HTTP_REFERRER_HOST) && wants(~(URI_DATA | URI_PORT)) && get_protocol_need_slash_after_host(uri->protocol)) add_char_to_string(string, '/'); From 8890d95174488e7e561bcb3aed3e3a8d33822ed8 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 11 Feb 2006 19:37:57 +0100 Subject: [PATCH 3/4] Cure few of my ie.-vs-e.g. sins --- configure.in | 4 ++-- features.conf | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index cd5774656..b87f00a74 100644 --- a/configure.in +++ b/configure.in @@ -675,7 +675,7 @@ if test "$enable_guile" = "yes"; then cat < Date: Sat, 11 Feb 2006 21:37:49 +0100 Subject: [PATCH 4/4] Make ELinks FreeBSD friendly. Defined keys used on FreeBSD console --- src/terminal/kbd.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/terminal/kbd.c b/src/terminal/kbd.c index 408cebff0..d50147f5e 100644 --- a/src/terminal/kbd.c +++ b/src/terminal/kbd.c @@ -37,7 +37,6 @@ #include "util/string.h" #include "util/time.h" - /* TODO: move stuff from here to itrm.{c,h} and mouse.{c,h} */ struct itrm *ditrm = NULL; @@ -636,6 +635,7 @@ get_esc_code(unsigned char *str, int len, unsigned char *code, int *num) /* #define DEBUG_ITRM_QUEUE */ #ifdef DEBUG_ITRM_QUEUE +#include #include /* isprint() isspace() */ #endif @@ -680,6 +680,19 @@ decode_terminal_escape_sequence(struct itrm *itrm, struct term_event *ev) case 'H': kbd.key = KBD_HOME; break; case 'I': kbd.key = KBD_PAGE_UP; break; case 'G': kbd.key = KBD_PAGE_DOWN; break; +/* Free BSD */ +/* case 'M': kbd.key = KBD_F1; break;*/ + case 'N': kbd.key = KBD_F2; break; + case 'O': kbd.key = KBD_F3; break; + case 'P': kbd.key = KBD_F4; break; + case 'Q': kbd.key = KBD_F5; break; +/* case 'R': kbd.key = KBD_F6; break;*/ + case 'S': kbd.key = KBD_F7; break; + case 'T': kbd.key = KBD_F8; break; + case 'U': kbd.key = KBD_F9; break; + case 'V': kbd.key = KBD_F10; break; + case 'W': kbd.key = KBD_F11; break; + case 'X': kbd.key = KBD_F12; break; case 'z': switch (v) { case 247: kbd.key = KBD_INS; break; @@ -758,10 +771,13 @@ set_kbd_event(struct term_event *ev, int key, int modifier) key = KBD_TAB; break; +/* Free BSD uses ASCII_DEL on console */ case ASCII_BS: - case ASCII_DEL: key = KBD_BS; break; + case ASCII_DEL: + key = KBD_DEL; + break; case ASCII_LF: case ASCII_CR: