forked from PsychoticNinja/irssi
Merge pull request #478 from pisculichi/fix-ansic-issues
Fix some ANSI-C issues
This commit is contained in:
commit
1cfec5f63d
@ -175,6 +175,7 @@ static void sig_message_public(SERVER_REC *server, const char *msg,
|
|||||||
int for_me, print_channel, level;
|
int for_me, print_channel, level;
|
||||||
char *nickmode, *color, *freemsg = NULL;
|
char *nickmode, *color, *freemsg = NULL;
|
||||||
HILIGHT_REC *hilight;
|
HILIGHT_REC *hilight;
|
||||||
|
TEXT_DEST_REC dest;
|
||||||
|
|
||||||
/* NOTE: this may return NULL if some channel is just closed with
|
/* NOTE: this may return NULL if some channel is just closed with
|
||||||
/WINDOW CLOSE and server still sends the few last messages */
|
/WINDOW CLOSE and server still sends the few last messages */
|
||||||
@ -214,7 +215,6 @@ static void sig_message_public(SERVER_REC *server, const char *msg,
|
|||||||
if (printnick == NULL)
|
if (printnick == NULL)
|
||||||
printnick = nick;
|
printnick = nick;
|
||||||
|
|
||||||
TEXT_DEST_REC dest;
|
|
||||||
format_create_dest(&dest, server, target, level, NULL);
|
format_create_dest(&dest, server, target, level, NULL);
|
||||||
dest.address = address;
|
dest.address = address;
|
||||||
dest.nick = nick;
|
dest.nick = nick;
|
||||||
@ -396,8 +396,9 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
|
|||||||
count = 0; windows = NULL;
|
count = 0; windows = NULL;
|
||||||
chans = g_string_new(NULL);
|
chans = g_string_new(NULL);
|
||||||
for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
|
for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
|
||||||
|
CHANNEL_REC *rec;
|
||||||
level = MSGLEVEL_QUITS;
|
level = MSGLEVEL_QUITS;
|
||||||
CHANNEL_REC *rec = tmp->data;
|
rec = tmp->data;
|
||||||
|
|
||||||
if (!nicklist_find(rec, nick))
|
if (!nicklist_find(rec, nick))
|
||||||
continue;
|
continue;
|
||||||
|
@ -365,9 +365,9 @@ char *theme_format_expand_get(THEME_REC *theme, const char **format)
|
|||||||
GString *str;
|
GString *str;
|
||||||
char *ret;
|
char *ret;
|
||||||
theme_rm_col dummy, reset;
|
theme_rm_col dummy, reset;
|
||||||
|
int braces = 1; /* we start with one brace opened */
|
||||||
dummy.m[0] = '\0';
|
dummy.m[0] = '\0';
|
||||||
strcpy(reset.m, "n");
|
strcpy(reset.m, "n");
|
||||||
int braces = 1; /* we start with one brace opened */
|
|
||||||
|
|
||||||
str = g_string_new(NULL);
|
str = g_string_new(NULL);
|
||||||
while (**format != '\0' && braces != 0) {
|
while (**format != '\0' && braces != 0) {
|
||||||
|
@ -554,6 +554,7 @@ void gui_entry_insert_char(GUI_ENTRY_REC *entry, unichar chr)
|
|||||||
|
|
||||||
char *gui_entry_get_cutbuffer(GUI_ENTRY_REC *entry)
|
char *gui_entry_get_cutbuffer(GUI_ENTRY_REC *entry)
|
||||||
{
|
{
|
||||||
|
GUI_ENTRY_CUTBUFFER_REC *tmp;
|
||||||
char *buf;
|
char *buf;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -562,7 +563,7 @@ char *gui_entry_get_cutbuffer(GUI_ENTRY_REC *entry)
|
|||||||
if (entry->kill_ring == NULL || entry->kill_ring->data == NULL)
|
if (entry->kill_ring == NULL || entry->kill_ring->data == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
GUI_ENTRY_CUTBUFFER_REC *tmp = entry->kill_ring->data;
|
tmp = entry->kill_ring->data;
|
||||||
|
|
||||||
if (tmp->cutbuffer == NULL)
|
if (tmp->cutbuffer == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -582,12 +583,14 @@ char *gui_entry_get_cutbuffer(GUI_ENTRY_REC *entry)
|
|||||||
|
|
||||||
char *gui_entry_get_next_cutbuffer(GUI_ENTRY_REC *entry)
|
char *gui_entry_get_next_cutbuffer(GUI_ENTRY_REC *entry)
|
||||||
{
|
{
|
||||||
|
GUI_ENTRY_CUTBUFFER_REC *tmp;
|
||||||
|
|
||||||
g_return_val_if_fail(entry != NULL, NULL);
|
g_return_val_if_fail(entry != NULL, NULL);
|
||||||
|
|
||||||
if (entry->kill_ring == NULL)
|
if (entry->kill_ring == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
GUI_ENTRY_CUTBUFFER_REC *tmp = entry->kill_ring->data;
|
tmp = entry->kill_ring->data;
|
||||||
|
|
||||||
entry->kill_ring = g_slist_remove(entry->kill_ring, tmp);
|
entry->kill_ring = g_slist_remove(entry->kill_ring, tmp);
|
||||||
entry->kill_ring = g_slist_append(entry->kill_ring, tmp);
|
entry->kill_ring = g_slist_append(entry->kill_ring, tmp);
|
||||||
@ -608,7 +611,7 @@ void gui_entry_erase_to(GUI_ENTRY_REC *entry, int pos, CUTBUFFER_UPDATE_OP updat
|
|||||||
|
|
||||||
static GUI_ENTRY_CUTBUFFER_REC *get_cutbuffer_rec(GUI_ENTRY_REC *entry, CUTBUFFER_UPDATE_OP update_cutbuffer)
|
static GUI_ENTRY_CUTBUFFER_REC *get_cutbuffer_rec(GUI_ENTRY_REC *entry, CUTBUFFER_UPDATE_OP update_cutbuffer)
|
||||||
{
|
{
|
||||||
GUI_ENTRY_CUTBUFFER_REC *tmp = NULL;
|
GUI_ENTRY_CUTBUFFER_REC *tmp;
|
||||||
|
|
||||||
g_return_val_if_fail(entry != NULL, NULL);
|
g_return_val_if_fail(entry != NULL, NULL);
|
||||||
|
|
||||||
|
@ -696,10 +696,11 @@ static void key_append_next_kill(void)
|
|||||||
|
|
||||||
static gboolean paste_timeout(gpointer data)
|
static gboolean paste_timeout(gpointer data)
|
||||||
{
|
{
|
||||||
|
int split_lines;
|
||||||
paste_was_bracketed_mode = paste_bracketed_mode;
|
paste_was_bracketed_mode = paste_bracketed_mode;
|
||||||
|
|
||||||
/* number of lines after splitting extra-long messages */
|
/* number of lines after splitting extra-long messages */
|
||||||
int split_lines = paste_buffer->len / LINE_SPLIT_LIMIT;
|
split_lines = paste_buffer->len / LINE_SPLIT_LIMIT;
|
||||||
|
|
||||||
/* Take into account the fact that a line may be split every LINE_SPLIT_LIMIT characters */
|
/* Take into account the fact that a line may be split every LINE_SPLIT_LIMIT characters */
|
||||||
if (paste_line_count == 0 && split_lines <= paste_verify_line_count) {
|
if (paste_line_count == 0 && split_lines <= paste_verify_line_count) {
|
||||||
|
@ -671,8 +671,8 @@ void statusbar_item_default_handler(SBAR_ITEM_REC *item, int get_size_only,
|
|||||||
WI_ITEM_REC *wiitem;
|
WI_ITEM_REC *wiitem;
|
||||||
char *tmpstr, *tmpstr2;
|
char *tmpstr, *tmpstr2;
|
||||||
theme_rm_col reset;
|
theme_rm_col reset;
|
||||||
strcpy(reset.m, "n");
|
|
||||||
int len;
|
int len;
|
||||||
|
strcpy(reset.m, "n");
|
||||||
|
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
str = statusbar_item_get_value(item);
|
str = statusbar_item_get_value(item);
|
||||||
|
@ -28,13 +28,14 @@
|
|||||||
/* SYNTAX: IRSSIPROXY STATUS */
|
/* SYNTAX: IRSSIPROXY STATUS */
|
||||||
static void cmd_irssiproxy_status(const char *data, IRC_SERVER_REC *server)
|
static void cmd_irssiproxy_status(const char *data, IRC_SERVER_REC *server)
|
||||||
{
|
{
|
||||||
|
GSList *tmp;
|
||||||
|
|
||||||
if (!settings_get_bool("irssiproxy")) {
|
if (!settings_get_bool("irssiproxy")) {
|
||||||
printtext(server, NULL, MSGLEVEL_CLIENTNOTICE,
|
printtext(server, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||||
"Proxy is currently disabled");
|
"Proxy is currently disabled");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSList *tmp;
|
|
||||||
|
|
||||||
printtext(server, NULL, MSGLEVEL_CLIENTNOTICE,
|
printtext(server, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||||
"Proxy: Currently connected clients: %d",
|
"Proxy: Currently connected clients: %d",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user