lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: lynx-dev How to get all the lynks in a page ? (II)


From: HATTON Nicolas
Subject: RE: lynx-dev How to get all the lynks in a page ? (II)
Date: Thu, 30 Jul 1998 16:33:19 +0200

I found out what my compilation problem was : I had to (in LYMainLoop.c)
:
- include "HTCJK.h"
- declare the TextAnchor, the HTLine and _HText structs

Now everything is fine and this small sample can actually get all the
links of the current document before it is displayed.
I'm posting that just in case someone needs this one day...

It's in the 'case NORMAL :' of the 'switch(getresult)'.

{
TextAnchor *TA;
HTChildAnchor *CA;
HTLink  *HTL;
char    msg2[250];
char    *adresse;
int      i = 1;
struct _HText   *HMa = (struct _HText *)HTMainText;

for (TA = HMa->first_anchor; TA != NULL; TA = TA->next)
        {
        if (TA->show_anchor)    /* Visible anchor ? */
             {
                CA = TA->anchor;
                HTL = &(CA->mainLink);
                adresse = HTAnchor_address(HTL->dest);
                sprintf(msg2, "Link[%d] : %s", i++, adresse);
                _statusline(msg2); sleep(3);
                FREE(adresse);
                }
        }
}
    

Nicolas (NO "h" : I'm French :) )

> -----Message d'origine-----
> De:   HATTON Nicolas [SMTP:address@hidden
> Date: mercredi 29 juillet 1998 19:12
> À:    'address@hidden'
> Objet:        lynx-dev How to get all the lynks in a page ? (II)
> 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]