X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/d6b2ae5fa68b9a82ffc006c233aef64c5cdb3bd2..5bc2777230cdc4cea23ff87df356af3fb0cfadf9:/h/fmt_scan.h?ds=sidebyside diff --git a/h/fmt_scan.h b/h/fmt_scan.h index 5f659d4c..40ef9c03 100644 --- a/h/fmt_scan.h +++ b/h/fmt_scan.h @@ -1,12 +1,10 @@ - -/* - * fmt_scan.h -- definitions for fmt_scan() +/* fmt_scan.h -- definitions for fmt_scan() */ /* * This structure describes an "interesting" component. It holds * the name & text from the component (if found) and one piece of - * auxilary info. The structure for a particular component is located + * auxiliary info. The structure for a particular component is located * by (open) hashing the name and using it as an index into the ptr array * "wantcomp". All format entries that reference a particular component * point to its comp struct (so we only have to do component specific @@ -98,28 +96,6 @@ struct fmt_callbacks { void * trace_context; }; -/* - * Create a new format string. Arguments are: - * - * form - Name of format file. Will be searched by etcpath(), see that - * function for details. - * format - The format string to be used if no format file is given - * default_fs - The default format string to be used if neither form nor - * format is given - * - * This function also takes care of processing \ escapes like \n, \t, etc. - * - * Returns an allocated format string. - */ - -char *new_fs (char *form, char *format, char *default_fs); - -/* - * Free memory allocated by new_fs(). It allocates to a static so - * no argument is necessary. - */ -void free_fs (); - /* * Compile a format string into a set of format instructions. Arguments are: * @@ -129,7 +105,7 @@ void free_fs (); * format engine. * reset - If set to true, the format compiler will reset the * component hash table. The component hash table contains - * all of the references to message components refered to in + * all of the references to message components referred to in * the format instructions. If you have multiple format * strings that you want to compile and operate on the * same message, this should be set to false. @@ -150,7 +126,7 @@ int fmt_compile (char *fstring, struct format **fmt, int reset); * format instructions. Is always terminated with a * newline (\n). * width - Maximum number of displayed characters. Does not include - * characters marked as nonprinting or (depending on the + * characters marked as non-printing or (depending on the * encoding) bytes in a multibyte encoding that exceed the * character's column width. * dat - An integer array that contains data used by certain format @@ -207,7 +183,7 @@ void fmt_freecomptext(void); * or NULL if the component is not found in the hash table. */ -struct comp *fmt_findcomp(char *component); +struct comp *fmt_findcomp(char *component) PURE; /* * Search for a component structure in the component hash table. @@ -215,7 +191,7 @@ struct comp *fmt_findcomp(char *component); * Identical to fmd_findcomp(), but is case-INSENSITIVE. */ -struct comp *fmt_findcasecomp(char *component); +struct comp *fmt_findcasecomp(char *component) PURE; /* * Add a component entry to the component hash table @@ -243,7 +219,7 @@ int fmt_addcompentry(char *component); * component buffer is a newline, it will be separated * from previous text by ",\n\t"; otherwise if the last * character of the previous text is a newline it will - * simply be seperated by a "\t". This unusual processing + * simply be separated by a "\t". This unusual processing * is designed to handle the case where you have multiple * headers with the same name (e.g.: multiple "cc:" headers, * even though that isn't technically allowed in the RFCs). @@ -291,25 +267,3 @@ void fmt_appendcomp(int bucket, char *component, char *text); */ struct comp *fmt_nextcomp(struct comp *comp, unsigned int *bucket); - -/* - * The implementation of the %(formataddr) function. This is available for - * programs to provide their own local implementation if they wish to do - * special processing (see uip/replsbr.c for an example). Arguments are: - * - * orig - Existing list of addresses - * str - New address(es) to append to list. - * - * This function returns an allocated string containing the new list of - * addresses. - */ - -char *formataddr(char *orig, char *str); - -/* - * The implementation of the %(concataddr) function. Arguments and behavior - * are the same as %(formataddr). Again, see uip/replsbr.c to see how you - * can override this behavior. - */ - -char *concataddr(char *orig, char *str);