david@bdt.UUCP (David Beckemeyer) (11/09/89)
I'm posting this for someone else. He can't post to this group, but you can reply to him with e-mail as "albert_dayes@bdt.UUCP" or "{ucbvax,uunet}!unisoft!bdt!albert_dayes" He is looking for C source to a flow chart maker for C. -- David Beckemeyer (david@bdt.UUCP) | "Lester Moore - Four slugs from a .44 Beckemeyer Development Tools | no Les, no more." 478 Santa Clara Ave. Oakland, CA 94610 | - Headstone at Boot Hill UUCP: {uunet,ucbvax}!unisoft!bdt!david | Tombstone, AZ
bruce@hpihoah.HP.COM (Bruce LaVigne) (11/11/89)
> He is looking for C source to a flow chart maker for C.
I would also be interested in finding such a tool
-bruce
Bruce LaVigne
ARPA: bruce%hpda@hplabs.hp.com
UUCP: {ucbvax,hplabs}!hpda!bruce
USnail: c/o Hewlett-Packard m/s 42L8
19447 Pruneridge Avenue
Cupertino, CA 95014
Phone: (408)447-6279 work
lee@sq.sq.com (Liam R. E. Quin) (11/19/89)
(sorry to post this, but the original article has expired and the
followup doesn't include the address...)
Although I don't normally produce flow charts, we are stuck with having
to do COBOL support, so the Cobol Person has to do flow charts.
We use pic (actually sqpic, but that is another story) to draw the
flow charts.
Now, that doesn't helo going from C to a flow chart. I would suggest
that if you are doing this as a programming aid, forget it.
If (as I suspect) you are doing it as a Mangagement Tool, look at cflow.
This only reports calls to functions, but for a typical medium-to-large
C program, that is more than enough.
A cflow-to-pic awk script should be simple to write.
I'd be happy to try and help more, if you mail me, but not an arbitrary
C flowcharter.
ASIDE:
I commonly use pointers to functions, which completely
defeat flow charts anyway. How do you represent
Handle(Obj)
t_Object *Obj;
{
int (* f)();
f = FunctionTable[Obj->Type]; /* f now points to a function */
return (*f)(Obj); /* call the function */
}
This is a common construct, but there is know way to tell in advance
which function is going to be called here.
Flow charts don't really help C, because thery tend to be at too low
a level. Look at some of the other methodologies, like SSADM. There's
even a British Standard Notation (422? anyone remember the number?) which
is reasonable. You need a notation that represents looping, iteration,
recursion, selection and conditionals. And I don't mean by turning them
into goto statements!
end ASIDE.
Lee
--
Liam R. Quin, Unixsys (UK) Ltd [note: not an employee of "sq" - a visitor!]
lee@sq.com (Whilst visiting Canada from England)
lee@anduk.co.uk (Upon my return to England at Christmas)