X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=h%2Ffmt_scan.h;h=8de6f23d3760e6a5725d7383b04bc0b5f9225970;hb=80bf776d0a4587c477bb8a248b9dbe1a31e74575;hp=7e21479ec14b6b8d4ee689ab85b4b7fedc4ab147;hpb=8eeef5b13a0588318b1c5e9002163fb3f33fec1e;p=mmh diff --git a/h/fmt_scan.h b/h/fmt_scan.h index 7e21479..8de6f23 100644 --- a/h/fmt_scan.h +++ b/h/fmt_scan.h @@ -173,6 +173,25 @@ void fmt_free (struct format *fmt, int reset); struct comp *fmt_findcomp(char *component); /* + * Search for a component structure in the component hash table. + * + * Identical to fmd_findcomp(), but is case-INSENSITIVE. + */ + +struct comp *fmt_findcasecomp(char *component); + +/* + * Add a component entry to the component hash table + * + * component - The name of the component to add to the hash table. + * + * If the component is already in the hash table, this function will do + * nothing. Returns 1 if a component was added, 0 if it already existed. + */ + +int fmt_addcompentry(char *component); + +/* * Add a string to a component hash table entry. Arguments are: * * component - The name of the component to add text to. The component @@ -194,16 +213,18 @@ struct comp *fmt_findcomp(char *component); * * This function is designed to be called when you start processing a new * component. The function returns the integer value of the hash table - * bucket corresponding to this component. + * bucket corresponding to this component. If there was no entry found + * in the component hash table, this function will return -1. */ -int fmt_addcomp(char *component, char *text); +int fmt_addcomptext(char *component, char *text); /* * Append to an existing component. Arguments are: * * bucket - The hash table bucket corresponding to this component, - * as returned by fmt_addcomp(). + * as returned by fmt_addcomp(). If -1, this function will + * return with no actions performed. * component - The component to append text to. Like fmt_addcomp, the * component is searched case-INSENSITIVELY. * text - The text to append to the component. No special processing