w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

parsetagx.h (963B)


      1 /* $Id$ */
      2 #ifndef PARSETAGX_H
      3 #define PARSETAGX_H
      4 
      5 #include "html.h"
      6 #include "Str.h"
      7 
      8 /* Parsed Tag structure */
      9 
     10 struct parsed_tag {
     11     unsigned char tagid;
     12     unsigned char *attrid;
     13     char **value;
     14     unsigned char *map;
     15     char need_reconstruct;
     16 };
     17 
     18 #define parsedtag_accepts(tag, id) ((tag)->map&&(tag)->map[id]!=MAX_TAGATTR)
     19 #define parsedtag_exists(tag, id)  (parsedtag_accepts(tag,id)&&((tag)->attrid[(tag)->map[id]]!=ATTR_UNKNOWN))
     20 #define parsedtag_delete(tag, id)  (parsedtag_accepts(tag,id)&&((tag)->attrid[(tag)->map[id]]=ATTR_UNKNOWN))
     21 #define parsedtag_need_reconstruct(tag) ((tag)->need_reconstruct)
     22 #define parsedtag_attname(tag, i) (AttrMAP[(tag)->attrid[i]].name)
     23 
     24 extern struct parsed_tag *parse_tag(char **s, int internal);
     25 extern int parsedtag_get_value(struct parsed_tag *tag, int id, void *value);
     26 extern int parsedtag_set_value(struct parsed_tag *tag, int id, char *value);
     27 extern Str parsedtag2str(struct parsed_tag *tag);
     28 #endif