summaryrefslogtreecommitdiffstats
path: root/message.c
diff options
context:
space:
mode:
authorSuper User2008-04-25 09:06:20 +0200
committerSuper User2008-04-25 09:06:20 +0200
commita130bdd9f635fc6f4a69de9592080afe3f61aab1 (patch)
tree0ca97f442b4b7d6d5250cb1f4d288579a6b6a11d /message.c
parentwork (diff)
downloadlcr-a130bdd9f635fc6f4a69de9592080afe3f61aab1.tar.gz
lcr-a130bdd9f635fc6f4a69de9592080afe3f61aab1.tar.xz
lcr-a130bdd9f635fc6f4a69de9592080afe3f61aab1.zip
struct message -> struct lcr_msg
Diffstat (limited to 'message.c')
-rw-r--r--message.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/message.c b/message.c
index e3195e3..9821265 100644
--- a/message.c
+++ b/message.c
@@ -13,15 +13,15 @@
MESSAGES
-struct message *message_first = NULL;
-struct message **messagepointer_end = &message_first;
+struct lcr_msg *message_first = NULL;
+struct lcr_msg **messagepointer_end = &message_first;
/* creates a new message with the given attributes. the message must be filled then. after filling, the message_put must be called */
-struct message *message_create(int id_from, int id_to, int flow, int type)
+struct lcr_msg *message_create(int id_from, int id_to, int flow, int type)
{
- struct message *message;
+ struct lcr_msg *message;
- message = (struct message *)MALLOC(sizeof(struct message));
+ message = (struct lcr_msg *)MALLOC(sizeof(struct lcr_msg));
if (!message)
FATAL("No memory for message.\n");
mmemuse++;
@@ -35,7 +35,7 @@ struct message *message_create(int id_from, int id_to, int flow, int type)
}
/* attaches a message to the end of the message chain */
-void message_put(struct message *message)
+void message_put(struct lcr_msg *message)
{
if (message->id_to == 0)
{
@@ -51,12 +51,12 @@ void message_put(struct message *message)
messagepointer_end = &(message->next);
}
-struct message *message_forward(int id_from, int id_to, int flow, union parameter *param)
+struct lcr_msg *message_forward(int id_from, int id_to, int flow, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
/* get point to message */
- message = (struct message *)((unsigned long)param - ((unsigned long)(&message->param) - (unsigned long)message));
+ message = (struct lcr_msg *)((unsigned long)param - ((unsigned long)(&message->param) - (unsigned long)message));
/* protect, so forwarded messages are not freed after handling */
message->keep = 1;
@@ -70,9 +70,9 @@ struct message *message_forward(int id_from, int id_to, int flow, union paramete
}
/* detaches the first messages from the message chain */
-struct message *message_get(void)
+struct lcr_msg *message_get(void)
{
- struct message *message;
+ struct lcr_msg *message;
if (!message_first)
{
@@ -94,11 +94,11 @@ struct message *message_get(void)
}
/* free a message */
-void message_free(struct message *message)
+void message_free(struct lcr_msg *message)
{
if (message->keep)
return;
- FREE(message, sizeof(struct message));
+ FREE(message, sizeof(struct lcr_msg));
mmemuse--;
}