libredwg
[Top][All Lists]
Advanced

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

Re: [libredwg] __VA_ARGS__ instead args


From: Rodrigo Rodrigues da Silva
Subject: Re: [libredwg] __VA_ARGS__ instead args
Date: Sat, 13 Mar 2010 18:04:56 -0300
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Timo, could you please post your patches to the patch tracker (instructions here: http://groups.fsf.org/wiki/LibreDWG#Hacking_and_submitting_changes)

That will help us keep track of your proposals and look at it carefully soon. I won't be able to do that until next week, sorry.

Rodrigo

Felipe Sanches wrote:
Rodrigo,
can you review that, please?

-Felipe

2010/3/4 Timo Lähde <address@hidden <mailto:address@hidden>>

    Is this patch usable for ANSI C99 compilers:

    --- a\logging.h Wed Mar  3 20:53:41 2010
    +++ b\logging.h Thu Mar  4 10:57:34 2010
    @@ -42,20 +42,20 @@
    #define HANDLER fprintf
    #define OUTPUT stderr

    -#define LOG(level, args...) \
    +#define LOG(level, ...) \
             if (DWG_LOGLEVEL >= DWG_LOGLEVEL_##level) { \
    -            HANDLER(OUTPUT, args); \
    +            HANDLER(OUTPUT, __VA_ARGS__); \
             }

    -#define LOG_ERROR(args...) \
    +#define LOG_ERROR(...) \
             if (DWG_LOGLEVEL > DWG_LOGLEVEL_ERROR) { \
                 HANDLER(OUTPUT, "ERROR: "); \
    -              LOG(ERROR, args) \
    +              LOG(ERROR, __VA_ARGS__) \
             }

    -#define LOG_INFO(args...) LOG(INFO, args)
    -#define LOG_TRACE(args...) LOG(TRACE, args)
    -#define LOG_ALL(args...) LOG(ALL, args)
    +#define LOG_INFO(...) LOG(INFO, __VA_ARGS__)
    +#define LOG_TRACE(...) LOG(TRACE, __VA_ARGS__)
    +#define LOG_ALL(...) LOG(ALL, __VA_ARGS__)


    #endif //#ifndef LOGGING_H







reply via email to

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