From 327b7c16889c9d95ec076d695c970da11dc32a2b Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Tue, 30 Mar 1999 17:24:31 -0500 Subject: snapshot of project "lynx", label v2-8-2dev_21 --- src/LYGetFile.c | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) (limited to 'src/LYGetFile.c') 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 #endif /* DIRED_SUPPORT */ +#include #include #include @@ -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; -- cgit 1.4.1-2-gfad0