[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev follow link bug fix
From: |
Laura Eaves |
Subject: |
lynx-dev follow link bug fix |
Date: |
Fri, 5 Mar 1999 11:29:14 -0500 (EST) |
Try the following patch against dev19.
The problem was that I (dangerously) set newdoc.line in mainloop()
befor calling follow_link_number(). Fix was to pass this number
a different way so as not to touch newdoc....
The current fix should now be safe.
--le
Index: LYForms.c
--- old/LYForms.c Thu Mar 4 03:39:46 1999
+++ src/LYForms.c Thu Mar 4 13:10:16 1999
@@ -552,6 +552,8 @@
default:
*c = *p++;
*rel = *p;
+ case 0:
+ break;
}
/*
Index: LYGetFile.c
--- old/LYGetFile.c Thu Mar 4 03:39:46 1999
+++ src/LYGetFile.c Fri Mar 5 11:24:07 1999
@@ -948,6 +948,7 @@
int rel = 0;
int new_top, new_link;
BOOL want_go;
+ int curline = *num; /* passed in from mainloop() */
CTRACE(tfp,"follow_link_number(%d,%d,...)\n",c,cur);
temp[0] = c;
@@ -972,6 +973,8 @@
break;
default:
rel = *++p;
+ case 0:
+ break;
}
/* don't currently check for errors typing suffix */
@@ -985,7 +988,6 @@
int npages = ((nlines + 1) > display_lines) ?
(((nlines + 1) + (display_lines - 1))/(display_lines))
: 1;
- int curline = doc->line; /* passed from mainloop() */
int curpage = ((curline + 1) > display_lines) ?
(((curline + 1) + (display_lines - 1))/(display_lines))
: 1;
Index: LYMainLoop.c
--- old/LYMainLoop.c Thu Mar 4 03:39:46 1999
+++ src/LYMainLoop.c Fri Mar 5 11:20:40 1999
@@ -1830,7 +1830,7 @@
/* pass cur line num for use in follow_link_number()
* Note: Current line may not equal links[cur].line
*/
- newdoc.line = curdoc.line;
+ number = curdoc.line;
switch (follow_link_number(c, lindx, &newdoc, &number)) {
case DO_LINK_STUFF:
/*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev follow link bug fix,
Laura Eaves <=