Changeset 11228 for trunk/libtransmission/utils.c
- Timestamp:
- Sep 18, 2010, 11:06:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/utils.c
r11209 r11228 51 51 52 52 #include "transmission.h" 53 #include "bencode.h" 53 54 #include "fdlimit.h" 54 55 #include "ConvertUTF.h" … … 1687 1688 return formatter_get_size_str( &mem_units, buf, bytes_per_second, buflen ); 1688 1689 } 1690 1691 void 1692 tr_formatter_get_units( tr_benc * d ) 1693 { 1694 int i; 1695 tr_benc * l; 1696 1697 tr_bencDictReserve( d, 6 ); 1698 1699 tr_bencDictAddInt( d, "memory-bytes", mem_units.units[TR_FMT_KB].value ); 1700 l = tr_bencDictAddList( d, "memory-units", 4 ); 1701 for( i=0; i<4; i++ ) tr_bencListAddStr( l, mem_units.units[i].name ); 1702 1703 tr_bencDictAddInt( d, "size-bytes", size_units.units[TR_FMT_KB].value ); 1704 l = tr_bencDictAddList( d, "size-units", 4 ); 1705 for( i=0; i<4; i++ ) tr_bencListAddStr( l, size_units.units[i].name ); 1706 1707 tr_bencDictAddInt( d, "speed-bytes", speed_units.units[TR_FMT_KB].value ); 1708 l = tr_bencDictAddList( d, "speed-units", 4 ); 1709 for( i=0; i<4; i++ ) tr_bencListAddStr( l, speed_units.units[i].name ); 1710 } 1711
Note: See TracChangeset
for help on using the changeset viewer.