mirror of
https://github.com/weechat/weechat.git
synced 2026-07-04 16:53:14 +02:00
api: fix type of value returned by function strcasestr
This commit is contained in:
@@ -341,7 +341,7 @@ string_strcmp_ignore_chars (const char *string1, const char *string2,
|
||||
* Returns pointer to string found, or NULL if not found.
|
||||
*/
|
||||
|
||||
char *
|
||||
const char *
|
||||
string_strcasestr (const char *string, const char *search)
|
||||
{
|
||||
int length_search;
|
||||
@@ -1051,8 +1051,8 @@ string_regcomp (void *preg, const char *regex, int default_flags)
|
||||
int
|
||||
string_has_highlight (const char *string, const char *highlight_words)
|
||||
{
|
||||
char *msg, *highlight, *match, *match_pre, *match_post, *msg_pos;
|
||||
char *pos, *pos_end;
|
||||
const char *match, *match_pre, *match_post, *msg_pos;
|
||||
char *msg, *highlight, *pos, *pos_end;
|
||||
int end, length, startswith, endswith, wildcard_start, wildcard_end, flags;
|
||||
|
||||
if (!string || !string[0] || !highlight_words || !highlight_words[0])
|
||||
|
||||
@@ -38,7 +38,7 @@ extern int string_strcmp_ignore_chars (const char *string1,
|
||||
const char *string2,
|
||||
const char *chars_ignored,
|
||||
int case_sensitive);
|
||||
extern char *string_strcasestr (const char *string, const char *search);
|
||||
extern const char *string_strcasestr (const char *string, const char *search);
|
||||
extern int string_match (const char *string, const char *mask,
|
||||
int case_sensitive);
|
||||
extern char *string_replace (const char *string, const char *search,
|
||||
|
||||
+2
-2
@@ -1001,8 +1001,8 @@ gui_color_emphasize (const char *string,
|
||||
regex_t *regex)
|
||||
{
|
||||
regmatch_t regex_match;
|
||||
char *result, *result2, *string_no_color, *pos;
|
||||
const char *ptr_string, *ptr_no_color, *color_emphasis;
|
||||
char *result, *result2, *string_no_color;
|
||||
const char *ptr_string, *ptr_no_color, *color_emphasis, *pos;
|
||||
int rc, length_search, length_emphasis, length_result;
|
||||
int pos1, pos2, real_pos1, real_pos2, count_emphasis;
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ struct timeval;
|
||||
* please change the date with current one; for a second change at same
|
||||
* date, increment the 01, otherwise please keep 01.
|
||||
*/
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20150624-01"
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20150703-01"
|
||||
|
||||
/* macros for defining plugin infos */
|
||||
#define WEECHAT_PLUGIN_NAME(__name) \
|
||||
@@ -269,7 +269,7 @@ struct t_weechat_plugin
|
||||
int max, int range);
|
||||
int (*strcmp_ignore_chars) (const char *string1, const char *string2,
|
||||
const char *chars_ignored, int case_sensitive);
|
||||
char *(*strcasestr) (const char *string, const char *search);
|
||||
const char *(*strcasestr) (const char *string, const char *search);
|
||||
int (*strlen_screen) (const char *string);
|
||||
int (*string_match) (const char *string, const char *mask,
|
||||
int case_sensitive);
|
||||
|
||||
Reference in New Issue
Block a user