source cleanup: remove trailing whitespaces

This commit is contained in:
Michael Vetter 2014-09-11 19:10:33 +02:00
commit 51239925ec
44 changed files with 92 additions and 92 deletions

View file

@ -574,7 +574,7 @@ GList *completion_get_aliases(const char *word)
list = g_list_append(list, g_strdup(node->key));
}
return list;
}
@ -781,7 +781,7 @@ GList *completion_get_servers(const char *word)
for (tmp = setupservers; tmp != NULL; tmp = tmp->next) {
SERVER_SETUP_REC *rec = tmp->data;
if (g_ascii_strncasecmp(rec->address, word, len) == 0)
if (g_ascii_strncasecmp(rec->address, word, len) == 0)
list = g_list_append(list, g_strdup(rec->address));
}
@ -814,12 +814,12 @@ GList *completion_get_targets(const char *word)
list = g_list_append(list, g_strdup(node->key));
}
return list;
}
static void sig_complete_connect(GList **list, WINDOW_REC *window,
const char *word, const char *line,
const char *word, const char *line,
int *want_space)
{
g_return_if_fail(list != NULL);
@ -895,7 +895,7 @@ static void sig_complete_alias(GList **list, WINDOW_REC *window,
int *want_space)
{
const char *definition;
g_return_if_fail(list != NULL);
g_return_if_fail(word != NULL);
g_return_if_fail(line != NULL);
@ -905,7 +905,7 @@ static void sig_complete_alias(GList **list, WINDOW_REC *window,
*list = g_list_append(NULL, g_strdup(definition));
signal_stop();
}
} else {
} else {
*list = completion_get_aliases(word);
if (*list != NULL) signal_stop();
}
@ -965,7 +965,7 @@ static void sig_complete_target(GList **list, WINDOW_REC *window,
int *want_space)
{
const char *definition;
g_return_if_fail(list != NULL);
g_return_if_fail(word != NULL);
g_return_if_fail(line != NULL);
@ -975,7 +975,7 @@ static void sig_complete_target(GList **list, WINDOW_REC *window,
*list = g_list_append(NULL, g_strdup(definition));
signal_stop();
}
} else {
} else {
*list = completion_get_targets(word);
if (*list != NULL) signal_stop();
}

View file

@ -45,7 +45,7 @@ void command_history_add(HISTORY_REC *history, const char *text)
if (link != NULL && strcmp(link->data, text) == 0)
return; /* same as previous entry */
if (settings_get_int("max_command_history") < 1 ||
if (settings_get_int("max_command_history") < 1 ||
history->lines < settings_get_int("max_command_history"))
history->lines++;
else {
@ -78,12 +78,12 @@ HISTORY_REC *command_history_find_name(const char *name)
for (tmp = histories; tmp != NULL; tmp = tmp->next) {
HISTORY_REC *rec = tmp->data;
if (rec->name != NULL &&
g_ascii_strcasecmp(rec->name, name) == 0)
return rec;
}
return NULL;
}
@ -135,7 +135,7 @@ const char *command_history_next(WINDOW_REC *window, const char *text)
GList *pos;
history = command_history_current(window);
pos = history->pos;
pos = history->pos;
if (pos != NULL)
history->pos = history->pos->next;
@ -160,21 +160,21 @@ void command_history_clear_pos_func(HISTORY_REC *history, gpointer user_data)
void command_history_clear_pos(WINDOW_REC *window)
{
g_slist_foreach(histories,
g_slist_foreach(histories,
(GFunc) command_history_clear_pos_func, NULL);
}
HISTORY_REC *command_history_create(const char *name)
{
HISTORY_REC *rec;
rec = g_new0(HISTORY_REC, 1);
if (name != NULL)
rec->name = g_strdup(name);
histories = g_slist_append(histories, rec);
return rec;
}

View file

@ -403,7 +403,7 @@ static void display_sorted_nicks(CHANNEL_REC *channel, GSList *nicklist)
nickmode[0] = rec->prefixes[0];
else
nickmode[0] = ' ';
if (linebuf_size < columns[col]-item_extra+1) {
linebuf_size = (columns[col]-item_extra+1)*2;
linebuf = g_realloc(linebuf, linebuf_size);

View file

@ -65,7 +65,7 @@ static void ignore_print(int index, IGNORE_REC *rec)
}
if (rec->fullword) g_string_append(options, "-full ");
if (rec->replies) g_string_append(options, "-replies ");
if (rec->servertag != NULL)
if (rec->servertag != NULL)
g_string_append_printf(options, "-network %s ", rec->servertag);
if (rec->pattern != NULL)
g_string_append_printf(options, "-pattern %s ", rec->pattern);
@ -137,7 +137,7 @@ static void cmd_ignore(const char *data)
/* Allow -ircnet for backwards compatibility */
if (!servertag)
servertag = g_hash_table_lookup(optlist, "ircnet");
if (*mask == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
if (*levels == '\0') levels = "ALL";
level = level2bits(levels, NULL);

View file

@ -92,7 +92,7 @@ char *expand_emphasis(WI_ITEM_REC *item, const char *text)
use emphasis on them. */
int found;
char c;
char *end2;
char *end2;
/* check if _foo_ is a nick */
c = end[1];
@ -234,7 +234,7 @@ static void sig_message_public(SERVER_REC *server, const char *msg,
for_me ? TXT_PUBMSG_ME_CHANNEL :
TXT_PUBMSG_CHANNEL,
printnick, target, msg, nickmode);
}
}
g_free_not_null(nickmode);
g_free_not_null(freemsg);

View file

@ -184,7 +184,7 @@ void window_change_server(WINDOW_REC *window, void *server)
if (window->active_server != active) {
window->active_server = active;
signal_emit("window server changed", 2, window, active);
}
}
}
void window_set_refnum(WINDOW_REC *window, int refnum)

