List of Public Function in WWWLib

void HTSetPresentation ((HTList * conversions, CONST char * representation, CONST char * command, CONST char * test_command, double quality, double secs, double secs_per_byte));
Register a Presenter Register a Converter
void HTFormatInit ((HTList * conversions));
Set up Default Presenters and Converters
void HTAcceptEncoding ((HTList * list, CONST char * enc, double quality));
Register an Encoding
void HTAcceptCharset ((HTList * list, CONST char * charset, double quality));
Register a Charset
void HTAcceptLanguage ((HTList * list, CONST char * lang, double quality));
Register a Language
void HTFormatDelete ((HTRequest * request));
Remove Local Preferences
The function is called from HTRequest_delete.
void HTDisposeConversions NO;
Remove Global Preferences
The function is called from HTLibTerminate.
BOOL HTRank ((HTList * possibilities, HTList * accepted_content_types, HTList * accepted_content_languages, HTList * accepted_content_encodings));
Ranking of Accepted Formats
This function is used when the best match among several possible documents is to be found as a function of the accept headers sent in the client request.
HTStream * HTStreamStack ((HTFormat rep_in, HTFormat rep_out, HTStream * output_stream, HTRequest * request, BOOL guess));
This is the routine which actually sets up the conversion. It takes a stream into which the output should be sent in the final format, builds the conversion stack, and returns a stream into which the data in the input format should be fed.
double HTStackValue ((HTList * conversions, HTFormat format_in, HTFormat format_out, double initial_value, long int length));
Must return the cost of the same stack which HTStreamStack would set up.

BOOL HTRegisterProtocol ((HTProtocol * protocol));
void HTDisposeProtocols NO;
BOOL HTProtocolBlocking ((HTRequest * request));
A small function to make life easier. Returns YES or NO. If the Library is run in NON-INTERACTIVE MODE then the function always returns YES;

int HTAddRule (( HTRuleOp op, const char * pattern, const char * equiv));
Add rule to the list
int HTClearRules NO;
Clear all rules
char * HTTranslate ((CONST char * required));
Translate by rules
int HTSetConfiguration ((CONST char * config));
Load one line of configuration information
int HTLoadRules ((const char * filename));
Load the rules from a file

int HTLoadRelative ((CONST char * relative_name, HTParentAnchor* here, HTRequest * request))
Load a document from relative URL
int HTLoadAbsolute ((CONST char * addr, HTRequest * request));
Load a document from absolute URL
int HTLoadToStream ((CONST char * addr, BOOL filter, HTRequest * request));
Load a document from absolute name to a stream
int HTLoadAnchor ((HTAnchor * a, HTRequest * request));
Load a document from anchor
int HTLoadAnchorRecursive ((HTAnchor * a, HTRequest * request));
The recursive function keeps the error stack in the request structure so that no information is lost having more than one call.
int HTLoad ((HTRequest * request, BOOL keep_error_stack));
This is for loading a document which has an address AND a matching anchor.
BOOL HTLoadTerminate ((HTRequest * request, int status));
Terminates above process
int HTSearch ((CONST char * keywords, HTParentAnchor* here, HTRequest * request));
Search Using Relative URL
int HTSearchAbsolute ((CONST char * keywords, CONST char * indexname, HTRequest * request));
Search using Absolute URL

BOOL HTEventRegister ((HTEventCallBack * user_socket));
Register a User Event Handler
BOOL HTEventUnregister ((HTEventCallBack * user_socket));
unregistered using this function
void HTEventCleanup NO;
The function deletes the list of registered eventhandlers (not the structure elements themselves - only the list!)
void HTEventThread_new (( void * )) ;
To be replaced if client has own event loop mechanism
int HTEventThread_clear (( void * )) ;
To be replaced if client has own event loop mechanism
void HTEventThreadState (( SOCKFD, HTThreadAction ));
To be replaced if client has own event loop mechanism
HTEventState HTEventRequestTerminate ((HTRequest * request, int status));
This function is a callback function to the client to tell the result of a terminated request.
int HTEventLoop ((HTRequest * homerequest, HTParentAnchor * homeanchor, CONST char * homekeywords));
This is the internal socket eventloop that is executed when the client doesn't want to have the eventloop. The client can interrupt this loop by sending an event on one of the sockets registered for user events. The arguments are used to load the first document (the home page) and are supposed to make life easier for the client.

