lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev dev.16 patch 6 - Management of User Interface Pages; TRST fix


From: Klaus Weide
Subject: lynx-dev dev.16 patch 6 - Management of User Interface Pages; TRST fix
Date: Tue, 14 Dec 1999 10:52:25 -0600 (CST)


* Small correction in TRSTable.c: One one my previous changes for TRST broke
  inheritance of alignment for cell contents from TR elements.
* New functions for keeping track of temp files (and some other files) for
  user interface pages:  LYRegisterUIPage(), LYIsUIPage().  Most checks
  that look at the loaded document's title have ben replaced by this
  mechanism.  This also replaces various mechanism that were implemented
  for some specific pages.
* Also Replaced some more checks that looked at the document's title by
  chacks of the address, for pages that are always identified by a special
  URL scheme (LYNXCOOKIE:, LYNXKEYMAP:, LYNXMESSAGES:).
* Now check directly in postoptions() whether the loaded document is one
  from which submission of option changes can be accepted, using the new
  tracking mechanism.  Only the form-based Options Menu and Visited Links
  are allowed.  Relying on a good random generator to prevent spoofing is
  not necessary.  Kept the secure_string check, but it should be only
  regarded as an aid to the user, it prevents changing options from an
  instance of the form-based Options Menu that is not the most recent one
  (this can happen if an Options Menu page is pushed on the history stack
  and later returned to).
* Honor REUSE_TEMPFILES for some more user interface pages.
* Prevent an obscure LYNXOPTIONS://MBM_MENU crash.
* Other minor additions and corrections to checks for special pages.

Index: 2.33/src/LYUtils.c
--- 2.33/src/LYUtils.c Sat, 04 Dec 1999 00:06:06 -0600
+++ 2.33(w)/src/LYUtils.c Tue, 14 Dec 1999 09:53:25 -0600
@@ -6761,6 +6761,155 @@
 }
 
 /*
+ *  Management of User Interface Pages. - kw
+ *
+ *  These are mostly temp files.  Pages which can be recognized by their
+ *  special URL (after having been loaded) need not be tracked here.
+ *
+ *  First some private stuff:
+ */
+typedef struct uipage_entry {
+    UIP_t      type;
+    unsigned   flags;
+    char *     url;
+    HTList *   alturls;
+    char *     file;
+} uip_entry;
+
+#define UIP_F_MULTI    0x0001  /* flag: track multiple instances */
+#define UIP_F_LIMIT    0x0002  /* flag: limit size of alturl list */
+#define UIP_F_LMULTI   (UIP_F_MULTI | UIP_F_LIMIT)
+
+static uip_entry ly_uip[] =
+{
+    { UIP_HISTORY              , UIP_F_LMULTI, NULL, NULL, NULL }
+  , { UIP_DOWNLOAD_OPTIONS     , 0           , NULL, NULL, NULL }
+  , { UIP_PRINT_OPTIONS                , 0           , NULL, NULL, NULL }
+  , { UIP_SHOWINFO             , UIP_F_LMULTI, NULL, NULL, NULL }
+  , { UIP_LIST_PAGE            , UIP_F_LMULTI, NULL, NULL, NULL }
+  , { UIP_VLINKS               , UIP_F_LMULTI, NULL, NULL, NULL }
+#if !defined(NO_OPTION_FORMS)
+  , { UIP_OPTIONS_MENU         , UIP_F_LMULTI, NULL, NULL, NULL }
+#endif
+#ifdef DIRED_SUPPORT
+  , { UIP_DIRED_MENU           , 0           , NULL, NULL, NULL }
+  , { UIP_PERMIT_OPTIONS       , 0           , NULL, NULL, NULL }
+  , { UIP_UPLOAD_OPTIONS       , UIP_F_LMULTI, NULL, NULL, NULL }
+#endif
+#ifdef EXP_ADDRLIST_PAGE
+  , { UIP_ADDRLIST_PAGE                , UIP_F_LMULTI, NULL, NULL, NULL }
+#endif
+  , { UIP_LYNXCFG              , UIP_F_LMULTI, NULL, NULL, NULL }
+#if !defined(NO_CONFIG_INFO)
+  , { UIP_CONFIG_DEF           , UIP_F_LMULTI, NULL, NULL, NULL }
+#endif
+/* The following are not generated tempfiles: */
+  , { UIP_TRACELOG             , 0          , NULL, NULL, NULL }
+#if defined(DIRED_SUPPORT) && defined(OK_INSTALL)
+  , { UIP_INSTALL              , 0          , NULL, NULL, NULL }
+#endif
+
+};
+
+/*  Public entry points for User Interface Page mamagement: */
+
+PUBLIC BOOL LYIsUIPage3 ARGS3(
+    CONST char *,      url,
+    UIP_t,             type,
+    int,               flagparam)
+{
+    unsigned int i;
+    size_t l;
+    if (!url)
+       return NO;
+    for (i = 0; i < TABLESIZE(ly_uip); i++) {
+       if (ly_uip[i].type == type) {
+           if (!ly_uip[i].url) {
+               return NO;
+           } else if ((flagparam & UIP_P_FRAG) ?
+                      (!strncmp(ly_uip[i].url, url, (l=strlen(ly_uip[i].url)))
+                       && (url[l] == '\0' || url[l] == '#')) :
+                      !strcmp(ly_uip[i].url, url)) {
+               return YES;
+           } else if (ly_uip[i].flags & UIP_F_MULTI) {
+               char *p;
+               HTList *l0 = ly_uip[i].alturls;
+
+               while ((p = HTList_nextObject(l0)) != NULL) {
+                   if ((flagparam & UIP_P_FRAG) ?
+                      (!strncmp(p, url, (l=strlen(p)))
+                       && (url[l] == '\0' || url[l] == '#')) :
+                       !strcmp(p, url))
+                       return YES;
+               }
+           }
+           return NO;
+       }
+    }
+    return NO;
+}
+
+PUBLIC void LYRegisterUIPage ARGS2(
+    CONST char *,      url,
+    UIP_t,             type)
+{
+    unsigned int i;
+    for (i = 0; i < TABLESIZE(ly_uip); i++) {
+       if (ly_uip[i].type == type) {
+           if (ly_uip[i].url && url &&
+               !strcmp(ly_uip[i].url, url)) {
+
+           } else if (!ly_uip[i].url || !url ||
+                      !(ly_uip[i].flags & UIP_F_MULTI)) {
+               StrAllocCopy(ly_uip[i].url, url);
+
+           } else {
+               char *p;
+               int n = 0;
+               HTList *l0 = ly_uip[i].alturls;
+
+               while ((p = HTList_nextObject(l0)) != NULL) {
+                   if (!strcmp(p, url))
+                       return;
+                   if (!strcmp(p, ly_uip[i].url)) {
+                       StrAllocCopy(ly_uip[i].url, url);
+                       return;
+                   }
+                   n++;
+               }
+               if (!ly_uip[i].alturls)
+                   ly_uip[i].alturls = HTList_new();
+
+               if (n >= HTCacheSize && (ly_uip[i].flags & UIP_F_LIMIT))
+                   HTList_removeFirstObject(ly_uip[i].alturls);
+               HTList_addObject(ly_uip[i].alturls, ly_uip[i].url);
+               ly_uip[i].url = NULL;
+               StrAllocCopy(ly_uip[i].url, url);
+           }
+
+           return;
+       }
+    }
+}
+
+PUBLIC void LYUIPages_free NOARGS
+{
+    unsigned int i;
+    char *p;
+    HTList *l0;
+    for (i = 0; i < TABLESIZE(ly_uip); i++) {
+       FREE(ly_uip[i].url);
+       FREE(ly_uip[i].file);
+       l0 = ly_uip[i].alturls;
+       while ((p = HTList_nextObject(l0)) != NULL) {
+           FREE(p);
+       }
+       HTList_delete(ly_uip[i].alturls);
+       ly_uip[i].alturls = NULL;
+    }
+}
+
+/*
  *  Convert local pathname to www name
  *  (do not bother about file://localhost prefix at this point).
  */
