Changeset 6893


Ignore:
Timestamp:
Oct 13, 2008, 10:45:05 PM (13 years ago)
Author:
charles
Message:

more changes inspired by spry's `winport' code: for portability, use the standard VA_ARGS macro for variadic macros instead of the CPP extensions.

Location:
trunk/libtransmission
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r6842 r6893  
    6060#endif
    6161
    62 #define dbgmsg( fmt... ) tr_deepLog( __FILE__, __LINE__, NULL, ## fmt )
     62#define dbgmsg( ... ) tr_deepLog( __FILE__, __LINE__, NULL, __VA_ARGS__ )
    6363
    6464/**
  • trunk/libtransmission/peer-msgs.c

    r6882 r6893  
    346346}
    347347
    348 #define dbgmsg( msgs, fmt... ) myDebug( __FILE__, __LINE__, msgs, ## fmt )
     348#define dbgmsg( msgs, ... ) myDebug( __FILE__, __LINE__, msgs, __VA_ARGS__ )
    349349
    350350/**
  • trunk/libtransmission/rpc-server.c

    r6869 r6893  
    5555};
    5656
    57 #define dbgmsg( fmt ... ) tr_deepLog( __FILE__, __LINE__, MY_NAME, ## fmt )
     57#define dbgmsg( ... ) tr_deepLog( __FILE__, __LINE__, MY_NAME, __VA_ARGS__ )
    5858
    5959/**
  • trunk/libtransmission/session.c

    r6857 r6893  
    574574#define SHUTDOWN_MAX_SECONDS 30
    575575
    576 #define dbgmsg( fmt... ) tr_deepLog( __FILE__, __LINE__, NULL, ## fmt )
     576#define dbgmsg( ... ) tr_deepLog( __FILE__, __LINE__, NULL, __VA_ARGS__ )
    577577
    578578void
  • trunk/libtransmission/tracker.c

    r6832 r6893  
    119119};
    120120
    121 #define dbgmsg( name, fmt... ) tr_deepLog( __FILE__, __LINE__, name, ## fmt )
     121#define dbgmsg( name, ... ) tr_deepLog( __FILE__, __LINE__, name, __VA_ARGS__ )
    122122
    123123/***
  • trunk/libtransmission/trevent.c

    r6873 r6893  
    6767};
    6868
    69 #define dbgmsg( fmt... ) tr_deepLog( __FILE__, __LINE__, "event", ## fmt )
     69#define dbgmsg( ... ) tr_deepLog( __FILE__, __LINE__, "event", __VA_ARGS__ )
    7070
    7171static void
  • trunk/libtransmission/utils.h

    r6892 r6893  
    106106#endif
    107107
    108 #define tr_nerr( n, a... ) tr_msg( __FILE__, __LINE__, TR_MSG_ERR, n, ## a )
    109 #define tr_ninf( n, a... ) tr_msg( __FILE__, __LINE__, TR_MSG_INF, n, ## a )
    110 #define tr_ndbg( n, a... ) tr_msg( __FILE__, __LINE__, TR_MSG_DBG, n, ## a )
    111 
    112 #define tr_torerr( tor, a... ) tr_msg( __FILE__, __LINE__, TR_MSG_ERR,\
    113                                        tor->info.name, \
    114                                        ## a )
    115 #define tr_torinf( tor, a... ) tr_msg( __FILE__, __LINE__, TR_MSG_INF,\
    116                                        tor->info.name, \
    117                                        ## a )
    118 #define tr_tordbg( tor, a... ) tr_msg( __FILE__, __LINE__, TR_MSG_DBG,\
    119                                        tor->info.name, \
    120                                        ## a )
    121 
    122 #define tr_err( a... ) tr_msg( __FILE__, __LINE__, TR_MSG_ERR, NULL, ## a )
    123 #define tr_inf( a... ) tr_msg( __FILE__, __LINE__, TR_MSG_INF, NULL, ## a )
    124 #define tr_dbg( a... ) tr_msg( __FILE__, __LINE__, TR_MSG_DBG, NULL, ## a )
     108#define tr_nerr( n, ... ) tr_msg( __FILE__, __LINE__, TR_MSG_ERR, n, __VA_ARGS__ )
     109#define tr_ninf( n, ... ) tr_msg( __FILE__, __LINE__, TR_MSG_INF, n, __VA_ARGS__ )
     110#define tr_ndbg( n, ... ) tr_msg( __FILE__, __LINE__, TR_MSG_DBG, n, __VA_ARGS__ )
     111
     112#define tr_torerr( tor, ... ) tr_msg( __FILE__, __LINE__, TR_MSG_ERR, tor->info.name, __VA_ARGS__ )
     113#define tr_torinf( tor, ... ) tr_msg( __FILE__, __LINE__, TR_MSG_INF, tor->info.name, __VA_ARGS__ )
     114#define tr_tordbg( tor, ... ) tr_msg( __FILE__, __LINE__, TR_MSG_DBG, tor->info.name, __VA_ARGS__ )
     115
     116#define tr_err( ... ) tr_msg( __FILE__, __LINE__, TR_MSG_ERR, NULL, __VA_ARGS__ )
     117#define tr_inf( ... ) tr_msg( __FILE__, __LINE__, TR_MSG_INF, NULL, __VA_ARGS__ )
     118#define tr_dbg( ... ) tr_msg( __FILE__, __LINE__, TR_MSG_DBG, NULL, __VA_ARGS__ )
    125119
    126120int            tr_wildmat( const char * text,
  • trunk/libtransmission/web.c

    r6892 r6893  
    3232#define PULSE_MSEC 100
    3333
    34 #define dbgmsg( fmt... ) tr_deepLog( __FILE__, __LINE__, "web", ## fmt )
     34#define dbgmsg( ... ) tr_deepLog( __FILE__, __LINE__, "web", __VA_ARGS__ )
    3535
    3636struct tr_web
Note: See TracChangeset for help on using the changeset viewer.