On Tue, 24 Jun 2003 21:10:47 +0530
Paras Sharma <> wrote:
> Hi ,
>
> I have one Library function DBG() - a kind wrapper kindof function
> for printf. ( it takes variable number of parameters )
>
> DBG( stringname, index, " Hello %d %s ..", i,c);
> DBG( stringname, index, " Hello %d %c %i %s ..", i,c1, j, c);
> .......
>
>
> I am using DBG at many places in the code . Now Just for testing I want
> not to call this function at run time.
> How to do it without commenting 10000s of places ..
>
> Is there any other like using some hashdefine #define DBG(ABC..)
> or some other way.
>
>
> Thanks in advance .
> Paras
>
You can comment every call to the function (as you mentioned above)
or you can subtitute the function DBG() with a dummy function like:
/*
The real DBG() function:
DBG()
{
your function code;
}
*/
/* Here is a sample dummy function: */
DBG()
{
return 0;
}
-- Wictory
|