BOOL HTBind_init NO;
Initializes in HTLibinit().
BOOL HTBind_deleteAll NO;
This is done automatically by HTLibTerminate().
void HTBind_setCaseSensitive ((BOOL sensitive));
Should the search for suffixes be case sensitive or not? The default value is case sensitive.
CONST char *HTBind_getDelimiters NO;
Get set of suffix delimiters.
void HTBind_setDelimiters ((CONST char * new_suffixes));
Change the set of suffix delimiters.
BOOL HTBind_setBinding ((CONST char * suffix, CONST char * representation, CONST char * encoding, CONST char * language, double value));
he first method is a "super" method for binding information to a file suffic. Any of the string values can be NULL. If filename suffix is already defined its previous definition is overridden or modified. For example, a HTBind_setType and HTBind_setEncoding can be called with the same suffix.
BOOL HTBind_setType ((CONST char * suffix, CONST char * encoding, double value));
Set up content type Bindings Associated with a File Suffix
BOOL HTBind_setEncoding ((CONST char * suffix, CONST char * encoding, double value));
By Content encoding.
BOOL HTBind_setLanguage ((CONST char * suffix, CONST char * language, double value));
By language.
char * HTBind_getSuffix ((HTParentAnchor * anchor));
Use the set of bindings to find a suitable suffix (or index) for a certain combination of language, media type and encoding given in the anchor.
BOOL HTBind_getBindings ((HTParentAnchor * anchor));
Use the set of bindings to find the combination of language, media type and encoding of a given anchor.
BOOL HTBind_getFormat ((CONST char * filename, HTFormat * format, HTEncoding * encoding, HTLanguage * language, double * quality));
Use the set of bindings to find the combination of language, media type and encoding of a given file.
HTContentDescription * HTBind_getDescription ((char * file));
>Use the set of bindings to find the combination of language, media type and encoding of a given file with numerous suffixes.

