Mackila a écrit :
Rigole pas j'ai déja fait ca, voulais faire une macro avec du printf dedans, et les ... des macros c'est spécial GCC (et j'avais du codewarrior).
Attendez que je la retrouve...
edit : trouvé
patapé hein
Code :
- // LOG()
- // Utilisation :
- // LOG((const char * format, ...)) ;
- // ATTENTION A LA DOUBLE PARENTHESES !!!
- #define LOG(args) do \
- { \
- extern BYTE commandeEnCours ;\
- putstring("\rLog: " ) ; \
- printf args ; \
- fflush(stdout) ; \
- putstring("\r\n" ) ; \
- if ( !commandeEnCours ) \
- { \
- putstring(">" ) ; \
- afficheBufferEntree() ; \
- } \
- } while(0)
|
Utilisation typique :
Code :
- LOG(("free_HC_TD() : descripteur incorrect (index=%d, align=%d)", index, align)) ;
|
Bon d'accord je reconnais, ca fait bizarre, mais ca marche...
|