Hi Guys!!!
I am new to bytes.com and this is my first post, and unfortunately its a weird one :P
K here is it.. i have a c code which uses some pre-compiled library calls, i just want to stop the printf calls inside that library only after certain point.
Say like
void main(){
//do some stuff
printf("blah blah..");
if(condn){
LIB_call(); //don't print
}else {
LIB_call(); //Print
}
}
Well if it was not a precompiled one i could have used
#define printf if(condn){//}else{printf}
which would comment out the unwanted printf's, but its a precompiled one :(
It will be fine even if i can push the outputs to a separate file or something like that, i jus wanna separate them.
I know its weird, but after all its C, so anything can happen??
Thanks in advance.
I am new to bytes.com and this is my first post, and unfortunately its a weird one :P
K here is it.. i have a c code which uses some pre-compiled library calls, i just want to stop the printf calls inside that library only after certain point.
Say like
void main(){
//do some stuff
printf("blah blah..");
if(condn){
LIB_call(); //don't print
}else {
LIB_call(); //Print
}
}
Well if it was not a precompiled one i could have used
#define printf if(condn){//}else{printf}
which would comment out the unwanted printf's, but its a precompiled one :(
It will be fine even if i can push the outputs to a separate file or something like that, i jus wanna separate them.
I know its weird, but after all its C, so anything can happen??
Thanks in advance.
Comment