Changeset 5735


Ignore:
Timestamp:
May 1, 2008, 2:05:17 PM (14 years ago)
Author:
charles
Message:

(gtk,daemon,cli) we don't need to statically link in all of libevnt, just libevent_core.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/Makefile.am

    r5673 r5735  
    1010transmissioncli_LDADD = \
    1111  $(top_builddir)/libtransmission/libtransmission.a \
    12   $(top_builddir)/third-party/libevent/libevent.la \
     12  $(top_builddir)/third-party/libevent/libevent_core.la \
    1313  $(top_builddir)/third-party/libnatpmp/libnatpmp.a \
    1414  $(top_builddir)/third-party/miniupnp/libminiupnp.a \
  • trunk/daemon/Makefile.am

    r5673 r5735  
    3232    $(top_builddir)/third-party/miniupnp/libminiupnp.a \
    3333    $(top_builddir)/third-party/libnatpmp/libnatpmp.a \
    34     $(top_builddir)/third-party/libevent/libevent.la \
     34    $(top_builddir)/third-party/libevent/libevent_core.la \
    3535    $(INTLLIBS) \
    3636    $(OPENSSL_LIBS) \
  • trunk/gtk/Makefile.am

    r5673 r5735  
    7272transmission_LDADD = \
    7373    $(top_builddir)/libtransmission/libtransmission.a \
    74     $(top_builddir)/third-party/libevent/libevent.la \
     74    $(top_builddir)/third-party/libevent/libevent_core.la \
    7575    $(top_builddir)/third-party/miniupnp/libminiupnp.a \
    7676    $(top_builddir)/third-party/libnatpmp/libnatpmp.a \
  • trunk/gtk/util.c

    r5662 r5735  
    2323 *****************************************************************************/
    2424
     25#include <ctype.h> /* isxdigit() */
    2526#include <stdarg.h>
    2627#include <stdlib.h> /* free() */
     
    224225decode_uri( const char * uri )
    225226{
    226     char * filename = evhttp_decode_uri( uri );
    227     char * ret = g_strdup( filename );
    228     free( filename );
     227    gboolean in_query = FALSE;
     228    char * ret = g_new( char, strlen( uri ) + 1 );
     229    char * out = ret;
     230    for( ; uri && *uri; ) {
     231        char ch = *uri;
     232        if( ch=='?' )
     233            in_query = TRUE;
     234        else if( ch=='+' && in_query )
     235            ch = ' ';
     236        else if( ch=='%' && isxdigit((unsigned char)uri[1])
     237                         && isxdigit((unsigned char)uri[2])) {
     238            char buf[3] = { uri[1], uri[2], '\0' };
     239            ch = (char) g_ascii_strtoull( buf, NULL, 16 );
     240            uri += 2;
     241       }
     242
     243       ++uri;
     244       *out++ = ch;
     245    }
     246
     247    *out = '\0';
    229248    return ret;
    230249}
Note: See TracChangeset for help on using the changeset viewer.