Changeset 14428


Ignore:
Timestamp:
Jan 2, 2015, 11:15:31 AM (6 years ago)
Author:
mikedld
Message:

Replace tabs with spaces; remove trailing spaces

Location:
trunk
Files:
42 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/daemon.c

    r14382 r14428  
    390390
    391391    if (up>0 || dn>0)
    392         sd_notifyf (0, "STATUS=Uploading %.2f KBps, Downloading %.2f KBps.\n", up, dn);
     392        sd_notifyf (0, "STATUS=Uploading %.2f KBps, Downloading %.2f KBps.\n", up, dn);
    393393    else
    394         sd_notify (0, "STATUS=Idle.\n");
     394        sd_notify (0, "STATUS=Idle.\n");
    395395}
    396396
     
    575575    }
    576576
    577     sd_notifyf (0, "MAINPID=%d\n", (int)getpid()); 
     577    sd_notifyf (0, "MAINPID=%d\n", (int)getpid());
    578578
    579579    /* setup event state */
     
    682682    {
    683683        tr_logAddError("Failed to launch daemon event loop: %s", tr_strerror(errno));
    684         goto cleanup;
     684        goto cleanup;
    685685    }
    686686
  • trunk/daemon/remote.c

    r14359 r14428  
    17661766    {
    17671767        curl_easy_setopt (curl, CURLOPT_SSL_VERIFYHOST, 0); /* do not verify subject/hostname */
    1768         curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 0); /* since most certs will be self-signed, do not verify against CA */               
     1768        curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 0); /* since most certs will be self-signed, do not verify against CA */
    17691769    }
    17701770    if (sessionId) {
  • trunk/gtk/Makefile.am

    r14422 r14428  
    111111icondir = $(datadir)/pixmaps
    112112
    113 UI_FILES = transmission-ui.xml 
     113UI_FILES = transmission-ui.xml
    114114
    115 transmission-resources.c: transmission.gresource.xml $(UI_FILES) 
     115transmission-resources.c: transmission.gresource.xml $(UI_FILES)
    116116        $(AM_V_GEN)glib-compile-resources --target=$@ --sourcedir=$(srcdir) \
    117           --generate-source --c-name transmission $< 
     117          --generate-source --c-name transmission $<
    118118
    119 transmission-resources.h: transmission.gresource.xml $(UI_FILES) 
     119transmission-resources.h: transmission.gresource.xml $(UI_FILES)
    120120        $(AM_V_GEN)glib-compile-resources --target=$@ --sourcedir=$(srcdir) \
    121           --generate-header --c-name transmission $< 
     121          --generate-header --c-name transmission $<
    122122
    123123CLEANFILES += \
  • trunk/gtk/main.c

    r14242 r14428  
    6565static const char * LICENSE =
    6666  "Copyright 2005-2014. All code is copyrighted by the respective authors.\n"
    67   "\n"           
     67  "\n"
    6868  "Transmission can be redistributed and/or modified under the terms of the "
    6969  "GNU GPL versions 2 or 3 or by any future license endorsed by Mnemosyne LLC.\n"
     
    469469  data->torrent_id = tr_torrentId (tor);
    470470  gdk_threads_add_idle (on_rpc_changed_idle, data);
    471  
     471
    472472  return TR_RPC_NOREMOVE;
    473473}
  • trunk/gtk/transmission-gtk.desktop.in

    r14104 r14428  
    1313Categories=Network;FileTransfer;P2P;GTK;
    1414X-Ubuntu-Gettext-Domain=transmission
    15 X-AppInstall-Keywords=torrent 
     15X-AppInstall-Keywords=torrent
    1616Actions=Pause;Minimize;
    1717
  • trunk/gtk/util.h

    r14241 r14428  
    4949  return q;                                                             \
    5050 }
    51 #endif 
     51#endif
    5252
    5353
  • trunk/libtransmission/announcer.c

    r14354 r14428  
    13521352                {
    13531353                    on_scrape_error (session, tier, _("Could not connect to tracker"));
    1354                 }
     1354                }
    13551355                else if (response->did_timeout)
    13561356                {
  • trunk/libtransmission/libtransmission-test.c

    r14382 r14428  
    312312  tr_ctor * ctor;
    313313
    314   /* 
     314  /*
    315315     1048576 files-filled-with-zeroes/1048576
    316316        4096 files-filled-with-zeroes/4096
     
    389389      err = errno;
    390390      assert (tr_sys_path_exists (path, NULL));
    391       errno = err; 
     391      errno = err;
    392392      tr_free (path);
    393393    }
  • trunk/libtransmission/log.c

    r14369 r14428  
    152152  seconds = tv.tv_sec;
    153153  tr_localtime_r (&seconds, &now_tm);
    154   strftime (tmp, sizeof (tmp), "%Y-%m-%d %H:%M:%S.%%03d %Z", &now_tm); 
     154  strftime (tmp, sizeof (tmp), "%Y-%m-%d %H:%M:%S.%%03d %Z", &now_tm);
    155155  milliseconds = tv.tv_usec / 1000;
    156156  tr_snprintf (buf, buflen, tmp, milliseconds);
  • trunk/libtransmission/makemeta-test.c

    r14382 r14428  
    136136  size_t i;
    137137  char* tmpstr;
    138  
     138
    139139
    140140  /* set up our local test sandbox */
     
    213213  return 0;
    214214}
    215  
     215
    216216static int
    217217test_single_directory_random_payload_impl (const tr_tracker_info * trackers,
  • trunk/libtransmission/metainfo-test.c

    r14293 r14428  
    9898  return 0;
    9999}
    100    
     100
    101101int
    102102main (void)
  • trunk/libtransmission/move-test.c

    r14382 r14428  
    6666  data->done = true;
    6767}
    68  
     68
    6969static int
    7070test_incomplete_dir_impl (const char * incomplete_dir, const char * download_dir)
     
    180180  target_dir = tr_buildPath (tr_sessionGetConfigDir (session), "target", NULL);
    181181  tr_sys_dir_create (target_dir, TR_SYS_DIR_CREATE_PARENTS, 0777, NULL);
    182  
     182
    183183  /* init a torrent. */
    184184  tor = libttest_zero_torrent_init (session);
  • trunk/libtransmission/net.h

    r14382 r14428  
    166166#if defined (_WIN32) && !defined (QT_DLL)
    167167/* The QT exclusion is because something clashes whith the next include */
    168 #include <ws2tcpip.h>           /* socklen_t */
     168#include <ws2tcpip.h> /* socklen_t */
    169169
    170170#endif
  • trunk/libtransmission/peer-mgr.c

    r14384 r14428  
    32823282      if (unreachable)
    32833283        step += 2;
    3284  
     3284
    32853285      switch (step)
    32863286        {
  • trunk/libtransmission/peer-mgr.h

    r14316 r14428  
    184184void         tr_peerMgrPieceCompleted       (tr_torrent         * tor,
    185185                                             tr_piece_index_t     pieceIndex);
    186  
     186
    187187
    188188
  • trunk/libtransmission/peer-msgs.c

    r14354 r14428  
    691691***/
    692692
    693 static bool 
     693static bool
    694694tr_peerMsgsCalculateActive (const tr_peerMsgs * msgs, tr_direction direction)
    695695{
     
    18301830        /* honor the session limits, if enabled */
    18311831        if (tr_torrentUsesSessionLimits (torrent) &&
    1832             tr_sessionGetActiveSpeedLimit_Bps (torrent->session, TR_PEER_TO_CLIENT, &irate_Bps))
     1832            tr_sessionGetActiveSpeedLimit_Bps (torrent->session, TR_PEER_TO_CLIENT, &irate_Bps))
    18331833                rate_Bps = MIN (rate_Bps, irate_Bps);
    18341834
     
    24702470peermsgs_is_transferring_pieces (const struct tr_peer * peer,
    24712471                                 uint64_t               now,
    2472                                  tr_direction           direction, 
     2472                                 tr_direction           direction,
    24732473                                 unsigned int         * setme_Bps)
    24742474{
  • trunk/libtransmission/platform-quota.c

    r14382 r14428  
    254254    {
    255255#elif defined(__sun)
    256   struct quotctl  op; 
    257   int fd = open(device, O_RDONLY); 
    258   if (fd < 0) 
    259     return -1; 
    260   op.op = Q_GETQUOTA; 
    261   op.uid = getuid(); 
    262   op.addr = (caddr_t) &dq; 
     256  struct quotctl  op;
     257  int fd = open(device, O_RDONLY);
     258  if (fd < 0)
     259    return -1;
     260  op.op = Q_GETQUOTA;
     261  op.uid = getuid();
     262  op.addr = (caddr_t) &dq;
    263263  if (ioctl(fd, Q_QUOTACTL, &op) == 0)
    264264    {
  • trunk/libtransmission/quark.c

    r14241 r14428  
    489489  return ret;
    490490}
    491  
     491
    492492const char *
    493493tr_quark_get_string (tr_quark q, size_t * len)
  • trunk/libtransmission/rename-test.c

    r14382 r14428  
    118118
    119119  /* cleanup */
    120   tr_free (metainfo); 
     120  tr_free (metainfo);
    121121  return tor;
    122122}
     
    184184  ***/
    185185
    186   tmpstr = tr_buildPath (tor->currentDir, "hello-world.txt", NULL); 
     186  tmpstr = tr_buildPath (tor->currentDir, "hello-world.txt", NULL);
    187187  check (tr_sys_path_exists (tmpstr, NULL));
    188188  check_streq ("hello-world.txt", tr_torrentName(tor));
     
    194194  check_streq ("foobar", tor->info.files[0].name); /* confirm the file's name is now 'foobar' in our struct */
    195195  check (strstr (tor->info.torrent, "foobar") == NULL); /* confirm the name in the .torrent file hasn't changed */
    196   tmpstr = tr_buildPath (tor->currentDir, "foobar", NULL); 
     196  tmpstr = tr_buildPath (tor->currentDir, "foobar", NULL);
    197197  check (tr_sys_path_exists (tmpstr, NULL)); /* confirm the file's name is now 'foobar' on the disk */
    198198  tr_free (tmpstr);
     
    210210  ***/
    211211
    212   tmpstr = tr_buildPath (tor->currentDir, "foobar", NULL); 
     212  tmpstr = tr_buildPath (tor->currentDir, "foobar", NULL);
    213213  check (tr_sys_path_exists (tmpstr, NULL));
    214214  check_int_eq (0, torrentRenameAndWait (tor, "foobar", "hello-world.txt"));
     
    502502
    503503  /***
    504   ****  create our test torrent with an incomplete .part file 
     504  ****  create our test torrent with an incomplete .part file
    505505  ***/
    506506
  • trunk/libtransmission/rpc-server.c

    r14359 r14428  
    937937  const char * str = tr_quark_get_string (q, NULL);
    938938  tr_logAddNamedError (MY_NAME, _("Couldn't find settings key \"%s\""), str);
    939 } 
     939}
    940940
    941941tr_rpc_server *
  • trunk/libtransmission/rpcimpl.c

    r14359 r14428  
    252252}
    253253
    254 static int 
    255 compareTorrentByQueuePosition (const void * va, const void * vb) 
    256 { 
    257   const tr_torrent * a = * (const tr_torrent **) va; 
    258   const tr_torrent * b = * (const tr_torrent **) vb; 
    259 
    260   return a->queuePosition - b->queuePosition; 
    261 } 
     254static int
     255compareTorrentByQueuePosition (const void * va, const void * vb)
     256{
     257  const tr_torrent * a = * (const tr_torrent **) va;
     258  const tr_torrent * b = * (const tr_torrent **) vb;
     259
     260  return a->queuePosition - b->queuePosition;
     261}
    262262
    263263static const char*
     
    274274
    275275  torrents = getTorrents (session, args_in, &torrentCount);
    276   qsort (torrents, torrentCount, sizeof (tr_torrent *), compareTorrentByQueuePosition); 
     276  qsort (torrents, torrentCount, sizeof (tr_torrent *), compareTorrentByQueuePosition);
    277277  for (i=0; i<torrentCount; ++i)
    278278    {
     
    302302
    303303  torrents = getTorrents (session, args_in, &torrentCount);
    304   qsort (torrents, torrentCount, sizeof (tr_torrent *), compareTorrentByQueuePosition); 
     304  qsort (torrents, torrentCount, sizeof (tr_torrent *), compareTorrentByQueuePosition);
    305305  for (i=0; i<torrentCount; ++i)
    306306    {
  • trunk/libtransmission/session.c

    r14382 r14428  
    17631763
    17641764  return torrents;
    1765 } 
     1765}
    17661766
    17671767static int
     
    22542254      char * path;
    22552255      char * load = NULL;
    2256  
     2256
    22572257      if (name[0] == '.') /* ignore dotfiles */
    22582258        continue;
  • trunk/libtransmission/torrent.c

    r14382 r14428  
    19301930
    19311931void
    1932 tr_torrentFree (tr_torrent * tor) 
    1933 {
    1934   if (tr_isTorrent (tor)) 
    1935     { 
    1936       tr_session * session = tor->session; 
    1937       assert (tr_isSession (session)); 
    1938       tr_sessionLock (session); 
    1939 
    1940       tr_torrentClearCompletenessCallback (tor); 
    1941       tr_runInEventThread (session, closeTorrent, tor); 
    1942 
    1943       tr_sessionUnlock (session); 
    1944     } 
     1932tr_torrentFree (tr_torrent * tor)
     1933{
     1934  if (tr_isTorrent (tor))
     1935    {
     1936      tr_session * session = tor->session;
     1937      assert (tr_isSession (session));
     1938      tr_sessionLock (session);
     1939
     1940      tr_torrentClearCompletenessCallback (tor);
     1941      tr_runInEventThread (session, closeTorrent, tor);
     1942
     1943      tr_sessionUnlock (session);
     1944    }
    19451945}
    19461946
     
    19591959  struct remove_data * data = vdata;
    19601960  tr_session * session = data->tor->session;
    1961   tr_sessionLock (session); 
     1961  tr_sessionLock (session);
    19621962
    19631963  if (data->deleteFlag)
     
    19681968  tr_free (data);
    19691969
    1970   tr_sessionUnlock (session); 
     1970  tr_sessionUnlock (session);
    19711971}
    19721972
     
    37013701      tr_free (tmp);
    37023702    }
    3703      
     3703
    37043704  if (!strcmp (file->name, name))
    37053705    {
     
    37073707    }
    37083708  else
    3709     { 
     3709    {
    37103710      tr_free (file->name);
    37113711      file->name = name;
  • trunk/libtransmission/torrent.h

    r14241 r14428  
    304304}
    305305
    306 static inline void tr_torrentLock (const tr_torrent * tor) 
    307 { 
    308   tr_sessionLock (tor->session); 
    309 } 
     306static inline void tr_torrentLock (const tr_torrent * tor)
     307{
     308  tr_sessionLock (tor->session);
     309}
    310310static inline bool tr_torrentIsLocked (const tr_torrent * tor)
    311311{
  • trunk/libtransmission/tr-lpd.c

    r14427 r14428  
    3333  #include <inttypes.h>
    3434  #include <ws2tcpip.h>
    35   typedef uint16_t in_port_t;                   /* all missing */
     35  typedef uint16_t in_port_t; /* all missing */
    3636#else
    3737  #include <sys/time.h>
  • trunk/libtransmission/trevent.c

    r14382 r14428  
    110110                errno = EAGAIN;
    111111                break;
    112             case WSAECONNRESET:
    113                 /* EOF on the pipe! (win32 socket based implementation) */
    114                 ret = 0;
    115                 /* fall through */
     112            case WSAECONNRESET:
     113                /* EOF on the pipe! (win32 socket based implementation) */
     114                ret = 0;
     115                /* fall through */
    116116            default:
    117117                errno = werror;
  • trunk/libtransmission/upnp.c

    r14347 r14428  
    117117#if (MINIUPNPC_API_VERSION >= 10) /* adds remoteHost arg */
    118118
    119     err = UPNP_GetSpecificPortMappingEntry (handle->urls.controlURL, 
    120                                             handle->data.first.servicetype, 
     119    err = UPNP_GetSpecificPortMappingEntry (handle->urls.controlURL,
     120                                            handle->data.first.servicetype,
    121121                                            portStr,
    122122                                            proto,
    123                                             NULL /*remoteHost*/, 
     123                                            NULL /*remoteHost*/,
    124124                                            intClient,
    125125                                            intPort,
    126                                             NULL /*desc*/, 
     126                                            NULL /*desc*/,
    127127                                            NULL /*enabled*/,
    128128                                            NULL /*duration*/);
  • trunk/libtransmission/variant-json.c

    r14266 r14428  
    217217                          UTF8 * str8_walk = str8_buf;
    218218                          UTF8 * str8_end = str8_buf + 8;
    219    
     219
    220220                          if (ConvertUTF32toUTF8 (&str32_walk, str32_end, &str8_walk, str8_end, 0) == 0)
    221221                            {
     
    224224                              unescaped = true;
    225225                            }
    226    
     226
    227227                          in += 6;
    228228                          break;
  • trunk/libtransmission/variant.c

    r14405 r14428  
    2323#define __LIBTRANSMISSION_VARIANT_MODULE___
    2424#include "transmission.h"
    25 #include "ConvertUTF.h" 
     25#include "ConvertUTF.h"
    2626#include "error.h"
    2727#include "file.h"
  • trunk/libtransmission/variant.h

    r14405 r14428  
    5050  union { char buf[16]; const char * str; } str;
    5151};
    52  
     52
    5353
    5454/* these are PRIVATE IMPLEMENTATION details that should not be touched.
     
    201201                                        const char      ** setme_str,
    202202                                        size_t           * setme_len);
    203                                                                  
     203
    204204void         tr_variantInitStr         (tr_variant       * initme,
    205205                                        const void       * str,
  • trunk/libtransmission/web.c

    r14427 r14428  
    276276            tr_wait_msec (20);
    277277        }
    278      
     278
    279279      task = tr_new0 (struct tr_web_task, 1);
    280280      task->session = session;
  • trunk/libtransmission/webseed.c

    r14241 r14428  
    286286          evbuffer_remove_buffer (task->content, data->content,
    287287                                  block_size * completed);
    288  
     288
    289289          tr_runInEventThread (w->session, write_block_func, data);
    290290          task->blocks_done += completed;
  • trunk/qt/README.txt

    r14163 r14428  
    33   - Qt developers and translators are needed
    44   - If you find a bug, please report it at http://trac.transmissionbt.com/
    5    
     5
    66ABOUT TRANSMISSION-QT
    77
     
    4343   5. In the qt/ directory, as root, type "INSTALL_ROOT=/usr make install"
    4444      (Feel free to replace /usr with /usr/local or /opt or whatever)
    45  
     45
  • trunk/qt/app.cc

    r14413 r14428  
    354354
    355355          if (!tor->isSeed ())
    356             connect (tor, SIGNAL (torrentCompleted (int)), this, SLOT (onTorrentCompleted (int)));
     356            connect (tor, SIGNAL (torrentCompleted (int)), this, SLOT (onTorrentCompleted (int)));
    357357        }
    358358    }
  • trunk/qt/config.pri.in

    r14422 r14428  
    11DHT_LIBS = @DHT_LIBS_QT@
    22LIBB64_LIBS = @LIBB64_LIBS_QT@
    3 LIBUTP_LIBS = @LIBUTP_LIBS_QT@ 
     3LIBUTP_LIBS = @LIBUTP_LIBS_QT@
    44LIBUPNP_LIBS = @LIBUPNP_LIBS_QT@
    55LIBNATPMP_LIBS = @LIBNATPMP_LIBS_QT@
  • trunk/qt/file-tree.cc

    r14413 r14428  
    196196FileTreeItem::sizeString () const
    197197{
    198   QString str; 
     198  QString str;
    199199
    200200  if (myChildren.isEmpty())
     
    438438FileTreeModel::itemFromIndex (const QModelIndex& index) const
    439439{
    440   return static_cast<FileTreeItem*>(index.internalPointer()); 
     440  return static_cast<FileTreeItem*>(index.internalPointer());
    441441}
    442442
     
    505505
    506506          case COL_PRIORITY:
    507             data.setValue (tr("Priority")); 
     507            data.setValue (tr("Priority"));
    508508            break;
    509509
     
    635635  item = findItemForFileIndex (fileIndex);
    636636
    637   if (item) // this file is already in the tree, we've added this 
     637  if (item) // this file is already in the tree, we've added this
    638638    {
    639639      QModelIndex indexWithChangedParents;
  • trunk/qt/prefs-dialog.cc

    r14403 r14428  
    615615  hig->addSectionDivider ();
    616616  hig->addSectionTitle (tr ("Download Queue"));
    617    
     617
    618618    hig->addRow (tr ("Ma&ximum active downloads:"), spinBoxNew (Prefs::DOWNLOAD_QUEUE_SIZE, 1, INT_MAX, 1));
    619619    hig->addRow (tr ("Downloads sharing data in the last &N minutes are active:"), spinBoxNew (Prefs::QUEUE_STALLED_MINUTES, 1, INT_MAX, 10));
  • trunk/qt/qtr.pro

    r14426 r14428  
    2222TRANSMISSION_TOP = ..
    2323
    24 include(config.pri) 
     24include(config.pri)
    2525
    2626INCLUDEPATH = $${EVENT_TOP}/include $${INCLUDEPATH}
  • trunk/qt/session.cc

    r14406 r14428  
    535535
    536536void Session::pauseTorrents    (const QSet<int>& ids) { sendTorrentRequest ("torrent-stop",      ids); }
    537 void Session::startTorrents    (const QSet<int>& ids) { sendTorrentRequest ("torrent-start",     ids); } 
     537void Session::startTorrents    (const QSet<int>& ids) { sendTorrentRequest ("torrent-start",     ids); }
    538538void Session::startTorrentsNow (const QSet<int>& ids) { sendTorrentRequest ("torrent-start-now", ids); }
    539 void Session::queueMoveTop     (const QSet<int>& ids) { sendTorrentRequest ("queue-move-top",    ids); } 
    540 void Session::queueMoveUp      (const QSet<int>& ids) { sendTorrentRequest ("queue-move-up",     ids); } 
    541 void Session::queueMoveDown    (const QSet<int>& ids) { sendTorrentRequest ("queue-move-down",   ids); } 
    542 void Session::queueMoveBottom  (const QSet<int>& ids) { sendTorrentRequest ("queue-move-bottom", ids); } 
     539void Session::queueMoveTop     (const QSet<int>& ids) { sendTorrentRequest ("queue-move-top",    ids); }
     540void Session::queueMoveUp      (const QSet<int>& ids) { sendTorrentRequest ("queue-move-up",     ids); }
     541void Session::queueMoveDown    (const QSet<int>& ids) { sendTorrentRequest ("queue-move-down",   ids); }
     542void Session::queueMoveBottom  (const QSet<int>& ids) { sendTorrentRequest ("queue-move-bottom", ids); }
    543543
    544544void
  • trunk/qt/torrent-filter.cc

    r14394 r14428  
    252252
    253253  for (int row(0); ; ++row)
    254     { 
     254    {
    255255      QModelIndex index (sourceModel()->index(row, 0));
    256256      if (!index.isValid())
  • trunk/qt/utils.cc

    r14417 r14428  
    220220        if  ((c[m] & 0xc0) != 0x80)
    221221          return false;
    222     } 
     222    }
    223223
    224224  return true;
  • trunk/utils/create.c

    r14337 r14428  
    8787
    8888          case 's':
    89             if (optarg) 
    90               { 
     89            if (optarg)
     90              {
    9191                char * endptr = NULL;
    9292                piecesize_kib = strtoul (optarg, &endptr, 10);
    9393                if (endptr && *endptr=='M')
    94                   piecesize_kib *= KiB; 
     94                  piecesize_kib *= KiB;
    9595              }
    9696            break;
Note: See TracChangeset for help on using the changeset viewer.