]> granicus.if.org Git - transmission/commitdiff
(trunk) it's bad form to #include so many system headers in libtransmission/utils...
authorJordan Lee <jordan@transmissionbt.com>
Wed, 16 Mar 2011 18:04:23 +0000 (18:04 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Wed, 16 Mar 2011 18:04:23 +0000 (18:04 +0000)
24 files changed:
daemon/watch.c
gtk/filter.c
libtransmission/announcer-http.c
libtransmission/announcer-udp.c
libtransmission/announcer.c
libtransmission/bandwidth.c
libtransmission/bencode.c
libtransmission/bitset.c
libtransmission/cache.c
libtransmission/completion.c
libtransmission/history.c
libtransmission/magnet.c
libtransmission/torrent-magnet.c
libtransmission/torrent.c
libtransmission/tr-dht.c
libtransmission/tr-lpd.c
libtransmission/tr-udp.c
libtransmission/utils.c
libtransmission/utils.h
libtransmission/verify.c
libtransmission/web.c
utils/create.c
utils/edit.c
utils/show.c

index 3621798feb97fc84de49651da2cefdfd99ceb53c..488ef21c31a97b6bef009849d95f36f88890ef11 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <errno.h>
 #include <string.h> /* strstr */
+#include <stdio.h> /* perror() */
 
 #include <dirent.h> /* readdir */
 
index 967081b5288c3805e0cde51fd46897dc94125d0f..fd3ebbbbf739428954b17a759dc6860b2c044d53 100644 (file)
@@ -10,6 +10,8 @@
  * $Id$
  */
 
+#include <stdlib.h> /* qsort() */
+
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
index d787e8036788626e040d52e847447f95bf424b0d..e5798248a6351468ad0a98a2634338f7067d9967 100644 (file)
@@ -11,6 +11,9 @@
  */
 
 #include <limits.h> /* USHRT_MAX */
+#include <stdio.h> /* fprintf() */
+#include <stdlib.h> /* getenv() */
+#include <string.h> /* strchr(), memcmp(), memcpy() */
 
 #include <event2/buffer.h>
 #include <event2/http.h> /* for HTTP_OK */
index 975c1afcf53bf147f4ad4081bc38fd122716c813..72021eecf6ed3554867d18c2ed197012b8e47d55 100644 (file)
@@ -12,6 +12,8 @@
 
 #define __LIBTRANSMISSION_ANNOUNCER_MODULE___
 
+#include <string.h> /* memcpy(), memset() */
+
 #include <event2/buffer.h>
 #include <event2/dns.h>
 #include <event2/util.h>
index d4bff777dd1b3ae22c6d99a92dbc3de4ec37a5c6..862b846391b101adcf88a4f2dc1bc1e8841885ba 100644 (file)
@@ -12,6 +12,9 @@
 
 #include <assert.h>
 #include <limits.h>
+#include <stdio.h>
+#include <stdlib.h> /* qsort() */
+#include <string.h> /* strcmp(), memcpy() */
 
 #include <event2/buffer.h>
 #include <event2/event.h> /* evtimer */
index 01b7ad92812029fadb4c4d8efbd6ba34809a4d80..72cf2e0b4551e4be2b4ebc73dd97c2ab6debf1d6 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <assert.h>
 #include <limits.h>
+#include <string.h> /* memset() */
 
 #include "transmission.h"
 #include "bandwidth.h"
index e641125bf5b9959b1ff565e84873baef3c508511..353c5c4f9d9a01ad988c0d9f4fbf5d925a380615 100644 (file)
@@ -15,6 +15,7 @@
 #include <errno.h>
 #include <math.h> /* fabs() */
 #include <stdio.h> /* rename() */
+#include <stdlib.h> /* strtoul(), strtod(), realloc(), qsort(), mkstemp() */
 #include <string.h>
 
 #ifdef WIN32 /* tr_mkstemp() */
index a013556a234fb9f8262341f87911f334aa80775a..97f0239f1799142fddb33e17d920d697f2f5c49a 100644 (file)
@@ -10,6 +10,9 @@
  * $Id$
  */
 
+#include <string.h> /* memset() */
+#include <stdlib.h> /* realloc() */
+
 #include "transmission.h"
 #include "bencode.h"
 #include "bitset.h"
index d6f3b60022dfcefb49e4ddc98129dbf0b2abebd9..12730091760f852980e50ebef0069192b641a38d 100644 (file)
@@ -10,6 +10,8 @@
  * $Id$
  */
 
+#include <stdlib.h> /* qsort() */
+
 #include <event2/buffer.h>
 
 #include "transmission.h"
index 26ab97b3beeb12a1f8fcbb5d0bd7180ba2452c68..ccfd9e9159461debe1c6aab5b136c74969385d19 100644 (file)
@@ -10,6 +10,8 @@
  * $Id$
  */
 
+#include <string.h> /* memcpy() */
+
 #include "transmission.h"
 #include "completion.h"
 #include "torrent.h"
index 5ce18e816ad8b42b55707026e1299ad2fe5f9c7e..296f634f08f813cf851eccbd7303b7d35e1e2875 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include <assert.h>
+#include <string.h> /* memset() */
 
 #include "transmission.h"
 #include "history.h"
index 2e4841ea35ffacdb6c2b55123f39df60bc72ad80..991ba41a021e767e31345d8fafb89944c112ad3c 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <assert.h>
 #include <string.h> /* strchr() */
+#include <stdio.h> /* sscanf() */
 
 #include "transmission.h"
 #include "bencode.h"
index d6cf1f1ef05dd59576ed4cb72afd81ce8c4a69cf..b428f514f1df9e5bbacbcacb2b207d02084a2584 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <assert.h>
 #include <stdio.h> /* remove() */
+#include <string.h> /* memcpy(), memset(), memcmp() */
 
 #include <event2/buffer.h>
 
index 084985da0bab40855ed74aa2b54060b3bae45714..dd201df182183934689107bef73723f25d0b37a0 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdarg.h>
 #include <string.h> /* memcmp */
 #include <stdlib.h> /* qsort */
+#include <stdio.h> /* remove() */
 
 #include <event2/util.h> /* evutil_vsnprintf() */
 
index 112242e7abe56a61a725740c21e7b4a796f97231..aa5498140776cc0ab28d72153d18edb3cf286c80 100644 (file)
@@ -26,6 +26,8 @@
 /* ansi */
 #include <errno.h>
 #include <stdio.h>
+#include <string.h> /* memcpy(), memset(), memchr(), strlen() */
+#include <stdlib.h> /* atoi() */
 
 /* posix */
 #include <signal.h> /* sig_atomic_t */
index e16e3acc05cfbcc6009b41a5001aede6761d07e1..0b93fed38ff659f0bf395c733566923c1e0f6ede 100644 (file)
@@ -23,6 +23,7 @@ THE SOFTWARE.
 /* ansi */
 #include <errno.h>
 #include <stdio.h>
+#include <string.h> /* strlen(), strncpy(), strstr(), memset() */
 
 /* posix */
 #include <signal.h> /* sig_atomic_t */
index 697d04c63e0120ad48bd329f73c1ce8869810d39..2beeb1ed252fba53a717e63312580497eb01ae41 100644 (file)
@@ -23,6 +23,8 @@ THE SOFTWARE.
 
 #include <unistd.h>
 #include <assert.h>
+#include <string.h> /* memcmp(), memcpy(), memset() */
+#include <stdlib.h> /* malloc(), free() */
 
 #include <event2/event.h>
 
index 149e1c2941acf7cb1f5482c547f924b19618e944..fb250b438fa0badfa79289b73d28ad1c4f4acf26 100644 (file)
@@ -92,7 +92,7 @@ getMessageLock( void )
     return l;
 }
 
