[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev dev.15 patch 4 (pass #3)
From: |
Leonid Pauzner |
Subject: |
lynx-dev dev.15 patch 4 (pass #3) |
Date: |
Tue, 30 Nov 1999 19:49:53 +0300 (MSK) |
29-Nov-99 21:50 Leonid Pauzner wrote:
This patch should be applied on top of my "patch 4 (pass #2)".
sorry for possible confusion :(
> This patch should be applayed on top of my "patch 4"
> * slightly reorganize partial mode logic: 'display_partial' variable
> now initialized directly in HText_new(), no need in specialized
> semaphore any more. -LP
* Newline now PRIVATE except the mouse code in LYStrings.c -LP
diff -u old/lyglobal.h ./lyglobal.h
--- old/lyglobal.h Sun Nov 28 00:05:26 1999
+++ ./lyglobal.h Tue Nov 30 19:20:58 1999
@@ -284,13 +284,12 @@
* force source dump */
extern BOOLEAN no_url_redirection; /* Don't follow URL redirections */
#ifdef DISP_PARTIAL
-extern BOOLEAN display_partial; /* Display document during download */
+extern BOOLEAN display_partial; /* Display document while loading */
extern int Newline_partial; /* -//- "current" newline position */
extern int NumOfLines_partial; /* -//- "current" number of lines */
extern int partial_threshold;
extern BOOLEAN debug_display_partial; /* show with MessageSecs delay */
extern BOOLEAN display_partial_flag; /* permanent flag, not mutable */
-extern int Newline; /* original newline position, from mainloop() */
#endif
extern char *form_post_data; /* User data for post form */
extern char *form_get_data; /* User data for get form */
diff -u old/lymainlo.c ./lymainlo.c
--- old/lymainlo.c Sun Nov 29 18:57:26 2099
+++ ./lymainlo.c Tue Nov 30 19:40:54 1999
@@ -203,12 +203,15 @@
PUBLIC BOOLEAN display_partial = FALSE; /* could be enabled in HText_new() */
PUBLIC int Newline_partial = 0; /* newline position in partial mode */
PUBLIC int NumOfLines_partial = 0; /* number of lines displayed in partial
mode */
-PUBLIC int Newline = 0;
-#else
-/* Whether we need Newline global?
+#endif
+
+#if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE)
+/* Whether we need Newline PUBLIC?
* seems mouse code in LYStrings.c use it...
* not a partial mode any more.
*/
+PUBLIC int Newline = 0;
+#else
PRIVATE int Newline = 0;
#endif
@@ -390,7 +393,7 @@
/*
* Override Newline with a new value if user
- * scrolled the document while downloading.
+ * scrolled the document while loading.
* Newline = Newline_partial;
*/
#endif
@@ -5751,7 +5754,7 @@
/* - already set and probably updated in partial mode */
/* incremental rendering stage already closed (but see
below) */
- if (display_partial == TRUE) {
+ if (display_partial == TRUE || Newline != Newline_partial) {
/* This is the case when we came from the history stack
* _and_ cached HText was used instead of HT*Copy() call.
* Set Newline and close partial mode here.
diff -u old/lymainlo.h ./lymainlo.h
--- old/lymainlo.h Sun Nov 28 00:05:32 1999
+++ ./lymainlo.h Tue Nov 30 19:33:40 1999
@@ -11,6 +11,14 @@
extern void LYCloseTracelog NOPARAMS;
extern void repaint_main_statusline PARAMS((int for_what));
+#if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE)
+/* Whether we need Newline PUBLIC?
+ * seems mouse code in LYStrings.c use it...
+ * not a partial mode any more.
+ */
+extern int Newline; /* original newline position, from mainloop() */
+#endif
+
/* made them available in partial mode */
extern void LYMainLoop_pageDisplay PARAMS((int line_num));
extern void handle_LYK_TRACE_TOGGLE NOPARAMS;
diff -u old/lystring.c ./lystring.c
--- old/lystring.c Thu Nov 18 14:20:26 1999
+++ ./lystring.c Tue Nov 30 19:34:00 1999
@@ -14,9 +14,9 @@
#include <HTString.h>
#include <LYCharUtils.h>
#include <HTParse.h>
-#ifdef NCURSES_MOUSE_VERSION
+#if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE)
#include <LYMainLoop.h>
-#endif /* NCURSES_MOUSE_VERSION */
+#endif /* NCURSES_MOUSE_VERSION || USE_SLANG_MOUSE */
#ifdef DJGPP_KEYHANDLER
#include <pc.h>
@@ -332,7 +332,7 @@
return LAC_TO_LKC0(LYK_UP_TWO);
if (y >= h)
return LAC_TO_LKC0(LYK_DOWN_TWO);
-#ifdef DISP_PARTIAL /* Newline is not defined otherwise */
+
if (clicks >= 2) {
double frac = (1. * y)/(h - 1);
int l = HText_getNumOfLines() + 1; /* NOL() off by one? */
@@ -342,7 +342,7 @@
Newline = frac * l + 1 + 0.5;
return LYReverseKeymap(LYK_DO_NOTHING);
}
-#endif
+
if (y < LYsb_begin)
return LAC_TO_LKC0(LYK_PREV_PAGE);
if (y >= LYsb_end)