+2005-02-08 Bruno Haible <bruno@clisp.org>
+
+ * kwset.h (kwsincr, kwsprep): Change return type to 'const char *'.
+ * kwset.c (kwsincr, kwsprep): Likewise.
+
2005-02-03 Bruno Haible <bruno@clisp.org>
* dfa.c (dfaexec): Avoid continuing the loop past the end of the
/* Add the given string to the contents of the keyword set. Return NULL
for success, an error message otherwise. */
-char *
+const char *
kwsincr (kwset_t kws, char const *text, size_t len)
{
struct kwset *kwset;
/* Compute the shift for each trie node, as well as the delta
table and next cache for the given keyword set. */
-char *
+const char *
kwsprep (kwset_t kws)
{
register struct kwset *kwset;
/* Incrementally extend the keyword set to include the given string.
Return NULL for success, or an error message. Remember an index
number for each keyword included in the set. */
-extern char *kwsincr (kwset_t, char const *, size_t);
+extern const char *kwsincr (kwset_t, char const *, size_t);
/* When the keyword set has been completely built, prepare it for
use. Return NULL for success, or an error message. */
-extern char *kwsprep (kwset_t);
+extern const char *kwsprep (kwset_t);
/* Search through the given buffer for a member of the keyword set.
Return a pointer to the leftmost longest match found, or NULL if