Questions about HTRequest structure.

Hi,
        I'd like to know what's the semanthic differents of the next two
fields in the HTRequest structure :

struct _HTRequest {
        .....
        HTParentAnchor *        anchor ; /* The client anchor for this
request */
        HTParentAnchor *        parentAnchor ; /* For refere fields */
        .....
} HTRequest ;

        My doubt come out from the current implementation of the Robot: in
the HText_beginAnchor definition, every call to the method HTRequest_parent
return a null pointer. The problem is that this method returns the second
field of the HTRequest structure that is NULL all the times. The solution is
trivial: we must simply reach the first field. That is : 


[HTRobot.c]
PUBLIC void HText_beginAnchor (HText * text , HTChildAnchor * anchor)
{
   if (text && anchor ) {
        .........
        if (mr->flags & MR_LINK) && dest_parent && !hd) {
                HTParentAnchor * parent = HTRequest_parent ( text->request
); /* <- ????????? */
                .................
        }
        .........
   }
}

[Simple Solution]
PUBLIC void HText_beginAnchor (HText * text , HTChildAnchor * anchor)
{
   if (text && anchor ) {
        .........
        if (mr->flags & MR_LINK) && dest_parent && !hd) {
                HTParentAnchor * parent = HTRequest_anchor(text->request);
/* <- !!!!!!!!! */ 
                ..............
        }
        .........
   }
}

        This simple solution resolve the problem of the correct depth in the
robot.

        Here I have another question :         
                In the Robot, why is the start HyperDoc object not linked to
the first anchor created in the Main function ? Perhaps for question of
flexibility ?
        
        Congratulations. You've made a very good job. 

        Thank you. 

        Giacomo Fiorentini
        E-mail addresses : fiorenti@cli.di.unipi.it
                           giacomo@pisa.ccr.it
        University student. ( Pisa University )

Received on Tuesday, 16 January 1996 18:01:20 UTC