Index: 2.33/src/LYGetFile.c
--- 2.33/src/LYGetFile.c Thu, 09 Dec 1999 17:57:39 -0600
+++ 2.33(w)/src/LYGetFile.c Tue, 14 Dec 1999 04:20:08 -0600
@@ -63,7 +63,7 @@
  *                  to show for it either.
  *     NULLFILE   - requested document not loaded into HTMainText, either
  *                  some interactive protocol was requested (like telnet),
- *                  or lynx does not allow access,
+ *                  or lynx does not allow access.
  *  The distinction between NOT_FOUND and NULLFILE is not very crucial,
  *  but getting it right prevents mainloop from exiting with the wrong
  *  message if it happens for the first file, and from logging (or not
@@ -271,9 +271,8 @@
                    url_type != PROXY_URL_TYPE &&
                    url_type != LYNXOPTIONS_URL_TYPE &&
                    !(url_type == FILE_URL_TYPE &&
-                     *(LYlist_temp_url()) &&
-                     !strncmp(WWWDoc.address, LYlist_temp_url(),
-                              strlen(LYlist_temp_url())))) {
+                     (LYIsUIPage(WWWDoc.address, UIP_LIST_PAGE) ||
+                      LYIsUIPage(WWWDoc.address, UIP_ADDRLIST_PAGE)))) {
                    CTRACE((tfp, "getfile: dropping post_data!\n"));
                    HTAlert(IGNORED_POST);
                    FREE(doc->post_data);
Index: 2.33/src/LYLocal.c
--- 2.33/src/LYLocal.c Thu, 09 Dec 1999 17:57:39 -0600
+++ 2.33(w)/src/LYLocal.c Tue, 14 Dec 1999 01:18:25 -0600
@@ -92,11 +92,8 @@
        char *          msg));
 
 #ifdef DIRED_SUPPORT
-PUBLIC char LYPermitFileURL[LY_MAXPATH] = "\0";
-PUBLIC char LYDiredFileURL[LY_MAXPATH] = "\0";
 
 #ifdef OK_INSTALL
-PUBLIC char LYInstallFileURL[LY_MAXPATH] = "\0";
 #ifdef FNAMES_8_3
 #define INSTALLDIRS_FILE "instdirs.htm"
 #else
@@ -1135,7 +1132,7 @@
         * Make the tempfile a URL.
         */
        LYLocalFileToURL(newpath, tempfile);
