* util.h: Added const-preserving version of strstr().

* util.c: Likewise.
This commit is contained in:
Roland Illig 2005-05-23 11:21:26 +00:00
parent de1e263746
commit caaf0730b6
3 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,8 @@
* help.c: Fixed the use of check_movement_keys(). This had been
really ugly code, involving casts on incompatible functions.
* command.c: Removed casts on function pointer types.
* util.h: Added const-preserving version of strstr().
* util.c: Likewise.
2005-05-22 Pavel Roskin <proski@gnu.org>

View File

@ -1441,6 +1441,12 @@ cstrcasestr (const char *haystack, const char *needle)
return NULL;
}
const char *
cstrstr (const char *haystack, const char *needle)
{
return strstr(haystack, needle);
}
extern char *
str_unconst (const char *s)
{

View File

@ -20,6 +20,7 @@ extern char *str_unconst (const char *);
/* String managing functions */
extern const char *cstrcasestr (const char *haystack, const char *needle);
extern const char *cstrstr (const char *haystack, const char *needle);
void str_replace(char *s, char from, char to);
int is_printable (int c);