I have core function which i can call from the customized module of the product.
function_core
is the core function which will return and integer
we have a macro in header file
#define func_cust function_core
i am calling
func_cust inside my customized code.
EDIT: but inside the core we again call some other core function
#define function_core main_core
so i cannot put in my customized code all the arguments.
i am calling this func_cust
function call in many c files.
i need to check the return value of the function function_core
like
if function_core
returns x then i want to change the return value to 0 or else same return value willl be returned.
for eg i want to define a macro like this
#define funct_cust ((function_core==x)?0:function_core)
Is this possible?
To be more specific this is what i need!!
#include<stdio.h>
#define sum_2 ((sum_1==11)?0:sum_1)
#define sum_1(a,b) sum(a,b)
int sum( int ,int);
int main()
{
int a,b,c;
a=5;
b=6;
c=sum_2(a,b);
printf("%d\n",c);
}
int sum(int x,int y)
{
return x+y;
}
this gives an error :
"test_fun.c", line 12.3: 1506-045 (S) Undeclared identifier sum_1.
i only have the access to play with this macro sum_2.