I was really happy when I saw this configuration parameter - but now I'm
unhappy to find this is not actually implemented: I need this badly to
enable a jump to the nearest location within a (long) document.
I'm trying to path Display.cc to implement this.
Looking at db.docdb I can see that each document actually has a list of
anchor names; I need to retrieve the correct name.
I found that ref->DocAnchor() returns the sequence number of the anchor.
How do I get at the name? This is what I'm trying to do (in
Display::excerpt()):
List *anchors = ref->DocAnchors();
String *tmpanchor;
int n = ref->DocAnchor();
*tmpanchor << ((String*) (*anchors)[n])->get();
String *docanchor = (String*) "#";
*docanchor << tmpanchor;
vars.Add("ANCHOR", docanchor);
*url << docanchor;
No compilation errors or warnings. But I'm getting a segmentation fault at
((String*) (*anchors)[n])->get() .
What am I not doing or doing wrong?
Marjolein Katsma [EMAIL PROTECTED]
Java Woman - http://javawoman.com/
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the body of the message.