View file

@ -42,7 +42,7 @@ HILIGHT_REC *hilight_match(SERVER_REC *server, const char *channel,
HILIGHT_REC *hilight_match_nick(SERVER_REC *server, const char *channel,
const char *nick, const char *address,
int level, const char *msg);
char *hilight_get_color(HILIGHT_REC *rec);
void hilight_update_text_dest(TEXT_DEST_REC *dest, HILIGHT_REC *rec);

View file

@ -170,13 +170,13 @@ static void print_line(TEXT_DEST_REC *dest, const char *text)
g_return_if_fail(dest != NULL);
g_return_if_fail(text != NULL);
theme = window_get_theme(dest->window);
tmp = format_get_level_tag(theme, dest);
str = !theme->info_eol ? format_add_linestart(text, tmp) :
format_add_lineend(text, tmp);
g_free_not_null(tmp);
/* send both the formatted + stripped (for logging etc.) */
stripped = strip_codes(str);
signal_emit_id(signal_print_text, 3, dest, str, stripped);

View file

@ -385,7 +385,7 @@ char *theme_format_expand_get(THEME_REC *theme, const char **format)
&dummy, &dummy, 0);
continue;
}
if (braces == 0) {
(*format)++;
break;

View file

@ -187,7 +187,7 @@ int mk_wcwidth(unichar ucs)
/* if we arrive here, ucs is not a combining or C0/C1 control character */
return 1 +
return 1 +
(ucs >= 0x1100 &&
(ucs <= 0x115f || /* Hangul Jamo init. consonants */
ucs == 0x2329 || ucs == 0x232a ||

View file

@ -529,7 +529,7 @@ static void cmd_window_item_goto(const char *data, SERVER_REC *server)
GSList *tmp;
void *free_arg;
char *target;
if (!cmd_get_params(data, &free_arg, 1, &target))
return;

View file

@ -68,7 +68,7 @@ static void sig_layout_restore_item(WINDOW_REC *window, const char *type,
(SIGNAL_FUNC) signal_query_created_curwin);
restore_win = window;
protocol = chat_protocol_find(chat_type);
if (protocol == NULL)
window_bind_add(window, tag, name);

View file

@ -60,7 +60,7 @@ static void sig_message_dcc_own_action(CHAT_DCC_REC *dcc, const char *msg)
format_create_dest_tag(&dest, dcc->server, dcc->servertag, tag,
MSGLEVEL_DCCMSGS | MSGLEVEL_ACTIONS |
MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT, NULL);
printformat_dest(&dest, query != NULL ? IRCTXT_OWN_DCC_ACTION_QUERY :
IRCTXT_OWN_DCC_ACTION, dcc->mynick, dcc->id, msg);
g_free(tag);

View file

@ -118,7 +118,7 @@ static void event_who(IRC_SERVER_REC *server, const char *data)
while (*realname != '\0' && *realname != ' ') realname++;
if (*realname == ' ')
*realname++ = '\0';
recoded = recode_in(SERVER(server), realname, nick);
printformat(server, NULL, MSGLEVEL_CRAP, IRCTXT_WHO,
channel, nick, stat, hops, user, host, recoded, serv);

View file

@ -115,9 +115,9 @@ static void cmd_notice(const char *data, IRC_SERVER_REC *server,
if (*target == '\0' || *msg == '\0')
cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
signal_emit("message irc own_notice", 3, server, msg, target);
cmd_params_free(free_arg);
}

View file

@ -87,7 +87,7 @@ static void sig_message_own_public(SERVER_REC *server, const char *msg,
g_free(nickmode);
signal_stop();
}
}
/* received msg to all ops in channel */
@ -201,7 +201,7 @@ static void sig_message_irc_action(IRC_SERVER_REC *server, const char *msg,
IRCTXT_ACTION_PRIVATE_QUERY,
nick, address == NULL ? "" : address, msg);
}
g_free_not_null(freemsg);
}
@ -219,7 +219,7 @@ static void sig_message_irc_notice(SERVER_REC *server, const char *msg,
{
const char *oldtarget;
int level = MSGLEVEL_NOTICES;
oldtarget = target;
target = skip_target(IRC_SERVER(server), target);

View file

@ -63,7 +63,7 @@ static void sig_server_add_fill(IRC_SERVER_SETUP_REC *rec,
char *value;
value = g_hash_table_lookup(optlist, "network");
/* For backwards compatibility, also allow the old name 'ircnet'.
/* For backwards compatibility, also allow the old name 'ircnet'.
But of course only if -network was not given. */
if (!value)
value = g_hash_table_lookup(optlist, "ircnet");
@ -121,7 +121,7 @@ static void cmd_server_list(const char *data)
g_string_append_printf(str, "ssl_cafile: %s, ", rec->ssl_cafile);
if (rec->ssl_capath)
g_string_append_printf(str, "ssl_capath: %s, ", rec->ssl_capath);
}
if (rec->max_cmds_at_once > 0)
g_string_append_printf(str, "cmdmax: %d, ", rec->max_cmds_at_once);

View file

@ -409,7 +409,7 @@ void fe_whois_init(void)
signal_add("event 311", (SIGNAL_FUNC) event_whois);
signal_add("event 312", (SIGNAL_FUNC) event_whois_server);
/* readding this events fixes the printing of /whois -yes *
/* readding this events fixes the printing of /whois -yes *
Bug http://bugs.irssi.org/?do=details&id=123 */
signal_add("event 317", (SIGNAL_FUNC) event_whois_idle);
signal_add("event 319", (SIGNAL_FUNC) event_whois_channels);