(trunk) copyediting: remove some unneeded #includes, and annotate some needed ones

This commit is contained in:
Jordan Lee 2011-03-24 21:49:42 +00:00
parent 433da8df9a
commit 375694eda9
32 changed files with 32 additions and 58 deletions

View File

@ -22,10 +22,9 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h> /* fprintf() */
#include <stdlib.h> /* atoi() */
#include <string.h> /* memcmp() */
#include <signal.h>
#include <libtransmission/transmission.h>

View File

@ -13,7 +13,7 @@
#include <errno.h>
#include <stdio.h> /* printf */
#include <stdlib.h> /* exit, atoi */
#include <string.h> /* strcmp */
#include <string.h> /* strerror() */
#include <fcntl.h> /* open */
#include <signal.h>

View File

@ -20,7 +20,7 @@
#endif
#include <errno.h>
#include <string.h> /* strstr */
#include <string.h> /* strlen() */
#include <stdio.h> /* perror() */
#include <dirent.h> /* readdir */

View File

@ -24,7 +24,7 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h> /* strtol() */
#include <string.h>
#include <unistd.h>

View File

@ -10,10 +10,9 @@
* $Id$
*/
#include <assert.h>
#include <stddef.h>
#include <stdio.h> /* sscanf */
#include <stdlib.h>
#include <stdio.h> /* sscanf() */
#include <stdlib.h> /* abort() */
#include <glib/gi18n.h>
#include <gtk/gtk.h>

View File

@ -12,7 +12,6 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>

View File

@ -26,7 +26,7 @@
#include <signal.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h> /* exit() */
#include <sys/param.h>
#include <time.h>
#include <unistd.h>

View File

@ -10,8 +10,6 @@
* $Id$
*/
#include <string.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>

View File

@ -10,7 +10,7 @@
* $Id$
*/
#include <string.h>
#include <string.h> /* strcmp() */
#ifdef HAVE_LIBCANBERRA
#include <canberra-gtk.h>

View File

@ -10,7 +10,6 @@
* $Id$
*/
#include <string.h> /* strcmp() */
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libtransmission/transmission.h>

View File

@ -12,7 +12,7 @@
#include <ctype.h> /* isspace */
#include <limits.h> /* USHRT_MAX */
#include <stdlib.h> /* free() */
#include <string.h> /* strcmp() */
#include <unistd.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>

View File

@ -13,8 +13,7 @@
#include <ctype.h> /* isxdigit() */
#include <errno.h>
#include <stdarg.h>
#include <stdlib.h> /* free() */
#include <string.h> /* strcmp() */
#include <string.h> /* strchr(), strrchr(), strlen(), strncmp(), strstr() */
#include <sys/types.h> /* for gtr_lockfile()'s open() */
#include <sys/stat.h> /* for gtr_lockfile()'s open() */
@ -888,6 +887,6 @@ gtr_label_set_text( GtkLabel * lb, const char * newstr )
{
const char * oldstr = gtk_label_get_text( lb );
if( ( oldstr == NULL ) || strcmp( oldstr, newstr ) )
if( tr_strcmp0( oldstr, newstr ) )
gtk_label_set_text( lb, newstr );
}

View File

@ -68,7 +68,6 @@ SOFTWARE.
#include <string.h>
#include <locale.h>
#include <stdarg.h> /* some 1.4.x versions of evutil.h need this */
#include <event2/util.h> /* evutil_strtoll() */
#include "JSON_parser.h"

View File

@ -11,7 +11,7 @@
*/
#include <assert.h>
#include <limits.h>
#include <limits.h> /* INT_MAX */
#include <stdio.h>
#include <stdlib.h> /* qsort() */
#include <string.h> /* strcmp(), memcpy() */

View File

@ -1,6 +1,4 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "transmission.h"
#include "blocklist.h"
#include "net.h"

View File

@ -10,10 +10,14 @@
* $Id$
*/
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h> /* qsort(), free() */
#include <stdlib.h> /* bsearch(), qsort() */
#include <string.h>
#include <unistd.h> /* unlink() */
#ifdef WIN32
#include <w32api.h>
#define WINVER WindowsXP
@ -28,8 +32,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <assert.h>
#include "transmission.h"
#include "platform.h"

View File

@ -1,5 +1,4 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "transmission.h"
#include "clients.h"

View File

