+my %connected;
+# $connected{"toto"} is defined if XBT_LOG_CONNECT("toto") is used
+
+sub cleanup_ctn {
+ my $ctn = shift; # cleanup the content of a macro call
+ $ctn =~ s/^\s*(.*)\s*$/$1/gs;
+ my @elms;
+ print "ctn=$ctn\n" if $debug > 1;
+ if ($ctn =~ m/^(\w+)\s*,\s*(\w+)\s*,\s*"?([^"]*)"?$/s) {
+ # Perfect, we got 0->name; 1->anc; 2->desc
+ $elms[0] = $1;
+ $elms[1] = $2;
+ $elms[2] = $3;
+ } elsif ($ctn =~ m/^(\w+)\s*,\s*"?([^"]*)"?$/s) {
+ # Mmm. got no ancestor. Add the default one.
+ $elms[0] = $1;
+ $elms[1] = "XBT_LOG_ROOT_CAT";
+ $elms[2] = $2;
+ } else {
+ die "Unparsable content: $ctn\n";
+ }
+ $elms[2] =~ s/\\\\/\\/gs;
+ return @elms;
+}
+