I've got the program that send many error messages to some output file using fprintf; I need to change file with stderr according to value of some environmetal variable;
the problem that I have MANY fprintf's in code, and I don't want every time do :if (strcmp(getenv("SOME_ENV_VAR","Some value"== 0) then fprintf(stderr....
else
fprintf(fp....
How can I do it once ?
Can I somehow point to stderr ?
the problem that I have MANY fprintf's in code, and I don't want every time do :if (strcmp(getenv("SOME_ENV_VAR","Some value"== 0) then fprintf(stderr....
else
fprintf(fp....
How can I do it once ?
Can I somehow point to stderr ?