Changeset 3831
- Timestamp:
- 02/28/06 22:22:02 (3 years ago)
- Files:
-
- wired/trunk/wired/accounts.c (modified) (3 diffs)
- wired/trunk/wired/commands.c (modified) (17 diffs)
- wired/trunk/wired/files.c (modified) (1 diff)
- wired/trunk/wired/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wired/trunk/wired/accounts.c
r3809 r3831 42 42 43 43 #define WD_ACCOUNT_GET_BOOL(array, count, index) \ 44 ((count) > (index) ? wi_string_bool _value(WI_ARRAY((array), (index))) : false)45 46 #define WD_ACCOUNT_GET_U NSIGNED_INT(array, count, index) \47 ((count) > (index) ? wi_string_u nsigned_int_value(WI_ARRAY((array), (index))) : 0)44 ((count) > (index) ? wi_string_bool(WI_ARRAY((array), (index))) : false) 45 46 #define WD_ACCOUNT_GET_UINT32(array, count, index) \ 47 ((count) > (index) ? wi_string_uint32(WI_ARRAY((array), (index))) : 0) 48 48 49 49 … … 113 113 account->ban_users = WD_ACCOUNT_GET_BOOL(array, count, 19); 114 114 account->cannot_be_kicked = WD_ACCOUNT_GET_BOOL(array, count, 20); 115 account->download_speed = WD_ACCOUNT_GET_U NSIGNED_INT(array, count, 21);116 account->upload_speed = WD_ACCOUNT_GET_U NSIGNED_INT(array, count, 22);117 account->download_limit = WD_ACCOUNT_GET_U NSIGNED_INT(array, count, 23);118 account->upload_limit = WD_ACCOUNT_GET_U NSIGNED_INT(array, count, 24);115 account->download_speed = WD_ACCOUNT_GET_UINT32(array, count, 21); 116 account->upload_speed = WD_ACCOUNT_GET_UINT32(array, count, 22); 117 account->download_limit = WD_ACCOUNT_GET_UINT32(array, count, 23); 118 account->upload_limit = WD_ACCOUNT_GET_UINT32(array, count, 24); 119 119 account->set_topic = WD_ACCOUNT_GET_BOOL(array, count, 25); 120 120 account->files = WD_ACCOUNT_GET_INSTANCE(array, count, 26); … … 148 148 account->ban_users = WD_ACCOUNT_GET_BOOL(array, count, 17); 149 149 account->cannot_be_kicked = WD_ACCOUNT_GET_BOOL(array, count, 18); 150 account->download_speed = WD_ACCOUNT_GET_U NSIGNED_INT(array, count, 19);151 account->upload_speed = WD_ACCOUNT_GET_U NSIGNED_INT(array, count, 20);152 account->download_limit = WD_ACCOUNT_GET_U NSIGNED_INT(array, count, 21);153 account->upload_limit = WD_ACCOUNT_GET_U NSIGNED_INT(array, count, 22);150 account->download_speed = WD_ACCOUNT_GET_UINT32(array, count, 19); 151 account->upload_speed = WD_ACCOUNT_GET_UINT32(array, count, 20); 152 account->download_limit = WD_ACCOUNT_GET_UINT32(array, count, 21); 153 account->upload_limit = WD_ACCOUNT_GET_UINT32(array, count, 22); 154 154 account->set_topic = WD_ACCOUNT_GET_BOOL(array, count, 23); 155 155 account->files = WD_ACCOUNT_GET_INSTANCE(array, count, 25); wired/trunk/wired/commands.c
r3809 r3831 396 396 } 397 397 398 uid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));398 uid = wi_string_uint32(WI_ARRAY(arguments, 0)); 399 399 peer = wd_client_with_uid(uid); 400 400 … … 619 619 wd_cid_t cid; 620 620 621 cid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));621 cid = wi_string_uint32(WI_ARRAY(arguments, 0)); 622 622 chat = wd_chat_with_cid(cid); 623 623 … … 902 902 903 903 properpath = wi_string_by_normalizing_path(path); 904 offset = wi_string_u nsigned_long_long_value(WI_ARRAY(arguments, 1));904 offset = wi_string_uint64(WI_ARRAY(arguments, 1)); 905 905 906 906 wd_transfers_queue_download(properpath, offset); … … 971 971 wd_icon_t icon; 972 972 973 icon = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));973 icon = wi_string_uint32(WI_ARRAY(arguments, 0)); 974 974 975 975 /* set icon if changed */ … … 1019 1019 } 1020 1020 1021 uid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));1021 uid = wi_string_uint32(WI_ARRAY(arguments, 0)); 1022 1022 peer = wd_client_with_uid(uid); 1023 1023 … … 1096 1096 wd_cid_t cid; 1097 1097 1098 uid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));1098 uid = wi_string_uint32(WI_ARRAY(arguments, 0)); 1099 1099 peer = wd_client_with_uid(uid); 1100 1100 … … 1105 1105 } 1106 1106 1107 cid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 1));1107 cid = wi_string_uint32(WI_ARRAY(arguments, 1)); 1108 1108 chat = wd_chat_with_cid(cid); 1109 1109 … … 1135 1135 wd_cid_t cid; 1136 1136 1137 cid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));1137 cid = wi_string_uint32(WI_ARRAY(arguments, 0)); 1138 1138 chat = wd_chat_with_cid(cid); 1139 1139 … … 1164 1164 } 1165 1165 1166 uid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));1166 uid = wi_string_uint32(WI_ARRAY(arguments, 0)); 1167 1167 peer = wd_client_with_uid(uid); 1168 1168 … … 1206 1206 wd_cid_t cid; 1207 1207 1208 cid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));1208 cid = wi_string_uint32(WI_ARRAY(arguments, 0)); 1209 1209 1210 1210 if(cid == WD_PUBLIC_CID) … … 1277 1277 unsigned int i, count; 1278 1278 1279 cid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));1279 cid = wi_string_uint32(WI_ARRAY(arguments, 0)); 1280 1280 chat = wd_chat_with_cid(cid); 1281 1281 … … 1352 1352 wd_uid_t uid; 1353 1353 1354 uid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));1354 uid = wi_string_uint32(WI_ARRAY(arguments, 0)); 1355 1355 peer = wd_client_with_uid(uid); 1356 1356 … … 1570 1570 1571 1571 properpath = wi_string_by_normalizing_path(path); 1572 size = wi_string_u nsigned_long_long_value(WI_ARRAY(arguments, 1));1572 size = wi_string_uint64(WI_ARRAY(arguments, 1)); 1573 1573 1574 1574 wd_transfers_queue_upload(properpath, size, WI_ARRAY(arguments, 2)); … … 1625 1625 unsigned int i, count; 1626 1626 1627 cid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));1627 cid = wi_string_uint32(WI_ARRAY(arguments, 0)); 1628 1628 chat = wd_chat_with_cid(cid); 1629 1629 … … 1728 1728 wd_cid_t cid; 1729 1729 1730 cid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));1730 cid = wi_string_uint32(WI_ARRAY(arguments, 0)); 1731 1731 chat = wd_chat_with_cid(cid); 1732 1732 … … 1786 1786 1787 1787 properpath = wi_string_by_normalizing_path(path); 1788 type = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 1));1788 type = wi_string_uint32(WI_ARRAY(arguments, 1)); 1789 1789 1790 1790 wd_files_set_type(properpath, type); … … 1840 1840 wd_cid_t cid; 1841 1841 1842 cid = wi_string_u nsigned_int_value(WI_ARRAY(arguments, 0));1842 cid = wi_string_uint32(WI_ARRAY(arguments, 0)); 1843 1843 chat = wd_chat_with_cid(cid); 1844 1844 wired/trunk/wired/files.c
r3809 r3831 971 971 wi_string_delete_surrounding_whitespace(string); 972 972 973 return wi_string_u nsigned_int_value(string);973 return wi_string_uint32(string); 974 974 } 975 975 wired/trunk/wired/main.c
r3830 r3831 132 132 133 133 case 'i': 134 wi_log_limit = wi_string_u nsigned_int_value(wi_string_with_cstring(optarg));134 wi_log_limit = wi_string_uint32(wi_string_with_cstring(optarg)); 135 135 break; 136 136
