From 2ef343ba6ed7387bc21c4fd5b2cdb4d9c6109737 Mon Sep 17 00:00:00 2001 From: ccremers Date: Mon, 7 Aug 2006 09:56:55 +0000 Subject: [PATCH] - Order of claim processing now corresponds to the order in which they occur in the file. --- src/compiler.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/compiler.c b/src/compiler.c index e0a5eca..3b25f06 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -464,8 +464,24 @@ claimCreate (const System sys, const Protocol protocol, const Role role, cl->roles = NULL; cl->alwaystrue = false; cl->warnings = false; - cl->next = sys->claimlist; - sys->claimlist = cl; + + /* add the claim to the end of the current list */ + cl->next = NULL; + if (sys->claimlist == NULL) + { + sys->claimlist = cl; + } + else + { + Claimlist cl2; + + cl2 = sys->claimlist; + while (cl2->next != NULL) + { + cl2 = cl2->next; + } + cl2->next = cl; + } /* add the role event */ role->roledef = roledefAdd (role->roledef, CLAIM, label,