[ I changed the Subject - please remember to make a new message ]
Jan Wester wrote:
> Is where any example availble for defined of macros for lwip_platform_diag
> printout
Yes, lots in the "contrib" part of lwIP. The usual definition is:
#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
> I have try def for lwip_platform_diag but it is problem to get it work and I
> found out it is problem with variable no of arguments, it works for one
> argument (only print format string)
> if the arguments consists of format string and a integer, the input
> parameter for the function is a value of the integer, should be a pointer ?
Are you calling it yourself? All the instances that lwIP itself makes use
double brackets. Perhaps these have been forgotten.
So you can do something like:
LWIP_PLATFORM_DIAG(("foo=%d\n", foo));
which will expand to:
do {printf (foo=%d\n", foo);} while(0)
and it all works.
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users