diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1999-06-29 13:01:29 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1999-06-29 13:01:29 -0400 |
commit | 83824f14360f92f8a3a47ac5f136bb077b141065 (patch) | |
tree | 9b21f7145d93e54ad67f57e8807f20493dfcbc3d /src/LYOptions.c | |
parent | 5be99e2ee1a17028574fcbd90b9ba2c09555585e (diff) | |
download | lynx-snapshots-83824f14360f92f8a3a47ac5f136bb077b141065.tar.gz |
snapshot of project "lynx", label v2-8-3_3
Diffstat (limited to 'src/LYOptions.c')
-rw-r--r-- | src/LYOptions.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/LYOptions.c b/src/LYOptions.c index 560b29e8..7bc6e1d0 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -3553,17 +3553,22 @@ PUBLIC int postoptions ARGS1( return(NULLFILE); } + data = break_data(newdoc->post_data); - /*------------------------------------------------- - * kludge gen_options() call: - *--------------------------------------------------*/ - - if (strstr(newdoc->address, "LYNXOPTIONS:/") && !newdoc->post_data) { - int status = gen_options(&newdoc->address); - if (status == NOT_FOUND) - return(NOT_FOUND); + if (!data) { + int status; + + /*------------------------------------------------- + * kludge gen_options() call: + *--------------------------------------------------*/ + status = gen_options(&newdoc->address); + if (status != NORMAL) { + HTAlwaysAlert("Unexpected way of accessing", newdoc->address); + FREE(newdoc->address); + return(status); + } - /* exit to getfile() cyrcle */ + /* exit to getfile() cycle */ WWWDoc.address = newdoc->address; WWWDoc.post_data = newdoc->post_data; WWWDoc.post_content_type = newdoc->post_content_type; @@ -3576,9 +3581,6 @@ PUBLIC int postoptions ARGS1( return(NORMAL); } - - data = break_data(newdoc->post_data); - for (i = 0; data[i].tag != NULL; i++) { /* * Paranoid security. @@ -4085,13 +4087,17 @@ PRIVATE int gen_options ARGS1( #if defined(USE_SLANG) || defined(COLOR_CURSES) BOOLEAN can_do_colors; #endif - static char tempfile[LY_MAXPATH]; + static char tempfile[LY_MAXPATH] = "\0"; FILE *fp0; size_t cset_len = 0; size_t text_len = COLS - 38; /* cf: PutLabel */ - LYRemoveTemp(tempfile); - fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); + if (LYReuseTempfiles) { + fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w"); + } else { + LYRemoveTemp(tempfile); + fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); + } if (fp0 == NULL) { HTAlert(UNABLE_TO_OPEN_TEMPFILE); return(NOT_FOUND); |