[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file [2nd patch]
From: |
brian j pardy |
Subject: |
Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file [2nd patch] |
Date: |
Sun, 19 Dec 1999 02:32:27 -0500 |
On Sat, Dec 18, 1999, brian j pardy wrote:
> On Boomtime, the 60th of The Aftermath, 3165, Klaus Weide wrote:
[...]
> > So maybe getfile() should be tweaked, to always return NORMAL in a
> > case that really *is* a success with -source, and not check HTMainText
> > at all in that case (or check that it doesn't exist...)
>
> I considered that at first, and then somehow convinced myself not to.
> I can't remember why now. I was probably just lazy and didn't want to
> parse through all the checks that determine what to return.
>
> I'll see if I can come up with anything in getfile() to figure out if
> it was indeed a successful -source (etc) operation.
My second attempt. The -source segfault with the earlier patch was
due to the call to HTFindPoundSelector() -- the anchor elements aren't
populated in dump_output_immediately mode. I'm short-circuiting the
check on HTLoadedDocumentURL() when in d_o_i mode -- getfile() will
then return NORMAL, and it looks like the rest of the code can handle
it properly, apart from HTFindPoundSelector().
Any thoughts here?
diff -ru 2.8.3dev.17/src/HTFWriter.c 2.8.3dev.17.bri/src/HTFWriter.c
--- 2.8.3dev.17/src/HTFWriter.c Wed Dec 15 18:22:16 1999
+++ 2.8.3dev.17.bri/src/HTFWriter.c Sun Dec 19 02:23:06 1999
@@ -419,8 +419,12 @@
if (dump_output_immediately) {
if (me->anchor->FileCache)
remove(me->anchor->FileCache);
- FREE(me);
- exit_immediately(0);
+ /*
+ * Let's not exit immediately -- return and let getfile()
+ * figure out what happened. - BJP
+ */
+ /* FREE(me); */
+ /* exit_immediately(0); */
}
FREE(me);
diff -ru 2.8.3dev.17/src/LYGetFile.c 2.8.3dev.17.bri/src/LYGetFile.c
--- 2.8.3dev.17/src/LYGetFile.c Wed Dec 15 18:22:16 1999
+++ 2.8.3dev.17.bri/src/LYGetFile.c Sun Dec 19 02:19:49 1999
@@ -1042,8 +1042,14 @@
* anchor deletion problems), so this
* is too. - FM
*/
- (strcmp(doc->address,
- HTLoadedDocumentURL()) ||
+
+ /*
+ * Allow in non-interactive mode. - BJP
+ */
+ ((strcmp(doc->address,
+ HTLoadedDocumentURL()) &&
+ !dump_output_immediately) ||
+
/*
* Also check the post_data elements. - FM
*/
@@ -1064,8 +1070,14 @@
/*
* May set www_search_result.
*/
- if (pound != NULL)
+ if (pound != NULL && !dump_output_immediately)
+ /*
+ * HTFindPoundSelector() will crash if
+ * in non-interactive mode -- anchor
+ * isn't populated. Skip this. - BJP
+ */
HTFindPoundSelector(pound+1);
+
return(NORMAL);
}
}
--
Confidence is the feeling you have before you understand the situation.
- Re: lynx-dev libreadline, (continued)
- Re: lynx-dev libreadline, Klaus Weide, 1999/12/12
- Re: lynx-dev libreadline, brian j pardy, 1999/12/12
- lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, brian j pardy, 1999/12/12
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, Klaus Weide, 1999/12/15
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, brian j pardy, 1999/12/15
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, brian j pardy, 1999/12/15
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, Klaus Weide, 1999/12/15
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, brian j pardy, 1999/12/18
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file [2nd patch],
brian j pardy <=
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file [2nd patch], Klaus Weide, 1999/12/19
- Re: lynx-dev libreadline, Vlad Harchev, 1999/12/12
Re: lynx-dev libreadline, T.E.Dickey, 1999/12/09