[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Adding lynx.cfg options to the code
From: |
Leonid Pauzner |
Subject: |
Re: lynx-dev Adding lynx.cfg options to the code |
Date: |
Sun, 27 Sep 1998 18:04:45 +0400 (MSD) |
> * From: Eric <address@hidden>
> * Date: Sun, 27 Sep 1998 01:17:17 -0400
> * Mail-Followup-To: Lynx-dev <address@hidden>
> * Reply-To: address@hidden
> * Sender: address@hidden
> _________________________________________________________________
> Hi,
> Could somebody give me a quick point-and-comprehend explanation
> of how to add lynx.cfg options (and command line opts)? like, what
> .c and .h files to edit to add them in there, where to add the global
> variables involved with them, and such.
> The reason is, I see the # of lines in the partial-display logic
> is display_size or something, and would like to make a new lynx.cfg option
> (didn't see one that does this) to allow the user to tweak the # of
> lines that must be input for partial display to redraw the screen.
OK, will be included in pre4.
This patch should work for you:
diff -u old/htformat.c ./htformat.c
--- old/htformat.c Sun Sep 13 07:35:56 1998
+++ ./htformat.c Sun Sep 27 15:30:46 1998
@@ -503,10 +503,15 @@
/* new hypertext document available */
&& ((Newline_partial + display_lines) > NumOfLines_partial)
/* current page not complete... */
- && ((Newline_partial + display_lines) < HText_getNumOfLines())) {
- /* ^^^^^^^^^^^^^
- * and we MAY display the page in one stage:
- * incremental rendering of the first page reported annoying
+ && ((Newline_partial +
+ ((min_lines_partial < 1) ?
+ display_lines : min_lines_partial))
+ < HText_getNumOfLines())) {
+ /*
+ * and we MAY display certain amount of lines (from lynx.cfg)
+ *
+ * By default, wait for complete screen:
+ * incremental rendering of the first screen reported annoying
* on slow network connection.
*/
NumOfLines_partial = HText_getNumOfLines();
diff -u old/lyglobal.h ./lyglobal.h
--- old/lyglobal.h Fri Sep 25 15:03:04 1998
+++ ./lyglobal.h Sun Sep 27 15:32:26 1998
@@ -264,6 +263,7 @@
extern int NumOfLines_partial; /* -//- "current" number of lines */
extern BOOLEAN debug_display_partial; /* show with MessageSecs delay */
extern BOOLEAN detected_forms_input_partial; /* trimHightext temp fix */
+extern int min_lines_partial; /* incremental rendering minimum */
#endif
extern char *form_post_data; /* User data for post form */
extern char *form_get_data; /* User data for get form */
diff -u old/lymain.c ./lymain.c
--- old/lymain.c Sun Sep 27 13:12:28 1998
+++ ./lymain.c Sun Sep 27 15:31:12 1998
@@ -360,6 +360,7 @@
PUBLIC BOOLEAN display_partial = TRUE; /* Display document during download */
PUBLIC BOOLEAN debug_display_partial = FALSE; /* Show with MessageSecs delay */
PUBLIC BOOLEAN detected_forms_input_partial = FALSE; /* trimHightext temp fix
*/
+PUBLIC int min_lines_partial = 0; /* default: wait for complete screen */
#endif
/* These are declared in cutil.h for current freeWAIS libraries. - FM */
diff -u old/lynx.cfg ./lynx.cfg
--- old/lynx.cfg Fri Sep 25 15:27:54 1998
+++ ./lynx.cfg Sun Sep 27 15:27:00 1998
@@ -393,6 +393,10 @@
# Display partial pages while downloading
#PARTIAL:TRUE
+# Minimum lines amount for first redisplay in PARTIAL mode
+# (0 - wait for complete screen by default).
+#PARTIAL_MIN_LINES:0
+
# While getting large files, Lynx shows the approximate rate of
# transfer. Set this to change the units shown (true for KB/sec,
# and false for bytes/sec).
diff -u old/lyreadcf.c ./lyreadcf.c
--- old/lyreadcf.c Sun Sep 27 13:12:30 1998
+++ ./lyreadcf.c Sun Sep 27 15:38:06 1998
@@ -903,6 +903,7 @@
PARSE_FUN("outgoing_mail_charset", CONF_FUN, outgoing_mail_charset_fun),
#ifdef DISP_PARTIAL
PARSE_SET("partial", CONF_BOOL, display_partial),
+ PARSE_SET("partial_min_lines", CONF_INT, min_lines_partial),
#endif
PARSE_STR("personal_mailcap", CONF_STR, personal_type_map),
PARSE_STR("personal_extension_map", CONF_STR, personal_extension_map),