-FILE*
+void*
 tr_getLog( void )
 {
     static tr_bool initialized = FALSE;
index 7722c9d5a3a0f3fe4423dcde3e8d6d5352df9b21..208b81797bf97c1ee98d6a980bacc3e8ddd8170e 100644 (file)
@@ -15,9 +15,6 @@
 
 #include <inttypes.h>
 #include <stddef.h> /* size_t */
-#include <stdio.h> /* FILE* */
-#include <string.h> /* memcpy()* */
-#include <stdlib.h> /* malloc() */
 #include <time.h> /* time_t */
 
 #ifdef __cplusplus
@@ -189,7 +186,7 @@ void tr_msg( const char * file, int line,
 
 
 
-FILE*          tr_getLog( void );
+void* tr_getLog( void );
 
 /** @brief return true if deep logging has been enabled by the user; false otherwise */
 tr_bool tr_deepLoggingIsActive( void );
index 7ac8737226818de043fbc477d2eaaa1565535d13..c9dd57bb9d8ac68dd1592604657cdf3e50fbf5d1 100644 (file)
@@ -10,6 +10,9 @@
  * $Id$
  */
 
+#include <string.h> /* memcmp() */
+#include <stdlib.h> /* free() */
+
 #ifdef HAVE_POSIX_FADVISE
  #define _XOPEN_SOURCE 600
  #include <fcntl.h> /* posix_fadvise() */
index 15f045d86ee3ec45c576a44d9ca34e986a38d0f5..d40768bb127fa1d11c906c8eaf2f86aa8bf06c62 100644 (file)
@@ -10,6 +10,9 @@
  * $Id$
  */
 
+#include <string.h> /* strlen(), strstr() */
+#include <stdlib.h> /* getenv() */
+
 #ifdef WIN32
   #include <ws2tcpip.h>
 #else
index 10a27ddd9f8e4b157d3cfdfd56b24a6f740bacbb..65a6f574a3d99814e17d947954b865f93e820591 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <stdlib.h> /* EXIT_FAILURE */
 #include <unistd.h> /* getcwd() */
 
 #include <libtransmission/transmission.h>
index 77af5c7cd5b139a22193968a7b79f4fca68ed91a..d2ed6181cb37ba0029e3156b735dae9af20dab11 100644 (file)
@@ -11,6 +11,8 @@
  */
 
 #include <stdio.h>
+#include <string.h> /* strlen(), strstr(), strcmp() */
+#include <stdlib.h> /* EXIT_FAILURE */
 
 #include <event2/buffer.h>
 
index 7c750461ed6668fb9845709032435d54f10171ad..85a60b7ca247422168460669e0dc6d7d77fb04dc 100644 (file)
@@ -11,6 +11,8 @@
  */
 
 #include <stdio.h>
+#include <string.h> /* strcmp(), strchr(), memcmp() */
+#include <stdlib.h> /* getenv(), qsort() */
 #include <time.h>
 
 #define CURL_DISABLE_TYPECHECK /* otherwise -Wunreachable-code goes insane */