bug-cflow
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-cflow] cflow: --main does not work for static functions?


From: gabriele balducci
Subject: [bug-cflow] cflow: --main does not work for static functions?
Date: Fri, 14 Sep 2007 16:37:01 +0200

Hello,

apologies if I have misunderstood something.

It seems to me that cflow's `--main' option  does not behave as expected
for functions declared as static.

If I take the whoami.c example in the info docs as is and run:

myhost:265> cflow --main who_am_i whoami.c
who_am_i() <int who_am_i (void) at whoami.c:8>:
    getpwuid()
    geteuid()
    getenv()
    fprintf()
    printf()


I get what the info docs say.

However, if I change the definition of who_am_i from:

     int
     who_am_i (void)

to:

     static int
     who_am_i (void)


and rerun:

myhost:266> cflow --main who_am_i whoami.c
main() <int main (int argc,char **argv) at whoami.c:26>:
    fprintf()
    who_am_i() <int who_am_i (void) at whoami.c:8>:
        getpwuid()
        geteuid()
        getenv()
        fprintf()
        printf()

I don't get the same output as before. All works as if the `--main' option
had not been given in this case.

I'm probably missing something: I've read the docs, but I don't seem to
be able to find the reason for this different output (the only ref to
static declarations I could find is about the `-i s' option, which
however should be on by default, if I have well understood...)

If you could give me some clue, it would be warmly appreciated!

Here is the version information:

myhost:263> cflow --version
cflow (GNU cflow) 1.2
Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Sergey Poznyakoff.


Thank you very much in advance.


ciao
gabriele

-- 
Gabriele Balducci - Dipartimento di Scienze Chimiche - Via L. Giorgieri 1
I-34127 TRIESTE tel: I-040-5583957 fax: I-040-5583903 e-mail: address@hidden
Please, if possible, don't send me MS Word or PowerPoint attachments
Why? See: http://www.gnu.org/philosophy/no-word-attachments.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]