Xref: utzoo comp.lang.c:28440 comp.unix.wizards:21803 alt.sources:1837 comp.sources.d:5263 misc.misc:9668 Path: utzoo!mnetor!geac!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!crdgw1!passaret From: passaret@brahe.crd.ge.com ("Mr. Mike" Passaretti) Newsgroups: comp.lang.c,comp.unix.wizards,alt.sources,comp.sources.d,misc.misc Subject: Re: #define DEBUG... (using printf for debugging) Message-ID: <7377@crdgw1.crd.ge.com> Date: 4 May 90 13:18:42 GMT References: <11290@hoptoad.uucp> <40628@cornell.UUCP> Sender: news@crdgw1.crd.ge.com Reply-To: Followup-To: comp.lang.c Organization: GE Corporate Research & Development Lines: 82 In-reply-to: gordon@mimir.cs.cornell.edu's message of 3 May 90 14:50:35 GMT In article <40628@cornell.UUCP> gordon@mimir.cs.cornell.edu (Jeffrey Adam Gordon) writes: # # I want to have a DEBUG flag which controls whether diagnostic printfs # are executed or not. # # [....] # # - Jeff Fred Fish has produced an excellent set of macros for C which do just this and a lot more. The basic form of use is as follows (forgive me if this is a bit long). #include "dbug.h" main(argc, argv) int argc; char *argv[]; { int foo; DBUG_ENTER("main"); DBUG_PROCESS(argv[0]); for (i=1;imain ->bar_bar_bar -blah_blah_blah -