#include "GDgopherdir.h"
#include <stdio.h>

struct HTMLstruct {
     GopherDirObj *Links;

     int          *Linklinenum;      /** Line # of the link **/
     int          *Linklinepos;      /** line position of the link **/
     int          Linkmaxsize;       /** Size of Links arrays **/

     FILE         *Filehtml;
     FILE         *Filetxt;

     String       *Filehtmlname;
     String       *Filetxtname;

     String       *Title;
};

typedef struct HTMLstruct HTMLObj;

#define HTMLGetLink(a,b)  (GDgetEntry(((a)->Links),(b)))  /** Returns a GopherObj**/
#define HTMLGetLinepos(a,b)    ((a)->Linklinepos[(b)])
#define HTMLGetNumLinks(a)     (GDgetNumitems((a)->Links))
#define HTMLGetLinenum(a,b)    ((a)->Linklinenum[(b)])
#define HTMLGetLinkMax(a)      ((a)->Linkmaxsize)
#define HTMLSetLinepos(a,b,c)  ((a)->Linklinepos[(b)] = (c))
#define HTMLSetLinenum(a,b,c)  ((a)->Linklinenum[(b)] = (c))
/** procedures defined in HTML.c **/

HTMLObj *HTMLnew( /*size*/);
void     HTMLInit();
void     HTMLDestroy();
void     HTMLgrow();
void     HTMLaddLink();



