[En-Nut-Discussion] H8/300 Question: Print Format Specifier For size_t

Harald Kipp harald.kipp at egnite.de
Wed Mar 17 18:20:09 CET 2004


In the H8 port, several format specifiers have been
changed from %X to %lX.

Example, found in app/httpserv.c

#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega103__)
         printf("[%u] Connected, %u bytes free\n", id, NutHeapAvailable());
#else
         printf("[%u] Connected, %lu bytes free\n", id, NutHeapAvailable());
#endif


Is that really required? Isn't size_t (like int) 32 bit by
default?

Harald






More information about the En-Nut-Discussion mailing list