about summary refs log tree commit diff stats
path: root/src/LYGetFile.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1999-03-30 17:24:31 -0500
committerThomas E. Dickey <dickey@invisible-island.net>1999-03-30 17:24:31 -0500
commit327b7c16889c9d95ec076d695c970da11dc32a2b (patch)
tree91a9c864c60dfff69efe63d4cca7aab0b4754d6d /src/LYGetFile.c
parent79de405977ac0d7820576b353dde07ce09cedba9 (diff)
downloadlynx-snapshots-327b7c16889c9d95ec076d695c970da11dc32a2b.tar.gz
snapshot of project "lynx", label v2-8-2dev_21
Diffstat (limited to 'src/LYGetFile.c')
-rw-r--r--src/LYGetFile.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/src/LYGetFile.c b/src/LYGetFile.c
index 6e7f90d3..010c4a92 100644
--- a/src/LYGetFile.c
+++ b/src/LYGetFile.c
@@ -27,6 +27,7 @@
 #ifdef DIRED_SUPPORT
 #include <LYLocal.h>
 #endif /* DIRED_SUPPORT */
+#include <LYReadCFG.h>
 
 #include <LYexit.h>
 #include <LYLeaks.h>
@@ -178,6 +179,8 @@ Try_Redirected_URL:
 			  url_type == LYNXCOOKIE_URL_TYPE ||
 			  url_type == LYNXPRINT_URL_TYPE ||
 			  url_type == LYNXOPTIONS_URL_TYPE ||
+			  url_type == LYNXCFG_URL_TYPE ||
+			  url_type == LYNXCOMPILE_OPTS_URL_TYPE ||
 			  url_type == LYNXDOWNLOAD_URL_TYPE ||
 			  url_type == MAILTO_URL_TYPE ||
 			  url_type == NEWSPOST_URL_TYPE ||
@@ -242,10 +245,40 @@ Try_Redirected_URL:
 
 #ifndef NO_OPTION_FORMS
 		} else if (url_type == LYNXOPTIONS_URL_TYPE) {
-		    /* forms-based options menu */
+		    /* proceed forms-based options menu */
 		    return(postoptions(doc));
 #endif
 
+		} else if (url_type == LYNXCFG_URL_TYPE) {
+		    /* show lynx.cfg settings */
+		    StrAllocCopy(doc->address, lynx_cfg_infopage());
+		    WWWDoc.address = doc->address;
+		    WWWDoc.post_data = doc->post_data;
+		    WWWDoc.post_content_type = doc->post_content_type;
+		    WWWDoc.bookmark = doc->bookmark;
+		    WWWDoc.isHEAD = doc->isHEAD;
+		    WWWDoc.safe = doc->safe;
+
+		    if (!HTLoadAbsolute(&WWWDoc))
+			 return(NOT_FOUND);
+		    return(NORMAL);
+
+#ifdef HAVE_CFG_DEFS_H
+		} else if (url_type == LYNXCOMPILE_OPTS_URL_TYPE) {
+		    /* show compile-time settings */
+		    StrAllocCopy(doc->address, (char *)lynx_compile_opts());
+		    WWWDoc.address = doc->address;
+		    WWWDoc.post_data = doc->post_data;
+		    WWWDoc.post_content_type = doc->post_content_type;
+		    WWWDoc.bookmark = doc->bookmark;
+		    WWWDoc.isHEAD = doc->isHEAD;
+		    WWWDoc.safe = doc->safe;
+
+		    if (!HTLoadAbsolute(&WWWDoc))
+			 return(NOT_FOUND);
+		    return(NORMAL);
+#endif
+
 #ifndef DISABLE_NEWS
 		} else if (url_type == NEWSPOST_URL_TYPE ||
 			   url_type == NEWSREPLY_URL_TYPE ||
@@ -711,6 +744,8 @@ Try_Redirected_URL:
 #endif /* DIRED_SUPPORT */
 				url_type == LYNXPRINT_URL_TYPE ||
 				url_type == LYNXOPTIONS_URL_TYPE ||
+				url_type == LYNXCFG_URL_TYPE ||
+				url_type == LYNXCOMPILE_OPTS_URL_TYPE ||
 				url_type == LYNXHIST_URL_TYPE ||
 				url_type == LYNXCOOKIE_URL_TYPE ||
 				(LYValidate &&
@@ -1086,6 +1121,7 @@ static struct trust *trusted_exec = &trusted_exec_default;
 static struct trust *always_trusted_exec = &always_trusted_exec_default;
 static struct trust *trusted_cgi = &trusted_cgi_default;
 
+#ifdef LY_FIND_LEAKS
 PRIVATE void LYTrusted_free NOARGS
 {
     struct trust *cur;
@@ -1126,9 +1162,10 @@ PRIVATE void LYTrusted_free NOARGS
 
     return;
 }
+#endif /* LY_FIND_LEAKS */
 
 PUBLIC void add_trusted ARGS2(
-	char *, 	str,
+	char *,		str,
 	int,		type)
 {
     struct trust *tp;