+/* --- @conf_undelim@ --- *
+ *
+ * Arguments: @scanner *sc@ = pointer to scanner definition
+ * @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 conf_undelim(scanner */*sc*/,
+ const char */*d*/, const char */*dd*/);
+
+/* --- @token@ --- *
+ *
+ * Arguments: @scanner *sc@ = pointer to scanner definition
+ *
+ * Returns: Type of token scanned.
+ *
+ * Use: Reads the next token from the character scanner.
+ */
+
+extern int token(scanner */*sc*/);
+
+/* --- @error@ --- *
+ *
+ * Arguments: @scanner *sc@ = pointer to scanner definition
+ * @const char *msg@ = message skeleton string
+ * @...@ = extra arguments for the skeleton
+ *
+ * Returns: Doesn't
+ *
+ * Use: Reports an error at the current scanner location.
+ */
+
+extern void error(scanner */*sc*/, const char */*msg*/, ...);
+
+/* --- @pushback@ --- *
+ *
+ * Arguments: @scanner *sc@ = pointer to scanner definition
+ *
+ * Returns: ---
+ *
+ * Use: Pushes the current token back. This is normally a precursor
+ * to pushing a new scanner source.
+ */
+
+extern void pushback(scanner */*sc*/);
+
+/* --- @conf_enum@ --- *
+ *
+ * Arguments: @scanner *sc@ = pointer to a scanner object
+ * @const char *list@ = comma-separated things to allow
+ * @unsigned @f = flags for the search
+ * @const char *err@ = error message if not found
+ *
+ * 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. 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
+#define ENUM_NONE 2u
+
+extern int conf_enum(scanner */*sc*/, const char */*list*/,
+ unsigned /*flags*/, const char */*err*/);
+
+/* --- @conf_prefix@ --- *
+ *
+ * Arguments: @scanner *sc@ = pointer to a scanner object
+ * @const char *p@ = pointer to prefix string to check
+ *
+ * Returns: Nonzero if the prefix matches.
+ *
+ * Use: If the current token is a word matching the given prefix
+ * string, then it and an optional `.' character are removed and
+ * a nonzero result is returned. Otherwise the current token is
+ * left as it is, and zero is returned.
+ *
+ * Typical options parsing code would remove an expected prefix,
+ * scan an option anyway (since qualifying prefixes are
+ * optional) and if a match is found, claim the option. If no
+ * match is found, and a prefix was stripped, then an error
+ * should be reported.
+ */
+
+extern int conf_prefix(scanner */*sc*/, const char */*p*/);
+
+/* --- @CONF_BEGIN@, @CONF_END@ --- *
+ *
+ * Arguments: @sc@ = scanner to read from
+ * @prefix@ = prefix to scan for
+ * @desc@ = description of what we're parsing