[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev dev.28 and FORMS_OPTIONS problems
From: |
Leonid Pauzner |
Subject: |
Re: lynx-dev dev.28 and FORMS_OPTIONS problems |
Date: |
Sat, 19 Sep 1998 16:26:34 +0400 (MSD) |
>> > so far I think it's ok as 'experimental' (I'm using it).
OK, the patch against clean dev28,
may conflict with my previous patch
in a few obvious lines (LYMain.c, LYReadCFG.c)
* Since no more security problems let compile in forms-based options code,
old-style code ifdef'ed with "#ifndef EXP_FORMS_OPTIONS" (probably need
another name). If old-style code compiled - it became active but
FORMS_OPTIONS switch in lynx.cfg as well as -forms_options command line
toggle introduced (this will help with farther testing). - LP
diff -u old/installa ./installa
--- old/installa Thu Sep 17 22:54:06 1998
+++ ./installa Sat Sep 19 15:57:52 1998
@@ -256,7 +256,9 @@
only. *Use with discretion.* See docs/README.chartrans.)
--enable-forms-options (define EXP_FORMS_OPTIONS)
- Add forms-based options screen.
+ Do not compile in old-style options code (was FORMS_OPTIONS switch
+ in lynx.cfg as well as -forms_options command line toggle).
+ So use forms-based options screen only.
--enable-internal-links (define DONT_TRACK_INTERNAL_LINKS)
Disabled by default, this option allows tracking of internal links,
diff -u old/lygetfil.c ./lygetfil.c
--- old/lygetfil.c Mon Sep 7 03:02:16 1998
+++ ./lygetfil.c Sat Sep 19 15:10:34 1998
@@ -245,10 +245,9 @@
} else if (url_type == LYNXPRINT_URL_TYPE) {
return(printfile(doc));
-#ifdef EXP_FORMS_OPTIONS
} else if (url_type == LYNXOPTIONS_URL_TYPE) {
+ /* forms-based options menu */
return(postoptions(doc));
-#endif /* EXP_FORMS_OPTIONS */
} else if (url_type == NEWSPOST_URL_TYPE ||
url_type == NEWSREPLY_URL_TYPE ||
@@ -712,9 +711,7 @@
url_type == LYNXDIRED_URL_TYPE ||
#endif /* DIRED_SUPPORT */
url_type == LYNXPRINT_URL_TYPE ||
-#ifdef EXP_FORMS_OPTIONS
url_type == LYNXOPTIONS_URL_TYPE ||
-#endif
url_type == LYNXHIST_URL_TYPE ||
url_type == LYNXCOOKIE_URL_TYPE ||
(LYValidate &&
diff -u old/lyglobal.h ./lyglobal.h
--- old/lyglobal.h Thu Sep 17 22:52:42 1998
+++ ./lyglobal.h Sat Sep 19 15:06:36 1998
@@ -110,6 +110,9 @@
extern int LYChosenShowColor; /* extended color/monochrome choice */
extern int LYrcShowColor; /* ... as read or last written */
+#ifndef EXP_FORMS_OPTIONS
+extern BOOLEAN LYUseFormsOptions; /* use Forms-based options menu */
+#endif
extern BOOLEAN LYShowCursor; /* Show the cursor or hide it? */
extern BOOLEAN verbose_img; /* display filenames of images? */
extern BOOLEAN LYUseDefShoCur; /* Command line -show_cursor toggle */
diff -u old/lyhistor.c ./lyhistor.c
--- old/lyhistor.c Thu Sep 17 22:52:42 1998
+++ ./lyhistor.c Sat Sep 19 14:25:12 1998
@@ -7,9 +7,7 @@
#include <LYHistory.h>
#include <LYPrint.h>
#include <LYDownload.h>
-#ifdef EXP_FORMS_OPTIONS
#include <LYOptions.h>
-#endif
#include <LYKeymap.h>
#include <LYList.h>
#include <LYShowInfo.h>
@@ -70,9 +68,7 @@
!strcmp((doc->title ? doc->title : ""), HISTORY_PAGE_TITLE) ||
!strcmp((doc->title ? doc->title : ""), PRINT_OPTIONS_TITLE) ||
!strcmp((doc->title ? doc->title : ""), DOWNLOAD_OPTIONS_TITLE) ||
-#ifdef EXP_FORMS_OPTIONS
!strcmp((doc->title ? doc->title : ""), OPTIONS_TITLE) ||
-#endif
#ifdef DIRED_SUPPORT
!strcmp((doc->title ? doc->title : ""), DIRED_MENU_TITLE) ||
!strcmp((doc->title ? doc->title : ""), UPLOAD_OPTIONS_TITLE) ||
diff -u old/lymain.c ./lymain.c
--- old/lymain.c Thu Sep 17 22:55:46 1998
+++ ./lymain.c Sat Sep 19 15:22:30 1998
@@ -143,6 +143,9 @@
PUBLIC int LYShowColor = SHOW_COLOR_UNKNOWN; /* to show or not to show */
PUBLIC int LYChosenShowColor = SHOW_COLOR_UNKNOWN; /* whether to show and save
*/
PUBLIC int LYrcShowColor = SHOW_COLOR_UNKNOWN; /* ... as last read or written
*/
+#ifndef EXP_FORMS_OPTIONS
+PUBLIC BOOLEAN LYUseFormsOptions = FALSE; /* use forms-based options menu */
+#endif
PUBLIC BOOLEAN LYShowCursor = SHOW_CURSOR; /* to show or not to show */
PUBLIC BOOLEAN verbose_img = VERBOSE_IMAGES; /* show filenames or not */
PUBLIC BOOLEAN LYUseDefShoCur = TRUE; /* Command line -show_cursor toggle */
@@ -2665,6 +2668,12 @@
"from", TOGGLE_ARG, &LYNoFromHeader,
"toggle transmissions of From headers"
),
+#ifndef EXP_FORMS_OPTIONS
+ PARSE_SET(
+ "forms_options", TOGGLE_ARG, &LYUseFormsOptions,
+ "toggles forcing of forms-based options menu style"
+ ),
+#endif
PARSE_SET(
"ftp", UNSET_ARG, &ftp_ok,
"disable ftp access"
diff -u old/lymainlo.c ./lymainlo.c
--- old/lymainlo.c Thu Sep 17 22:52:46 1998
+++ ./lymainlo.c Sat Sep 19 15:25:22 1998
@@ -230,9 +230,6 @@
char *temp = NULL;
BOOLEAN ForcePush = FALSE;
BOOLEAN override_LYresubmit_posts = FALSE;
-#ifdef EXP_FORMS_OPTIONS
- BOOLEAN was_in_options = FALSE;
-#endif
unsigned int len;
int i;
@@ -682,12 +679,6 @@
trace_mode_flag = FALSE;
fprintf(tfp, "Turning TRACE back on.\n\n");
}
-#ifdef EXP_FORMS_OPTIONS
- if (newdoc.address) {
- was_in_options =
- (!strncmp(newdoc.address, "LYNXOPTIONS:", 12));
- }
-#endif /* EXP_FORMS_OPTIONS */
FREE(newdoc.address); /* to pop last doc */
FREE(newdoc.bookmark);
LYJumpFileURL = FALSE;
@@ -3742,6 +3733,7 @@
c = dir_list_style;
#endif /* DIRED_SUPPORT */
#ifndef EXP_FORMS_OPTIONS
+if (!LYUseFormsOptions) {
LYoptions(); /* do the old-style options stuff */
@@ -3841,7 +3833,9 @@
StrAllocCopy(CurrentNegoCharset, (pref_charset ?
pref_charset : ""));
refresh_screen = TRUE; /* to repaint screen */
-#else /* EXP_FORMS_OPTIONS */
+ break;
+} /* end if !LYUseFormsOptions */
+#endif /* !EXP_FORMS_OPTIONS */
/*
* FIXME: Blatantly stolen from LYK_PRINT below.
* how much is really valid here? I don't know the
@@ -3873,7 +3867,6 @@
*/
HTuncache_current_document();
}
-#endif /* EXP_FORMS_OPTIONS */
break;
case LYK_INDEX_SEARCH: /* search for a user string */
diff -u old/lyoption.c ./lyoption.c
--- old/lyoption.c Thu Sep 17 22:52:46 1998
+++ ./lyoption.c Sat Sep 19 14:34:04 1998
@@ -3067,7 +3067,7 @@
}
}
-#else /* EXP_FORMS_OPTIONS */
+#endif /* !EXP_FORMS_OPTIONS */
/*
* I'm paranoid about mistyping strings. Also, this way they get combined
@@ -4035,4 +4035,3 @@
LYCloseTempFP(fp0);
return(0);
}
-#endif /* EXP_FORMS_OPTIONS */
diff -u old/lyoption.h ./lyoption.h
--- old/lyoption.h Sat Aug 29 16:22:40 1998
+++ ./lyoption.h Sat Sep 19 14:33:08 1998
@@ -7,10 +7,10 @@
extern void edit_bookmarks NOPARAMS;
-#ifdef EXP_FORMS_OPTIONS
extern int postoptions PARAMS((document *newdoc));
extern int gen_options PARAMS((char **newfile));
-#else
+
+#ifndef EXP_FORMS_OPTIONS
extern void LYoptions NOPARAMS;
/*
@@ -73,6 +73,6 @@
#define B_VERBOSE_IMAGES 50
#define C_VERBOSE_IMAGES (B_VERBOSE_IMAGES + 21)
-#endif /* EXP_FORMS_OPTIONS */
+#endif /* !EXP_FORMS_OPTIONS */
#endif /* LYOPTIONS_H */
diff -u old/lyreadcf.c ./lyreadcf.c
--- old/lyreadcf.c Mon Sep 14 01:29:40 1998
+++ ./lyreadcf.c Sat Sep 19 15:15:04 1998
@@ -829,6 +829,9 @@
PARSE_ENV("finger_proxy", CONF_ENV, 0 ),
PARSE_SET("force_8bit_toupper", CONF_BOOL, UCForce8bitTOUPPER),
PARSE_SET("force_ssl_cookies_secure", CONF_BOOL, LYForceSSLCookiesSecure),
+#ifndef EXP_FORMS_OPTIONS
+ PARSE_SET("forms_options", CONF_BOOL, LYUseFormsOptions),
+#endif
PARSE_ENV("ftp_proxy", CONF_ENV, 0 ),
PARSE_STR("global_extension_map", CONF_STR, global_extension_map),
PARSE_STR("global_mailcap", CONF_STR, global_type_map),
diff -u old/lyutils.h ./lyutils.h
--- old/lyutils.h Thu Sep 17 22:52:50 1998
+++ ./lyutils.h Sat Sep 19 14:39:48 1998
@@ -142,13 +142,10 @@
#define LYNXIMGMAP_URL_TYPE 33
#define LYNXCOOKIE_URL_TYPE 34
#define LYNXDIRED_URL_TYPE 35
+#define LYNXOPTIONS_URL_TYPE 36
-#define PROXY_URL_TYPE 36
+#define PROXY_URL_TYPE 37
-/*
- * FIXME: Where should this really go?
- */
-#define LYNXOPTIONS_URL_TYPE 37
#define UNKNOWN_URL_TYPE 38
/*
Only in .: old