summaryrefslogtreecommitdiff
path: root/navit/callback.c
diff options
context:
space:
mode:
authorJoseph Herlant <aerostitch@users.noreply.github.com>2018-05-30 08:43:42 -0700
committerjkoan <jkoan@users.noreply.github.com>2018-05-30 17:43:42 +0200
commit567a02aa949dfa34f7b2c2246c6eb6f8818fdf01 (patch)
tree4bb102fa60f0d01db0184d1424a5fc822ba79bc9 /navit/callback.c
parentcd477eb0e05b74b8dd26aa2df2778505a3b3c37c (diff)
downloadnavit-567a02aa949dfa34f7b2c2246c6eb6f8818fdf01.tar.gz
Cleanup:global:force the re-attach the return type to the function declaration (#605)
* Cleanup:global:force the re-attach the return type to the function declaration * cleanup:global:some loose ends
Diffstat (limited to 'navit/callback.c')
-rw-r--r--navit/callback.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/navit/callback.c b/navit/callback.c
index af40a4039..271948cc8 100644
--- a/navit/callback.c
+++ b/navit/callback.c
@@ -88,20 +88,17 @@ callback_new_args(void (*func)(void), int count, ...) {
return callback_new(func, count, p);
}
-void
-callback_destroy(struct callback *cb) {
+void callback_destroy(struct callback *cb) {
g_free(cb);
}
-void
-callback_set_arg(struct callback *cb, int arg, void *p) {
+void callback_set_arg(struct callback *cb, int arg, void *p) {
if (arg < 0 || arg > cb->pcount)
return;
cb->p[arg]=p;
}
-void
-callback_list_add(struct callback_list *l, struct callback *cb) {
+void callback_list_add(struct callback_list *l, struct callback *cb) {
l->list=g_list_prepend(l->list, cb);
}
@@ -115,19 +112,16 @@ callback_list_add_new(struct callback_list *l, void (*func)(void), int pcount, v
return ret;
}
-void
-callback_list_remove(struct callback_list *l, struct callback *cb) {
+void callback_list_remove(struct callback_list *l, struct callback *cb) {
l->list=g_list_remove(l->list, cb);
}
-void
-callback_list_remove_destroy(struct callback_list *l, struct callback *cb) {
+void callback_list_remove_destroy(struct callback_list *l, struct callback *cb) {
callback_list_remove(l, cb);
g_free(cb);
}
-void
-callback_call(struct callback *cb, int pcount, void **p) {
+void callback_call(struct callback *cb, int pcount, void **p) {
int i;
void *pf[8];
if (! cb)
@@ -187,8 +181,7 @@ callback_call(struct callback *cb, int pcount, void **p) {
}
}
-void
-callback_call_args(struct callback *cb, int count, ...) {
+void callback_call_args(struct callback *cb, int count, ...) {
int i;
void **p=g_alloca(sizeof(void*)*count);
va_list ap;
@@ -199,8 +192,7 @@ callback_call_args(struct callback *cb, int count, ...) {
callback_call(cb, count, p);
}
-void
-callback_list_call_attr(struct callback_list *l, enum attr_type type, int pcount, void **p) {
+void callback_list_call_attr(struct callback_list *l, enum attr_type type, int pcount, void **p) {
GList *cbi;
struct callback *cb;
@@ -218,8 +210,7 @@ callback_list_call_attr(struct callback_list *l, enum attr_type type, int pcount
}
-void
-callback_list_call_attr_args(struct callback_list *cbl, enum attr_type type, int count, ...) {
+void callback_list_call_attr_args(struct callback_list *cbl, enum attr_type type, int count, ...) {
int i;
void **p=g_alloca(sizeof(void*)*count);
va_list ap;
@@ -230,13 +221,11 @@ callback_list_call_attr_args(struct callback_list *cbl, enum attr_type type, int
callback_list_call_attr(cbl, type, count, p);
}
-void
-callback_list_call(struct callback_list *l, int pcount, void **p) {
+void callback_list_call(struct callback_list *l, int pcount, void **p) {
callback_list_call_attr(l, attr_any, pcount, p);
}
-void
-callback_list_call_args(struct callback_list *cbl, int count, ...) {
+void callback_list_call_args(struct callback_list *cbl, int count, ...) {
int i;
void **p=g_alloca(sizeof(void*)*count);
va_list ap;
@@ -247,8 +236,7 @@ callback_list_call_args(struct callback_list *cbl, int count, ...) {
callback_list_call(cbl, count, p);
}
-void
-callback_list_destroy(struct callback_list *l) {
+void callback_list_destroy(struct callback_list *l) {
GList *cbi;
cbi=l->list;
while (cbi) {