diff options
author | Matteo Bernardini | 2018-07-21 18:30:25 +0200 |
---|---|---|
committer | Matteo Bernardini | 2018-07-21 18:30:25 +0200 |
commit | edc3e434486c95e7ee8e227def485cc9e068f377 (patch) | |
tree | 85312122d425cbf4fcc00475938a40451c4dc97c /network/elinks/0005-gopher_newlines_tabs_entity.patch | |
parent | ec1a4a932c386f509cf24092be7aa38837d57ddd (diff) | |
download | slackbuilds-current-20180722.1.tar.gz |
20180721.2 global branch merge.current-20180722.1
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/elinks/0005-gopher_newlines_tabs_entity.patch')
-rw-r--r-- | network/elinks/0005-gopher_newlines_tabs_entity.patch | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/network/elinks/0005-gopher_newlines_tabs_entity.patch b/network/elinks/0005-gopher_newlines_tabs_entity.patch deleted file mode 100644 index f93b0d5431..0000000000 --- a/network/elinks/0005-gopher_newlines_tabs_entity.patch +++ /dev/null @@ -1,87 +0,0 @@ -##################################################################### -# Some fixes for having line feeds in text without a carriage return. -# Make sure that only lines with tabs are treated as links. -# Support links that don't begin with a '/'. -##################################################################### -diff -Naur a/src/protocol/gopher/gopher.c b/src/protocol/gopher/gopher.c ---- a/src/protocol/gopher/gopher.c 2017-12-28 15:08:54.310546900 +0000 -+++ b/src/protocol/gopher/gopher.c 2017-12-28 20:26:00.635193897 +0000 -@@ -326,7 +326,7 @@ - - /* Get entity type, and selector string. */ - /* Pick up gopher_entity */ -- if (selectorlen > 1 && selector[1] == '/') { -+ if (selectorlen > 1) { - entity = *selector++; - selectorlen--; - } -@@ -357,8 +357,7 @@ - selectorlen++; - } - -- if (entity_info->type == '1') -- { -+ if (entity_info->type == '1') { - if (strstr(selector, DIR) == selector) - { - *selector++; -@@ -402,9 +401,9 @@ - gopher->entity = entity_info; - gopher->commandlen = command.length; - -- debug_log("439 gopher->entity: ", 0); -+ debug_log("404 gopher->entity: ", 0); - debug_log(gopher->entity, 1); -- debug_log("437 command.source: ", 0); -+ debug_log("406 command.source: ", 0); - debug_log(command.source, 1); - memcpy(gopher->command, command.source, command.length); - done_string(&command); -@@ -486,6 +485,7 @@ - unsigned char *host = NULL; - unsigned char *port = NULL; - enum gopher_entity entity = *name++; -+ int link = 0; - - if (!entity) { - add_char_to_string(buffer, '\n'); -@@ -495,6 +495,7 @@ - if (*name) { - selector = strchr(name, ASCII_TAB); - if (selector) { -+ link = 1; - /* Terminate name */ - *selector++ = '\0'; - -@@ -565,7 +566,7 @@ - switch (entity) { - case GOPHER_WWW: - /* Gopher pointer to W3 */ -- if (selector) { -+ if (selector && link == 1) { - add_gopher_link(buffer, name, selector); - break; - } -@@ -617,7 +618,8 @@ - - } else if (address.length > 0 - && strlcmp(address.source, address.length - 1, -- "gopher://error.host:1/", -1)) { -+ "gopher://error.host:1/", -1) -+ && link == 1) { - add_gopher_link(buffer, name, address.source); - - } else { -@@ -639,6 +641,12 @@ - for (; datalen > 1; data++, datalen--) - if (data[0] == ASCII_CR && data[1] == ASCII_LF) - return data + 2; -+ else -+ if(data[0] == ASCII_CR) -+ return data + 2; -+ else -+ if(data[0] == ASCII_LF) -+ return data + 2; - - return NULL; - } |