Menu

#6 Elimination of fprintf, stdout, stderr

open
nobody
None
5
2012-10-25
2006-05-08
Anonymous
No

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

Discussion

  • Anil Kumar

    Anil Kumar - 2007-03-21

    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.

     
  • Bjoern Doebel

    Bjoern Doebel - 2007-03-22

    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.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.