X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/blobdiff_plain/022008acb24995e5df9cfebec4b8428d14de91d8..17be1d6b52cc22403bcfec5e8547bf612d214690:/conf.h diff --git a/conf.h b/conf.h index 6183048..5b78b13 100644 --- a/conf.h +++ b/conf.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: conf.h,v 1.3 1999/07/27 18:30:14 mdw Exp $ + * $Id: conf.h,v 1.5 1999/10/22 22:46:44 mdw Exp $ * * Configuration parsing * @@ -29,6 +29,13 @@ /*----- Revision history --------------------------------------------------* * * $Log: conf.h,v $ + * Revision 1.5 1999/10/22 22:46:44 mdw + * Improve documentation for conf_enum. + * + * Revision 1.4 1999/08/19 18:32:48 mdw + * Improve lexical analysis. In particular, `chmod' patterns don't have to + * be quoted any more. + * * Revision 1.3 1999/07/27 18:30:14 mdw * Improve documentation and layout for @CONF_BEGIN@ and friends. Remove * irritating warning about unused label by introducing a spurious `goto'. @@ -63,6 +70,19 @@ /*----- Functions provided ------------------------------------------------*/ +/* --- @undelim@ --- * + * + * Arguments: @const char *d, dd@ = pointer to characters to escape + * + * Returns: --- + * + * Use: Modifies the tokenizer. Characters in the first list will + * always be considered to begin a word. Characters in the + * second list will always be allowed to continue a word. + */ + +extern void undelim(const char */*d*/, const char */*dd*/); + /* --- @token@ --- * * * Arguments: @scanner *sc@ = pointer to scanner definition @@ -97,9 +117,15 @@ extern void error(scanner */*sc*/, const char */*msg*/, ...); * Returns: Index into list, zero-based, or @-1@. * * Use: Checks whether the current token is a string which matches - * one of the comma-separated items given. If not, an error is - * reported; otherwise the index of the matched item is - * returned. + * one of the comma-separated items given. The return value is + * the index (zero-based) of the matched string in the list. + * + * The flags control the behaviour if no exact match is found. + * If @ENUM_ABBREV@ is set, and the current token is a left + * substring of exactly one of the possibilities, then that one + * is chosen. If @ENUM_NONE@ is set, the value @-1@ is + * returned; otherwise an error is reported and the program is + * terminated. */ #define ENUM_ABBREV 1u