2005-02-08 Bruno Haible (tiny change) * src/kwset.h (kwsincr, kwsprep): Change return type to 'const char *'. * src/kwset.c (kwsincr, kwsprep): Likewise. Index: src/kwset.c =================================================================== RCS file: /cvsroot/grep/grep/src/kwset.c,v retrieving revision 1.4 diff -u -r1.4 kwset.c --- src/kwset.c 8 Feb 2001 15:06:36 -0000 1.4 +++ src/kwset.c 9 Feb 2005 10:20:40 -0000 @@ -1,5 +1,5 @@ /* kwset.c - search for any of a set of keywords. - Copyright 1989, 1998, 2000 Free Software Foundation, Inc. + Copyright 1989, 1998, 2000, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -121,7 +121,7 @@ /* 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; @@ -371,7 +371,7 @@ /* 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; Index: src/kwset.h =================================================================== RCS file: /cvsroot/grep/grep/src/kwset.h,v retrieving revision 1.2 diff -u -r1.2 kwset.h --- src/kwset.h 8 Feb 2001 15:06:36 -0000 1.2 +++ src/kwset.h 9 Feb 2005 10:20:40 -0000 @@ -1,5 +1,5 @@ /* kwset.h - header declaring the keyword set library. - Copyright (C) 1989, 1998 Free Software Foundation, Inc. + Copyright (C) 1989, 1998, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -38,11 +38,11 @@ /* 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 PARAMS((kwset_t, char const *, size_t)); +extern const char *kwsincr PARAMS((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 PARAMS((kwset_t)); +extern const char *kwsprep PARAMS((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