From f7dd4e1ad5aa5fcbb0d25240d41b05873b00acbe Mon Sep 17 00:00:00 2001 From: idgay Date: Tue, 17 Jun 2008 19:02:03 +0000 Subject: [PATCH] quick fix for commands in specs of generic components - produces large XML files --- tools/tinyos/ncc/nesdoc-py/archive.py | 3 ++- tools/tinyos/ncc/nesdoc.in | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tinyos/ncc/nesdoc-py/archive.py b/tools/tinyos/ncc/nesdoc-py/archive.py index 99f4cda3..4fcc05b1 100644 --- a/tools/tinyos/ncc/nesdoc-py/archive.py +++ b/tools/tinyos/ncc/nesdoc-py/archive.py @@ -150,7 +150,8 @@ for x in interfaces.getElementsByTagName("interface"): # and bare commands, events for x in functions.getElementsByTagName("function"): # hack: tasks don't show up with a command/event attribute - if x.hasAttribute("event") or x.hasAttribute("command"): + # don't include commands/events from interfaces + if (x.hasAttribute("event") or x.hasAttribute("command")) and (not xml_tag(x, "interface-ref")): incomponent = get1(x, "component-ref").getAttribute("qname") if speclist.has_key(incomponent): speclist[incomponent].append(x) diff --git a/tools/tinyos/ncc/nesdoc.in b/tools/tinyos/ncc/nesdoc.in index 9d8aa3d4..eaad3cbd 100644 --- a/tools/tinyos/ncc/nesdoc.in +++ b/tools/tinyos/ncc/nesdoc.in @@ -137,7 +137,7 @@ unshift @ncc_args, "-fnesc-dump=interfacedefs"; unshift @ncc_args, "-fnesc-dump=components(wiring)"; unshift @ncc_args, "-fnesc-dump=interfaces"; unshift @ncc_args, "-fnesc-dump=functions(!global())"; -unshift @ncc_args, "-fnesc-dump=referenced(interfaces,components)"; +unshift @ncc_args, "-fnesc-dump=referenced(interfaces,components,functions)"; unshift @ncc_args, "$exec_prefix/bin/ncc"; print STDERR join(' ', @ncc_args), "\n" if $verbose; -- 2.39.2