about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2020-02-23 22:07:29 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2020-02-23 22:07:29 +0000
commit6a29f4e16c142c62e3b17ad85ff01df2e5d75b4f (patch)
tree0d521603070641e0f6e47643d20557ce0522c664 /src
parent4044c64089941f422a18fa35b599f03fd74390d6 (diff)
downloadlynx-snapshots-6a29f4e16c142c62e3b17ad85ff01df2e5d75b4f.tar.gz
snapshot of project "lynx", label v2-9-0dev_4k
Diffstat (limited to 'src')
-rw-r--r--src/LYGlobalDefs.h3
-rw-r--r--src/LYList.c5
-rw-r--r--src/LYMain.c7
-rw-r--r--src/LYReadCFG.c3
-rw-r--r--src/LYrcFile.h3
5 files changed, 15 insertions, 6 deletions
diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h
index 5bf1f2e4..0a09a929 100644
--- a/src/LYGlobalDefs.h
+++ b/src/LYGlobalDefs.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYGlobalDefs.h,v 1.151 2019/09/18 22:20:44 Steffen.Nurpmeso Exp $
+ * $LynxId: LYGlobalDefs.h,v 1.152 2020/02/23 21:20:05 tom Exp $
  *
  * global variable definitions
  */
@@ -234,6 +234,7 @@ extern "C" {
     extern BOOLEAN LYcase_sensitive;	/* TRUE to turn on case sensitive search */
     extern BOOLEAN check_mail;	/* TRUE to report unread/new mail messages */
     extern BOOLEAN child_lynx;	/* TRUE to exit with an arrow */
+    extern BOOLEAN dump_links_decoded;
     extern BOOLEAN dump_links_inline;
     extern BOOLEAN dump_links_only;
     extern BOOLEAN dump_output_immediately;
diff --git a/src/LYList.c b/src/LYList.c
index 71633fc4..989b6a36 100644
--- a/src/LYList.c
+++ b/src/LYList.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYList.c,v 1.54 2018/06/10 20:27:01 tom Exp $
+ * $LynxId: LYList.c,v 1.55 2020/02/23 21:20:05 tom Exp $
  *
  *			Lynx Document Reference List Support	      LYList.c
  *			====================================
@@ -294,7 +294,8 @@ static int print_refs(FILE *fp, int titles, int refs)
 		    fprintf(fp, "%s\n", title);
 		} else {
 		    address = HTAnchor_short_address(dest);
-		    if (LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8) {
+		    if (dump_links_decoded
+			&& LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8) {
 			(void) HTUnEscape(address);
 		    }
 		    fprintf(fp, "%s\n", address);
diff --git a/src/LYMain.c b/src/LYMain.c
index 6d51ef13..90581881 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYMain.c,v 1.287 2020/01/21 22:19:23 tom Exp $
+ * $LynxId: LYMain.c,v 1.288 2020/02/23 21:20:05 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTP.h>
@@ -209,6 +209,7 @@ BOOLEAN bold_name_anchors = FALSE;
 BOOLEAN LYcase_sensitive = CASE_SENSITIVE_ALWAYS_ON;
 BOOLEAN check_mail = CHECKMAIL;
 BOOLEAN child_lynx = FALSE;
+BOOLEAN dump_links_decoded = TRUE;
 BOOLEAN dump_links_inline = FALSE;
 BOOLEAN dump_links_only = FALSE;
 BOOLEAN dump_output_immediately = FALSE;
@@ -3620,6 +3621,10 @@ soon as they are seen)"
       "=NUMBER\nstarting count for lnk#.dat files produced by -crawl"
    ),
    PARSE_SET(
+      "list_decoded",	4|TOGGLE_ARG,		dump_links_decoded,
+      "with -dump, forces it to decode URL-encoded links"
+   ),
+   PARSE_SET(
       "list_inline",	4|TOGGLE_ARG,		dump_links_inline,
       "with -dump, forces it to show links inline with text"
    ),
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index a73a14d8..78dc94d8 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYReadCFG.c,v 1.196 2020/01/21 21:33:37 tom Exp $
+ * $LynxId: LYReadCFG.c,v 1.197 2020/02/23 21:15:14 tom Exp $
  */
 #ifndef NO_RULES
 #include <HTRules.h>
@@ -1574,6 +1574,7 @@ static Config_Type Config_Table [] =
      PARSE_FUN(RC_KEYMAP,               keymap_fun),
      PARSE_SET(RC_LEFTARROW_IN_TEXTFLD_PROMPT, textfield_prompt_at_left_edge),
      PARSE_SET(RC_LISTONLY,             dump_links_only),
+     PARSE_SET(RC_LIST_DECODED,         dump_links_decoded),
 #ifndef VMS
      PARSE_STR(RC_LIST_FORMAT,          list_format),
 #endif
diff --git a/src/LYrcFile.h b/src/LYrcFile.h
index 0397b7de..19530ecc 100644
--- a/src/LYrcFile.h
+++ b/src/LYrcFile.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYrcFile.h,v 1.54 2019/08/24 00:08:45 tom Exp $
+ * $LynxId: LYrcFile.h,v 1.55 2020/02/23 21:13:14 tom Exp $
  */
 #ifndef LYRCFILE_H
 #define LYRCFILE_H
@@ -127,6 +127,7 @@
 #define RC_LEFTARROW_IN_TEXTFLD_PROMPT  "leftarrow_in_textfield_prompt"
 #define RC_LINEEDIT_MODE                "lineedit_mode"
 #define RC_LISTONLY                     "listonly"
+#define RC_LIST_DECODED                 "list_decoded"
 #define RC_LIST_FORMAT                  "list_format"
 #define RC_LIST_INLINE                  "list_inline"
 #define RC_LIST_NEWS_DATES              "list_news_dates"