-       strcpy(LYPermitFileURL, *newpath);
+       LYRegisterUIPage(*newpath, UIP_PERMIT_OPTIONS);
 
        group_name = HTAA_GidToName (dir_info.st_gid);
        LYstrncpy(LYValidPermitFile,
@@ -1733,7 +1730,7 @@
      *  Make the tempfile a URL.
      */
     LYLocalFileToURL(newfile, tempfile);
-    strcpy(LYDiredFileURL, *newfile);
+    LYRegisterUIPage(*newfile, UIP_DIRED_MENU);
 
     if (doc->link > -1 && doc->link < (nlinks+1)) {
        path = HTfullURL_toFile(links[doc->link].lname);
@@ -2003,9 +2000,7 @@
        LYLocalFileToURL(newpath, Home_Dir());
        LYAddHtmlSep(newpath);
        StrAllocCat(*newpath, INSTALLDIRS_FILE);
-       LYstrncpy(LYInstallFileURL,
-                 *newpath,
-                 (sizeof(LYInstallFileURL) - 1));
+       LYRegisterUIPage(*newpath, UIP_INSTALL);
        return 0;
     }
 
Index: 2.33/src/LYMainLoop.c
--- 2.33/src/LYMainLoop.c Thu, 09 Dec 1999 17:57:39 -0600
+++ 2.33(w)/src/LYMainLoop.c Tue, 14 Dec 1999 10:04:17 -0600
@@ -1018,9 +1018,7 @@
                      strncasecomp(
                        (links[curdoc.link].form->submit_action + 10),
                                   "//PERMIT_LOCATION", 17) ||
-                     strcmp(curdoc.address, LYPermitFileURL) ||
-                     strcmp((curdoc.title ? curdoc.title : ""),
-                            PERMIT_OPTIONS_TITLE)))  ||
+                     !LYIsUIPage(curdoc.address, UIP_PERMIT_OPTIONS))) ||
 #else
                    !strncasecomp(
                            links[curdoc.link].form->submit_action,
@@ -1232,37 +1230,30 @@
             */
            if ((!strncmp(links[curdoc.link].lname,
                          "LYNXCOOKIE:", 11) &&
-                strcmp((curdoc.title ? curdoc.title : ""),
-                       COOKIE_JAR_TITLE)) ||
+                (strcmp((curdoc.title ? curdoc.title : ""),
+                        COOKIE_JAR_TITLE) ||
+                 strncmp(curdoc.address, "LYNXCOOKIE:", 11))) ||
 #ifdef DIRED_SUPPORT
                (!strncmp(links[curdoc.link].lname,
                          "LYNXDIRED:", 10) &&
-                (strcmp(curdoc.address, LYDiredFileURL) ||
-                 strcmp((curdoc.title ? curdoc.title : ""),
-                       DIRED_MENU_TITLE)) &&
-                (strcmp(curdoc.address, LYPermitFileURL) ||
-                 strcmp((curdoc.title ? curdoc.title : ""),
-                       PERMIT_OPTIONS_TITLE)) &&
+                !LYIsUIPage(curdoc.address, UIP_DIRED_MENU) &&
+                !LYIsUIPage(curdoc.address, UIP_PERMIT_OPTIONS) &&
 #ifdef OK_INSTALL
-                strcmp(curdoc.address, LYInstallFileURL) &&
+                !LYIsUIPage(curdoc.address, UIP_INSTALL) &&
 #endif /* OK_INSTALL */
-                (strcmp(curdoc.address, LYUploadFileURL) ||
-                 strcmp((curdoc.title ? curdoc.title : ""),
-                       UPLOAD_OPTIONS_TITLE))) ||
+                !LYIsUIPage(curdoc.address, UIP_UPLOAD_OPTIONS)) ||
 #endif /* DIRED_SUPPORT */
                (!strncmp(links[curdoc.link].lname,
                         "LYNXDOWNLOAD:", 13) &&
-                strcmp((curdoc.title ? curdoc.title : ""),
-                       DOWNLOAD_OPTIONS_TITLE)) ||
+                !LYIsUIPage(curdoc.address, UIP_DOWNLOAD_OPTIONS)) ||
                (!strncmp(links[curdoc.link].lname,
                          "LYNXHIST:", 9) &&
-                strcmp((curdoc.title ? curdoc.title : ""),
-                       HISTORY_PAGE_TITLE) &&
-                strcmp(curdoc.address, LYlist_temp_url())) ||
+                !LYIsUIPage(curdoc.address, UIP_HISTORY) &&
+                !LYIsUIPage(curdoc.address, UIP_LIST_PAGE) &&
+                !LYIsUIPage(curdoc.address, UIP_ADDRLIST_PAGE)) ||
                (!strncmp(links[curdoc.link].lname,
                          "LYNXPRINT:", 10) &&
-                strcmp((curdoc.title ? curdoc.title : ""),
-                       PRINT_OPTIONS_TITLE))) {
+                !LYIsUIPage(curdoc.address, UIP_PRINT_OPTIONS))) {
                    HTAlert(SPECIAL_VIA_EXTERNAL_DISALLOWED);
                    HTOutputFormat = WWW_PRESENT;
                    LYforce_no_cache = FALSE;
@@ -1296,8 +1287,9 @@
                 *  for an internal link within the document the
                 *  List Page is about. - kw
                 */
-               if ( 0==strcmp(curdoc.address, LYlist_temp_url()) &&
-                   (LYIsListpageTitle(curdoc.title ? curdoc.title : ""))) {
+               if (LYIsListpageTitle(curdoc.title ? curdoc.title : "") &&
+                   (LYIsUIPage(curdoc.address, UIP_LIST_PAGE) ||
+                    LYIsUIPage(curdoc.address, UIP_ADDRLIST_PAGE))) {
                    if (check_history()) {
                        LYinternal_flag = TRUE;
                    } else {
@@ -1363,7 +1355,7 @@
 #endif /* TRACK_INTERNAL_LINKS */
            /*
             *  Might be an anchor in the same doc from a POST
-            *  form.  If so, dont't free the content. -- FM
+            *  form.  If so, don't free the content. -- FM
             */
            if (are_different(&curdoc, &newdoc)) {
                FREE(newdoc.post_data);
@@ -1377,7 +1369,8 @@
                LYJumpFileURL = TRUE;
                LYUserSpecifiedURL = TRUE;
            } else if ((curdoc.title &&
-                      !strcmp(curdoc.title, HISTORY_PAGE_TITLE)) ||
+                       (LYIsUIPage(curdoc.address, UIP_HISTORY) ||
+                        !strcmp(curdoc.title, HISTORY_PAGE_TITLE))) ||
                       curdoc.bookmark != NULL ||
                       (lynxjumpfile &&
                        !strcmp(lynxjumpfile, curdoc.address))) {
@@ -1421,8 +1414,7 @@
     /*
      * Don't do if already viewing list addresses page.
      */
-    if (!strcmp((curdoc.title ? curdoc.title : ""),
-               ADDRLIST_PAGE_TITLE)) {
+    if (LYIsUIPage(curdoc.address, UIP_ADDRLIST_PAGE)) {
        /*
         *  Already viewing list page, so get out.
         */
@@ -1466,20 +1458,17 @@
        return;
     }
 
-    if (strcmp((curdoc.title ? curdoc.title : ""), HISTORY_PAGE_TITLE) &&
-       strcmp((curdoc.title ? curdoc.title : ""), SHOWINFO_TITLE) &&
-       strcmp((curdoc.title ? curdoc.title : ""), PRINT_OPTIONS_TITLE) &&
+    if (!LYIsUIPage(curdoc.address, UIP_HISTORY) &&
+       !LYIsUIPage(curdoc.address, UIP_SHOWINFO) &&
+       !LYIsUIPage(curdoc.address, UIP_PRINT_OPTIONS) &&
 #ifdef DIRED_SUPPORT
-       strcmp(curdoc.address, LYDiredFileURL) &&
-       strcmp((curdoc.title ? curdoc.title : ""), DIRED_MENU_TITLE) &&
-       strcmp(curdoc.address, LYPermitFileURL) &&
-       strcmp((curdoc.title ? curdoc.title : ""), PERMIT_OPTIONS_TITLE) &&
-       strcmp(curdoc.address, LYUploadFileURL) &&
-       strcmp((curdoc.title ? curdoc.title : ""), UPLOAD_OPTIONS_TITLE) &&
+       !LYIsUIPage(curdoc.address, UIP_DIRED_MENU) &&
+       !LYIsUIPage(curdoc.address, UIP_PERMIT_OPTIONS) &&
+       !LYIsUIPage(curdoc.address, UIP_UPLOAD_OPTIONS) &&
 #endif /* DIRED_SUPPORT */
-       strcmp((curdoc.title ? curdoc.title : ""), DOWNLOAD_OPTIONS_TITLE) &&
-       strcmp((curdoc.title ? curdoc.title : ""), COOKIE_JAR_TITLE) &&
-       strcmp((curdoc.title ? curdoc.title : ""), OPTIONS_TITLE) &&
+       !LYIsUIPage(curdoc.address, UIP_DOWNLOAD_OPTIONS) &&
+       strncmp(curdoc.address, "LYNXCOOKIE:", 11) &&
+       !LYIsUIPage(curdoc.address, UIP_OPTIONS_MENU) &&
        ((nlinks <= 0) ||
         (links[curdoc.link].lname != NULL &&
          strncmp(links[curdoc.link].lname, "LYNXHIST:", 9) &&
@@ -1487,14 +1476,13 @@
          strncmp(links[curdoc.link].lname, "LYNXDIRED:", 10) &&
          strncmp(links[curdoc.link].lname, "LYNXDOWNLOAD:", 13) &&
          strncmp(links[curdoc.link].lname, "LYNXCOOKIE:", 11) &&
-         strncmp(links[curdoc.link].lname, "LYNXOPTIONS:", 12) &&
-         strncmp(links[curdoc.link].lname, "LYNXLIST:", 9)))) {
+         strncmp(links[curdoc.link].lname, "LYNXOPTIONS:", 12)))) {
        if (nlinks > 0) {
            if (curdoc.post_data == NULL &&
                curdoc.bookmark == NULL &&
-               !LYIsListpageTitle(curdoc.title ? curdoc.title : "") &&
-               strcmp((curdoc.title ? curdoc.title : ""),
-                      VISITED_LINKS_TITLE)) {
+               !LYIsUIPage(curdoc.address, UIP_LIST_PAGE) &&
+               !LYIsUIPage(curdoc.address, UIP_ADDRLIST_PAGE) &&
+               !LYIsUIPage(curdoc.address, UIP_VLINKS)) {
                /*
                 *  The document doesn't have POST content,
                 *  and is not a bookmark file, nor is the
@@ -1740,8 +1728,7 @@
     /*
      * Don't do if already viewing the cookie jar.
      */
-    if (strcmp((curdoc.title ? curdoc.title : ""),
-              COOKIE_JAR_TITLE)) {
+    if (strncmp(curdoc.address, "LYNXCOOKIE:", 11)) {
        StrAllocCopy(newdoc.address, "LYNXCOOKIE:/");
        FREE(newdoc.post_data);
        FREE(newdoc.post_content_type);
@@ -1934,7 +1921,7 @@
      * Don't do if not allowed or already viewing the menu.
      */
     if (lynx_edit_mode && !no_dired_support &&
-       strcmp(curdoc.address, LYDiredFileURL) &&
+       !LYIsUIPage(curdoc.address, UIP_DIRED_MENU) &&
        strcmp((curdoc.title ? curdoc.title : ""),
               DIRED_MENU_TITLE)) {
        dired_options(&curdoc,&newdoc.address);
@@ -1965,8 +1952,7 @@
     /*
      * Don't do if already viewing download options page.
      */
-    if (!strcmp((curdoc.title ? curdoc.title : ""),
-               DOWNLOAD_OPTIONS_TITLE))
+    if (LYIsUIPage(curdoc.address, UIP_DOWNLOAD_OPTIONS))
        return 0;
 
     if (do_change_link() == -1)
@@ -2002,32 +1988,26 @@
                HTUserMsg(NO_DOWNLOAD_INPUT);
            }
 
-       } else if (!strcmp((curdoc.title ? curdoc.title : ""),
-                          COOKIE_JAR_TITLE)) {
+       } else if (!strncmp(curdoc.address, "LYNXCOOKIE:", 11)) {
            if (*old_c != real_c)       {
                *old_c = real_c;
                HTUserMsg(NO_DOWNLOAD_COOKIES);
            }
 
-       } else if (!strcmp((curdoc.title ? curdoc.title : ""),
-                          PRINT_OPTIONS_TITLE)) {
+       } else if (LYIsUIPage(curdoc.address, UIP_PRINT_OPTIONS)) {
            if (*old_c != real_c)       {
                *old_c = real_c;
                HTUserMsg(NO_DOWNLOAD_PRINT_OP);
            }
 
 #ifdef DIRED_SUPPORT
-       } else if (!strcmp(curdoc.address, LYUploadFileURL) ||
-                  !strcmp((curdoc.title ? curdoc.title : ""),
-                          UPLOAD_OPTIONS_TITLE)) {
+       } else if (LYIsUIPage(curdoc.address, UIP_UPLOAD_OPTIONS)) {
            if (*old_c != real_c)       {
                *old_c = real_c;
                HTUserMsg(NO_DOWNLOAD_UPLOAD_OP);
            }
 
-       } else if (!strcmp(curdoc.address, LYPermitFileURL) ||
-                  !strcmp((curdoc.title ? curdoc.title : ""),
-                          PERMIT_OPTIONS_TITLE)) {
+       } else if (LYIsUIPage(curdoc.address, UIP_PERMIT_OPTIONS)) {
            if (*old_c != real_c)       {
                *old_c = real_c;
                HTUserMsg(NO_DOWNLOAD_PERMIT_OP);
@@ -2049,10 +2029,13 @@
            FREE(temp);
 #endif /* DIRED_SUPPORT */
 
-       } else if (!strcmp((curdoc.title ? curdoc.title : ""),
-                          HISTORY_PAGE_TITLE) &&
+       } else if (LYIsUIPage(curdoc.address, UIP_HISTORY) &&
            !strncmp(links[curdoc.link].lname, "LYNXHIST:", 9)) {
            int number = atoi(links[curdoc.link].lname+9);
+           if (number >= nhist || number < 0) {
+               HTUserMsg(NO_DOWNLOAD_SPECIAL);
+               return 0;
+           }
            if ((history[number].post_data != NULL &&
                 history[number].safe != TRUE) &&
                HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) {
@@ -2100,6 +2083,8 @@
                            "LYNXPRINT:", 10) ||
                   !strncmp(links[curdoc.link].lname,
                            "LYNXOPTIONS:", 12) ||
+                  !strncmp(links[curdoc.link].lname,
+                           "LYNXHIST:", 9) || /* handled above if valid - kw */
 /* @@@ should next two be downloadable? - kw */
                   !strncmp(links[curdoc.link].lname,
                            "LYNXCFG:", 8) ||
@@ -2309,12 +2294,9 @@
        return 0;
     }
 #ifdef DIRED_SUPPORT
-    if (!strcmp(curdoc.address, LYDiredFileURL) ||
-       !strcmp((curdoc.title ? curdoc.title : ""), DIRED_MENU_TITLE) ||
-       !strcmp(curdoc.address, LYPermitFileURL) ||
-       !strcmp((curdoc.title ? curdoc.title : ""), PERMIT_OPTIONS_TITLE) ||
-       !strcmp(curdoc.address, LYUploadFileURL) ||
-       !strcmp((curdoc.title ? curdoc.title : ""), UPLOAD_OPTIONS_TITLE)) {
+    if (LYIsUIPage(curdoc.address, UIP_DIRED_MENU) ||
+       LYIsUIPage(curdoc.address, UIP_PERMIT_OPTIONS) ||
+       LYIsUIPage(curdoc.address, UIP_UPLOAD_OPTIONS)) {
        /*
         *  Disallow editing of File Management URLs. - FM
         */
@@ -2578,12 +2560,9 @@
     }
 #ifdef DIRED_SUPPORT
     if (!strncmp(links[curdoc.link].lname, "LYNXDIRED:", 10) ||
-       !strcmp(curdoc.address, LYDiredFileURL) ||
-       !strcmp((curdoc.title ? curdoc.title : ""), DIRED_MENU_TITLE) ||
-       !strcmp(curdoc.address, LYPermitFileURL) ||
-       !strcmp((curdoc.title ? curdoc.title : ""), PERMIT_OPTIONS_TITLE) ||
-       !strcmp(curdoc.address, LYUploadFileURL) ||
-       !strcmp((curdoc.title ? curdoc.title : ""), UPLOAD_OPTIONS_TITLE)) {
+       LYIsUIPage(curdoc.address, UIP_DIRED_MENU) ||
+       LYIsUIPage(curdoc.address, UIP_PERMIT_OPTIONS) ||
+       LYIsUIPage(curdoc.address, UIP_UPLOAD_OPTIONS)) {
        /*
         *  Disallow editing of File Management URLs. - FM
         */
@@ -3091,7 +3070,7 @@
 PRIVATE BOOLEAN handle_LYK_HISTORY ARGS1(
     BOOLEAN,   ForcePush)
 {
-    if (curdoc.title && strcmp(curdoc.title, HISTORY_PAGE_TITLE)) {
+    if (curdoc.title && !LYIsUIPage(curdoc.address, UIP_HISTORY)) {
        /*
         *  Don't do this if already viewing history page.
         *
@@ -3115,6 +3094,7 @@
            LYpop(&curdoc);
            return TRUE;
        }
+       LYRegisterUIPage(newdoc.address, UIP_HISTORY);
        StrAllocCopy(newdoc.title, HISTORY_PAGE_TITLE);
        FREE(newdoc.post_data);
        FREE(newdoc.post_content_type);
@@ -3273,11 +3253,11 @@
     /*
      * Don't do if already viewing info page.
      */
-    if (strcmp((curdoc.title ? curdoc.title : ""),
-              SHOWINFO_TITLE)) {
+    if (!LYIsUIPage(curdoc.address, UIP_SHOWINFO)) {
        if (do_change_link() != -1
         && showinfo(&curdoc, HText_getNumOfLines(),
                     &newdoc, owner_address) >= 0) {
+           LYRegisterUIPage(newdoc.address, UIP_SHOWINFO);
            StrAllocCopy(newdoc.title, SHOWINFO_TITLE);
            FREE(newdoc.post_data);
            FREE(newdoc.post_content_type);
@@ -3512,7 +3492,8 @@
      * Don't do if already viewing list page.
      */
     if (!strcmp((curdoc.title ? curdoc.title : ""),
-               LIST_PAGE_TITLE)) {
+               LIST_PAGE_TITLE) &&
+       LYIsUIPage(curdoc.address, UIP_LIST_PAGE)) {
        /*
         *  Already viewing list page, so get out.
         */
@@ -3795,7 +3776,7 @@
     /*
      * Don't do if already viewing options page.
      */
-    if (strcmp((curdoc.title ? curdoc.title : ""), OPTIONS_TITLE)) {
+    if (!LYIsUIPage(curdoc.address, UIP_OPTIONS_MENU)) {
 
        StrAllocCopy(newdoc.address, "LYNXOPTIONS:/");
        FREE(newdoc.post_data);
@@ -4092,9 +4073,10 @@
     /*
      * Don't do if already viewing print options page.
      */
-    if (strcmp((curdoc.title ? curdoc.title : ""), PRINT_OPTIONS_TITLE)
+    if (!LYIsUIPage(curdoc.address, UIP_PRINT_OPTIONS)
      && print_options(&newdoc.address,
-                     &curdoc.address, HText_getNumOfLines()) >= 0) {
+                     curdoc.address, HText_getNumOfLines()) >= 0) {
+       LYRegisterUIPage(newdoc.address, UIP_PRINT_OPTIONS);
        StrAllocCopy(newdoc.title, PRINT_OPTIONS_TITLE);
        FREE(newdoc.post_data);
        FREE(newdoc.post_content_type);
@@ -4312,8 +4294,9 @@
 #ifdef SOURCE_CACHE
        (!(canreparse_post = HTcan_reparse_document())) &&
 #endif
-       confirm_post_resub(curdoc.address, curdoc.title,
-                          1, 1) == FALSE) {
+       (curdoc.isHEAD ? HTConfirm(CONFIRM_POST_RESUBMISSION) :
+        confirm_post_resub(curdoc.address, curdoc.title,
+                           1, 1)) == FALSE) {
        HTInfoMsg(CANCELLED);
        return;
     }
@@ -4511,7 +4494,7 @@
 }
 
 PRIVATE void handle_LYK_TRACE_LOG ARGS1(
-    BOOLEAN *, trace_mode_flag)
+    BOOLEAN *, trace_flag_ptr)
 {
     /*
      * Check whether we've started a TRACE log
@@ -4525,8 +4508,7 @@
     /*
      * Don't do if already viewing the TRACE log. - FM
      */
-    if (!strcmp((curdoc.title ? curdoc.title : ""),
-               LYNX_TRACELOG_TITLE))
+    if (LYIsUIPage(curdoc.address, UIP_TRACELOG))
        return;
 
     /*
@@ -4540,10 +4522,11 @@
      * and open it again, to make sure all stderr messages thus
      * far will be in the log. - FM
      */
-    if (!LYReopenTracelog(trace_mode_flag))
+    if (!LYReopenTracelog(trace_flag_ptr))
        return;
 
     LYLocalFileToURL (&(newdoc.address), LYTraceLogPath);
+    LYRegisterUIPage(newdoc.address, UIP_TRACELOG);
     StrAllocCopy(newdoc.title, LYNX_TRACELOG_TITLE);
     FREE(newdoc.post_data);
     FREE(newdoc.post_content_type);
@@ -4570,9 +4553,7 @@
     /*
      * Don't do if already viewing upload options page.
      */
-    if (!strcmp(curdoc.address, LYUploadFileURL) ||
-       !strcmp((curdoc.title ? curdoc.title : ""),
-               UPLOAD_OPTIONS_TITLE))
+    if (LYIsUIPage(curdoc.address, UIP_UPLOAD_OPTIONS))
        return;
 
     if (lynx_edit_mode && !no_dired_support) {
@@ -4750,8 +4731,7 @@
 {
     int c;
 
-    if (!strcmp((curdoc.title ? curdoc.title : ""),
-               VISITED_LINKS_TITLE)) {
+    if (LYIsUIPage(curdoc.address, UIP_VLINKS)) {
        /*
         *  Already viewing visited links page, so get out.
         */
@@ -4891,7 +4871,8 @@
            LYinternal_flag = TRUE;
            newdoc.internal_link = TRUE;
            if (LYIsListpageTitle(curdoc.title ? curdoc.title : "") &&
-               0==strcmp(HTLoadedDocumentURL(), LYlist_temp_url())) {
+               (LYIsUIPage(curdoc.address, UIP_LIST_PAGE) ||
+                LYIsUIPage(curdoc.address, UIP_ADDRLIST_PAGE))) {
                if (check_history()) {
                    LYinternal_flag = TRUE;
                } else {
@@ -5309,8 +5290,7 @@
                if (LYUseTraceLog == TRUE &&
                    trace_mode_flag == FALSE &&
                    LYTraceLogFP != NULL &&
-                   !strcmp((newdoc.title ? newdoc.title : ""),
-                            LYNX_TRACELOG_TITLE)) {
+                   LYIsUIPage(newdoc.address, UIP_TRACELOG)) {
                    DocAddress WWWDoc;
                    HTParentAnchor *tmpanchor;
 
Index: 2.33/src/LYOptions.c
--- 2.33/src/LYOptions.c Thu, 09 Dec 1999 17:57:39 -0600
+++ 2.33(w)/src/LYOptions.c Tue, 14 Dec 1999 04:45:02 -0600
@@ -3630,11 +3630,15 @@
 
     if (strstr(newdoc->address, "LYNXOPTIONS://MBM_MENU")) {
        FREE(newdoc->post_data);
-       if (!no_bookmark)
+       if (no_bookmark) {
+          HTAlert(BOOKMARK_CHANGE_DISALLOWED); /* anonymous */
+          return(NULLFILE);
+       } else if (dump_output_immediately) {
+           return(NOT_FOUND);
+       } else {
           edit_bookmarks();
-       else /* anonymous */
-          HTAlert(BOOKMARK_CHANGE_DISALLOWED);
-       return(NULLFILE);
+          return(NULLFILE);
+       }
     }
 
     data = break_data(newdoc->post_data);
@@ -3662,21 +3666,46 @@
 
        if (!HTLoadAbsolute(&WWWDoc))
            return(NOT_FOUND);
+       LYRegisterUIPage(newdoc->address, UIP_OPTIONS_MENU);
 #ifdef DIRED_SUPPORT
        lynx_edit_mode = FALSE;
 #endif /* DIRED_SUPPORT */
        return(NORMAL);
     }
 
+    if (!LYIsUIPage3(HTLoadedDocumentURL(), UIP_OPTIONS_MENU, 0) &&
+       !LYIsUIPage3(HTLoadedDocumentURL(), UIP_VLINKS, 0)) {
+       char *buf = NULL;
+
+       /*  We may have been spoofed? */
+       HTSprintf0(&buf,
+                  gettext("Use %s to invoke the Options menu!"),
+                  key_for_func_ext(LYK_OPTIONS, FOR_PANEL));
+       HTAlert(buf);
+       FREE(buf);
+       FREE(data);
+       return(NOT_FOUND);
+    }
+
     for (i = 0; data[i].tag != NULL; i++) {
        /*
-        * Paranoid security.
+        *  This isn't really for security, but rather for avoiding that
+        *  the user may revisit an older instance from the history stack
+        *  and submit stuff which accidentally undoes changes that had
+        *  been done from a newer instance. - kw
         */
        if (!strcmp(data[i].tag, secure_string)) {
            if (!secure_value || strcmp(data[i].value, secure_value)) {
+               char *buf = NULL;
+
                /*
-                * FIXME: We've been spoofed message here.
+                * We probably came from an older instance of the Options
+                * page that had been on the history stack. - kw
                 */
+               HTSprintf0(&buf,
+                          gettext("Use %s to invoke the Options menu!"),
+                          key_for_func_ext(LYK_OPTIONS, FOR_PANEL));
+               HTAlert(buf);
                FREE(data);
                return(NULLFILE);
            }
Index: 2.33/src/LYPrint.c
--- 2.33/src/LYPrint.c Thu, 25 Nov 1999 07:18:32 -0600
+++ 2.33(w)/src/LYPrint.c Tue, 14 Dec 1999 08:53:52 -0600
@@ -1271,7 +1271,7 @@
  */
 PUBLIC int print_options ARGS3(
        char **,        newfile,
-       char **,        printed_url,
+       CONST char *,   printed_url,
        int,            lines_in_file)
 {
     static char my_temp[LY_MAXPATH] = "\0";
@@ -1301,7 +1301,7 @@
     /*  pages = lines_in_file/66 + 1; */
     pages = (lines_in_file+65)/66;
     HTSprintf0(&buffer, "   <em>%s</em> %s\n   <em>%s</em> %d\n   <em>%s</em> 
%d %s %s\n",
-           gettext("Document:"), *printed_url,
+           gettext("Document:"), printed_url,
            gettext("Number of lines:"), lines_in_file,
            gettext("Number of pages:"), pages,
            (pages > 1 ? gettext("pages") : gettext("page")),
Index: 2.33/src/LYUpload.c
--- 2.33/src/LYUpload.c Wed, 06 Oct 1999 14:48:20 -0500
+++ 2.33(w)/src/LYUpload.c Tue, 14 Dec 1999 04:57:34 -0600
@@ -30,8 +30,6 @@
 #include <LYexit.h>
 #include <LYLeaks.h>
 
-PUBLIC char LYUploadFileURL[LY_MAXPATH] = "\0";
-
 #define SUBDIR_COMMAND "cd %s ; "
 
 /*
@@ -192,8 +190,13 @@
     static char curloc[LY_MAXPATH];
     char *cp;
 
-    LYRemoveTemp(tempfile);
-    if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) {
+    if (LYReuseTempfiles) {
+       fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w");
+    } else {
+       LYRemoveTemp(tempfile);
+       fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w");
+    }
+    if (fp0 == NULL) {
        HTAlert(CANNOT_OPEN_TEMP);
        return(-1);
     }
@@ -208,7 +211,7 @@
 #endif /* VMS */
 
     LYLocalFileToURL(newfile, tempfile);
-    strcpy(LYUploadFileURL, *newfile);
+    LYRegisterUIPage(*newfile, UIP_UPLOAD_OPTIONS);
 
     BeginInternalPage(fp0, UPLOAD_OPTIONS_TITLE, UPLOAD_OPTIONS_HELP);
 
Index: 2.33/src/LYHistory.c
--- 2.33/src/LYHistory.c Sat, 04 Dec 1999 00:06:06 -0600
+++ 2.33(w)/src/LYHistory.c Tue, 14 Dec 1999 09:53:27 -0600
@@ -88,28 +88,28 @@
          !strncmp(doc->address, "file://localhost/", 17)))) {
        int related = 1;        /* First approximation only */
 
-       if (    !strcmp(title, HISTORY_PAGE_TITLE) ||
-               !strcmp(title, VISITED_LINKS_TITLE) ||
-               !strcmp(title, SHOWINFO_TITLE) ||
-               !strcmp(title, STATUSLINES_TITLE) ||
+       if (    LYIsUIPage(doc->address, UIP_HISTORY) ||
+               LYIsUIPage(doc->address, UIP_VLINKS) ||
+               LYIsUIPage(doc->address, UIP_SHOWINFO) ||
+               !strncmp(doc->address, "LYNXMESSAGES:", 13) ||
                        (related = 0)   ||
 #ifdef DIRED_SUPPORT
-               !strcmp(title, DIRED_MENU_TITLE) ||
-               !strcmp(title, UPLOAD_OPTIONS_TITLE) ||
-               !strcmp(title, PERMIT_OPTIONS_TITLE) ||
+               LYIsUIPage(doc->address, UIP_DIRED_MENU) ||
+               LYIsUIPage(doc->address, UIP_UPLOAD_OPTIONS) ||
+               LYIsUIPage(doc->address, UIP_PERMIT_OPTIONS) ||
 #endif /* DIRED_SUPPORT */
-               !strcmp(title, PRINT_OPTIONS_TITLE) ||
-               !strcmp(title, DOWNLOAD_OPTIONS_TITLE) ||
-               !strcmp(title, OPTIONS_TITLE) ||
-               !strcmp(title, CURRENT_KEYMAP_TITLE) ||
-               !strcmp(title, LIST_PAGE_TITLE) ||
+               LYIsUIPage(doc->address, UIP_PRINT_OPTIONS) ||
+               LYIsUIPage(doc->address, UIP_DOWNLOAD_OPTIONS) ||
+               LYIsUIPage(doc->address, UIP_OPTIONS_MENU) ||
+               !strncmp(doc->address, "LYNXKEYMAP:", 11) ||
+               LYIsUIPage(doc->address, UIP_LIST_PAGE) ||
 #ifdef EXP_ADDRLIST_PAGE
-               !strcmp(title, ADDRLIST_PAGE_TITLE) ||
+               LYIsUIPage(doc->address, UIP_ADDRLIST_PAGE) ||
 #endif
-               !strcmp(title, CONFIG_DEF_TITLE) ||
-               !strcmp(title, LYNXCFG_TITLE) ||
-               !strcmp(title, COOKIE_JAR_TITLE) ||
-               !strcmp(title, LYNX_TRACELOG_TITLE)     ) {
+               LYIsUIPage(doc->address, UIP_CONFIG_DEF) ||
+               LYIsUIPage(doc->address, UIP_LYNXCFG) ||
+               !strncmp(doc->address, "LYNXCOOKIE:", 11) ||
+               LYIsUIPage(doc->address, UIP_TRACELOG)  ) {
            if (!related)
                PrevVisitedLink = NULL;
            return;
@@ -222,17 +222,31 @@
            return TRUE;
     }
 
-    return (!strcmp(title, HISTORY_PAGE_TITLE)
-        || !strcmp(title, PRINT_OPTIONS_TITLE)
-        || !strcmp(title, DOWNLOAD_OPTIONS_TITLE)
+    if (docurl) {
+       return (LYIsUIPage(docurl, UIP_HISTORY)
+               || LYIsUIPage(docurl, UIP_PRINT_OPTIONS)
+               || LYIsUIPage(docurl, UIP_DOWNLOAD_OPTIONS)
 #ifdef DIRED_SUPPORT
-        || !strcmp(title, DIRED_MENU_TITLE)
-        || !strcmp(title, UPLOAD_OPTIONS_TITLE)
-        || !strcmp(title, PERMIT_OPTIONS_TITLE)
+               || LYIsUIPage(docurl, UIP_DIRED_MENU)
+               || LYIsUIPage(docurl, UIP_UPLOAD_OPTIONS)
+               || LYIsUIPage(docurl, UIP_PERMIT_OPTIONS)
 #endif /* DIRED_SUPPORT */
-        )
-        ? FALSE
-        : TRUE;
+           )
+           ? FALSE
+           : TRUE;
+    } else {
+       return (!strcmp(title, HISTORY_PAGE_TITLE)
+               || !strcmp(title, PRINT_OPTIONS_TITLE)
+               || !strcmp(title, DOWNLOAD_OPTIONS_TITLE)
+#ifdef DIRED_SUPPORT
+               || !strcmp(title, DIRED_MENU_TITLE)
+               || !strcmp(title, UPLOAD_OPTIONS_TITLE)
+               || !strcmp(title, PERMIT_OPTIONS_TITLE)
+#endif /* DIRED_SUPPORT */
+           )
+           ? FALSE
+           : TRUE;
+    }
 }
 
 /*
@@ -568,7 +582,7 @@
      */
     if (HTMainText && nhist > 0 &&
        !strcmp(HTLoadedDocumentTitle(), HISTORY_PAGE_TITLE) &&
-       !LYwouldPush(HTLoadedDocumentURL(), HTLoadedDocumentTitle()) &&
+       LYIsUIPage3(HTLoadedDocumentURL(), UIP_HISTORY, 0) &&
        strcmp(HTLoadedDocumentURL(), history[nhist-1].address)) {
        HTuncache_current_document();  /* don't waste the cache */
     }
@@ -659,6 +673,7 @@
     }
 
     LYLocalFileToURL(newfile, tempfile);
+    LYRegisterUIPage(*newfile, UIP_VLINKS);
 
     LYforce_HTML_mode = TRUE;  /* force this file to be HTML */
     LYforce_no_cache = TRUE;   /* force this file to be new */
Index: 2.33/src/LYList.c
--- 2.33/src/LYList.c Wed, 06 Oct 1999 13:57:53 -0500
+++ 2.33(w)/src/LYList.c Tue, 14 Dec 1999 04:34:36 -0600
@@ -32,17 +32,6 @@
 **                     Clear:  we only get addresses.
 */
 
-static char *list_filename = 0;
-
-/*
- *  Returns the name of the file used for the List Page, if one has
- *  been created, as a full URL; otherwise, returns an empty string.
- * - kw
- */
-PUBLIC char * LYlist_temp_url NOARGS
-{
-    return list_filename ? list_filename : "";
-}
 
 PUBLIC int showlist ARGS2(
        document *,     newdoc,
@@ -51,6 +40,7 @@
     int cnt;
     int refs, hidden_links;
     static char tempfile[LY_MAXPATH];
+    static BOOLEAN last_titles = TRUE;
     FILE *fp0;
     char *Address = NULL, *Title = NULL, *cp = NULL;
     char *LinkTitle = NULL;  /* Rel stored as property of link, not of dest */
@@ -69,15 +59,22 @@
        return(-1);
     }
 
-    LYRemoveTemp(tempfile);
-    if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) {
+    if (LYReuseTempfiles && titles == last_titles) {
+       fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w");
+    } else {
+       LYRemoveTemp(tempfile);
+       fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w");
+    }
+    if (fp0 == NULL) {
        HTUserMsg(CANNOT_OPEN_TEMP);
        return(-1);
     }
 
-    LYLocalFileToURL(&list_filename, tempfile);
+    LYLocalFileToURL(&(newdoc->address), tempfile);
 
-    StrAllocCopy(newdoc->address, list_filename);
+    LYRegisterUIPage(newdoc->address,
+                    titles ? UIP_LIST_PAGE : UIP_ADDRLIST_PAGE);
+    last_titles = titles;
     LYforce_HTML_mode = TRUE;  /* force this file to be HTML */
     LYforce_no_cache = TRUE;   /* force this file to be new */
 
Index: 2.33/src/LYUtils.h
--- 2.33/src/LYUtils.h Sat, 04 Dec 1999 00:06:06 -0600
+++ 2.33(w)/src/LYUtils.h Tue, 14 Dec 1999 09:53:26 -0600
@@ -128,6 +128,33 @@
 extern void toggle_novice_line NOPARAMS;
 extern BOOL strn_dash_equ PARAMS((CONST char* p1,CONST char* p2,int len));
 
+/* Keeping track of User Interface Pages: */
+typedef enum {
+    UIP_UNKNOWN=-1
+  , UIP_HISTORY=0
+  , UIP_DOWNLOAD_OPTIONS
+  , UIP_PRINT_OPTIONS
+  , UIP_SHOWINFO
+  , UIP_LIST_PAGE
+  , UIP_VLINKS
+  , UIP_LYNXCFG
+  , UIP_OPTIONS_MENU
+  , UIP_DIRED_MENU
+  , UIP_PERMIT_OPTIONS
+  , UIP_UPLOAD_OPTIONS
+  , UIP_ADDRLIST_PAGE
+  , UIP_CONFIG_DEF
+  , UIP_TRACELOG
+  , UIP_INSTALL
+} UIP_t;
+
+#define UIP_P_FRAG 0x0001   /* flag: consider "url#frag" as matching "url" */
+
+extern BOOL LYIsUIPage3 PARAMS((CONST char * url, UIP_t type, int flagparam));
+#define LYIsUIPage(url,type) LYIsUIPage3(url, type, UIP_P_FRAG)
+extern void LYRegisterUIPage PARAMS((CONST char * url, UIP_t type));
+#define LYUnRegisterUIPage(type) LYRegisterUIPage(NULL, type)
+extern void LYUIPages_free NOPARAMS;
 
 #if defined(WIN_EX)    /* 1997/10/16 (Thu) 20:13:28 */
 extern int put_clip(char *szBuffer);
Index: 2.33/src/LYPrint.h
--- 2.33/src/LYPrint.h Fri, 04 Jun 1999 20:32:21 -0500
+++ 2.33(w)/src/LYPrint.h Tue, 14 Dec 1999 08:53:53 -0600
@@ -7,7 +7,7 @@
 
 extern int printfile PARAMS((document *newdoc));
 extern int print_options PARAMS((char **newfile,
-                                char **printed_url, int lines_in_file));
+                                CONST char *printed_url, int lines_in_file));
 extern char * GetFileName NOPARAMS;
 
 #endif /* LYPRINT_H */
Index: 2.33/src/LYLocal.h
--- 2.33/src/LYLocal.h Thu, 09 Dec 1999 17:57:39 -0600
+++ 2.33(w)/src/LYLocal.h Tue, 14 Dec 1999 01:11:56 -0600
@@ -32,13 +32,6 @@
 /* Special return code for LYMainLoop.c */
 #define PERMIT_FORM_RESULT (-99)
 
-extern char LYPermitFileURL[];
-extern char LYDiredFileURL[];
-extern char LYUploadFileURL[];
-#ifdef OK_INSTALL
-extern char LYInstallFileURL[];
-#endif
-
 extern BOOLEAN local_create PARAMS((document *doc));
 extern BOOLEAN local_modify PARAMS((document *doc, char **newpath));
 extern BOOLEAN local_remove PARAMS((document *doc));
Index: 2.33/src/LYList.h
--- 2.33/src/LYList.h Thu, 03 Jun 1999 19:24:44 -0500
+++ 2.33(w)/src/LYList.h Tue, 14 Dec 1999 04:10:02 -0600
@@ -3,7 +3,6 @@
 
 #include <LYStructs.h>
 
-extern char * LYlist_temp_url NOPARAMS;
 extern int showlist PARAMS((document *newdoc, BOOLEAN titles));
 extern void printlist PARAMS((FILE *fp, BOOLEAN titles));
 
Index: 2.33/src/LYDownload.c
--- 2.33/src/LYDownload.c Mon, 25 Oct 1999 09:01:18 -0500
+++ 2.33(w)/src/LYDownload.c Tue, 14 Dec 1999 07:57:35 -0600
@@ -573,6 +573,7 @@
     fprintf(fp0, "</pre>\n");
     EndInternalPage(fp0);
     LYCloseTempFP(fp0);
+    LYRegisterUIPage(*newfile, UIP_DOWNLOAD_OPTIONS);
 
     /*
      * Free off temp copy.
Index: 2.33/src/GridText.c
--- 2.33/src/GridText.c Thu, 09 Dec 1999 17:57:39 -0600
+++ 2.33(w)/src/GridText.c Tue, 14 Dec 1999 04:45:03 -0600
@@ -796,7 +796,8 @@
      * contain any entries with empty titles, but it might happen. - kw
      */
     if (anchor->bookmark ||
-       (anchor->address && !strcmp(anchor->address, LYlist_temp_url())))
+       LYIsUIPage3(anchor->address, UIP_LIST_PAGE, 0) ||
+       LYIsUIPage3(anchor->address, UIP_ADDRLIST_PAGE, 0))
        self->hiddenlinkflag = HIDDENLINKS_MERGE;
     else
        self->hiddenlinkflag = LYHiddenLinks;
Index: 2.33/src/LYMain.c
--- 2.33/src/LYMain.c Thu, 09 Dec 1999 17:57:39 -0600
+++ 2.33(w)/src/LYMain.c Tue, 14 Dec 1999 04:10:02 -0600
@@ -640,13 +640,7 @@
     FREE(lynx_lss_file);
 #endif
     FREE(UCAssume_MIMEcharset);
-    {
-       char *p = LYlist_temp_url();
-       if (p && *p) {
-           *p = '\0';
-           FREE(p);
-       }
-    }
+    LYUIPages_free();
     for (i = 0; i < nlinks; i++) {
        FREE(links[i].lname);
     }
Index: 2.33/src/LYReadCFG.c
--- 2.33/src/LYReadCFG.c Thu, 09 Dec 1999 17:57:39 -0600
+++ 2.33(w)/src/LYReadCFG.c Tue, 14 Dec 1999 09:53:27 -0600
@@ -2030,6 +2030,7 @@
        if (HTMainText && nhist > 0 &&
            !strcmp(HTLoadedDocumentTitle(), LYNXCFG_TITLE) &&
            !strcmp(HTLoadedDocumentURL(), history[nhist-1].address) &&
+           LYIsUIPage(history[nhist-1].address, UIP_LYNXCFG) &&
            (!lynxcfginfo_url ||
             strcmp(HTLoadedDocumentURL(), lynxcfginfo_url))) {
            /*  the page was pushed, so pop-up. */
@@ -2055,6 +2056,7 @@
                return(NOT_FOUND);
 
            HTuncache_current_document();  /* will never use again */
+           LYUnRegisterUIPage(UIP_LYNXCFG);
        }
 
        /*  now set up the flag and fall down to create a new LYNXCFG:/ page */
@@ -2174,6 +2176,7 @@
        fprintf(fp0, "</pre>\n");
        EndInternalPage(fp0);
        LYCloseTempFP(fp0);
+       LYRegisterUIPage(lynxcfginfo_url, UIP_LYNXCFG);
     }
 
     /* return to getfile() cycle */
@@ -2261,6 +2264,7 @@
        fprintf(fp0, "</pre>\n");
        EndInternalPage(fp0);
        LYCloseTempFP(fp0);
+       LYRegisterUIPage(configinfo_url, UIP_CONFIG_DEF);
     }
 
     /* exit to getfile() cycle */
Index: 2.33/src/HTML.c
--- 2.33/src/HTML.c Thu, 09 Dec 1999 17:57:39 -0600
+++ 2.33(w)/src/HTML.c Tue, 14 Dec 1999 04:34:38 -0600
@@ -3107,7 +3107,8 @@
            StrAllocCopy(temp, value[HTML_A_TYPE]);
            if (!intern_flag && href &&
                !strcasecomp(value[HTML_A_TYPE], HTAtom_name(LINK_INTERNAL)) &&
-               0 != strcmp(me->node_anchor->address, LYlist_temp_url()) &&
+               !LYIsUIPage3(me->node_anchor->address, UIP_LIST_PAGE, 0) &&
+               !LYIsUIPage3(me->node_anchor->address, UIP_ADDRLIST_PAGE, 0) &&
                0 != strncmp(me->node_anchor->address, "LYNXIMGMAP:", 11)) {
                /* Some kind of spoof?
                ** Found TYPE="internal link" but not in a valid context
@@ -6363,7 +6364,8 @@
 
     case HTML_HEAD:
        if (me->inBASE &&
-           !strcmp(me->node_anchor->address, LYlist_temp_url())) {
+           (LYIsUIPage3(me->node_anchor->address, UIP_LIST_PAGE, 0) ||
+            LYIsUIPage3(me->node_anchor->address, UIP_ADDRLIST_PAGE, 0))) {
            /*  If we are parsing the List Page, and have a BASE after
             *  we are done with the HEAD element, propagate it back
             *  to the node_anchor object.  The base should have been
Index: 2.33/src/TRSTable.c
--- 2.33/src/TRSTable.c Sat, 04 Dec 1999 00:06:06 -0600
+++ 2.33(w)/src/TRSTable.c Mon, 13 Dec 1999 11:21:03 -0600
@@ -445,6 +445,8 @@
     else {
        if (ncolinfo >= me->ncells + 1) 
            me->cells[me->ncells].alignment = colinfo[me->ncells].alignment;
+       else
+           me->cells[me->ncells].alignment = me->alignment;
        if (me->cells[me->ncells].alignment==HT_ALIGN_NONE)
            me->cells[me->ncells].alignment = me->alignment;
        if (me->cells[me->ncells].alignment==HT_ALIGN_NONE)


reply via email to

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