summaryrefslogtreecommitdiff
path: root/src/core/signals.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-07-16 20:18:05 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-07-16 20:18:05 +0000
commitc2397475c5105dc6d5db1fac0ee1d8f33b77b237 (patch)
tree0076cdb290a2c15627812f94c117d6c4d621ea85 /src/core/signals.c
parent2a1052bbcef9318e42df9a87cc4cfb9fe8ef5a40 (diff)
downloadirssi-c2397475c5105dc6d5db1fac0ee1d8f33b77b237.zip
Cleaned up code.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@480 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/signals.c')
-rw-r--r--src/core/signals.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/core/signals.c b/src/core/signals.c
index cfc0da37..1b62f55c 100644
--- a/src/core/signals.c
+++ b/src/core/signals.c
@@ -43,7 +43,8 @@ static SIGNAL_REC *first_signal_rec, *last_signal_rec; /* "signal" and "last sig
static SIGNAL_REC *current_emitted_signal;
/* bind a signal */
-void signal_add_to(const char *module, int pos, const char *signal, SIGNAL_FUNC func)
+void signal_add_to(const char *module, int pos, const char *signal,
+ SIGNAL_FUNC func)
{
SIGNAL_REC *rec;
int signal_id;
@@ -104,7 +105,8 @@ static int signal_list_find(GPtrArray *array, void *data)
return -1;
}
-static void signal_remove_from_list(SIGNAL_REC *rec, int signal_id, int list, int index)
+static void signal_remove_from_list(SIGNAL_REC *rec, int signal_id,
+ int list, int index)
{
if (rec->emitting) {
g_ptr_array_index(rec->siglist[list], index) = NULL;
@@ -118,7 +120,8 @@ static void signal_remove_from_list(SIGNAL_REC *rec, int signal_id, int list, in
}
/* Remove signal from emit lists */
-static int signal_remove_from_lists(SIGNAL_REC *rec, int signal_id, SIGNAL_FUNC func)
+static int signal_remove_from_lists(SIGNAL_REC *rec, int signal_id,
+ SIGNAL_FUNC func)
{
int n, index;
@@ -149,9 +152,13 @@ void signal_remove(const char *signal, SIGNAL_FUNC func)
signal_id = signal_get_uniq_id(signal);
rec = g_hash_table_lookup(signals, GINT_TO_POINTER(signal_id));
- found = rec == NULL ? 0 : signal_remove_from_lists(rec, signal_id, func);
+ found = rec == NULL ? 0 :
+ signal_remove_from_lists(rec, signal_id, func);
- if (!found) g_warning("signal_remove() : signal \"%s\" isn't grabbed for %p", signal, func);
+ if (!found) {
+ g_warning("signal_remove() : signal \"%s\" isn't "
+ "grabbed for %p", signal, func);
+ }
}
/* Remove all NULL functions from signal list */