From df4efb853a3d1e885db97edeb3c0d878c0d2ed64 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 20 May 2001 10:42:15 +0000 Subject: [PATCH] receiver in messages wieder rueckgaengig --- src/common/kernel/message.c | 6 +++--- src/common/util/message.c | 7 +++---- src/common/util/message.h | 5 ++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/common/kernel/message.c b/src/common/kernel/message.c index dd3a9062c..ac588644f 100644 --- a/src/common/kernel/message.c +++ b/src/common/kernel/message.c @@ -291,7 +291,7 @@ msg_error(const struct unit * u, const char * cmd, const char * name, const char } va_end(marker); - return msg_create(mtype, u->faction, (void**)args); + return msg_create(mtype, (void**)args); } message * @@ -322,7 +322,7 @@ msg_message(const char * name, const char* sig, ...) } va_end(marker); - return msg_create(mtype, NULL, (void**)args); + return msg_create(mtype, (void**)args); } message * @@ -423,7 +423,7 @@ new_message(struct faction * receiver, const char* sig, ...) } } va_end(marker); - return msg_create(mtype, receiver, (void**)args); + return msg_create(mtype, (void**)args); } static void diff --git a/src/common/util/message.c b/src/common/util/message.c index fb876b5ab..c70bf4958 100644 --- a/src/common/util/message.c +++ b/src/common/util/message.c @@ -73,11 +73,10 @@ mt_new_va(const char * name, ...) } message * -msg_create(const struct message_type * type, struct faction *receiver, void * args[]) +msg_create(const struct message_type * type, void * args[]) { int i; message * msg = (message *)malloc(sizeof(message)); - msg->receiver = receiver; msg->type = type; msg->parameters = calloc(sizeof(void*), type->nparameters); for (i=0;i!=type->nparameters;++i) { @@ -87,7 +86,7 @@ msg_create(const struct message_type * type, struct faction *receiver, void * ar } message * -msg_create_va(const struct message_type * type, struct faction *receiver, ...) +msg_create_va(const struct message_type * type, ...) /* sets a messages parameters */ { void * args[16]; @@ -98,7 +97,7 @@ msg_create_va(const struct message_type * type, struct faction *receiver, ...) args[i] = va_arg(marker, void*); } va_end(marker); - return msg_create(type, receiver, args); + return msg_create(type, args); } typedef struct messagetype_list { diff --git a/src/common/util/message.h b/src/common/util/message.h index 7ef693d3a..5802d9597 100644 --- a/src/common/util/message.h +++ b/src/common/util/message.h @@ -20,7 +20,6 @@ typedef struct message_type { } message_type; typedef struct message { - struct faction *receiver; const struct message_type * type; const void ** parameters; } message; @@ -30,8 +29,8 @@ extern struct message_type * mt_new_va(const char * name, ...); /* mt_new("simple_sentence", "subject:string", "predicate:string", * "object:string", "lang:locale", NULL); */ -extern struct message * msg_create(const struct message_type * type, struct faction *receiver, void * args[]); -extern struct message * msg_create_va(const struct message_type * type, struct faction *receiver, ...); +extern struct message * msg_create(const struct message_type * type, void * args[]); +extern struct message * msg_create_va(const struct message_type * type, ...); /* msg_create(&mt_simplesentence, "enno", "eats", "chocolate", &locale_de); * parameters must be in the same order as they were for mt_new! */ extern void msg_free(struct message *m);