HTAnchor * HTAnchor_findAddress ((CONST char * address));
This one is for a reference (link) which is found in a document, and might not be already loaded. The parent anchor returned can either be created on the spot or is already in the hash table.
HTChildAnchor * HTAnchor_findChild ((HTParentAnchor *parent, CONST char * tag));
This one is for a new child anchor being edited into an existing document. The parent anchor must already exist but the child returned can either be created on the spot or is already in the hash table.
HTChildAnchor * HTAnchor_findChildAndLink ((HTParentAnchor * parent, CONST char * tag, CONST char * href, HTLinkType * ltype));
Find a child anchor anchor with a given parent and possibly a tag, and (if passed) link this child to the URI given in the href.
BOOL HTAnchor_delete ((HTParentAnchor *me));
Delete an Anchor
BOOL HTAnchor_deleteAll ((HTList * objects));
Deletes all anchors and return a list of all the HyperDocs found while doing it.
BOOL HTAnchor_link ((HTAnchor *source, HTAnchor *destination, HTLinkType *type));
A single anchor may have many outgoing links of which the default is the main link. If one already exists then this new link is simply added to the list.
HTAnchor * HTAnchor_followMainLink ((HTAnchor *me));
FInd the anchor which is the main target of this anchor.
HTAnchor * HTAnchor_followTypedLink ((HTAnchor *me, HTLinkType *type))
Return the anchor with a given typed link
BOOL HTAnchor_makeMainLink ((HTAnchor *me, HTLink *movingLink));
Any outgoing link can at any time be the main destination.
void HTAnchor_makeLastChild ((HTChildAnchor *me));
Move a child anchor to the head of the list of its siblings
HTParentAnchor * HTAnchor_parent ((HTAnchor *me));
Who is Parent?
BOOL HTAnchor_hasChildren ((HTParentAnchor *me));
Does it have any Anchors within it?
void HTAnchor_setDocument ((HTParentAnchor *me, HyperDoc * doc));
Assign a HyperDoc to an Anchor
HyperDoc * HTAnchor_document ((HTParentAnchor *me));
Return the HyperDoc of an anchor (if any)
char * HTAnchor_address ((HTAnchor *me));
Get URI Address
char * HTAnchor_physical ((HTParentAnchor * me));
Contains the physical address after we haved looked for proxies etc.
void HTAnchor_setPhysical ((HTParentAnchor * me, char * protocol));
void HTAnchor_clearIndex ((HTParentAnchor *me));
void HTAnchor_setIndex ((HTParentAnchor *me));
BOOL HTAnchor_isIndex ((HTParentAnchor *me));
Is the Anchor searchable? - Search functions.
void * HTAnchor_protocol ((HTParentAnchor * me));
Gets protocol associated with anchor.
void HTAnchor_setProtocol ((HTParentAnchor * me, void* protocol));
Sets protocol associated with anchor.
CONST char * HTAnchor_title ((HTParentAnchor *me));
Get title of anchor.
void HTAnchor_setTitle ((HTParentAnchor *me, CONST char * title));
Set title for anchor
void HTAnchor_appendTitle ((HTParentAnchor *me, CONST char * title));
Append to title.
HTFormat HTAnchor_format ((HTParentAnchor *me));
Get content type.
void HTAnchor_setFormat ((HTParentAnchor *me, HTFormat form));
Set content type.
HTCharset HTAnchor_charset ((HTParentAnchor *me));
Get character set
void HTAnchor_setCharset ((HTParentAnchor *me, HTCharset charset));
Set character set.
HTLevel HTAnchor_level ((HTParentAnchor * me));
Get anchor level parameter.
void HTAnchor_setLevel ((HTParentAnchor * me, HTLevel level));
Set anchor level parameter.
HTLanguage HTAnchor_language ((HTParentAnchor *me));
Get language
void HTAnchor_setLanguage ((HTParentAnchor *me, HTLanguage language));
set language
HTEncoding HTAnchor_encoding ((HTParentAnchor *me));
Get content encoding
void HTAnchor_setEncoding ((HTParentAnchor *me, HTEncoding encoding));
Set content encoding.
HTCte HTAnchor_cte ((HTParentAnchor *me));
Get content transfer encoding
void HTAnchor_setCte ((HTParentAnchor *me, HTCte cte));
Set content transfer encoding.
long int HTAnchor_length ((HTParentAnchor *me));
Get anchor content length
void HTAnchor_setLength ((HTParentAnchor *me, long int length));
set anchor content length.
int HTAnchor_methods ((HTParentAnchor *me));
get anchor methods
void HTAnchor_setMethods ((HTParentAnchor *me, int methodset));
set anchor methods
void HTAnchor_appendMethods ((HTParentAnchor *me, int methodset));
append to anchor methods.
CONST char * HTAnchor_version ((HTParentAnchor *me));
Get anchor version
void HTAnchor_setVersion ((HTParentAnchor *me, CONST char * version));
Set anchor version
CONST char * HTAnchor_derived ((HTParentAnchor *me));
Get the location from where the anchor was derived.
void HTAnchor_setDerived ((HTParentAnchor *me, CONST char * derived_from));
Set the derivation of the anchor.
HTList * HTAnchor_Extra ((HTParentAnchor *me));
void HTAnchor_addExtra ((HTParentAnchor *me, CONST char * header));
BOOL HTAnchor_headerParsed ((HTParentAnchor *me));
Status of Header Parsing. These are primarily for internal use
void HTAnchor_setHeaderParsed ((HTParentAnchor *me));
Status of Header Parsing. These are primarily for internal use
void HTAnchor_clearHeader ((HTParentAnchor *me));
Clear the Header information.

HTRequest * HTRequest_new NO;
Create blank request
void HTRequest_delete ((HTRequest * req));
Delete request structure
void HTRequest_clear ((HTRequest * req));
Clear a request structure

BOOL HTLog_enable ((CONST char * filename, BOOL local));
Open the log file and start doing log.
BOOL HTLog_disable NO;
Disable the log
BOOL HTLog_request ((HTRequest * request));
This functions logs the result of a request.

BOOL HTCache_enable ((CONST char * cache_root));
Enables Cache.
BOOL HTCache_disable NO;
Disable cache.
BOOL HTCache_isEnabled NO;
Checks if cache is enabled.
BOOL HTCache_setRoot ((CONST char * cache_root));
Set Cache Root
CONST char *HTCache_getRoot NO;
Get Cache Root
void HTCache_freeRoot NO;
For clean up memory. This is done by the Library function HTLibTerminate()
void HTCacheClear ((HTList * cache));
Can clear a list of cache items.
void HTCacheDeleteAll NO;
To remove All cache files known to this session

