lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev (patch) fix exit from postoptions, broken since dev23


From: Leonid Pauzner
Subject: lynx-dev (patch) fix exit from postoptions, broken since dev23
Date: Tue, 25 May 1999 22:21:00 +0400 (MSD)

Oops, my fault. Please include this into the next preXX immediately.
(apparently, change log was also messed at this point).


* fix exit from postoptions() when need_reload is set but no source_cache,
  was broken in dev23



diff -u old/changes ./changes
--- old/changes Tue May 25 00:16:34 1999
+++ ./changes   Tue May 25 21:46:14 1999
@@ -166,20 +166,11 @@
   Harper) this is a detail I overlooked in dev.18 -TD
 * fixes to compile with SunOS K&R cc -TD
 1999-04-27 (2.8.2dev.25)
-* fix reload_read_cfg() to avoid persistent cookies mode changing at run time;
-  reload printers list, downloaders list, environments - as expected. - LP
-* fixes for SOURCE_CACHE!=NONE mode, trying to accommodate HTreparse_document()
-  for mainloop() events:
-  - add/use flag "from_source_cache" for better mainloop maintenance
-  - add partial display mode for HTreparse_document() operations
-  - add warning when the reparsed document may lost its forms content
-  - fix options menu staff to use HTreparse_document() when possible - LP
-* fix exit from postoptions() when the reloaded document was in source mode -LP
 * updates to INSTALLATION -HN
-* undo some redundant dev23 changes, in particular the absence of first
-  PSRC_TEST responsible for a wrong line breaking in -prettysrc mode (try "lynx
-  .  -prettysrc" and press "\" to see wrapping in dev23-24).  Also fix Visited
-  Links for internal pages (my fault) -LP
+* undo some redundant dev23 changes, in particular PSRC_TEST in HText_new
+  responsible for a wrong line breaking in -prettysrc mode
+  (try "lynx .  -prettysrc" and press "\" to see wrapping with altered
+  define).  Also fix Visited Links for internal pages -LP
 * restore links in lynx-dev.html to original form, to make redirection work
   properly -TD
 * add to MAKEFILE.W32 (untested - suggested by LP) -TD
@@ -282,6 +273,15 @@
 * fix redefinition of h_errno (report by Tony Bolton) -TD
 * ifdef'd print_local_dir in HTFile.c since this function does not compile on
   VMS (report by Andy Harper, Tony Bolton) -TD
+* fix reload_read_cfg() to avoid persistent cookies mode changing at run time;
+  reload printers list, downloaders list, environments - as expected. - LP
+* fixes for SOURCE_CACHE!=NONE mode, trying to accommodate HTreparse_document()
+  for mainloop() events:
+  - add/use flag "from_source_cache" for better mainloop maintenance
+  - add partial display mode for HTreparse_document() operations
+  - add warning when the reparsed document may lost its forms content
+  - fix options menu staff to use HTreparse_document() when possible - LP
+* fix exit from postoptions() when the reloaded document was in source mode -LP
 * update flags to correct behavior with SOURCE_CACHE!=NONE:  the length of the
   re-rendered text may vary so the scrolling down is broken (especially nice
   when switching to source).  ("more" updated, "lines_in_file" inlined) -LP

diff -u old/lyoption.c ./lyoption.c
--- old/lyoption.c      Tue May 25 00:15:52 1999
+++ ./lyoption.c        Tue May 25 22:13:06 1999
@@ -3939,6 +3939,10 @@
      *  Being out of mainloop()/getfile() cycle, do things manually.
      */
     CTRACE(tfp, "\nLYOptions.c/postoptions(): exiting...\n");
+    CTRACE(tfp, "                            need_reload = %s\n",
+                    need_reload ? "TRUE" : "FALSE");
+    CTRACE(tfp, "                            need_end_reload = %s\n",
+                    need_end_reload ? "TRUE" : "FALSE");

     /*  Options menu was pushed before postoptions(), so pop-up. */
     LYpop(newdoc);
@@ -3987,6 +3991,11 @@
     if (!HTLoadAbsolute(&WWWDoc))
        return(NOT_FOUND);

+    /*
+     * Now most interesting part: reload document when necessary.
+     * **********************************************************
+     */
+
     reloading = FALSE;  /* set manually */
     /*  force end-to-end reload from remote server if change LYUserAgent
      *  or language or pref_charset (marked by need_end_reload flag above),
@@ -4007,7 +4016,7 @@
         *  case LYK_RELOAD (see comments there). - KW
         */
        reloading = TRUE;  /* global flag */
-       need_reload = TRUE;
+       need_reload = TRUE;  /* this was probably already TRUE, don't worry */
     }

     if (need_reload == FALSE) {
@@ -4018,8 +4027,7 @@
        /*  update HText cache */

        /*
-        *  Check to see if should reload source, or load html
-        *  (from LYK_RELOAD & LYK_OPTIONS)
+        *  see LYK_RELOAD & LYK_OPTIONS in mainloop for details...
         */
        if (HTisDocumentSource()) {
 #ifndef USE_PSRC
@@ -4049,10 +4057,14 @@
        }
 #endif
        HEAD_request = HTLoadedDocumentIsHEAD();
-       /*  no uncache, already loaded */
+       /*  uncache and load again */
+       HTuncache_current_document();
+       LYpush(newdoc, FALSE);
        CTRACE(tfp, "LYOptions.c/postoptions(): now really exit.\n\n");
-       return(NORMAL);
+       return(NULLFILE);
     }
+
+    /******** Done! **************************************************/
 }

 PRIVATE char *NewSecureValue NOARGS




reply via email to

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