diff options
author | Michael Vetter <g.bluehut@gmail.com> | 2014-09-11 19:10:33 +0200 |
---|---|---|
committer | Michael Vetter <g.bluehut@gmail.com> | 2014-09-11 19:10:33 +0200 |
commit | 51239925ec2931a065aeaee664793a0edbcd2c4a (patch) | |
tree | 92792766b7500f01a67d1d144c4028e699574e88 /src/fe-common | |
parent | 503cbeb330331e9ab6cf31af453f6232b10b12e2 (diff) | |
download | irssi-51239925ec2931a065aeaee664793a0edbcd2c4a.zip |
source cleanup: remove trailing whitespaces
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/chat-completion.c | 16 | ||||
-rw-r--r-- | src/fe-common/core/command-history.c | 16 | ||||
-rw-r--r-- | src/fe-common/core/fe-channels.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/fe-ignore.c | 4 | ||||
-rw-r--r-- | src/fe-common/core/fe-messages.c | 4 | ||||
-rw-r--r-- | src/fe-common/core/fe-windows.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/hilight-text.h | 2 | ||||
-rw-r--r-- | src/fe-common/core/printtext.c | 4 | ||||
-rw-r--r-- | src/fe-common/core/themes.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/wcwidth.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/window-commands.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/windows-layout.c | 2 | ||||
-rw-r--r-- | src/fe-common/irc/dcc/fe-dcc-chat-messages.c | 2 | ||||
-rw-r--r-- | src/fe-common/irc/fe-events-numeric.c | 2 | ||||
-rw-r--r-- | src/fe-common/irc/fe-irc-commands.c | 4 | ||||
-rw-r--r-- | src/fe-common/irc/fe-irc-messages.c | 6 | ||||
-rw-r--r-- | src/fe-common/irc/fe-irc-server.c | 4 | ||||
-rw-r--r-- | src/fe-common/irc/fe-whois.c | 2 |
18 files changed, 39 insertions, 39 deletions
diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c index d3e018ad..aba76b9d 100644 --- a/src/fe-common/core/chat-completion.c +++ b/src/fe-common/core/chat-completion.c @@ -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(); } diff --git a/src/fe-common/core/command-history.c b/src/fe-common/core/command-history.c index afe19aa7..37405c43 100644 --- a/src/fe-common/core/command-history.c +++ b/src/fe-common/core/command-history.c @@ -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; } diff --git a/src/fe-common/core/fe-channels.c b/src/fe-common/core/fe-channels.c index 75147fdb..aefd1034 100644 --- a/src/fe-common/core/fe-channels.c +++ b/src/fe-common/core/fe-channels.c @@ -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); diff --git a/src/fe-common/core/fe-ignore.c b/src/fe-common/core/fe-ignore.c index 96242f9e..1a0b8339 100644 --- a/src/fe-common/core/fe-ignore.c +++ b/src/fe-common/core/fe-ignore.c @@ -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); diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index 95d9a9d8..97f3d84d 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -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); diff --git a/src/fe-common/core/fe-windows.c b/src/fe-common/core/fe-windows.c index bf9d7154..1049137f 100644 --- a/src/fe-common/core/fe-windows.c +++ b/src/fe-common/core/fe-windows.c @@ -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) diff --git a/src/fe-common/core/hilight-text.h b/src/fe-common/core/hilight-text.h index d54ec4b5..1692b8ab 100644 --- a/src/fe-common/core/hilight-text.h +++ b/src/fe-common/core/hilight-text.h @@ -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); diff --git a/src/fe-common/core/printtext.c b/src/fe-common/core/printtext.c index a5eaa38f..466a2825 100644 --- a/src/fe-common/core/printtext.c +++ b/src/fe-common/core/printtext.c @@ -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); diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index d92d23fe..c0741cef 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -385,7 +385,7 @@ char *theme_format_expand_get(THEME_REC *theme, const char **format) &dummy, &dummy, 0); continue; } - + if (braces == 0) { (*format)++; break; diff --git a/src/fe-common/core/wcwidth.c b/src/fe-common/core/wcwidth.c index 4ebfaca9..80d20fa1 100644 --- a/src/fe-common/core/wcwidth.c +++ b/src/fe-common/core/wcwidth.c @@ -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 || diff --git a/src/fe-common/core/window-commands.c b/src/fe-common/core/window-commands.c index a975fe5c..61357324 100644 --- a/src/fe-common/core/window-commands.c +++ b/src/fe-common/core/window-commands.c @@ -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; diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index 65741a73..54d7dcbf 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -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); diff --git a/src/fe-common/irc/dcc/fe-dcc-chat-messages.c b/src/fe-common/irc/dcc/fe-dcc-chat-messages.c index 93e10943..45791f56 100644 --- a/src/fe-common/irc/dcc/fe-dcc-chat-messages.c +++ b/src/fe-common/irc/dcc/fe-dcc-chat-messages.c @@ -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); diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c index d1cd12d4..d6c02d9f 100644 --- a/src/fe-common/irc/fe-events-numeric.c +++ b/src/fe-common/irc/fe-events-numeric.c @@ -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); diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c index 765b5340..b380c214 100644 --- a/src/fe-common/irc/fe-irc-commands.c +++ b/src/fe-common/irc/fe-irc-commands.c @@ -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); } diff --git a/src/fe-common/irc/fe-irc-messages.c b/src/fe-common/irc/fe-irc-messages.c index a8d52745..0c83a531 100644 --- a/src/fe-common/irc/fe-irc-messages.c +++ b/src/fe-common/irc/fe-irc-messages.c @@ -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); diff --git a/src/fe-common/irc/fe-irc-server.c b/src/fe-common/irc/fe-irc-server.c index fbfe4d9d..abde1112 100644 --- a/src/fe-common/irc/fe-irc-server.c +++ b/src/fe-common/irc/fe-irc-server.c @@ -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); diff --git a/src/fe-common/irc/fe-whois.c b/src/fe-common/irc/fe-whois.c index c5726124..35f99375 100644 --- a/src/fe-common/irc/fe-whois.c +++ b/src/fe-common/irc/fe-whois.c @@ -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); |