Changeset 12223


Ignore:
Timestamp:
Mar 24, 2011, 9:49:42 PM (11 years ago)
Author:
jordan
Message:

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

Location:
trunk
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/cli.c

    r12204 r12223  
    2323 *****************************************************************************/
    2424
    25 #include <stdio.h>
    26 #include <stdlib.h>
    27 #include <string.h>
    28 #include <unistd.h>
     25#include <stdio.h> /* fprintf() */
     26#include <stdlib.h> /* atoi() */
     27#include <string.h> /* memcmp() */
    2928#include <signal.h>
    3029
  • trunk/daemon/daemon.c

    r12204 r12223  
    1414#include <stdio.h> /* printf */
    1515#include <stdlib.h> /* exit, atoi */
    16 #include <string.h> /* strcmp */
     16#include <string.h> /* strerror() */
    1717
    1818#include <fcntl.h> /* open */
  • trunk/daemon/watch.c

    r12177 r12223  
    2121
    2222#include <errno.h>
    23 #include <string.h> /* strstr */
     23#include <string.h> /* strlen() */
    2424#include <stdio.h> /* perror() */
    2525
  • trunk/gtk/conf.c

    r12204 r12223  
    2525#include <errno.h>
    2626#include <stdio.h>
    27 #include <stdlib.h>
     27#include <stdlib.h> /* strtol() */
    2828#include <string.h>
    2929
  • trunk/gtk/details.c

    r12204 r12223  
    1111 */
    1212
    13 #include <assert.h>
    1413#include <stddef.h>
    15 #include <stdio.h> /* sscanf */
    16 #include <stdlib.h>
     14#include <stdio.h> /* sscanf() */
     15#include <stdlib.h> /* abort() */
    1716#include <glib/gi18n.h>
    1817#include <gtk/gtk.h>
  • trunk/gtk/file-list.c

    r12154 r12223  
    1313#include <stddef.h>
    1414#include <stdio.h>
    15 #include <stdlib.h>
    1615#include <string.h>
    1716#include <glib/gi18n.h>
  • trunk/gtk/main.c

    r12219 r12223  
    2727#include <string.h>
    2828#include <stdio.h>
    29 #include <stdlib.h>
     29#include <stdlib.h> /* exit() */
    3030#include <sys/param.h>
    3131#include <time.h>
  • trunk/gtk/makemeta-ui.c

    r12068 r12223  
    1010 * $Id$
    1111 */
    12 
    13 #include <string.h>
    1412
    1513#include <glib/gi18n.h>
  • trunk/gtk/notify.c

    r12068 r12223  
    1111 */
    1212
    13 #include <string.h>
     13#include <string.h> /* strcmp() */
    1414
    1515#ifdef HAVE_LIBCANBERRA
  • trunk/gtk/torrent-cell-renderer.c

    r12220 r12223  
    1111 */
    1212
    13 #include <string.h> /* strcmp() */
    1413#include <gtk/gtk.h>
    1514#include <glib/gi18n.h>
  • trunk/gtk/tr-prefs.c

    r12204 r12223  
    1313#include <ctype.h> /* isspace */
    1414#include <limits.h> /* USHRT_MAX */
    15 #include <stdlib.h> /* free() */
     15#include <string.h> /* strcmp() */
    1616#include <unistd.h>
    1717#include <glib/gi18n.h>
  • trunk/gtk/util.c

    r12222 r12223  
    1414#include <errno.h>
    1515#include <stdarg.h>
    16 #include <stdlib.h> /* free() */
    17 #include <string.h> /* strcmp() */
     16#include <string.h> /* strchr(), strrchr(), strlen(), strncmp(), strstr() */
    1817
    1918#include <sys/types.h> /* for gtr_lockfile()'s open() */
     
    889888    const char * oldstr = gtk_label_get_text( lb );
    890889
    891     if( ( oldstr == NULL ) || strcmp( oldstr, newstr ) )
     890    if( tr_strcmp0( oldstr, newstr ) )
    892891        gtk_label_set_text( lb, newstr );
    893892}
  • trunk/libtransmission/JSON_parser.c

    r11588 r12223  
    6969#include <locale.h>
    7070
    71 #include <stdarg.h> /* some 1.4.x versions of evutil.h need this */
    7271#include <event2/util.h> /* evutil_strtoll() */
    7372
  • trunk/libtransmission/announcer.c

    r12204 r12223  
    1212
    1313#include <assert.h>
    14 #include <limits.h>
     14#include <limits.h> /* INT_MAX */
    1515#include <stdio.h>
    1616#include <stdlib.h> /* qsort() */
  • trunk/libtransmission/blocklist-test.c

    r12204 r12223  
    11#include <stdio.h>
    2 #include <stdlib.h>
    3 #include <string.h>
    42#include "transmission.h"
    53#include "blocklist.h"
  • trunk/libtransmission/blocklist.c

    r12204 r12223  
    1111 */
    1212
     13#include <assert.h>
     14#include <errno.h>
    1315#include <stdio.h>
    14 #include <stdlib.h> /* qsort(), free() */
     16#include <stdlib.h> /* bsearch(), qsort() */
    1517#include <string.h>
     18
     19#include <unistd.h> /* unlink() */
    1620
    1721#ifdef WIN32
     
    2933#include <sys/stat.h>
    3034#include <fcntl.h>
    31 #include <unistd.h>
    32 #include <assert.h>
    3335
    3436#include "transmission.h"
  • trunk/libtransmission/clients-test.c

    r8561 r12223  
    11#include <stdio.h>
    2 #include <stdlib.h>
    32#include <string.h>
    43#include "transmission.h"
  • trunk/libtransmission/clients.c

    r12204 r12223  
    1414
    1515#include <ctype.h> /* isprint() */
    16 #include <stdio.h>
    1716#include <stdlib.h> /* strtol() */
    1817#include <string.h>
  • trunk/libtransmission/crypto.c

    r12204 r12223  
    1313#include <assert.h>
    1414#include <inttypes.h> /* uint8_t */
    15 #include <limits.h> /* for INT_MAX */
     15#include <limits.h> /* INT_MAX */
    1616#include <stdarg.h>
    17 #include <stdlib.h> /* for abs() */
    18 #include <string.h> /* memcpy */
     17#include <stdlib.h> /* abs() */
     18#include <string.h> /* memcpy(), memset(), strcmp() */
    1919
    2020#include <openssl/bn.h>
  • trunk/libtransmission/fdlimit.c

    r12204 r12223  
    2525#include <errno.h>
    2626#include <inttypes.h>
    27 #include <stdio.h>
    28 #include <stdlib.h>
    2927#include <string.h>
    3028#ifdef SYS_DARWIN
     
    4846#endif
    4947#include <fcntl.h> /* O_LARGEFILE posix_fadvise */
    50 #include <unistd.h>
     48#include <unistd.h> /* lseek(), write(), ftruncate(), pread(), pwrite(), etc */
    5149
    5250#include "transmission.h"
  • trunk/libtransmission/handshake.c

    r12204 r12223  
    1616#include <limits.h> /* UCHAR_MAX */
    1717#include <string.h>
    18 #include <stdio.h>
    1918
    2019#include <event2/event.h>
  • trunk/libtransmission/inout.c

    r12204 r12223  
    1313#include <assert.h>
    1414#include <errno.h>
    15 #include <stdlib.h> /* realloc */
    16 #include <string.h> /* memcmp */
     15#include <stdlib.h> /* bsearch() */
     16#include <string.h> /* memcmp() */
    1717
    1818#include <openssl/sha.h>
  • trunk/libtransmission/json.c

    r12204 r12223  
    1414#include <ctype.h>
    1515#include <errno.h> /* EILSEQ, EINVAL */
    16 #include <string.h>
    17 #include <stdio.h> /* printf */
    1816
    1917#include "JSON_parser.h"
  • trunk/libtransmission/makemeta.c

    r12204 r12223  
    1919#include <sys/types.h>
    2020#include <sys/stat.h>
    21 #include <unistd.h>
     21#include <unistd.h> /* read() */
    2222#include <dirent.h>
    2323
  • trunk/libtransmission/net.c

    r12204 r12223  
    2525
    2626#include <errno.h>
    27 #include <stdio.h>
    28 #include <stdlib.h>
    2927#include <string.h>
    3028#include <assert.h>
     
    4139 #include <arpa/inet.h> /* inet_addr */
    4240 #include <netdb.h>
    43  #include <fcntl.h>
    44 #endif
    45 #include <unistd.h>
     41#endif
    4642
    4743#include <event2/util.h>
  • trunk/libtransmission/peer-io.c

    r12204 r12223  
    1515#include <limits.h> /* INT_MAX */
    1616#include <string.h>
    17 #include <stdio.h>
    18 #include <unistd.h>
    1917
    2018#ifdef WIN32
  • trunk/libtransmission/port-forwarding.c

    r12204 r12223  
    1212
    1313#include <assert.h>
    14 #include <string.h>
    1514#include <stdio.h>
    1615
  • trunk/libtransmission/rpc-server.c

    r12204 r12223  
    1616#include <limits.h> /* INT_MAX */
    1717
    18 #include <sys/types.h> /* open */
    19 #include <sys/stat.h>  /* open */
    20 #include <fcntl.h>     /* open */
    2118#include <unistd.h>    /* close */
    2219
  • trunk/libtransmission/tr-udp.c

    r12204 r12223  
    2222*/
    2323
    24 #include <unistd.h>
    2524#include <assert.h>
    2625#include <string.h> /* memcmp(), memcpy(), memset() */
    2726#include <stdlib.h> /* malloc(), free() */
     27
     28#include <unistd.h> /* close() */
    2829
    2930#include <event2/event.h>
  • trunk/libtransmission/tr-utp.c

    r12204 r12223  
    2323
    2424#include <assert.h>
    25 #include <unistd.h>
    2625
    2726#include <event2/event.h>
     27
    2828#include <libutp/utp.h>
    2929
  • trunk/libtransmission/trevent.c

    r12204 r12223  
    1313#include <assert.h>
    1414#include <errno.h>
    15 #include <stdlib.h>
    1615#include <string.h>
    17 #include <stdio.h>
    1816
    1917#include <signal.h>
     
    126124#endif
    127125
    128 #include <unistd.h>
     126#include <unistd.h> /* read(), write(), pipe() */
    129127
    130128#include "transmission.h"
  • trunk/libtransmission/utils.c

    r12210 r12223  
    2323
    2424#include <assert.h>
    25 #include <ctype.h> /* isalpha(), tolower() */
     25#include <ctype.h> /* isdigit(), isalpha(), tolower() */
    2626#include <errno.h>
    2727#include <float.h> /* DBL_EPSILON */
     
    4141#include <sys/types.h>
    4242#include <sys/stat.h>
    43 #include <unistd.h> /* stat(), getcwd(), getpagesize() */
     43#include <unistd.h> /* stat(), getcwd(), getpagesize(), unlink() */
    4444
    4545#include <event2/buffer.h>
Note: See TracChangeset for help on using the changeset viewer.