api: fix type of value returned by function strcasestr

v2.8-utf8proc
Sébastien Helleu 2015-07-03 19:45:51 +02:00
parent 3e0ebc82a9
commit b13db0305d
9 changed files with 17 additions and 16 deletions

View File

@ -40,6 +40,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* core: fix bar item "scroll" after /buffer clear (closes #448)
* core: fix display of time in bare display when option
weechat.look.buffer_time_format is set to empty string (closes #441)
* api: fix type of value returned by function strcasestr
* fifo: fix send error on Cygwin when something is received in the pipe
(closes #436)
* irc: decode/encode only text in IRC messages and not the headers

View File

@ -763,7 +763,7 @@ Prototype:
[source,C]
----
char *weechat_strcasestr (const char *string, const char *search);
const char *weechat_strcasestr (const char *string, const char *search);
----
Arguments:
@ -779,7 +779,7 @@ C example:
[source,C]
----
char *pos = weechat_strcasestr ("aBcDeF", "de"); /* result: pointer to "DeF" */
const char *pos = weechat_strcasestr ("aBcDeF", "de"); /* result: pointer to "DeF" */
----
[NOTE]

View File

@ -772,7 +772,7 @@ Prototype :
[source,C]
----
char *weechat_strcasestr (const char *string, const char *search);
const char *weechat_strcasestr (const char *string, const char *search);
----
Paramètres :
@ -788,7 +788,7 @@ Exemple en C :
[source,C]
----
char *pos = weechat_strcasestr ("aBcDeF", "de"); /* résultat : pointeur vers "DeF" */
const char *pos = weechat_strcasestr ("aBcDeF", "de"); /* résultat : pointeur vers "DeF" */
----
[NOTE]

View File

@ -795,7 +795,7 @@ Prototipo:
[source,C]
----
char *weechat_strcasestr (const char *string, const char *search);
const char *weechat_strcasestr (const char *string, const char *search);
----
Argomenti:
@ -811,7 +811,7 @@ Esempio in C:
[source,C]
----
char *pos = weechat_strcasestr ("aBcDeF", "de"); /* risultato: puntatore a "DeF" */
const char *pos = weechat_strcasestr ("aBcDeF", "de"); /* risultato: puntatore a "DeF" */
----
[NOTE]

View File

@ -767,7 +767,7 @@ int diff = weechat_strcmp_ignore_chars ("a-b", "--a-e", "-", 1); /* == -3 */
[source,C]
----
char *weechat_strcasestr (const char *string, const char *search);
const char *weechat_strcasestr (const char *string, const char *search);
----
引数:
@ -783,7 +783,7 @@ C 言語での使用例:
[source,C]
----
char *pos = weechat_strcasestr ("aBcDeF", "de"); /* result: pointer to "DeF" */
const char *pos = weechat_strcasestr ("aBcDeF", "de"); /* result: pointer to "DeF" */
----
[NOTE]

View File

@ -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])

View File

@ -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,

View File

@ -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;

View File

@ -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);