It would be great, if you could eliminate the need for
fprintf, stdout and stderr. Because in my embedded
system I haven't got such functions.
It would be easy to achieve, if one could specify
macros or functions for these hardware related I/O
functions.
You could use e.g. PRINT_ERR("This is an error");
and I would have to implement the function PRINT_ERR
(char *str).
Regards
Michael
Anonymous
Logged In: YES
user_id=154946
Originator: NO
Not yet sure.. how this can be resolved effectively, as specifying fprintf as macro would strip ability to handle variable arguments.
Logged In: YES
user_id=1376455
Originator: NO
No. You can also have variable arguments in macros, see http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html
It is even a standard C(99) feature, so it won't tie you to a specific compiler.