In addition to the $if and $set pseudo tags, a program may inquire and manipulate the enviroment of the current page's expansion. Since expansion and conditional inclusion takes place at the time that htdumpfile() is called, this is quite useful for having a base template which fulfills a number of different purposes, dependent on who/when/where the program is executed.
- void hputenv (char * var, char * val)
- place the variable var with value val into the global environment. This is treated identically to the $set psuedo tag when emitting the HTML document.
This is quite useful for conditionally inclusion of various parts of documents given privilege level and other such things which can only be determined at run time.
- char * hgetenv (char * var)
- get the value of an environment variable. This function returns NULL with variables which aren't present, ala getenv(3).
- int hcond (htelm * h)
- Called from the HTML generator to determine whether a variable is true.
© (copyright) 1997 MTCC Last modified: Fri Apr 25 20:21:25 PDT 1997