avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] code restructuring - using C99 or not?


From: Axel Wachtler
Subject: [avrdude-dev] code restructuring - using C99 or not?
Date: Fri, 20 Jul 2012 12:03:38 +0200

Hallo,

I'm currently doing some code restructuring in avrdude.

Now I want to encapsulate the fprintf(stderr, ...) statments by 
a macro, lets say PRINTF.

There are two ways to do this: 

a) C99 style:
   #define PRINTF(fmt, ...) avrdude_message(fmt, __VA_ARGS__)
   Usage: PRINTF("foo=%d", 42);

b) with double braces (works also with none C99 compilers)
   #define PRINTF(args) avrdude_message args
   Usage: PRINTF(("foo=%d", 42));

My question: Is there anybody building avrdude with a none-C99 compiler, 
e.g. MS Visual C?

Which one would be the preffered solution a) or b).

Regards Axel






reply via email to

[Prev in Thread] Current Thread [Next in Thread]