Changeset 12291


Ignore:
Timestamp:
Apr 1, 2011, 3:13:44 AM (11 years ago)
Author:
jordan
Message:

(trunk libT) copyediting in resume.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/resume.c

    r12262 r12291  
    157157
    158158static void
    159 saveDND( tr_benc *          dict,
    160          const tr_torrent * tor )
    161 {
    162     const tr_info *       inf = tr_torrentInfo( tor );
     159saveDND( tr_benc * dict, const tr_torrent * tor )
     160{
     161    tr_benc * list;
     162    tr_file_index_t i;
     163    const tr_info * const inf = tr_torrentInfo( tor );
    163164    const tr_file_index_t n = inf->fileCount;
    164     tr_file_index_t       i;
    165     tr_benc *             list;
    166165
    167166    list = tr_bencDictAddList( dict, KEY_DND, n );
    168     for( i = 0; i < n; ++i )
     167    for( i=0; i<n; ++i )
    169168        tr_bencListAddInt( list, inf->files[i].dnd ? 1 : 0 );
    170169}
    171170
    172171static uint64_t
    173 loadDND( tr_benc *    dict,
    174          tr_torrent * tor )
    175 {
    176     uint64_t              ret = 0;
    177     tr_info *             inf = &tor->info;
    178     const tr_file_index_t n = inf->fileCount;
    179     tr_benc *             list = NULL;
     172loadDND( tr_benc * dict, tr_torrent * tor )
     173{
     174    uint64_t ret = 0;
     175    tr_benc * list = NULL;
     176    const tr_file_index_t n = tor->info.fileCount;
    180177
    181178    if( tr_bencDictFindList( dict, KEY_DND, &list )
     
    187184        tr_file_index_t   i, dlCount = 0, dndCount = 0;
    188185
    189         for( i = 0; i < n; ++i )
     186        for( i=0; i<n; ++i )
    190187        {
    191188            if( tr_bencGetInt( tr_bencListChild( list, i ), &tmp ) && tmp )
     
    231228saveFilePriorities( tr_benc * dict, const tr_torrent * tor )
    232229{
    233     const tr_info *       inf = tr_torrentInfo( tor );
     230    tr_benc * list;
     231    tr_file_index_t i;
     232    const tr_info * const inf = tr_torrentInfo( tor );
    234233    const tr_file_index_t n = inf->fileCount;
    235     tr_file_index_t       i;
    236     tr_benc *             list;
    237234
    238235    list = tr_bencDictAddList( dict, KEY_FILE_PRIORITIES, n );
     
    244241loadFilePriorities( tr_benc * dict, tr_torrent * tor )
    245242{
    246     uint64_t              ret = 0;
    247     tr_info *             inf = &tor->info;
    248     const tr_file_index_t n = inf->fileCount;
    249     tr_benc *             list;
     243    tr_benc * list;
     244    uint64_t ret = 0;
     245    const tr_file_index_t n = tor->info.fileCount;
    250246
    251247    if( tr_bencDictFindList( dict, KEY_FILE_PRIORITIES, &list )
     
    326322loadSpeedLimits( tr_benc * dict, tr_torrent * tor )
    327323{
    328     uint64_t  ret = 0;
    329324    tr_benc * d;
     325    uint64_t ret = 0;
     326
    330327
    331328    if( tr_bencDictFindDict( dict, KEY_SPEEDLIMIT_UP, &d ) )
     
    364361
    365362static uint64_t
    366 loadRatioLimits( tr_benc *    dict,
    367                  tr_torrent * tor )
    368 {
    369     uint64_t  ret = 0;
     363loadRatioLimits( tr_benc * dict, tr_torrent * tor )
     364{
    370365    tr_benc * d;
     366    uint64_t ret = 0;
    371367
    372368    if( tr_bencDictFindDict( dict, KEY_RATIOLIMIT, &d ) )
     
    385381
    386382static uint64_t
    387 loadIdleLimits( tr_benc *    dict,
    388                       tr_torrent * tor )
    389 {
    390     uint64_t  ret = 0;
     383loadIdleLimits( tr_benc * dict, tr_torrent * tor )
     384{
    391385    tr_benc * d;
     386    uint64_t ret = 0;
    392387
    393388    if( tr_bencDictFindDict( dict, KEY_IDLELIMIT, &d ) )
     
    673668
    674669static uint64_t
    675 loadFromFile( tr_torrent * tor,
    676               uint64_t     fieldsToLoad )
     670loadFromFile( tr_torrent * tor, uint64_t fieldsToLoad )
    677671{
    678672    int64_t  i;
     
    826820
    827821static uint64_t
    828 setFromCtor( tr_torrent *    tor,
    829              uint64_t        fields,
    830              const tr_ctor * ctor,
    831              int             mode )
     822setFromCtor( tr_torrent * tor, uint64_t fields, const tr_ctor * ctor, int mode )
    832823{
    833824    uint64_t ret = 0;
     
    862853
    863854static uint64_t
    864 useManditoryFields( tr_torrent *    tor,
    865                     uint64_t        fields,
    866                     const tr_ctor * ctor )
     855useManditoryFields( tr_torrent * tor, uint64_t fields, const tr_ctor * ctor )
    867856{
    868857    return setFromCtor( tor, fields, ctor, TR_FORCE );
     
    870859
    871860static uint64_t
    872 useFallbackFields( tr_torrent *    tor,
    873                    uint64_t        fields,
    874                    const tr_ctor * ctor )
     861useFallbackFields( tr_torrent * tor, uint64_t fields, const tr_ctor * ctor )
    875862{
    876863    return setFromCtor( tor, fields, ctor, TR_FALLBACK );
     
    902889    tr_free( filename );
    903890}
    904 
Note: See TracChangeset for help on using the changeset viewer.