(trunk) copyediting: remove some unneeded #includes, and annotate some needed ones
This commit is contained in:
parent
433da8df9a
commit
375694eda9
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h> /* strstr */
|
||||
#include <string.h> /* strlen() */
|
||||
#include <stdio.h> /* perror() */
|
||||
|
||||
#include <dirent.h> /* readdir */
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h> /* strtol() */
|
||||
#include <string.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <string.h> /* strcmp() */
|
||||
|
||||
#ifdef HAVE_LIBCANBERRA
|
||||
#include <canberra-gtk.h>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#include <string.h> /* strcmp() */
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <libtransmission/transmission.h>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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() */
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "transmission.h"
|
||||
#include "blocklist.h"
|
||||
#include "net.h"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "transmission.h"
|
||||
#include "clients.h"
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
/* thanks amc1! */
|
||||
|
||||
#include <ctype.h> /* isprint() */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* strtol() */
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <inttypes.h>
|
||||
#include <limits.h> /* UCHAR_MAX */
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <event2/event.h>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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() */
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -22,9 +22,9 @@ THE SOFTWARE.
|
|||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <event2/event.h>
|
||||
|
||||
#include <libutp/utp.h>
|
||||
|
||||
#include "transmission.h"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue