Changeset 13191


Ignore:
Timestamp:
Feb 3, 2012, 4:44:07 PM (7 years ago)
Author:
jordan
Message:

(trunk) remove trailing spaces from code lines ;)

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/cli.c

    r13047 r13191  
    227227    uint8_t     * fileContents;
    228228    size_t        fileLength;
    229     const char  * str; 
    230     char          buf[TR_PATH_MAX]; 
     229    const char  * str;
     230    char          buf[TR_PATH_MAX];
    231231
    232232    tr_formatter_mem_init( MEM_K, MEM_K_STR, MEM_M_STR, MEM_G_STR, MEM_T_STR );
  • trunk/configure.ac

    r13190 r13191  
    138138dnl file monitoring for the daemon
    139139
    140 AC_CHECK_HEADER([sys/inotify.h], 
    141                 [AC_CHECK_FUNC([inotify_init],[have_inotify="yes"],[have_inotify="no"])], 
    142                 [have_inotify="no"]) 
    143 AC_ARG_WITH([inotify], 
    144             [AS_HELP_STRING([--with-inotify],[Enable inotify support (default=auto)])], 
    145             [want_inotify=${withval}], 
    146             [want_inotify=${have_inotify}]) 
    147 if test "x$want_inotify" = "xyes" ; then 
    148     if test "x$have_inotify" = "xyes"; then 
    149       AC_DEFINE([WITH_INOTIFY],[1]) 
    150     else 
    151       AC_MSG_ERROR("inotify not found!") 
    152     fi 
    153 fi 
    154  
    155 AC_CHECK_HEADER([sys/event.h], 
    156                 [AC_CHECK_FUNC([kqueue],[have_kqueue="yes"],[have_kqueue="no"])], 
    157                 [have_kqueue="no"]) 
    158 AC_ARG_WITH([kqueue], 
    159             [AS_HELP_STRING([--with-kqueue],[Enable kqueue support (default=auto)])], 
    160             [want_kqueue=${withval}], 
    161             [want_kqueue=${have_kqueue}]) 
    162 if test "x$want_kqueue" = "xyes" ; then 
    163     if test "x$have_kqueue" = "xyes"; then 
    164       AC_DEFINE([WITH_KQUEUE],[1]) 
    165     else 
    166       AC_MSG_ERROR("kqueue not found!") 
    167     fi 
    168 fi 
     140AC_CHECK_HEADER([sys/inotify.h],
     141                [AC_CHECK_FUNC([inotify_init],[have_inotify="yes"],[have_inotify="no"])],
     142                [have_inotify="no"])
     143AC_ARG_WITH([inotify],
     144            [AS_HELP_STRING([--with-inotify],[Enable inotify support (default=auto)])],
     145            [want_inotify=${withval}],
     146            [want_inotify=${have_inotify}])
     147if test "x$want_inotify" = "xyes" ; then
     148    if test "x$have_inotify" = "xyes"; then
     149      AC_DEFINE([WITH_INOTIFY],[1])
     150    else
     151      AC_MSG_ERROR("inotify not found!")
     152    fi
     153fi
     154
     155AC_CHECK_HEADER([sys/event.h],
     156                [AC_CHECK_FUNC([kqueue],[have_kqueue="yes"],[have_kqueue="no"])],
     157                [have_kqueue="no"])
     158AC_ARG_WITH([kqueue],
     159            [AS_HELP_STRING([--with-kqueue],[Enable kqueue support (default=auto)])],
     160            [want_kqueue=${withval}],
     161            [want_kqueue=${have_kqueue}])
     162if test "x$want_kqueue" = "xyes" ; then
     163    if test "x$have_kqueue" = "xyes"; then
     164      AC_DEFINE([WITH_KQUEUE],[1])
     165    else
     166      AC_MSG_ERROR("kqueue not found!")
     167    fi
     168fi
    169169
    170170AC_CHECK_HEADERS([sys/statvfs.h \
     
    220220              [want_utp=${have_utp}])
    221221if test "x$want_utp" = "xyes" ; then
    222     if test "x$have_utp" = "xyes"; then 
     222    if test "x$have_utp" = "xyes"; then
    223223        LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
    224224        LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a"
     
    228228        AC_DEFINE([WITH_UTP],[1])
    229229        build_utp="yes"
    230     else 
    231       AC_MSG_ERROR("Unable to build uTP support -- C++ compiler not found") 
    232     fi 
    233 fi 
     230    else
     231      AC_MSG_ERROR("Unable to build uTP support -- C++ compiler not found")
     232    fi
     233fi
    234234AC_SUBST(LIBUTP_CFLAGS)
    235235AC_SUBST(LIBUTP_LIBS)
     
    244244AC_MSG_CHECKING([supported miniupnp library])
    245245upnp_version="none"
    246 ac_save_LIBS="$LIBS" 
    247 LIBS="-lminiupnpc" 
     246ac_save_LIBS="$LIBS"
     247LIBS="-lminiupnpc"
    248248# See if the OS has its miniupnp 1.5 installed
    249 AC_TRY_LINK([ 
    250     #include <stdlib.h> 
    251     #include <miniupnpc/miniupnpc.h> 
    252     #include <miniupnpc/upnpcommands.h> 
    253 ],[ 
    254     struct UPNPDev * devlist; 
    255     struct UPNPUrls    urls; 
    256     struct IGDdatas    data; 
    257     char lanaddr[16]; 
    258     char portStr[8]; 
    259     char intPort[8]; 
    260     char intClient[16]; 
    261     upnpDiscover( 2000, NULL, NULL, 0 ); 
    262     UPNP_GetValidIGD( devlist, &urls, &data, lanaddr, sizeof( lanaddr ) );  
    263     UPNP_GetSpecificPortMappingEntry( urls.controlURL, data.first.servicetype, 
    264                         portStr, "TCP", intClient, intPort ); 
    265 ],[ 
    266 AC_DEFINE(HAVE_MINIUPNP_15, 1, [Define to 1 if you have miniupnpc version 1.5]) 
     249AC_TRY_LINK([
     250    #include <stdlib.h>
     251    #include <miniupnpc/miniupnpc.h>
     252    #include <miniupnpc/upnpcommands.h>
     253],[
     254    struct UPNPDev * devlist;
     255    struct UPNPUrls    urls;
     256    struct IGDdatas    data;
     257    char lanaddr[16];
     258    char portStr[8];
     259    char intPort[8];
     260    char intClient[16];
     261    upnpDiscover( 2000, NULL, NULL, 0 );
     262    UPNP_GetValidIGD( devlist, &urls, &data, lanaddr, sizeof( lanaddr ) );
     263    UPNP_GetSpecificPortMappingEntry( urls.controlURL, data.first.servicetype,
     264                        portStr, "TCP", intClient, intPort );
     265],[
     266AC_DEFINE(HAVE_MINIUPNP_15, 1, [Define to 1 if you have miniupnpc version 1.5])
    267267upnp_version="1.5"])
    268  
     268
    269269# See if the OS has its miniupnp 1.6 installed
    270 AC_TRY_LINK([ 
    271     #include <stdlib.h> 
    272     #include <errno.h> 
    273     #include <miniupnpc/miniupnpc.h> 
    274     #include <miniupnpc/upnpcommands.h> 
    275 ],[ 
    276     struct UPNPDev * devlist; 
    277     struct UPNPUrls    urls; 
    278     struct IGDdatas    data; 
    279     char lanaddr[16]; 
    280     char portStr[8]; 
    281     char intPort[8]; 
    282     char intClient[16]; 
    283     upnpDiscover( 2000, NULL, NULL, 0, 0, &errno ); 
    284     UPNP_GetValidIGD( devlist, &urls, &data, lanaddr, sizeof( lanaddr ) );  
    285     UPNP_GetSpecificPortMappingEntry( urls.controlURL, data.first.servicetype, 
    286                         portStr, "TCP", intClient, intPort, NULL, NULL, NULL ); 
    287 ],[ 
    288 AC_DEFINE(HAVE_MINIUPNP_16, 1, [Define to 1 if you have miniupnpc version 1.6]) 
     270AC_TRY_LINK([
     271    #include <stdlib.h>
     272    #include <errno.h>
     273    #include <miniupnpc/miniupnpc.h>
     274    #include <miniupnpc/upnpcommands.h>
     275],[
     276    struct UPNPDev * devlist;
     277    struct UPNPUrls    urls;
     278    struct IGDdatas    data;
     279    char lanaddr[16];
     280    char portStr[8];
     281    char intPort[8];
     282    char intClient[16];
     283    upnpDiscover( 2000, NULL, NULL, 0, 0, &errno );
     284    UPNP_GetValidIGD( devlist, &urls, &data, lanaddr, sizeof( lanaddr ) );
     285    UPNP_GetSpecificPortMappingEntry( urls.controlURL, data.first.servicetype,
     286                        portStr, "TCP", intClient, intPort, NULL, NULL, NULL );
     287],[
     288AC_DEFINE(HAVE_MINIUPNP_16, 1, [Define to 1 if you have miniupnpc version 1.6])
    289289upnp_version="1.6"])
    290290
    291291# ... and the results of our tests
    292 LIBS="$ac_save_LIBS" 
     292LIBS="$ac_save_LIBS"
    293293AC_MSG_RESULT([$upnp_version])
    294 AM_CONDITIONAL([BUILD_MINIUPNP],[test "x$upnp_version" = "xnone"]) 
     294AM_CONDITIONAL([BUILD_MINIUPNP],[test "x$upnp_version" = "xnone"])
    295295if test "x$upnp_version" = "xnone" ; then
    296     LIBUPNP_CFLAGS="-I\$(top_srcdir)/third-party/" 
    297     LIBUPNP_LIBS="\$(top_builddir)/third-party/miniupnp/libminiupnp.a" 
    298     LIBUPNP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a" 
     296    LIBUPNP_CFLAGS="-I\$(top_srcdir)/third-party/"
     297    LIBUPNP_LIBS="\$(top_builddir)/third-party/miniupnp/libminiupnp.a"
     298    LIBUPNP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a"
    299299    dnl because this is the version that we bundle...
    300     AC_DEFINE(HAVE_MINIUPNP_16, 1, [Define to 1 if you have miniupnpc version 1.6]) 
     300    AC_DEFINE(HAVE_MINIUPNP_16, 1, [Define to 1 if you have miniupnpc version 1.6])
    301301else
    302     AC_DEFINE([SYSTEM_MINIUPNP]) 
    303     LIBUPNP_CFLAGS=""  
    304     LIBUPNP_LIBS="-lminiupnpc" 
    305     LIBUPNP_LIBS_QT="-lminiupnpc" 
    306 fi
    307 AC_SUBST(LIBUPNP_CFLAGS) 
    308 AC_SUBST(LIBUPNP_LIBS) 
    309 AC_SUBST(LIBUPNP_LIBS_QT) 
     302    AC_DEFINE([SYSTEM_MINIUPNP])
     303    LIBUPNP_CFLAGS=""
     304    LIBUPNP_LIBS="-lminiupnpc"
     305    LIBUPNP_LIBS_QT="-lminiupnpc"
     306fi
     307AC_SUBST(LIBUPNP_CFLAGS)
     308AC_SUBST(LIBUPNP_LIBS)
     309AC_SUBST(LIBUPNP_LIBS_QT)
    310310
    311311
     
    328328    PKG_CHECK_EXISTS([gtk+-3.0 >= $GTK3_MINIMUM],[gtk_version="3" with_gtk="yes"],[gtk_version="none" with_gtk="no"])
    329329fi
    330 AC_ARG_ENABLE([nls], 
     330AC_ARG_ENABLE([nls],
    331331              [AS_HELP_STRING([--enable-nls],[enable native language support])],,
    332332              [enable_nls=yes])
     
    371371    if test "x$have_libappindicator" = "xyes"; then
    372372        use_libappindicator=yes
    373         AC_DEFINE([HAVE_LIBAPPINDICATOR], 1) 
     373        AC_DEFINE([HAVE_LIBAPPINDICATOR], 1)
    374374    else
    375375        LIBAPPINDICATOR_CFLAGS=
     
    437437              [enable_lightweight=${enableval}],
    438438              [enable_lightweight="no"])
    439 if test "x$enable_lightweight" = "xyes" ; then 
     439if test "x$enable_lightweight" = "xyes" ; then
    440440  AC_DEFINE([TR_LIGHTWEIGHT],[1],[optimize libtransmission for low-resource systems])
    441 fi 
     441fi
    442442
    443443AC_ARG_ENABLE([cli],
  • trunk/libtransmission/announcer-http.c

    r12982 r13191  
    364364        const char * str;
    365365        const int benc_loaded = !tr_bencLoad( msg, msglen, &top, NULL );
    366        
     366
    367367        if( getenv( "TR_CURL_VERBOSE" ) != NULL )
    368368        {
     
    379379            }
    380380        }
    381        
     381
    382382        if( benc_loaded )
    383383        {
  • trunk/libtransmission/session.c

    r12649 r13191  
    26762676
    26772677    session->queueStalledMinutes = minutes;
    2678    
    26792678}
    26802679
     
    26872686    session->stalledEnabled = is_enabled;
    26882687}
    2689  
     2688
    26902689bool
    26912690tr_sessionGetQueueStalledEnabled( const tr_session * session )
  • trunk/libtransmission/transmission.h

    r12772 r13191  
    760760****  tr_torrentQueueMove{Top,Up,Down,Bottom}. They can be moved to
    761761****  arbitrary points in the queue with tr_torrentSetQueuePosition().
    762 **** 
     762****
    763763***/
    764764
  • trunk/libtransmission/utils.c

    r13109 r13191  
    16351635    return htonll( x );
    16361636#else
    1637     /* fallback code by bdonlan at 
    1638      * http://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/875505#875505 */ 
    1639     union { uint32_t lx[2]; uint64_t llx; } u; 
    1640     u.lx[0] = htonl(x >> 32); 
    1641     u.lx[1] = htonl(x & 0xFFFFFFFFULL); 
    1642     return u.llx; 
     1637    /* fallback code by bdonlan at
     1638     * http://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/875505#875505 */
     1639    union { uint32_t lx[2]; uint64_t llx; } u;
     1640    u.lx[0] = htonl(x >> 32);
     1641    u.lx[1] = htonl(x & 0xFFFFFFFFULL);
     1642    return u.llx;
    16431643#endif
    16441644}
     
    16501650    return ntohll( x );
    16511651#else
    1652     /* fallback code by bdonlan at 
    1653      * http://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/875505#875505 */ 
    1654     union { uint32_t lx[2]; uint64_t llx; } u; 
    1655     u.llx = x; 
    1656     return ((uint64_t)ntohl(u.lx[0]) << 32) | (uint64_t)ntohl(u.lx[1]); 
     1652    /* fallback code by bdonlan at
     1653     * http://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/875505#875505 */
     1654    union { uint32_t lx[2]; uint64_t llx; } u;
     1655    u.llx = x;
     1656    return ((uint64_t)ntohl(u.lx[0]) << 32) | (uint64_t)ntohl(u.lx[1]);
    16571657#endif
    16581658}
  • trunk/utils/edit.c

    r12851 r13191  
    243243        {
    244244            announce_list = tr_bencDictAddList( metainfo, "announce-list", 2 );
    245        
     245
    246246            if( had_announce )
    247247            {
Note: See TracChangeset for help on using the changeset viewer.