@ -13,7 +13,6 @@
/* thanks amc1! */
#include <ctype.h> /* isprint() */
#include <stdio.h>
#include <stdlib.h> /* strtol() */
#include <string.h>

View File

@ -12,10 +12,10 @@
#include <assert.h>
#include <inttypes.h> /* uint8_t */
#include <limits.h> /* for INT_MAX */
#include <limits.h> /* INT_MAX */
#include <stdarg.h>
#include <stdlib.h> /* for abs() */
#include <string.h> /* memcpy */
#include <stdlib.h> /* abs() */
#include <string.h> /* memcpy(), memset(), strcmp() */
#include <openssl/bn.h>
#include <openssl/dh.h>

View File

@ -24,8 +24,6 @@
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef SYS_DARWIN
#include <fcntl.h>
@ -47,7 +45,7 @@
#include <sys/resource.h> /* getrlimit */
#endif
#include <fcntl.h> /* O_LARGEFILE posix_fadvise */
#include <unistd.h>
#include <unistd.h> /* lseek(), write(), ftruncate(), pread(), pwrite(), etc */
#include "transmission.h"
#include "fdlimit.h"

View File

@ -15,7 +15,6 @@
#include <inttypes.h>
#include <limits.h> /* UCHAR_MAX */
#include <string.h>
#include <stdio.h>
#include <event2/event.h>

View File

@ -12,8 +12,8 @@
#include <assert.h>
#include <errno.h>
#include <stdlib.h> /* realloc */
#include <string.h> /* memcmp */
#include <stdlib.h> /* bsearch() */
#include <string.h> /* memcmp() */
#include <openssl/sha.h>

View File

@ -13,8 +13,6 @@
#include <assert.h>
#include <ctype.h>
#include <errno.h> /* EILSEQ, EINVAL */
#include <string.h>
#include <stdio.h> /* printf */
#include "JSON_parser.h"

View File

@ -18,7 +18,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <unistd.h> /* read() */
#include <dirent.h>
#include <event2/util.h> /* evutil_ascii_strcasecmp() */

View File

@ -24,8 +24,6 @@
*****************************************************************************/
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@ -40,9 +38,7 @@
#include <netinet/tcp.h>
#include <arpa/inet.h> /* inet_addr */
#include <netdb.h>
#include <fcntl.h>
#endif
#include <unistd.h>
#include <event2/util.h>
#include <libutp/utp.h>

View File

@ -14,8 +14,6 @@
#include <errno.h>
#include <limits.h> /* INT_MAX */
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#ifdef WIN32
#include <winsock2.h>

View File

@ -11,7 +11,6 @@
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <sys/types.h>

View File

@ -15,9 +15,6 @@
#include <string.h> /* memcpy */
#include <limits.h> /* INT_MAX */
#include <sys/types.h> /* open */
#include <sys/stat.h> /* open */
#include <fcntl.h> /* open */
#include <unistd.h> /* close */
#ifdef HAVE_ZLIB

View File

@ -21,11 +21,12 @@ THE SOFTWARE.
*/
#include <unistd.h>
#include <assert.h>
#include <string.h> /* memcmp(), memcpy(), memset() */
#include <stdlib.h> /* malloc(), free() */
#include <unistd.h> /* close() */
#include <event2/event.h>
#include "transmission.h"

View File

@ -22,9 +22,9 @@ THE SOFTWARE.
*/
#include <assert.h>
#include <unistd.h>
#include <event2/event.h>
#include <libutp/utp.h>
#include "transmission.h"

View File

@ -12,9 +12,7 @@
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <signal.h>
@ -125,7 +123,7 @@ piperead( int s, char *buf, int len )
#define pipewrite(a,b,c) write(a,b,c)
#endif
#include <unistd.h>
#include <unistd.h> /* read(), write(), pipe() */
#include "transmission.h"
#include "platform.h"

View File

@ -22,7 +22,7 @@
#endif
#include <assert.h>
#include <ctype.h> /* isalpha(), tolower() */
#include <ctype.h> /* isdigit(), isalpha(), tolower() */
#include <errno.h>
#include <float.h> /* DBL_EPSILON */
#include <locale.h> /* localeconv() */
@ -40,7 +40,7 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h> /* stat(), getcwd(), getpagesize() */
#include <unistd.h> /* stat(), getcwd(), getpagesize(), unlink() */
#include <event2/buffer.h>
#include <event2/event.h>