lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV Partial Display


From: Wayne Buttles
Subject: LYNX-DEV Partial Display
Date: Sun, 29 Mar 1998 22:33:01 -0500 (EST)

I found it odd that no one commented on the issue of partial dispay of
pages as they are loading.  Maybe it isn't a feature that is normally
wanted.  

I didn't want to let it drop, however, without making sure the issue was
settled.  I repatched the original code offered by
address@hidden
<http://www.flora.org/lynx-dev/html/month1096/msg00014.html> to work with
2.8.1dev and offer it here.  The code is rusty and needs work for both
correctness and usefullness since it is still in its original form.  The
real test is just to compile it in, fire up a REALLY long page, and hit
the space bar.

*** c:LYUtils.c Wed Mar 25 06:58:54 1998 
--- LYUtils.c   Sun Mar 29 22:14:24 1998 
***************
*** 16,21 ****
--- 16,26 ----
  #ifdef DOSPATH
  #include <HTDOS.h>
  #endif
+ 
+ #ifdef DISP_PARTIAL
+ #include <LYKeymap.h>
+ #endif /* DISP_PARTIAL */
+ 
  #ifdef VMS
  #include <descrip.h>
  #include <libclidef.h>
***************
*** 2060,2065 ****
--- 2065,2075 ----
         fd_set readfds;
  #endif /* !USE_SLANG */
  
+ #ifdef DISP_PARTIAL
+        extern int dp_dl_on, dp_newline ; /* flag to activate hack,
+                                                                               
                          position in the document */
+ #endif /* DISP_PARTIAL */
+ 
         if (fake_zap > 0) {
        fake_zap--;
        if (TRACE) {
***************
*** 2118,2123 ****
--- 2128,2164 ----
         if (TOUPPER(c) == 'Z' || c == 7 || c == 3)
        return((int)TRUE);
  
+ #ifdef DISP_PARTIAL    /* hack to display partially downloaded doc. - ganesh 
*/
+        else if (dp_dl_on) /* yes, there's a document coming down the line */
+               {
+                 switch (keymap[c+1])
+                        {
+                        case LYK_PREV_PAGE :
+                               if (dp_newline > 1)
+                                 dp_newline -= display_lines ;
+                               break ;
+                        case LYK_NEXT_PAGE :
+                               if (HText_canScrollDown())
+                                 dp_newline += display_lines ;
+                               break ;
+                        case LYK_UP_TWO :
+                               if (dp_newline > 1)
+                                 dp_newline -= 2 ;
+                               break ;
+                        case LYK_DOWN_TWO :
+                               if (HText_canScrollDown())
+                                 dp_newline += 2 ;
+                               break ;
+                        case LYK_REFRESH :
+                               break ;
+                        default :
+                               return ((int)FALSE) ;
+                        }
+                 HText_pageDisplay(dp_newline, "");
+               }
+ #endif /* DISP_PARTIAL */
+ 
+ 
         /** Other keystrokes **/
         return((int)FALSE);
  
*** c:HTTP.c    Wed Mar 25 06:58:54 1998
--- HTTP.c      Sun Mar 29 21:54:36 1998
***************
*** 37,42 ****
--- 37,48 ----
  
  /* #define TRACE 1 */
  
+ #ifdef DISP_PARTIAL
+ int dp_dl_on = 0 ; /* global which activates the paging in HTCheckForInterrupt
+                                 when a file is being downloaded */
+ int dp_newline = 1 ; /* newline for paging during downloads */
+ #endif
+ 
  struct _HTStream
  {
    HTStreamClass * isa;
***************
*** 1757,1767 ****
--- 1763,1781 ----
    */
    (*target->isa->put_block)(target, start_of_data, length);
  
+ #ifdef DISP_PARTIAL
+   dp_dl_on = dp_newline = 1;
+ #endif
+ 
    /*
    **  Go pull the bulk of the data down.
    */
    rv = HTCopy(anAnchor, s, (void *)handle, target);
  
+ #ifdef DISP_PARTIAL
+   dp_dl_on = 0;
+ #endif
+ 
    if (rv == -1) {
                /*
                **  Intentional interrupt before data were received, not an 
error


reply via email to

[Prev in Thread] Current Thread [Next in Thread]