mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 19:53:13 +02:00
New backlog option in logger plugin, added variable names in .h files, replaced "void *" pointers by structures
This commit is contained in:
@@ -48,7 +48,7 @@ weechat_aspell_new_speller (void)
|
||||
{
|
||||
aspell_speller_t *s;
|
||||
|
||||
s = (aspell_speller_t *) malloc (sizeof (aspell_speller_t));
|
||||
s = (aspell_speller_t *)malloc (sizeof (aspell_speller_t));
|
||||
if (!s)
|
||||
{
|
||||
weechat_aspell_plugin->print (weechat_aspell_plugin, NULL, NULL,
|
||||
@@ -203,7 +203,7 @@ weechat_aspell_new_config (void)
|
||||
{
|
||||
aspell_config_t *c;
|
||||
|
||||
c = (aspell_config_t *) malloc (sizeof (aspell_config_t));
|
||||
c = (aspell_config_t *)malloc (sizeof (aspell_config_t));
|
||||
if (!c)
|
||||
{
|
||||
weechat_aspell_plugin->print (weechat_aspell_plugin, NULL, NULL,
|
||||
@@ -828,7 +828,7 @@ weechat_aspell_config_save (void)
|
||||
if (found == 0)
|
||||
{
|
||||
n = strlen (servers) + strlen (p->server) + 2;
|
||||
servers = (char *) realloc (servers, n * sizeof (char));
|
||||
servers = (char *)realloc (servers, n * sizeof (char));
|
||||
strcat (servers, " ");
|
||||
strcat (servers, p->server);
|
||||
weechat_aspell_plugin->set_plugin_config (weechat_aspell_plugin, "servers", servers);
|
||||
@@ -848,13 +848,13 @@ weechat_aspell_config_save (void)
|
||||
else
|
||||
{
|
||||
n = strlen (channels) + strlen (q->channel) + 2;
|
||||
channels = (char *) realloc (channels, n * sizeof (char));
|
||||
channels = (char *)realloc (channels, n * sizeof (char));
|
||||
strcat (channels, " ");
|
||||
strcat (channels, q->channel);
|
||||
}
|
||||
|
||||
n = 7 + strlen (p->server) + strlen (q->channel);
|
||||
option = (char *) malloc ( n * sizeof (char));
|
||||
option = (char *)malloc (n * sizeof (char));
|
||||
snprintf (option, n, "lang_%s_%s", p->server, q->channel);
|
||||
weechat_aspell_plugin->set_plugin_config (weechat_aspell_plugin, option, q->speller->lang);
|
||||
free (option);
|
||||
@@ -864,7 +864,7 @@ weechat_aspell_config_save (void)
|
||||
if (channels)
|
||||
{
|
||||
n = 10 + strlen (p->server);
|
||||
option = (char *) malloc ( n * sizeof (char));
|
||||
option = (char *)malloc (n * sizeof (char));
|
||||
snprintf (option, n, "channels_%s", p->server);
|
||||
weechat_aspell_plugin->set_plugin_config (weechat_aspell_plugin, option, channels);
|
||||
free (option);
|
||||
@@ -899,7 +899,7 @@ weechat_aspell_config_load(void)
|
||||
for (i=0; i<s; i++)
|
||||
{
|
||||
n = 10 + strlen (servers_list[i]);
|
||||
option_s = (char *) malloc (n * sizeof (char));
|
||||
option_s = (char *)malloc (n * sizeof (char));
|
||||
snprintf (option_s, n, "channels_%s", servers_list[i]);
|
||||
|
||||
channels = weechat_aspell_plugin->get_plugin_config (weechat_aspell_plugin, option_s);
|
||||
@@ -911,7 +911,7 @@ weechat_aspell_config_load(void)
|
||||
for (j=0; j<c; j++)
|
||||
{
|
||||
n = 7 + strlen (servers_list[i]) + strlen (channels_list[j]);
|
||||
option_l = (char *) malloc (n * sizeof (char));
|
||||
option_l = (char *)malloc (n * sizeof (char));
|
||||
snprintf (option_l, n, "lang_%s_%s", servers_list[i], channels_list[j]);
|
||||
|
||||
lang = weechat_aspell_plugin->get_plugin_config (weechat_aspell_plugin, option_l);
|
||||
@@ -1174,7 +1174,7 @@ weechat_aspell_clean_word (char *word, int *offset)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
w = (char *) malloc ((len+1) * sizeof(char));
|
||||
w = (char *)malloc ((len+1) * sizeof(char));
|
||||
|
||||
if (w) {
|
||||
memcpy (w, buffer + *offset, len);
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
/* weechat-aspell.h: Aspell plugin support for WeeChat */
|
||||
|
||||
#ifndef WEECHAT_ASPELL__H
|
||||
#define WEECHAT_ASPELL__H 1
|
||||
#ifndef __WEECHAT_ASPELL_H
|
||||
#define __WEECHAT_ASPELL_H 1
|
||||
|
||||
#include <aspell.h>
|
||||
|
||||
@@ -192,4 +192,4 @@ cmds_keep_t cmd_tokeep[] =
|
||||
{ NULL, 0}
|
||||
};
|
||||
|
||||
#endif /* WEECHAT_ASPELL__H */
|
||||
#endif /* aspell.h */
|
||||
|
||||
Reference in New Issue
Block a user