From 4e085f0eb8dd32077bce80dc85042b413538c3d9 Mon Sep 17 00:00:00 2001 From: ccremers Date: Thu, 27 Jul 2006 10:45:26 +0000 Subject: [PATCH] - Initial knowledge displayed when running --check. --- src/compiler.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/compiler.c b/src/compiler.c index 50e4545..79f4950 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -867,7 +867,8 @@ roleCompile (Term nameterm, Tac tc) void roleKnows (Tac tc) { - thisRole->knows = termlistConcat (thisRole->knows, tacTermlist (tc->t1.tac)); + thisRole->knows = + termlistConcat (thisRole->knows, tacTermlist (tc->t1.tac)); } void @@ -1812,17 +1813,21 @@ preprocess (const System sys) * compute hidelevels */ hidelevelCompute (sys); - /* - * display initial role knowledge - */ - int showRK (Protocol p, Role r) - { - eprintf ("Role "); - termPrint (r->nameterm); - eprintf (" knows "); - termlistPrint (r->knows); - eprintf ("\n"); - } - iterateRoles (sys,showRK); + if (switches.check) + { + /* + * display initial role knowledge + */ + + int showRK (Protocol p, Role r) + { + eprintf ("Role "); + termPrint (r->nameterm); + eprintf (" knows "); + termlistPrint (r->knows); + eprintf ("\n"); + } + iterateRoles (sys, showRK); + } }