On Thu, 25 Nov 1999, Gilles Detillieux wrote:
> Date: Thu, 25 Nov 1999 16:54:49 -0600 (CST)
> From: Gilles Detillieux <[EMAIL PROTECTED]>
> To: Geoff Hutchison <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
> Subject: Re: [htdig3-dev] Patch for Ht://Dig v3.1.3
>
> According to Geoff Hutchison:
> > At 1:18 PM +0300 11/22/99, Alexis Mikhailov wrote:
> > >Can I propose a patch? It allows better handling of local files through
> > >using of file://localhost urls. And there was a little bug in String.cc.
> > >This patch was created to allow KDevelop to use Ht://Dig as it's
> > >search engine, work sponsored through Cosource.
> >
> > Hi!
> >
> > I actually had something like this in mind for local_urls. I've taken
> > a quick glance and it generally looks OK, though it would be nice to
> > have a ChangeLog entry for all of the changes (since some don't look
> > related).
>
> I've looked through, and the patch contains a number of different (sometimes
> loosely related) fixes and enhancements:
[snip]
> 4) htdig/htdig.cc & htlib/String.cc: allow htdig to read URL list from
> stdin if htdig given an argument of "-". The >> operator added to the
> String class uses a lot of stuff I've never seen before, so I don't know
> how to judge it for myself. It seems more complicated that it would
> need to be for the simple task at hand - all you need to do is load all
> of stdin into one string - but I guess the line by line approach would
> allow bigger lists (less string overhead). Undocumented.
> I'm all for these fixes, but some documentation explaining the less
> clear aspects, or even a note explaining the rationale for these,
> would be appreciated. I do have some concerns about the correctness of
> (1) above, given the lack of changes to URL.cc. Maybe this would be a
> better fit in 3.2. I'm also concerned about the portability of the >>
> operator added to the String class in (4) above, given the way it pokes
> into internals of library classes, and the unfamiliar cast construct.
Your concerns were very well founded; I applied a bunch of patches from
the patch site, including that patch, to htdig 3.1.3 and compiled the
source on a BSDI 4.0 box without any problem, but as soon as I randig,
htdig dumped core. I removed that patch, leaving other patches in, and
recompiled; everything worked fine.
Here are gdb results:
__________________________________________________________________________
$ gdb htdig htdig.core
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i386-unknown-bsdi4.0), Copyright 1996 Free Software Foundation,
Inc...
Core was generated by `htdig'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libg++.so...done.
Reading symbols from /usr/lib/libstdc++.so...done.
Reading symbols from /shlib/libgcc.so...done.
Reading symbols from /shlib/libcurses.so...done.
Reading symbols from /shlib/libtermcap.so...done.
Reading symbols from /shlib/libm.so...done.
Reading symbols from /shlib/libc.so...done.
Reading symbols from /shlib/ld-bsdi.so...done.
#0 String::get (this=0x1) at String.cc:215
215 if (!Allocated)
(gdb) bt
#0 String::get (this=0x1) at String.cc:215
#1 0x8054b06 in Retriever::Need2Get (this=0x80477c8, u=0x841f180
"http://www.ccsf.cc.ca.us/Info/") at Retriever.cc:598
#2 0x8055a7c in Retriever::got_href (this=0x80477c8, url=@0x8415980,
description=0x80c86d0 "") at Retriever.cc:1102
#3 0x805226f in HTML::do_tag (this=0x858c900, retriever=@0x80477c8, tag=@0x858c968)
at HTML.cc:964
#4 0x8050d0f in HTML::parse (this=0x858c900, retriever=@0x80477c8,
baseURL=@0x8128880) at HTML.cc:306
#5 0x80549fc in Retriever::RetrievedDocument (this=0x80477c8, doc=@0x8128780,
ref=0x8149700) at Retriever.cc:557
#6 0x805471a in Retriever::parse_url (this=0x80477c8, urlRef=@0x8375400) at
Retriever.cc:459
#7 0x8054195 in Retriever::Start (this=0x80477c8) at Retriever.cc:289
#8 0x8057b9b in main (ac=4, av=0x80479c0) at htdig.cc:264
#9 0x804eee0 in __start ()
(gdb) q
$
__________________________________________________________________________
Regards,
Joe
--
_/ _/_/_/ _/ ____________ __o
_/ _/ _/ _/ ______________ _-\<,_
_/ _/ _/_/_/ _/ _/ ......(_)/ (_)
_/_/ oe _/ _/. _/_/ ah [EMAIL PROTECTED]
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED]
You'll receive a message confirming the unsubscription.