summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/alias/alias.c8
-rw-r--r--src/plugins/aspell/weechat-aspell.c10
-rw-r--r--src/plugins/weechat-plugin.h9
3 files changed, 14 insertions, 13 deletions
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c
index c0df3a3d7..b325e7120 100644
--- a/src/plugins/alias/alias.c
+++ b/src/plugins/alias/alias.c
@@ -688,13 +688,13 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
{
ptr_completion = argv[2];
ptr_alias_name = (weechat_string_is_command_char (argv[3])) ?
- weechat_utf8_next_char (argv[3]) : argv[3];
+ (char *)weechat_utf8_next_char (argv[3]) : argv[3];
ptr_command = argv_eol[4];
}
else
{
ptr_alias_name = (weechat_string_is_command_char (argv[1])) ?
- weechat_utf8_next_char (argv[1]) : argv[1];
+ (char *)weechat_utf8_next_char (argv[1]) : argv[1];
ptr_command = argv_eol[2];
}
@@ -735,7 +735,7 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
{
/* get pointer to alias name */
ptr_alias_name = (weechat_string_is_command_char (argv[1])) ?
- weechat_utf8_next_char (argv[1]) : argv[1];
+ (char *)weechat_utf8_next_char (argv[1]) : argv[1];
/* display list of aliases */
alias_found = 0;
@@ -790,7 +790,7 @@ unalias_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
for (i = 1; i < argc; i++)
{
alias_name = (weechat_string_is_command_char (argv[i])) ?
- weechat_utf8_next_char (argv[i]) : argv[i];
+ (char *)weechat_utf8_next_char (argv[i]) : argv[i];
ptr_alias = alias_search (alias_name);
if (!ptr_alias)
{
diff --git a/src/plugins/aspell/weechat-aspell.c b/src/plugins/aspell/weechat-aspell.c
index 4c35dff95..ae2775b2c 100644
--- a/src/plugins/aspell/weechat-aspell.c
+++ b/src/plugins/aspell/weechat-aspell.c
@@ -708,7 +708,7 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
pos_space = ptr_string;
while (pos_space && pos_space[0] && (pos_space[0] != ' '))
{
- pos_space = weechat_utf8_next_char (pos_space);
+ pos_space = (char *)weechat_utf8_next_char (pos_space);
}
if (!pos_space || !pos_space[0])
{
@@ -766,7 +766,7 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
/* find end of word: ' and - allowed in word, but not at the end */
ptr_end_valid = ptr_string;
- ptr_end = weechat_utf8_next_char (ptr_string);
+ ptr_end = (char *)weechat_utf8_next_char (ptr_string);
code_point = weechat_utf8_char_int (ptr_end);
while (iswalnum (code_point) || (code_point == '\'')
|| (code_point == '-'))
@@ -778,12 +778,12 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
ptr_end_valid = ptr_end;
word_end_pos_valid = word_end_pos;
}
- ptr_end = weechat_utf8_next_char (ptr_end);
+ ptr_end = (char *)weechat_utf8_next_char (ptr_end);
if (!ptr_end[0])
break;
code_point = weechat_utf8_char_int (ptr_end);
}
- ptr_end = weechat_utf8_next_char (ptr_end_valid);
+ ptr_end = (char *)weechat_utf8_next_char (ptr_end_valid);
word_end_pos = word_end_pos_valid;
word_ok = 0;
if (weechat_aspell_string_is_url (ptr_string)
@@ -799,7 +799,7 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
code_point = weechat_utf8_char_int (ptr_end);
while (!iswspace (code_point))
{
- ptr_end = weechat_utf8_next_char (ptr_end);
+ ptr_end = (char *)weechat_utf8_next_char (ptr_end);
if (!ptr_end[0])
break;
code_point = weechat_utf8_char_int (ptr_end);
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index f5d99226e..51cf06281 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -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 "20150703-01"
+#define WEECHAT_PLUGIN_API_VERSION "20150704-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@@ -319,8 +319,9 @@ struct t_weechat_plugin
int (*utf8_has_8bits) (const char *string);
int (*utf8_is_valid) (const char *string, char **error);
void (*utf8_normalize) (char *string, char replacement);
- char *(*utf8_prev_char) (const char *string_start, const char *string);
- char *(*utf8_next_char) (const char *string);
+ const char *(*utf8_prev_char) (const char *string_start,
+ const char *string);
+ const char *(*utf8_next_char) (const char *string);
int (*utf8_char_int) (const char *string);
int (*utf8_char_size) (const char *string);
int (*utf8_strlen) (const char *string);
@@ -329,7 +330,7 @@ struct t_weechat_plugin
int (*utf8_charcmp) (const char *string1, const char *string2);
int (*utf8_charcasecmp) (const char *string1, const char *string2);
int (*utf8_char_size_screen) (const char *string);
- char *(*utf8_add_offset) (const char *string, int offset);
+ const char *(*utf8_add_offset) (const char *string, int offset);
int (*utf8_real_pos) (const char *string, int pos);
int (*utf8_pos) (const char *string, int real_pos);
char *(*utf8_strndup) (const char *string, int length);