1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 19:53:13 +02:00

Add french translation of Plugin API Reference

This commit is contained in:
Sebastien Helleu
2009-06-28 00:47:37 +02:00
parent 23f111329e
commit 26919fe58b
9 changed files with 7331 additions and 69 deletions
+4 -4
View File
@@ -562,17 +562,17 @@ utf8_pos (const char *string, int real_pos)
*/
char *
utf8_strndup (const char *string, int max_chars)
utf8_strndup (const char *string, int length)
{
const char *end;
if (!string || (max_chars < 0))
if (!string || (length < 0))
return NULL;
if (max_chars == 0)
if (length == 0)
return strdup ("");
end = utf8_add_offset (string, max_chars);
end = utf8_add_offset (string, length);
if (!end || (end == string))
return strdup (string);
+1 -1
View File
@@ -50,6 +50,6 @@ extern int utf8_char_size_screen (const char *string);
extern char *utf8_add_offset (const char *string, int offset);
extern int utf8_real_pos (const char *string, int pos);
extern int utf8_pos (const char *string, int real_pos);
extern char *utf8_strndup (const char *string, int max_chars);
extern char *utf8_strndup (const char *string, int length);
#endif /* wee-utf8.h */
+3 -1
View File
@@ -187,7 +187,7 @@ struct t_weechat_plugin
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 max_chars);
char *(*utf8_strndup) (const char *string, int length);
/* directories */
int (*mkdir_home) (const char *directory, int mode);
@@ -743,6 +743,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->utf8_real_pos(__string, __pos)
#define weechat_utf8_pos(__string, __real_pos) \
weechat_plugin->utf8_pos(__string, __real_pos)
#define weechat_utf8_strndup(__string, __length) \
weechat_plugin->utf8_strndup(__string, __length)
/* directories */
#define weechat_mkdir_home(__directory, __mode) \