BOOL HTProxy_setProxy ((CONST char *access,CONST char *proxy));
Register the proxy server
BOOL HTProxy_deleteProxy NO;
Deletes all proxies. This is automatically done in HTLibTerminate()
BOOL HTProxy_setNoProxy ((CONST char *host, CONST char *access, unsigned port));
Registering a host or domain with no proxy
BOOL HTProxy_deleteNoProxy NO;
The remove function removes all entries in the list. This is automatically done in HTLibTerminate()
char * HTProxy_getProxy ((CONST char * url))
This function evaluates the lists of registered proxies and if one is found for the actual access method and it is not registered in the `noproxy' list, then a URL containing the host to be contacted is returned to the caller.
BOOL HTProxy_setGateway ((CONST char *access, CONST char *gate));
Registering a gateway
BOOL HTProxy_deleteGateway NO;
The remove function removes all registered proxies. This is automatically done in HTLibTerminate()
char * HTProxy_getGateway ((CONST char * url));
This function evaluates the lists of registered gateways and if one is found for the actual access method then it is returned and must be freed by the caller.
void HTProxy_getEnvVar NO;
Backwards Compability with Environment Variables

BOOL HTConfirm ((CONST char * Msg));
This function prompts the user for a confirmation on the message passed as a parameter. If the user reacts in the affirmative, returns TRUE, returns FALSE otherwise.
char * HTPrompt ((CONST char * Msg, CONST char * deflt));
Prompt for answer and get text back. Reply text is either NULL on error or a dynamic string which the caller must free.
char * HTPromptPassword ((CONST char * Msg));
Prompt for password without echoing the reply. Reply text is weither NULL on error or a dynamic string which the caller must free.
void HTPromptUsernameAndPassword ((CONST char * Msg, char ** username, char ** password));
This is just a composite function using HTPrompt and HTPromptPassword. The strings returned must be freed by caller.
void HTAlert ((CONST char * Msg));
This function simply puts out the message passed.
void HTProgress ((CONST char * Msg));
This function can be used to indicate the current status of a certain action.
void HTErrorMsg ((HTRequest * request));
This function outputs the content of the error_stack to standard output

char * HTParse (( const char * aName, const char * relatedName, int wanted));
Parse a URI relative to another URI
char * HTRelative ((const char * aName, const char *relatedName));
Create a Relative (Partial) URI
char *HTSimplify ((char **filename));
Canonicalize the Path Part of a URI
char *HTCanon (( char ** filename, char * host));
Canonicalize the DNS part of a URI
BOOL HTCleanTelnetString ((char * str));
Prevent Security Holes. In many telnet like protocols, it can be very dangerous to allow a full ASCII character set to be in a URI. Therefore we have to strip them out.

char * HTEscape ((CONST char * str, unsigned char mask));
Encode Unacceptable Characters using %xy
char * HTUnEscape (( char * str));
Decode %xy Escaped Characters

HText * HText_new ((HTParentAnchor * anchor));
Create hypertext object
HText * HText_new2 ((HTParentAnchor * anchor, HTStream * output_stream));
Create hypertext object specify anchor and stream
HText * HText_new3 ((HTRequest * request, HTStream * output_stream, HTStructured * structure));
Create hypertext object specify request, stream, and structure.
void HText_free ((HText * me));
Free hypertext object
void HText_beginAppend ((HText * text));
void HText_endAppend ((HText * text));
These are used by a parser to build the text in an object HText_beginAppend must be called, then any combination of other append calls, then HText_endAppend. This allows optimised handling using buffers and caches which are flushed at the end.
void HText_setStyle ((HText * text, HTStyle * style));
Set the style for future text
void HText_appendCharacter ((HText * text, char ch));
Add one character
void HText_appendText ((HText * text, CONST char * str));
Add a zero-terminated string
void HText_appendParagraph ((HText * text));
New Paragraph
void HText_appendLineBreak ((HText * text));
Add new line break
void HText_appendHorizontalRule ((HText * text));
add horizontal ruler???
void HText_beginAnchor ((HText * text, HTChildAnchor * anc));
Begin anchor of sensitive text
void HText_endAnchor ((HText * text));
End anchor of sensitive text.
void HText_setNextId (( HText * text, CONST char * s));
Set the next free identifier to makes sure they're not reused.
void HText_appendImage (( HText * text, HTChildAnchor * anc, CONST char * alternative_text, CONST char * alignment, BOOL isMap));
Append an inline image. The image is handled by the creation of an anchor whose destination is the image document to be included. The semantics is the intended inline display of the image.
void HText_appendObject (( HText * text, int element_number, CONST BOOL * present, CONST char * CONST * value));
Append an object which does its own work
void HText_unimplemented (( HText * text));
Warn that object is not completely rendered.
void HText_dump ((HText * me));
Dump diagnostics to stderr
HTParentAnchor * HText_nodeAnchor ((HText * me));
Return the anchor associated with this node
BOOL HText_select ((HText * text));
Brings text to front and highlights.
BOOL HText_selectAnchor ((HText * text, HTChildAnchor* anchor));
Brings anchor to front and highlights.
void HText_applyStyle ((HText * me, HTStyle *style));
Apply style to selection. - for editing programs
void HText_updateStyle ((HText * me, HTStyle *style));
Update selection with style. - for editing programs
HTStyle * HText_selectionStyle (( HText * me, HTStyleSheet* sheet));
Returns style of selected text. - for editing programs.
void HText_replaceSel ((HText * me, CONST char *aString, HTStyle* aStyle));
Paste in styled text - for editing programs.
void HTextApplyToSimilar ((HText * me, HTStyle *style));
Apply this style to the selection and all similarly formatted text (style recovery only)
void HTextSelectUnstyled ((HText * me, HTStyleSheet *sheet));
Select the first unstyled run. (style recovery only)
void HText_unlinkSelection ((HText * me));
HTAnchor * HText_referenceSelected ((HText * me));
HTAnchor * HText_linkSelTo ((HText * me, HTAnchor* anchor));
Anchor handling - for editing programs.

HTStyle * HTStyleModify (( HTStyle * style, HTNesting* nesting, int element_number));
This routine is passed the style for a particular SGML nesting state, and the element number of a new element within that state. The routine returns a suitable style for text within the new element. It is passed a pointer to the nesting state so that it can link the style back to the nesting state for later manipulation of the SGML nesting tree.
HTStyle * HTStyleNew NO;
HTStyle* HTStyleNewNamed ((CONST char * name));
HTStyle * HTStyleFree ((HTStyle * self));
HTStyle * HTStyleRead ((HTStyle * self, HTStream * stream));
HTStyle * HTStyleWrite ((HTStyle * self, HTStream * stream));
Style Functions
HTStyleSheet * HTStyleSheetNew NO;
HTStyleSheet * HTStyleSheetFree ((HTStyleSheet * self));
HTStyle * HTStyleNamed ((HTStyleSheet * self, CONST char * name));
HTStyle * HTStyleMatching ((HTStyleSheet *self, HTStyle * style));
HTStyleSheet * HTStyleSheetAddStyle ((HTStyleSheet * self, HTStyle * style));
HTStyleSheet * HTStyleSheetRemoveStyle ((HTStyleSheet * self, HTStyle * style));
HTStyleSheet * HTStyleSheetRead ((HTStyleSheet * self, HTStream * stream));
HTStyleSheet * HTStyleSheetWrite ((HTStyleSheet * self, HTStream * stream));
Style Sheet Functions

void HTHistory_record ((HTAnchor * destination));
Record the jump to an anchor
HTAnchor * HTHistory_back ((HTAnchor * cur_anch));
Go back in history (find the last visited node)
HTAnchor * HTHistory_forward ((HTAnchor * cur_anch));
Go forward in history (find the last visited node) if exists.
HTAnchor * HTHistory_backtrack NO;
BOOL HTHistory_canBacktrack NO;
Can History go back to last node?
HTAnchor * HTHistory_moveBy ((int offset));
Browse through references in the same parent node
BOOL HTHistory_canMoveBy ((int offset));
Check if it's possible to move such.
#define HTHistory_next (HTHistory_moveBy (+1))
#define HTHistory_canNext (HTHistory_canMoveBy (+1))
#define HTHistory_previous (HTHistory_moveBy (-1))
#define HTHistory_canPrevious (HTHistory_canMoveBy (-1))
HTAnchor * HTHistory_read ((int number));
Read numbered visited anchor (1 is the oldest)
HTAnchor * HTHistory_recall ((int number));
This reads the anchor and stores it again in the list, except if last.
int HTHistory_count NO;
This is needed in order to check the validity of certain commands for menus, etc. (not needed for now. Use canBacktrack, etc.)
void HTHistory_leavingFrom ((HTAnchor * anchor));
Change last history entry. Sometimes we load a node by one anchor but leave by a different one, and it is the one we left from which we want to remember.

char * HTIcon_alt_string ((char * alt, BOOL brackets));
Generates the alt-tag
void HTAddIcon ((char * url, char * alt, char * type_templ));
General icon binding. Use this icon if content-type or encoding matches template.
void HTAddHref ((char * url, char * type_templ));
Called from HTConfig.c to build the list of all the AddHref's
void HTAddUnknownIcon ((char * url, char * alt));
Icon for which no other icon can be used.
void HTAddBlankIcon ((char * url, char * alt));
Invisible icon for the listing header field to make it aligned with the rest of the listing (this doesn't have to be blank)
void HTAddParentIcon ((char * url, char * alt));
Icon to use for parent directory.
void HTAddDirIcon ((char * url, char * alt));
Icon to use for a directory
HTIconNode * HTGetIcon ((mode_t mode, HTFormat content_type, HTEncoding content_encoding));
returns the icon corresponding to content_type or content_encoding.
HTHrefNode * HTGetHref (( char * filename));
returns the HrefNode to get the URL for presentation of a file (indexing)
void HTStdIconInit ((CONST char * url_prefix));
The function HTStdIconInit(url_prefix) can be used to initialize a standard icon set

int HTBrowseDirectory (( HTRequest * req, char * directory));
Functions for directory browsing on local UNIX system
int HTFTPBrowseDirectory (( HTRequest * req, char * directory, HTDirLineInput input));
Functions for directory browsing from other sources

HTStream * HTWriter_new ((SOCKFD soc, BOOL leave_open));
Opens a new socket writer
HTStream * HTWriter_newNoClose ((SOCKFD soc));
Opens a new socket writer that does not close
HTStream * HTASCIIWriter ((SOCKFD soc));
Write ASCII to socket?
HTStream * HTBlackHole NO;
This stream simply absorbs data without doing anything what so ever.
HTStream * HTFWriter_new ((FILE * fp, BOOL leave_open));
This function puts up a new stream given an open file descripter. If the file is not to be closed afterwards, then set leave_open = NO
BOOL HTTmp_setRoot ((CONST char * tmp_root));
Sets destination for temporary files.
CONST char * HTTmp_getRoot NO;
Gets destination for the files.
void HTTmp_freeRoot NO;
The HTTmp_freeRoot is called by the HTLibTerminate function. Probably does not need to be tested.
HTConverter HTSaveAndExecute, HTSaveLocally, HTSaveAndCallBack, HTThroughLine;
Five converters.
Note that HTSaveAndCallBack will also generate a cache file.
HTConverter HTCacheWriter;
Stream for writing to cache.
HTTag * SGMLFindTag ((CONST SGML_dtd* dtd, CONST char * string));
Returns a pointer to the tag within the DTD.
int SGMLFindAttribute ((HTTag* tag, CONST char * string));
Returns the number of the atribute or -1 if failure.
HTStream* SGML_new (( CONST SGML_dtd * dtd, HTStructured * target));
Create an SGML parser
HTStream * HTTee ((HTStream* s1, HTStream* s2));
The Tee stream just writes everything you put into it into two oter streams. One use (the only use?!) is for taking a cached copey on disk while loading the main copy, without having to wait for the disk copy to be finished and reread it.
HTStructured* HTML_new ((HTRequest * request, void * param, HTFormat input_format, HTFormat output_format, HTStream * output_stream));
A structured stream to parse HTML
void HTML_reopen ((HTStructured * me));
Reopening an existing HTML object allows it to be retained (for example by the styled text object) after the structured stream has been closed.
HTConverter HTMLToPlain, HTMLToC, HTMLPresent, HTMLToTeX;
Converters
void HTMLUseCharacterSet ((HTMLCharacterSet i));
Selecting internal character set representations
int HTLoadError (( HTRequest * req, int number, CONST char * message));
The error message should be marked as an error so that it can be reloaded later. This implementation just throws up an error message and leaves the document unloaded.
void HTRegenInit NO;
void HTRegenCharacter (( char c, HTNesting * nesting, HTStructured * target));
void HTNestingChange (( HTStructured* s, HTNesting* old, HTNesting * newnest, HTChildAnchor * info, CONST char * aName));
HTNesting * HTMLCommonality (( HTNesting * s1, HTNesting * s2));
HTNesting * HTNestElement ((HTNesting * p, int ele));
void * HTStyleForNesting ((HTNesting * n));
HTNesting* HTMLAncestor ((HTNesting * old, int depth));
HTNesting* CopyBranch ((HTNesting * old, HTNesting * newnest, int depth));>
HTNesting * HTInsertLevel ((HTNesting * old, int element_number, int level));
HTNesting * HTDeleteLevel ((HTNesting * old, int level));
int HTMLElementNumber ((HTNesting * s));
int HTMLLevel (( HTNesting * s));
HTNesting* HTMLAncestor ((HTNesting * old, int depth));
Nesting functions. These functions were new with HTML2.c. They allow the tree of SGML nesting states to be manipulated, and SGML regenerated from the style sequence.
HTStructured * HTMLGenerator ((HTStream * output));
This module converts structed stream into stream. That is, given a stream to write to, it will give you a structured stream too.
HTStructured * HTTeXGenerator ((HTStream * output));
This module converts a structured stream from HTML into LaTeX format.
void HTStartAnchor (( HTStructured * targetstream, CONST char * name, CONST char * href));
Start anchor element
void HTMLPutImg ((HTStructured *obj, CONST char *src, CONST char *alt, CONST char *align));
Put image element
void HTNextID ((HTStructured * targetStream, CONST char * s));
Specify next ID to be used
HTConverter HTMIMEConvert, HTNetMIME;
Converters
HTConverter HTWSRCConvert;
WAIS converter
char * HTDeSlash ((CONST char * str));
HTDeSlash takes out the invlaid characters in a URL path ELEMENT by converting them into hex-escaped characters.
char * HTEnSlash ((CONST char * str));
Opposite of HTDeSlash.
HTConverter HTPlainPresent;
Plain text converter.
HTStream * HTGuess_new ((HTRequest * req, void * param, HTFormat input_format, HTFormat output_format, HTStream * output_stream));
This stream is a one that reads first a chunk of stuff, tries to figure out the format, and calls HTStreamStack(). This is a kind of lazy-evaluation of HTStreamStack().

int HTDoConnect (( HTNetInfo *net, char *url, u_short default_port, u_long *addr, BOOL use_cur));
This makes an active connect to the specified host.
int HTDoAccept ((HTNetInfo *net));
This function makes a non-blocking accept on a port and polls every second until MAX_ACCEPT_POLL is reached.
void HTTCPAddrWeights ((char * host, time_t deltatime));
Recalculating the Time-Weights on Multihomed Hosts
void HTTCPCacheRemoveAll NO;
Cleanup the Memory. This function is called from HTLibTerminate.
CONST char * HTErrnoString ((int errnum));
Return error message corresponding to errno number given.
int HTInetStatus ((int errnum, char * where));
We need to pass the error number as a parameter as we on some platforms get different codes from sockets and local file access.
unsigned int HTCardinal ((int * pstatus, char ** pp, unsigned int max_value));
Parse a Cardinal Value
CONST char * HTInetString ((struct sockaddr_in * sin));
Produce a string for an internet address
int HTParseInet (( struct sockaddr_in * sin, CONST char * str, BOOL use_cur));
This function finds the address of a specified host and fills out the sockaddr structure. str points to a string with a node name or number, with optional trailing colon and port number. sin points to the binary internet or decnet address field.
char * HTGetHostBySock ((int soc));
Name of a Machine on the Other Side of a Socket
int HTGetHostByName ((char *host, SockA *sin, BOOL use_cur));
This function gets the address of the host and puts it in to the socket structure. It maintains its own cache of connections so that the communication to the Domain Name Server is minimized.
CONST char * HTGetHostName NO;
This function returns a CONET char pointer to a static location containing the name of this host or NULL if not available.
void HTSetHostName ((char * host));
This function overwrites any other value of current host name. This might be set by the user to change the value in the ID value parsed to a news host when posting. The change doesn't influence the Mail Address as they are stored in two different locations. If, however, the change is done before the first call to HTGetMailAddress() then this function will use the new host and domain name.
void HTFreeHostName NO;
Cleanup Memory. Called from HTLibTerminate
CONST char *HTGetDomainName NO;
This function rerturns the domain name part of the host name as returned by HTGetHostName() function.
CONST char * HTGetMailAddress NO;
This functions returns a char pointer to a static location containing the mail address of the current user. The static location is different from the one of the current host name so different values can be assigned. The default value is @hostname where hostname is as returned by HTGetHostName().
void HTSetMailAddress ((char * address));
This function overwrites any other value of current mail address. This might be set by the user to change the value in the From field in the HTTP Protocol.
void HTFreeMailAddress NO;
Free Memory. Called by HTLibTerminate
void HTSetSignal NO;
This is only necessary to compile on a few platforms and only if the application does not have its own signal handling. It is required on Solaris 2.3 (and other SVR4 platforms?) due to a bug in the TCP kernel. When a connect() is tried to a illegal port, solaris gives a SIGPIPE signal instead of returning Connection refused.

#define StrAllocCopy(dest, src) HTSACopy (&(dest), src)
#define StrAllocCat(dest, src) HTSACat (&(dest), src)
int strcasecomp ((CONST char *a, CONST char *b));
String comparison.
int strncasecomp ((CONST char *a, CONST char *b, int n));
Case-insensitive String Comparison
char * strcasestr ((char * s1, char * s2));
This works like strstr() but is not case-sensitive.
char * HTStrip ((char * s));
Return value points to first non-white character, or to '/0' if none. All trailing white space is OVERWRITTEN with zero.
char * HTNextField ((char** pstr));
This function returns a RFC822 word separated by space, comma, or semi-colons.
CONST char *HTDateTimeStr ((time_t *calendar, BOOL local));
RFC1123 Date/Time Stamp String
long HTGetTimeZoneOffset NO;
Calculates the offset from GMT in seconds. This is called from HTLibInit().
time_t HTParseTime ((CONST char * str));
Converts a string representation in GMT to a local representation of localtime time_t.
CONST char *HTMessageIdStr NO;
Unique Message-ID String

#define HTAtom_name(a) ((a)->name)
Get Content of an Atom
HTAtom * HTAtom_for ((CONST char * string));
This function returns a representative value (an atom) such that it will always (within one run of the program) return the same value for the same given string. Case sensitive.
HTAtom * HTAtom_caseFor ((CONST char * string));
Same as above but not case sensitive.
HTList * HTAtom_templateMatches ((CONST char * templ));
Returns a list of atoms which matches the template given. It is especially made for MIME-types so that for example a template like text returns a list of all MIME-types of type text.
void HTAtom_deleteAll NO;
Cleanup Memory. In order to cleanup memory, call this function. This is done automaticly from the HTLibTerminate function.

char * HTSACopy ((char **dest, CONST char *src));
char * HTSACat ((char **dest, CONST char *src));
These two functions are dynamic versions of strcpy and strcat. They use malloc for allocating space for the string.

HTList * HTList_new NO;
Create a new list.
void HTList_delete ((HTList *me));
Delete a list.
BOOL HTList_addObject ((HTList *me, void *newObject));
Add object to start of list.
BOOL HTList_removeObject ((HTList *me, void *oldObject));
Remove object.
void * HTList_removeLastObject ((HTList *me));
Removes last object.
void * HTList_removeFirstObject ((HTList *me));
Removes first object
#define HTList_isEmpty(me) (me ? me->next == NULL : YES)
Returns True or false if list is empty
int HTList_count ((HTList *me))
Gets length of list
int HTList_indexOf ((HTList *me, void *object));
#define HTList_lastObject(me) \ (me && me->next ? me->next->object : NULL)
Gets last object.
void * HTList_objectAt ((HTList *me, int position));
Gets object at given location.
#define HTList_nextObject(me) \ (me && (me = me->next) ? me->object : NULL)
Gets next object in list
#define HTList_free(x) FREE(x)
Free the memory from a list.

HTAssocList *HTAssocList_new NO;
Creates a new associated list.
void HTAssocList_delete ((HTAssocList * alist));
Deletes an associated list.
void HTAssocList_add ((HTAssocList * alist, CONST char * name, CONST char * value));
Add a new member to the list.
char *HTAssocList_lookup ((HTAssocList * alist, CONST char * name));
Lookup a member of the list.

HTBTree * HTBTree_new ((HTComparer comp));
Create a binary tree given its discrimination routine
void HTBTree_free ((HTBTree* tree));
Free storage of the tree but not of the objects
void HTBTreeAndObject_free ((HTBTree* tree));
Free storage of the tree and of the objects
void HTBTree_add ((HTBTree* tree, void * object));
Add an object to a binary tree
#define HTBTree_object(element) ((element)->object)
Find user object for element
HTBTElement * HTBTree_next ((HTBTree* tree, HTBTElement * ele));
Find next element in depth-first order