mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04: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:
parent
9bf5ea6049
commit
ffe5bd6930
@ -71,7 +71,7 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr,
|
|||||||
|
|
||||||
if (chatnet == NULL)
|
if (chatnet == NULL)
|
||||||
chatnet = g_hash_table_lookup(optlist, "network");
|
chatnet = g_hash_table_lookup(optlist, "network");
|
||||||
|
|
||||||
conn = server_create_conn(proto != NULL ? proto->id : -1, addr,
|
conn = server_create_conn(proto != NULL ? proto->id : -1, addr,
|
||||||
atoi(portstr), chatnet, password, nick);
|
atoi(portstr), chatnet, password, nick);
|
||||||
if (proto == NULL)
|
if (proto == NULL)
|
||||||
@ -395,7 +395,7 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
|||||||
else {
|
else {
|
||||||
/* Need to rely on server_ischannel(). If the protocol
|
/* Need to rely on server_ischannel(). If the protocol
|
||||||
doesn't really know if it's channel or nick based on
|
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
|
when typing text to channels it's always sent with
|
||||||
/MSG -channel. */
|
/MSG -channel. */
|
||||||
target_type = server_ischannel(server, target) ?
|
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 ?
|
signal_emit(target != NULL && target_type == SEND_TARGET_CHANNEL ?
|
||||||
"message own_public" : "message own_private", 4,
|
"message own_public" : "message own_private", 4,
|
||||||
server, recoded, target, origtarget);
|
server, recoded, target, origtarget);
|
||||||
|
|
||||||
g_free(recoded);
|
g_free(recoded);
|
||||||
if (free_ret && target != NULL) g_free(target);
|
if (free_ret && target != NULL) g_free(target);
|
||||||
cmd_params_free(free_arg);
|
cmd_params_free(free_arg);
|
||||||
|
@ -950,10 +950,10 @@ static int eval_recursion_depth=0;
|
|||||||
static void cmd_eval(const char *data, SERVER_REC *server, void *item)
|
static void cmd_eval(const char *data, SERVER_REC *server, void *item)
|
||||||
{
|
{
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
if (eval_recursion_depth > 100)
|
if (eval_recursion_depth > 100)
|
||||||
cmd_return_error(CMDERR_EVAL_MAX_RECURSE);
|
cmd_return_error(CMDERR_EVAL_MAX_RECURSE);
|
||||||
|
|
||||||
|
|
||||||
eval_recursion_depth++;
|
eval_recursion_depth++;
|
||||||
eval_special_string(data, "", server, item);
|
eval_special_string(data, "", server, item);
|
||||||
eval_recursion_depth--;
|
eval_recursion_depth--;
|
||||||
|
@ -341,7 +341,7 @@ static char *expando_cmdchar(SERVER_REC *server, void *item, int *free_ret)
|
|||||||
|
|
||||||
/* modes of current channel, if any */
|
/* modes of current channel, if any */
|
||||||
static char *expando_chanmode(SERVER_REC *server, void *item, int *free_ret)
|
static char *expando_chanmode(SERVER_REC *server, void *item, int *free_ret)
|
||||||
{
|
{
|
||||||
char *cmode;
|
char *cmode;
|
||||||
|
|
||||||
*free_ret = FALSE;
|
*free_ret = FALSE;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
net-disconnect.c :
|
net-disconnect.c :
|
||||||
|
|
||||||
Copyright (C) 1999-2000 Timo Sirainen
|
Copyright (C) 1999-2000 Timo Sirainen
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe,
|
|||||||
else {
|
else {
|
||||||
if (rec.host4) {
|
if (rec.host4) {
|
||||||
len = strlen(rec.host4) + 1;
|
len = strlen(rec.host4) + 1;
|
||||||
g_io_channel_write_block(pipe, (void *) &len,
|
g_io_channel_write_block(pipe, (void *) &len,
|
||||||
sizeof(int));
|
sizeof(int));
|
||||||
g_io_channel_write_block(pipe, (void *) rec.host4,
|
g_io_channel_write_block(pipe, (void *) rec.host4,
|
||||||
len);
|
len);
|
||||||
|
@ -40,7 +40,7 @@ typedef struct
|
|||||||
SSL_CTX *ctx;
|
SSL_CTX *ctx;
|
||||||
unsigned int verify:1;
|
unsigned int verify:1;
|
||||||
} GIOSSLChannel;
|
} GIOSSLChannel;
|
||||||
|
|
||||||
static SSL_CTX *ssl_ctx = NULL;
|
static SSL_CTX *ssl_ctx = NULL;
|
||||||
|
|
||||||
static void irssi_ssl_free(GIOChannel *handle)
|
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;
|
GIOSSLChannel *chan = (GIOSSLChannel *)handle;
|
||||||
gint err;
|
gint err;
|
||||||
|
|
||||||
err = SSL_read(chan->ssl, buf, len);
|
err = SSL_read(chan->ssl, buf, len);
|
||||||
if(err < 0)
|
if(err < 0)
|
||||||
{
|
{
|
||||||
@ -205,7 +205,7 @@ static gboolean irssi_ssl_init(void)
|
|||||||
{
|
{
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
|
|
||||||
ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
||||||
if(!ssl_ctx)
|
if(!ssl_ctx)
|
||||||
{
|
{
|
||||||
@ -226,14 +226,14 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, const char *mycer
|
|||||||
SSL_CTX *ctx = NULL;
|
SSL_CTX *ctx = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail(handle != NULL, NULL);
|
g_return_val_if_fail(handle != NULL, NULL);
|
||||||
|
|
||||||
if(!ssl_ctx && !irssi_ssl_init())
|
if(!ssl_ctx && !irssi_ssl_init())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if(!(fd = g_io_channel_unix_get_fd(handle)))
|
if(!(fd = g_io_channel_unix_get_fd(handle)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (mycert && *mycert) {
|
if (mycert && *mycert) {
|
||||||
char *scert = NULL, *spkey = NULL;
|
char *scert = NULL, *spkey = NULL;
|
||||||
if ((ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) {
|
if ((ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) {
|
||||||
g_error("Could not allocate memory for SSL context");
|
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)
|
if (ctx == NULL)
|
||||||
ctx = ssl_ctx;
|
ctx = ssl_ctx;
|
||||||
|
|
||||||
if(!(ssl = SSL_new(ctx)))
|
if(!(ssl = SSL_new(ctx)))
|
||||||
{
|
{
|
||||||
g_warning("Failed to allocate SSL structure");
|
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 = (GIOChannel *)chan;
|
||||||
gchan->funcs = &irssi_ssl_channel_funcs;
|
gchan->funcs = &irssi_ssl_channel_funcs;
|
||||||
g_io_channel_init(gchan);
|
g_io_channel_init(gchan);
|
||||||
|
|
||||||
return gchan;
|
return gchan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 nicklist_compare(NICK_REC *p1, NICK_REC *p2, const char *nick_prefix)
|
||||||
{
|
{
|
||||||
int status1, status2;
|
int status1, status2;
|
||||||
|
|
||||||
if (p1 == NULL) return -1;
|
if (p1 == NULL) return -1;
|
||||||
if (p2 == 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;
|
status2 = 2;
|
||||||
else
|
else
|
||||||
status2 = 1;
|
status2 = 1;
|
||||||
|
|
||||||
if (status1 < status2)
|
if (status1 < status2)
|
||||||
return 1;
|
return 1;
|
||||||
else if (status1 > status2)
|
else if (status1 > status2)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return g_strcasecmp(p1->nick, p2->nick);
|
return g_strcasecmp(p1->nick, p2->nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,14 +122,14 @@ char *recode_in(const SERVER_REC *server, const char *str, const char *target)
|
|||||||
return g_strdup(str);
|
return g_strdup(str);
|
||||||
else
|
else
|
||||||
from = "UTF-8";
|
from = "UTF-8";
|
||||||
|
|
||||||
else {
|
else {
|
||||||
from = find_conversion(server, target);
|
from = find_conversion(server, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (translit && !is_translit(to))
|
if (translit && !is_translit(to))
|
||||||
to = translit_to = g_strconcat(to, "//TRANSLIT", NULL);
|
to = translit_to = g_strconcat(to, "//TRANSLIT", NULL);
|
||||||
|
|
||||||
if (from)
|
if (from)
|
||||||
recoded = g_convert_with_fallback(str, len, to, from, NULL, NULL, NULL, NULL);
|
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)
|
void recode_deinit(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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, "op", nick->op);
|
||||||
config_node_set_bool(config, node, "halfop", nick->halfop);
|
config_node_set_bool(config, node, "halfop", nick->halfop);
|
||||||
config_node_set_bool(config, node, "voice", nick->voice);
|
config_node_set_bool(config, node, "voice", nick->voice);
|
||||||
|
|
||||||
other[0] = nick->other;
|
other[0] = nick->other;
|
||||||
other[1] = '\0';
|
other[1] = '\0';
|
||||||
config_node_set_str(config, node, "other", other);
|
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);
|
conn->connect_handle = g_io_channel_unix_new(handle);
|
||||||
|
|
||||||
server = proto->server_init_connect(conn);
|
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;
|
server->session_reconnect = TRUE;
|
||||||
signal_emit("session restore server", 2, server, node);
|
signal_emit("session restore server", 2, server, node);
|
||||||
|
|
||||||
|
@ -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)
|
static void gstring_append_escaped(GString *str, const char *text, int flags)
|
||||||
{
|
{
|
||||||
char esc[4], *escpos;
|
char esc[4], *escpos;
|
||||||
|
|
||||||
escpos = esc;
|
escpos = esc;
|
||||||
if (flags & PARSE_FLAG_ESCAPE_VARS)
|
if (flags & PARSE_FLAG_ESCAPE_VARS)
|
||||||
*escpos++ = '%';
|
*escpos++ = '%';
|
||||||
@ -465,7 +465,7 @@ static void gstring_append_escaped(GString *str, const char *text, int flags)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
*escpos = '\0';
|
*escpos = '\0';
|
||||||
while (*text != '\0') {
|
while (*text != '\0') {
|
||||||
for (escpos = esc; *escpos != '\0'; escpos++) {
|
for (escpos = esc; *escpos != '\0'; escpos++) {
|
||||||
if (*text == *escpos) {
|
if (*text == *escpos) {
|
||||||
|
Loading…
Reference in New Issue
Block a user