1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-23 06:35:36 +00:00

Remove trailing whitespace.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4705 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-02-04 15:30:38 +00:00 committed by exg
parent 9bf5ea6049
commit ffe5bd6930
10 changed files with 25 additions and 25 deletions

View File

@ -71,7 +71,7 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr,
if (chatnet == NULL)
chatnet = g_hash_table_lookup(optlist, "network");
conn = server_create_conn(proto != NULL ? proto->id : -1, addr,
atoi(portstr), chatnet, password, nick);
if (proto == NULL)
@ -395,7 +395,7 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
else {
/* Need to rely on server_ischannel(). If the protocol
doesn't really know if it's channel or nick based on
the name, it should just assume it's nick, because
the name, it should just assume it's nick, because
when typing text to channels it's always sent with
/MSG -channel. */
target_type = server_ischannel(server, target) ?
@ -410,7 +410,7 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
signal_emit(target != NULL && target_type == SEND_TARGET_CHANNEL ?
"message own_public" : "message own_private", 4,
server, recoded, target, origtarget);
g_free(recoded);
if (free_ret && target != NULL) g_free(target);
cmd_params_free(free_arg);

View File

@ -950,10 +950,10 @@ static int eval_recursion_depth=0;
static void cmd_eval(const char *data, SERVER_REC *server, void *item)
{
g_return_if_fail(data != NULL);
if (eval_recursion_depth > 100)
if (eval_recursion_depth > 100)
cmd_return_error(CMDERR_EVAL_MAX_RECURSE);
eval_recursion_depth++;
eval_special_string(data, "", server, item);
eval_recursion_depth--;

View File

@ -341,7 +341,7 @@ static char *expando_cmdchar(SERVER_REC *server, void *item, int *free_ret)
/* modes of current channel, if any */
static char *expando_chanmode(SERVER_REC *server, void *item, int *free_ret)
{
{
char *cmode;
*free_ret = FALSE;

View File

@ -1,5 +1,5 @@
/*
net-disconnect.c :
net-disconnect.c :
Copyright (C) 1999-2000 Timo Sirainen

View File

@ -125,7 +125,7 @@ int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe,
else {
if (rec.host4) {
len = strlen(rec.host4) + 1;
g_io_channel_write_block(pipe, (void *) &len,
g_io_channel_write_block(pipe, (void *) &len,
sizeof(int));
g_io_channel_write_block(pipe, (void *) rec.host4,
len);

View File

@ -40,7 +40,7 @@ typedef struct
SSL_CTX *ctx;
unsigned int verify:1;
} GIOSSLChannel;
static SSL_CTX *ssl_ctx = NULL;
static void irssi_ssl_free(GIOChannel *handle)
@ -113,7 +113,7 @@ static GIOStatus irssi_ssl_read(GIOChannel *handle, gchar *buf, gsize len, gsize
{
GIOSSLChannel *chan = (GIOSSLChannel *)handle;
gint err;
err = SSL_read(chan->ssl, buf, len);
if(err < 0)
{
@ -205,7 +205,7 @@ static gboolean irssi_ssl_init(void)
{
SSL_library_init();
SSL_load_error_strings();
ssl_ctx = SSL_CTX_new(SSLv23_client_method());
if(!ssl_ctx)
{
@ -226,14 +226,14 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, const char *mycer
SSL_CTX *ctx = NULL;
g_return_val_if_fail(handle != NULL, NULL);
if(!ssl_ctx && !irssi_ssl_init())
return NULL;
if(!(fd = g_io_channel_unix_get_fd(handle)))
return NULL;
if (mycert && *mycert) {
if (mycert && *mycert) {
char *scert = NULL, *spkey = NULL;
if ((ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) {
g_error("Could not allocate memory for SSL context");
@ -277,7 +277,7 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, const char *mycer
if (ctx == NULL)
ctx = ssl_ctx;
if(!(ssl = SSL_new(ctx)))
{
g_warning("Failed to allocate SSL structure");
@ -303,7 +303,7 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, const char *mycer
gchan = (GIOChannel *)chan;
gchan->funcs = &irssi_ssl_channel_funcs;
g_io_channel_init(gchan);
return gchan;
}

View File

@ -360,7 +360,7 @@ GSList *nicklist_get_same_unique(SERVER_REC *server, void *id)
int nicklist_compare(NICK_REC *p1, NICK_REC *p2, const char *nick_prefix)
{
int status1, status2;
if (p1 == NULL) return -1;
if (p2 == NULL) return 1;
@ -392,12 +392,12 @@ int nicklist_compare(NICK_REC *p1, NICK_REC *p2, const char *nick_prefix)
status2 = 2;
else
status2 = 1;
if (status1 < status2)
return 1;
else if (status1 > status2)
return -1;
return g_strcasecmp(p1->nick, p2->nick);
}

View File

@ -122,14 +122,14 @@ char *recode_in(const SERVER_REC *server, const char *str, const char *target)
return g_strdup(str);
else
from = "UTF-8";
else {
from = find_conversion(server, target);
}
if (translit && !is_translit(to))
to = translit_to = g_strconcat(to, "//TRANSLIT", NULL);
if (from)
recoded = g_convert_with_fallback(str, len, to, from, NULL, NULL, NULL, NULL);
@ -200,6 +200,6 @@ void recode_init(void)
}
void recode_deinit(void)
{
{
}

View File

@ -98,7 +98,7 @@ static void session_save_nick(CHANNEL_REC *channel, NICK_REC *nick,
config_node_set_bool(config, node, "op", nick->op);
config_node_set_bool(config, node, "halfop", nick->halfop);
config_node_set_bool(config, node, "voice", nick->voice);
other[0] = nick->other;
other[1] = '\0';
config_node_set_str(config, node, "other", other);
@ -265,7 +265,7 @@ static void session_restore_server(CONFIG_NODE *node)
conn->connect_handle = g_io_channel_unix_new(handle);
server = proto->server_init_connect(conn);
server->version = g_strdup(config_node_get_str(node, "version", NULL));
server->version = g_strdup(config_node_get_str(node, "version", NULL));
server->session_reconnect = TRUE;
signal_emit("session restore server", 2, server, node);

View File

@ -451,7 +451,7 @@ char *parse_special(char **cmd, SERVER_REC *server, void *item,
static void gstring_append_escaped(GString *str, const char *text, int flags)
{
char esc[4], *escpos;
escpos = esc;
if (flags & PARSE_FLAG_ESCAPE_VARS)
*escpos++ = '%';
@ -465,7 +465,7 @@ static void gstring_append_escaped(GString *str, const char *text, int flags)
return;
}
*escpos = '\0';
*escpos = '\0';
while (*text != '\0') {
for (escpos = esc; *escpos != '\0'; escpos++) {
if (*text == *escpos) {