These are the parsing routines. Many are intra-libht routines, but the reading functions are useful for outside when you don't want to alter the contents of the current output page.
- htelm * htpreadstr (htelm * head, htelm **pend, unsigned char * str);
- htelm * htpreadfile (htelm * head, htelm **pend, char * file) ;
- htelm * htpreadfiletext (htelm * head, htelm **pend, char * file)
- htelm * htpreadurl (htelm * head, htelm **pend, char * url, int * sts, char * type) ;
- struct token * htkgetword (struct token * tk, int n) ;
- char * htkgetval (struct token * tk, char * var) ;
- struct token * htkckvar (struct token * tk, char * var) ;
- void htprelease (htelm * h);
- void htpdumpfile (htelm * h) ;
- void _htpdumpfile (htelm * h, int endtag, int (* dumper) (char * fmt, ...)) ;
- void htpdumptree (htelm * h, int lvl) ;
- int htpcompile (htelm * h) ;
- htelm * htpreadstr (htelm * head, htelm **pend, unsigned char * str)
- Read a string, inserting the parsed elements in head. pend is set to the last element parsed.
- htelm * htpreadfile (htelm * head, htelm **pend, char * file)
- Read from file file, inserting the parsed elements in head. pend is set to the last element parsed.
- htelm * htpreadfiletext (htelm * head, htelm **pend, char * file)
- Read from file file, inserting the parsed elements in head. pend is set to the last element parsed. Unlike its cousin htpreadfile(), html tags are not parsed.
- htelm * htpreadurl (htelm * head, htelm **pend, char * url, int * sts, char * type)
- Read from URL url, inserting the parsed elements in head. pend is set to the last element parsed. You can capture the HTTP status and MIME encapsulation types by supplying these parameters.
- struct token * htkgetword (struct token * tk, int n)
- Get the n'th token in the token list for a given element. The token list is found in htelm->tk
- char * htkgetval (struct token * tk, char * var)
- struct token * htkckvar (struct token * tk, char * var)
- Given the token list tk, return 1 if var is present, 0 otherwise.
- void htprelease (htelm * h)
- The internal routine to release storage of the tree starting at h
- void htpdumpfile (htelm * h)
- Dump the file starting at h.
- void _htpdumpfile (htelm * h, int endtag, int (* dumper) (char * fmt, ...))
- Dump from h to endtag (the type, not a string) emitting with the printf(3) like dumper function.
- void htpdumptree (htelm * h, int lvl)
- Dump a diagnostic state 'o affairs of the tree starting at h