Changeset 6489
- Timestamp:
- Aug 11, 2008, 7:05:00 PM (14 years ago)
- Location:
- branches/1.3x
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3x/cli/cli.c
r6408 r6489 66 66 static void sigHandler ( int signal ); 67 67 68 char*68 static char* 69 69 tr_strlratio( char * buf, double ratio, size_t buflen ) 70 70 { … … 438 438 } 439 439 440 const struct tr_option options[] = {440 static const struct tr_option options[] = { 441 441 { 'a', "announce", "Set the new torrent's announce URL", "a", 1, "<url>" }, 442 442 { 'b', "blocklist", "Enable peer blocklists", "b", 0, NULL }, -
branches/1.3x/daemon/daemon.c
r6409 r6489 232 232 } 233 233 234 const struct tr_option options[] = {234 static const struct tr_option options[] = { 235 235 { 'a', "acl", "Access Control List. (Default: "TR_DEFAULT_RPC_ACL")", "a", 1, "<list>" }, 236 236 { 'b', "blocklist", "Enable peer blocklists", "b", 0, NULL }, -
branches/1.3x/daemon/remote.c
r6482 r6489 683 683 char sizestr[64]; 684 684 double percent = (double)have / length; 685 const char * pristr; 685 686 strlsize( sizestr, length, sizeof( sizestr ) ); 686 const char * pristr;687 687 switch( priority ) { 688 688 case TR_PRI_LOW: pristr = "Low"; break; -
branches/1.3x/gtk/actions.c
r6358 r6489 15 15 #include <gtk/gtk.h> 16 16 #include <libtransmission/transmission.h> 17 #include "actions.h" 17 18 #include "conf.h" 18 19 #include "tr-core.h" … … 23 24 #define UNUSED G_GNUC_UNUSED 24 25 25 extern void doAction (const char * action_name, gpointer user_data ); 26 27 static TrCore * myCore = 0; 28 29 static GtkActionGroup * myGroup = 0; 26 static TrCore * myCore = NULL; 27 28 static GtkActionGroup * myGroup = NULL; 30 29 31 30 static void … … 141 140 BuiltinIconInfo; 142 141 143 const BuiltinIconInfo my_fallback_icons [] =142 static const BuiltinIconInfo my_fallback_icons [] = 144 143 { 145 144 { tr_icon_logo, "transmission" }, … … 166 165 GtkIconSet * icon_set; 167 166 168 p = gdk_pixbuf_new_from_inline( -1, my_fallback_icons[i].raw, FALSE, 0);167 p = gdk_pixbuf_new_from_inline( -1, my_fallback_icons[i].raw, FALSE, NULL ); 169 168 width = gdk_pixbuf_get_width( p ); 170 169 icon_set = gtk_icon_set_new_from_pixbuf( p ); -
branches/1.3x/gtk/actions.h
r5122 r6489 29 29 GtkWidget* action_get_widget ( const char * path ); 30 30 31 void doAction( const char * action_name, gpointer user_data ); 32 31 33 #endif -
branches/1.3x/gtk/details.c
r6402 r6489 1166 1166 }; 1167 1167 1168 GtkWidget*1168 static GtkWidget* 1169 1169 tracker_page_new( TrTorrent * gtor ) 1170 1170 { -
branches/1.3x/gtk/main.c
r6413 r6489 411 411 if( didlock && ( didinit || cf_init( configDir, &err ) ) ) 412 412 { 413 GtkWindow * win; 414 413 415 tr_handle * h = tr_sessionInitFull( 414 416 configDir, … … 445 447 446 448 /* create main window now to be a parent to any error dialogs */ 447 GtkWindow *win = GTK_WINDOW( tr_window_new( myUIManager, cbdata->core ) );449 win = GTK_WINDOW( tr_window_new( myUIManager, cbdata->core ) ); 448 450 g_signal_connect( win, "window-state-event", G_CALLBACK(windowStateChanged), cbdata ); 449 451 g_signal_connect( win, "size-allocate", G_CALLBACK(onMainWindowSizeAllocated), cbdata ); … … 1048 1050 } 1049 1051 1050 gboolean1052 static gboolean 1051 1053 updatemodel( gpointer gdata ) 1052 1054 { -
branches/1.3x/gtk/tr-core.c
r6344 r6489 1040 1040 gboolean allowHibernation; 1041 1041 tr_handle * session = tr_core_handle( core ); 1042 tr_torrent * tor = NULL; 1042 1043 1043 1044 /* allow hibernation unless we have active torrents */ 1044 1045 allowHibernation = TRUE; 1045 tr_torrent * tor = NULL;1046 1046 while(( tor = tr_torrentNext( session, tor ))) { 1047 1047 if( tr_torrentGetStatus( tor ) != TR_STATUS_STOPPED ) { -
branches/1.3x/gtk/tr-prefs.c
r6369 r6489 271 271 testing_port_cb( GtkWidget * unused UNUSED, gpointer l ) 272 272 { 273 struct test_port_data * data; 274 273 275 gtk_label_set_markup( GTK_LABEL( l ), _( "<i>Testing port...</i>" ) ); 276 274 277 /* wait three seconds to give the port forwarding time to kick in */ 275 struct test_port_data *data = g_new0( struct test_port_data, 1 );278 data = g_new0( struct test_port_data, 1 ); 276 279 data->label = l; 277 280 data->alive = g_object_get_data( G_OBJECT( l ), "alive" ); … … 419 422 if( ok && !data->abortFlag ) 420 423 { 424 char * cmd; 421 425 filename2 = g_strdup_printf( "%s.txt", filename ); 422 426 g_snprintf( data->secondary, sizeof( data->secondary ), 423 427 _( "Uncompressing blocklist..." ) ); 424 428 g_idle_add( blocklistDialogSetSecondary, data ); 425 c har * cmd = g_strdup_printf( "zcat %s > %s ", filename, filename2 );429 cmd = g_strdup_printf( "zcat %s > %s ", filename, filename2 ); 426 430 tr_dbg( "%s", cmd ); 427 431 system( cmd ); -
branches/1.3x/gtk/tr-torrent.c
r6344 r6489 228 228 tr_torrent_status_str ( TrTorrent * gtor ) 229 229 { 230 char * top = 0;230 char * top = NULL; 231 231 232 232 const tr_stat * st = tr_torrent_stat( gtor ); -
branches/1.3x/gtk/tr-window.c
r6358 r6489 102 102 #define FILTER_TOGGLES_KEY "tr-filter-toggles" 103 103 104 PrivateData*104 static PrivateData* 105 105 get_private_data( TrWindow * w ) 106 106 { … … 225 225 { 226 226 PrivateData * p = vprivate; 227 gtk_menu_popup( GTK_MENU( p->status_menu ), 0, 0, 0, 0, 0, gtk_get_current_event_time( ) );227 gtk_menu_popup( GTK_MENU( p->status_menu ), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time( ) ); 228 228 } 229 229 … … 402 402 { 403 403 if ( icon_pos == SEXY_ICON_ENTRY_PRIMARY ) 404 gtk_menu_popup ( GTK_MENU( menu ), 0, 0, 0, 0, 0, gtk_get_current_event_time( ) );404 gtk_menu_popup ( GTK_MENU( menu ), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time( ) ); 405 405 } 406 406 -
branches/1.3x/gtk/ui.h
r6118 r6489 1 const char * fallback_ui_file =1 static const char * fallback_ui_file = 2 2 "<ui>\n" 3 3 " <menubar name='main-window-menu'>\n" -
branches/1.3x/libtransmission/bencode-test.c
r6483 r6489 8 8 #define VERBOSE 0 9 9 10 int test = 0;10 static int test = 0; 11 11 12 12 #define check(A) { \ -
branches/1.3x/libtransmission/bencode.c
r6483 r6489 318 318 const uint8_t ** setme_end ) 319 319 { 320 int err; 320 321 tr_ptrArray * parentStack = tr_ptrArrayNew( ); 322 321 323 top->type = 0; /* not initialized yet */ 322 const interr = tr_bencParseImpl( buf, end, top, parentStack, setme_end );324 err = tr_bencParseImpl( buf, end, top, parentStack, setme_end ); 323 325 if( err ) 324 326 tr_bencFree( top ); 327 325 328 tr_ptrArrayFree( parentStack, NULL ); 326 329 return err; -
branches/1.3x/libtransmission/blocklist.c
r6323 r6489 81 81 } 82 82 83 b->rules = mmap( 0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0 );83 b->rules = mmap( NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0 ); 84 84 if( !b->rules ) { 85 85 tr_err( err_fmt, b->filename, tr_strerror(errno) ); -
branches/1.3x/libtransmission/clients.c
r6395 r6489 21 21 22 22 #include "transmission.h" 23 #include "clients.h" 23 24 #include "utils.h" 24 25 -
branches/1.3x/libtransmission/fdlimit.c
r6425 r6489 48 48 49 49 #include "transmission.h" 50 #include "fdlimit.h" 50 51 #include "list.h" 51 52 #include "net.h" -
branches/1.3x/libtransmission/handshake.c
r6425 r6489 970 970 } 971 971 972 void972 static void 973 973 tr_handshakeDone( tr_handshake * handshake, int isOK ) 974 974 { -
branches/1.3x/libtransmission/json-test.c
r5843 r6489 7 7 #define VERBOSE 0 8 8 9 int test = 0;9 static int test = 0; 10 10 11 11 #define check(A) { \ -
branches/1.3x/libtransmission/json.c
r6334 r6489 22 22 #include "transmission.h" 23 23 #include "bencode.h" 24 #include "json.h" 24 25 #include "ptrarray.h" 25 26 #include "utils.h" -
branches/1.3x/libtransmission/makemeta.c
r6485 r6489 383 383 tr_bencDictAddStr( &top, "comment", builder->comment ); 384 384 tr_bencDictAddStr( &top, "created by", TR_NAME "/" LONG_VERSION_STRING ); 385 tr_bencDictAddInt( &top, "creation date", time( 0) );385 tr_bencDictAddInt( &top, "creation date", time(NULL) ); 386 386 tr_bencDictAddStr( &top, "encoding", "UTF-8" ); 387 387 makeInfoDict( tr_bencDictAddDict( &top, "info", 666 ), builder ); -
branches/1.3x/libtransmission/peer-msgs.c
r6469 r6489 1975 1975 } 1976 1976 1977 tr_publisher_tag1978 tr_peerMsgsSubscribe( tr_peermsgs * peer,1979 tr_delivery_func func,1980 void * userData )1981 {1982 return tr_publisherSubscribe( peer->publisher, func, userData );1983 }1984 1985 1977 void 1986 1978 tr_peerMsgsUnsubscribe( tr_peermsgs * peer, -
branches/1.3x/libtransmission/ptrarray.c
r6425 r6489 183 183 **/ 184 184 185 int185 static int 186 186 tr_ptrArrayLowerBound( const tr_ptrArray * t, 187 187 const void * ptr, -
branches/1.3x/libtransmission/rpc-test.c
r6376 r6489 8 8 #define VERBOSE 0 9 9 10 int test = 0;10 static int test = 0; 11 11 12 12 #define check(A) { \ -
branches/1.3x/libtransmission/rpc.c
r6425 r6489 643 643 typedef const char* (handler)( tr_handle*, tr_benc*, tr_benc* ); 644 644 645 st ruct method {645 static struct method { 646 646 const char * name; 647 647 handler * func; -
branches/1.3x/libtransmission/stats.c
r6425 r6489 16 16 #include "bencode.h" 17 17 #include "platform.h" /* tr_sessionGetConfigDir() */ 18 #include "stats.h" 18 19 #include "utils.h" /* tr_buildPath */ 19 20 … … 170 171 { 171 172 const struct tr_stats_handle * stats = getStats( handle ); 173 tr_session_stats current; 172 174 assert( stats ); 173 tr_session_stats current;174 175 tr_sessionGetStats( handle, ¤t ); 175 176 addStats( setme, &stats->old, ¤t ); -
branches/1.3x/libtransmission/tracker.c
r6421 r6489 155 155 ***/ 156 156 157 tr_tracker *157 static tr_tracker * 158 158 findTracker( tr_session * session, const uint8_t * hash ) 159 159 { … … 323 323 { 324 324 tr_benc benc; 325 const int bencLoaded = !tr_bencLoad( response, responseLen, &benc, 0 ); 325 const int bencLoaded = !tr_bencLoad( response, responseLen, 326 &benc, NULL ); 326 327 publishErrorClear( t ); 327 328 if( bencLoaded && tr_bencIsDict( &benc ) ) … … 467 468 { 468 469 tr_benc benc, *files; 469 const int bencLoaded = !tr_bencLoad( response, responseLen, &benc, 0 ); 470 const int bencLoaded = !tr_bencLoad( response, responseLen, 471 &benc, NULL ); 470 472 if( bencLoaded && tr_bencDictFindDict( &benc, "files", &files ) ) 471 473 { -
branches/1.3x/libtransmission/transmission.h
r6329 r6489 433 433 int tr_sessionGetProxyPort ( const tr_session * ); 434 434 tr_proxy_type tr_sessionGetProxyType ( const tr_session * ); 435 const char* tr_sessionGetProxyUsername ( const tr_session * ); 435 436 const char* tr_sessionGetProxyPassword ( const tr_session * ); 436 437 void tr_sessionSetProxyEnabled ( tr_session *, int isEnabled ); -
branches/1.3x/libtransmission/utils-test.c
r6140 r6489 15 15 #endif 16 16 17 int test = 0;17 static int test = 0; 18 18 19 19 #define check(A) { \
Note: See TracChangeset
for help on using the changeset viewer.