I dont know if it is possible.
I want to write some line that says to my compiler that where he find 'myfunction' use '\\myfunction'. So I could get to disable some calls.
Any idea.
Thanks
What you are searching for is the replace function that almost any text editor offers. In code::blocks and in many other programs you can access it with ctrl+r.
Another option is to use macros. The trick is to have the code "call" the macro which expands to the function call. When the function call is not wanted, the macro can be redefined to be empty, so no function is called.
In the header and source files where myfunction is declared and defined, change the function name:
from:
int myfunction()
to:
int myfunction_actual()
Then, in the header file where myfunction_actual is declared, define myfunction to be a macro expanding to a call to myfunction_actual:
#define myfunction() myfunction_actual()
(The above steps allow all of the code calling the the function to remain unchanged. Just adding a macro wrapper on top of myfunction would make you identify all of the places where myfunction is called and change them to the new macro.)
When you want to skip the call to myfunction_actual, change the macro definition to be empty:
#define myfunction()
If myfunction has arguments (3 in the below example), the macro definition would be:
#define myfunction(X, Y, Z) myfunction_actual(X, Y, Z)
Yeah, but doing that for all functions? Makes sense for functions you sometimes want to call, and sometimes not, but sometimes you just want to comment them all out to see what happens, or to avoid using yet unimplemented functions.