From 3d38723ad92540e7f5e968d22d68edcc132db744 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Wed, 5 Dec 2012 17:29:46 +0000 Subject: [PATCH] Follow more common whitespace style conventions in the C code (libtransmission, daemon, utils, cli, gtk). --- cli/cli.c | 587 +++--- daemon/daemon.c | 396 ++-- daemon/remote.c | 1974 +++++++++--------- daemon/watch.c | 156 +- daemon/watch.h | 10 +- gtk/actions.c | 284 +-- gtk/actions.h | 18 +- gtk/conf.c | 334 +-- gtk/conf.h | 22 +- gtk/details.c | 2308 ++++++++++----------- gtk/details.h | 10 +- gtk/dialogs.c | 118 +- gtk/dialogs.h | 4 +- gtk/favicon.c | 114 +- gtk/favicon.h | 10 +- gtk/file-list.c | 630 +++--- gtk/file-list.h | 8 +- gtk/filter.c | 778 +++---- gtk/filter.h | 6 +- gtk/hig.c | 146 +- gtk/hig.h | 44 +- gtk/icon-lock.h | 2 +- gtk/icon-logo-24.h | 2 +- gtk/icon-logo-48.h | 6 +- gtk/icons.c | 150 +- gtk/icons.h | 6 +- gtk/main.c | 1990 +++++++++--------- gtk/makemeta-ui.c | 466 ++--- gtk/makemeta-ui.h | 4 +- gtk/msgwin.c | 712 +++---- gtk/msgwin.h | 4 +- gtk/notify.c | 196 +- gtk/notify.h | 8 +- gtk/open-dialog.c | 448 ++--- gtk/open-dialog.h | 8 +- gtk/relocate.c | 136 +- gtk/relocate.h | 6 +- gtk/stats.c | 176 +- gtk/stats.h | 4 +- gtk/torrent-cell-renderer.c | 650 +++--- gtk/torrent-cell-renderer.h | 14 +- gtk/tr-core.c | 2170 ++++++++++---------- gtk/tr-core.h | 74 +- gtk/tr-icon.c | 100 +- gtk/tr-icon.h | 6 +- gtk/tr-prefs.c | 1454 +++++++------- gtk/tr-prefs.h | 6 +- gtk/tr-window.c | 804 ++++---- gtk/tr-window.h | 8 +- gtk/util.c | 462 ++--- gtk/util.h | 66 +- libtransmission/ConvertUTF.c | 54 +- libtransmission/ConvertUTF.h | 8 +- libtransmission/announcer-common.h | 30 +- libtransmission/announcer-http.c | 338 ++-- libtransmission/announcer-udp.c | 690 +++---- libtransmission/announcer.c | 1000 ++++----- libtransmission/announcer.h | 52 +- libtransmission/bandwidth.c | 270 +-- libtransmission/bandwidth.h | 76 +- libtransmission/bencode-test.c | 482 ++--- libtransmission/bencode.c | 1114 +++++----- libtransmission/bencode.h | 134 +- libtransmission/bitfield.c | 492 ++--- libtransmission/bitfield.h | 72 +- libtransmission/blocklist-test.c | 82 +- libtransmission/blocklist.c | 236 +-- libtransmission/blocklist.h | 28 +- libtransmission/cache.c | 501 ++--- libtransmission/cache.h | 33 +- libtransmission/clients-test.c | 32 +- libtransmission/clients.c | 480 ++--- libtransmission/clients.h | 4 +- libtransmission/completion.c | 194 +- libtransmission/completion.h | 66 +- libtransmission/crypto.c | 250 +-- libtransmission/crypto.h | 50 +- libtransmission/fdlimit.c | 428 ++-- libtransmission/fdlimit.h | 48 +- libtransmission/handshake.c | 861 ++++---- libtransmission/handshake.h | 20 +- libtransmission/history-test.c | 26 +- libtransmission/history.c | 47 +- libtransmission/history.h | 26 +- libtransmission/inout.c | 335 ++-- libtransmission/inout.h | 22 +- libtransmission/json-test.c | 148 +- libtransmission/json.c | 14 +- libtransmission/json.h | 6 +- libtransmission/libtransmission-test.h | 26 +- libtransmission/list.c | 221 +- libtransmission/list.h | 30 +- libtransmission/magnet-test.c | 48 +- libtransmission/magnet.c | 303 +-- libtransmission/magnet.h | 20 +- libtransmission/makemeta.c | 382 ++-- libtransmission/makemeta.h | 24 +- libtransmission/metainfo-test.c | 4 +- libtransmission/metainfo.c | 810 ++++---- libtransmission/metainfo.h | 16 +- libtransmission/natpmp.c | 130 +- libtransmission/natpmp_local.h | 8 +- libtransmission/net.c | 368 ++-- libtransmission/net.h | 62 +- libtransmission/peer-common.h | 10 +- libtransmission/peer-io.c | 934 ++++----- libtransmission/peer-io.h | 210 +- libtransmission/peer-mgr.c | 2568 ++++++++++++------------ libtransmission/peer-mgr.h | 102 +- libtransmission/peer-msgs-test.c | 22 +- libtransmission/peer-msgs.c | 1714 ++++++++-------- libtransmission/peer-msgs.h | 28 +- libtransmission/platform.c | 821 ++++---- libtransmission/platform.h | 38 +- libtransmission/port-forwarding.c | 128 +- libtransmission/port-forwarding.h | 16 +- libtransmission/ptrarray.c | 140 +- libtransmission/ptrarray.h | 70 +- libtransmission/resume.c | 592 +++--- libtransmission/resume.h | 50 +- libtransmission/rpc-server.c | 710 +++---- libtransmission/rpc-server.h | 54 +- libtransmission/rpc-test.c | 82 +- libtransmission/rpcimpl.c | 1864 ++++++++--------- libtransmission/rpcimpl.h | 20 +- libtransmission/session.c | 2064 +++++++++---------- libtransmission/session.h | 100 +- libtransmission/stats.c | 252 ++- libtransmission/stats.h | 23 +- libtransmission/test-peer-id.c | 18 +- libtransmission/torrent-ctor.c | 256 +-- libtransmission/torrent-magnet.c | 238 +-- libtransmission/torrent-magnet.h | 14 +- libtransmission/torrent.c | 2206 ++++++++++---------- libtransmission/torrent.h | 190 +- libtransmission/tr-dht.c | 502 ++--- libtransmission/tr-dht.h | 18 +- libtransmission/tr-getopt.c | 140 +- libtransmission/tr-getopt.h | 18 +- libtransmission/tr-lpd.c | 272 +-- libtransmission/tr-lpd.h | 14 +- libtransmission/tr-udp.c | 250 +-- libtransmission/tr-udp.h | 10 +- libtransmission/tr-utp.c | 104 +- libtransmission/tr-utp.h | 6 +- libtransmission/transmission.h | 784 ++++---- libtransmission/trevent.c | 200 +- libtransmission/trevent.h | 10 +- libtransmission/upnp.c | 164 +- libtransmission/upnp.h | 10 +- libtransmission/utils-test.c | 384 ++-- libtransmission/utils.c | 1116 +++++----- libtransmission/utils.h | 370 ++-- libtransmission/verify.c | 395 ++-- libtransmission/verify.h | 12 +- libtransmission/web.c | 388 ++-- libtransmission/web.h | 28 +- libtransmission/webseed.c | 358 ++-- libtransmission/webseed.h | 14 +- libtransmission/wildmat.c | 12 +- utils/create.c | 193 +- utils/edit.c | 375 ++-- utils/show.c | 398 ++-- 163 files changed, 25889 insertions(+), 25486 deletions(-) diff --git a/cli/cli.c b/cli/cli.c index 806aa59ce..c8b0d168d 100644 --- a/cli/cli.c +++ b/cli/cli.c @@ -22,9 +22,9 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ -#include /* fprintf() */ -#include /* atoi() */ -#include /* memcmp() */ +#include /* fprintf () */ +#include /* atoi () */ +#include /* memcmp () */ #include #include @@ -67,384 +67,439 @@ #define MY_READABLE_NAME "transmission-cli" static bool showVersion = false; -static bool verify = 0; -static sig_atomic_t gotsig = 0; -static sig_atomic_t manualUpdate = 0; +static bool verify = false; +static sig_atomic_t gotsig = false; +static sig_atomic_t manualUpdate = false; static const char * torrentPath = NULL; static const struct tr_option options[] = { - { 'b', "blocklist", "Enable peer blocklists", "b", 0, NULL }, - { 'B', "no-blocklist", "Disable peer blocklists", "B", 0, NULL }, - { 'd', "downlimit", "Set max download speed in "SPEED_K_STR, "d", 1, "" }, - { 'D', "no-downlimit", "Don't limit the download speed", "D", 0, NULL }, - { 910, "encryption-required", "Encrypt all peer connections", "er", 0, NULL }, - { 911, "encryption-preferred", "Prefer encrypted peer connections", "ep", 0, NULL }, - { 912, "encryption-tolerated", "Prefer unencrypted peer connections", "et", 0, NULL }, - { 'f', "finish", "Run a script when the torrent finishes", "f", 1, "