lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev Lynx 2.8.4dev.9 (DOS) exits with signal 291 [PATCH]


From: Doug Kaufman
Subject: Re: lynx-dev Lynx 2.8.4dev.9 (DOS) exits with signal 291 [PATCH]
Date: Sun, 15 Oct 2000 12:44:59 -0700 (PDT)

On Sun, 15 Oct 2000, Thomas Dickey wrote:

> On Sun, Oct 15, 2000 at 02:31:03PM +0300, Harri Tuominen wrote:
> > When I try to edit a local file Lynx exits with signal 291. This happens
> > after pressing the right arrow key and then "e". If I press "e" when the
> > cursor is on the current file name, then that file is loaded to the editor
> > configured in the lynx.cfg without problems.
> 
> There were a couple of bug-fixes in dev.10, but I'm not sure if they apply
> (DK may know).  Either can break the code...

No, this is another problem. Harri has "e" bound to LYK_DWIMEDIT, via
a KEYMAP in lynx.cfg. I believe that this is the DJGPP code being
sensitive to dereferencing a null pointer, when trying to edit a text
file with no links within it. I think that this fixes it. Patch is
against dev.9, since I don't have a clean copy of dev.10. Excuse the
duplication of the previously submitted patch for USE_EXTERNALS.
                                 Doug


--- lynx2-8-4/src/LYMainLoop.c  Thu Aug 24 18:30:12 2000
+++ lynx2-8-4/src/LYMainLoop.c.new      Sun Oct 15 12:16:30 2000
@@ -1301,8 +1301,13 @@
                    return 0;
                }
 
+#ifdef USE_EXTERNALS
            if (run_external(links[curdoc.link].lname, TRUE))
+           {
+               *refresh_screen = TRUE;
                return 0;
+           }
+#endif /* USE_EXTERNALS */
 
            /*
             *  Follow a normal link or anchor.
@@ -2296,7 +2301,8 @@
      *  contents, rather than attempting to edit the html source
      *  document.  KED
      */
-    if (links[curdoc.link].type       == WWW_FORM_LINK_TYPE &&
+    if (nlinks > 0  && 
+       links[curdoc.link].type       == WWW_FORM_LINK_TYPE &&
        links[curdoc.link].form->type == F_TEXTAREA_TYPE)   {
        *cmd = LYK_EDIT_TEXTAREA;
        return 2;
@@ -2313,7 +2319,8 @@
      *   auto invocation of the editor on the TEXTAREA's contents
      *   via the above if() statement.]
      */
-    if (links[curdoc.link].type       == WWW_FORM_LINK_TYPE &&
+    if (nlinks > 0 &&
+       links[curdoc.link].type       == WWW_FORM_LINK_TYPE &&
        links[curdoc.link].form->type == F_TEXT_TYPE)       {
        HTUserMsg (CANNOT_EDIT_FIELD);
        return 1;
__ 
Doug Kaufman
Internet: address@hidden


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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