[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-cflow] cflow: static functions in inverted trees
From: |
Sergey Poznyakoff |
Subject: |
Re: [bug-cflow] cflow: static functions in inverted trees |
Date: |
Sat, 12 Nov 2016 07:51:10 +0200 |
Hi Chris,
> I've been using cflow to analyse our source trees (great tool by the
> way, thanks!), and spotted one detail that surprised me. We're most
> interested in inverted trees, where each callee lists its callers. If
> you do that, static functions aren't included in the original list of
> callees so we don't get their details. Is there a reason for that?
I'm afraid I don't quite follow you. Static functions are included by
default, for both direct and inverted graphs. A test run on the sample
wc.c source shows:
$ cflow -r cflow-1.5/doc/wc.c | head
COUNT():
getword() <int getword (FILE *fp) at ../doc/wc.c:78>:
counter() <void counter (char *file) at ../doc/wc.c:108>:
main() <int main (int argc, char **argv) at ../doc/wc.c:127>
counter() <void counter (char *file) at ../doc/wc.c:108>:
main() <int main (int argc, char **argv) at ../doc/wc.c:127>
exit():
error_print() <void error_print (int perr, char *fmt, va_list ap) at
../doc/wc.c:22>:
errf() <void errf (char *fmt, ...) at ../doc/wc.c:34>:
main() <int main (int argc, char **argv) at ../doc/wc.c:127>
Notice the errf function in the next to last line. It is defined in
wc.c as
static void
errf (char *fmt, ...)
{
Am I missing something?
Regards,
Sergey