* util.h: Added const-preserving version of strstr().
* util.c: Likewise.
Этот коммит содержится в:
родитель
de1e263746
Коммит
caaf0730b6
@ -3,6 +3,8 @@
|
|||||||
* help.c: Fixed the use of check_movement_keys(). This had been
|
* help.c: Fixed the use of check_movement_keys(). This had been
|
||||||
really ugly code, involving casts on incompatible functions.
|
really ugly code, involving casts on incompatible functions.
|
||||||
* command.c: Removed casts on function pointer types.
|
* 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>
|
2005-05-22 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
@ -1441,6 +1441,12 @@ cstrcasestr (const char *haystack, const char *needle)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
cstrstr (const char *haystack, const char *needle)
|
||||||
|
{
|
||||||
|
return strstr(haystack, needle);
|
||||||
|
}
|
||||||
|
|
||||||
extern char *
|
extern char *
|
||||||
str_unconst (const char *s)
|
str_unconst (const char *s)
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,7 @@ extern char *str_unconst (const char *);
|
|||||||
/* String managing functions */
|
/* String managing functions */
|
||||||
|
|
||||||
extern const char *cstrcasestr (const char *haystack, const char *needle);
|
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);
|
void str_replace(char *s, char from, char to);
|
||||||
int is_printable (int c);
|
int is_printable (int c);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user