Changeset 4797
- Timestamp:
- 05/27/07 23:48:49 (2 years ago)
- Files:
-
- libwired/trunk/libwired/collections/wi-array.c (modified) (3 diffs)
- libwired/trunk/libwired/collections/wi-hash.c (modified) (4 diffs)
- libwired/trunk/libwired/collections/wi-set.c (modified) (2 diffs)
- libwired/trunk/libwired/data/wi-date.c (modified) (1 diff)
- libwired/trunk/libwired/data/wi-url.c (modified) (1 diff)
- libwired/trunk/libwired/misc/wi-crypto.c (modified) (2 diffs)
- libwired/trunk/libwired/misc/wi-error.c (modified) (1 diff)
- libwired/trunk/libwired/misc/wi-settings.c (modified) (1 diff)
- libwired/trunk/libwired/misc/wi-test.c (modified) (1 diff)
- libwired/trunk/libwired/net/wi-address.c (modified) (1 diff)
- libwired/trunk/libwired/p7/wi-p7-spec.c (modified) (11 diffs)
- libwired/trunk/test/tests/wi-runtime-tests.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libwired/trunk/libwired/collections/wi-array.c
r4774 r4797 133 133 wi_is_equal, 134 134 wi_description 135 };136 137 const wi_array_callbacks_t wi_array_null_callbacks = {138 NULL,139 NULL,140 NULL,141 NULL142 135 }; 143 136 … … 447 440 wi_uinteger_t i; 448 441 449 string = wi_string_with_format(WI_STR("<%@ %p>{count = % d, values = (\n"),442 string = wi_string_with_format(WI_STR("<%@ %p>{count = %lu, values = (\n"), 450 443 wi_runtime_class_name(array), 451 444 array, … … 460 453 description = wi_string_with_format(WI_STR("%p"), data); 461 454 462 wi_string_append_format(string, WI_STR(" % u: %@\n"), i, description);455 wi_string_append_format(string, WI_STR(" %lu: %@\n"), i, description); 463 456 } 464 457 libwired/trunk/libwired/collections/wi-hash.c
r4778 r4797 161 161 }; 162 162 163 const wi_hash_key_callbacks_t wi_hash_null_key_callbacks = {164 NULL,165 NULL,166 NULL,167 NULL,168 NULL169 };170 171 163 const wi_hash_value_callbacks_t wi_hash_default_value_callbacks = { 172 164 wi_retain, … … 174 166 wi_is_equal, 175 167 wi_description 176 };177 178 const wi_hash_value_callbacks_t wi_hash_null_value_callbacks = {179 NULL,180 NULL,181 NULL,182 NULL183 168 }; 184 169 … … 346 331 wi_uinteger_t i; 347 332 348 string = wi_string_with_format(WI_STR("<%@ %p>{count = % d, values = (\n"),333 string = wi_string_with_format(WI_STR("<%@ %p>{count = %lu, values = (\n"), 349 334 wi_runtime_class_name(hash), 350 335 hash, … … 461 446 462 447 if(hash->key_count == 0) 463 return wi_a rray();448 return wi_autorelease(wi_array_init(wi_array_alloc())); 464 449 465 450 callbacks.retain = NULL; libwired/trunk/libwired/collections/wi-set.c
r4774 r4797 136 136 }; 137 137 138 const wi_set_callbacks_t wi_set_null_callbacks = {139 NULL,140 NULL,141 NULL,142 NULL,143 NULL144 };145 146 138 static wi_uinteger_t _wi_set_buckets_per_page; 147 139 … … 301 293 wi_uinteger_t i; 302 294 303 string = wi_string_with_format(WI_STR("<%@ %p>{count = % d, values = (\n"),295 string = wi_string_with_format(WI_STR("<%@ %p>{count = %lu, values = (\n"), 304 296 wi_runtime_class_name(set), 305 297 set, libwired/trunk/libwired/data/wi-date.c
r4575 r4797 107 107 108 108 if(days > 0) { 109 return wi_string_with_format(WI_STR("% u:%.2u:%.2u:%.2u days"),109 return wi_string_with_format(WI_STR("%lu:%.2lu:%.2lu:%.2lu days"), 110 110 days, hours, minutes, seconds); 111 111 } 112 112 else if(hours > 0) { 113 return wi_string_with_format(WI_STR("%.2 u:%.2u:%.2u hours"),113 return wi_string_with_format(WI_STR("%.2lu:%.2lu:%.2lu hours"), 114 114 hours, minutes, seconds); 115 115 } 116 116 else if(minutes > 0) { 117 return wi_string_with_format(WI_STR("%.2 u:%.2u minutes"),117 return wi_string_with_format(WI_STR("%.2lu:%.2lu minutes"), 118 118 minutes, seconds); 119 119 } 120 120 else { 121 return wi_string_with_format(WI_STR("00:%.2 u seconds"),121 return wi_string_with_format(WI_STR("00:%.2lu seconds"), 122 122 seconds); 123 123 } libwired/trunk/libwired/data/wi-url.c
r4623 r4797 198 198 199 199 if(url->port > 0) 200 wi_string_append_format(url->string, WI_STR(":% u"), url->port);200 wi_string_append_format(url->string, WI_STR(":%lu"), url->port); 201 201 202 202 if(url->path) libwired/trunk/libwired/misc/wi-crypto.c
r4697 r4797 228 228 wi_rsa_t *rsa = instance; 229 229 230 return wi_string_with_format(WI_STR("<%@ %p>{key = %p, bits = % u}"),230 return wi_string_with_format(WI_STR("<%@ %p>{key = %p, bits = %lu}"), 231 231 wi_runtime_class_name(rsa), 232 232 rsa, … … 527 527 wi_cipher_t *cipher = instance; 528 528 529 return wi_string_with_format(WI_STR("<%@ %p>{name = %@, bits = % u, iv = %@, key = %@}"),529 return wi_string_with_format(WI_STR("<%@ %p>{name = %@, bits = %lu, iv = %@, key = %@}"), 530 530 wi_runtime_class_name(cipher), 531 531 cipher, libwired/trunk/libwired/misc/wi-error.c
r4698 r4797 254 254 wi_release(error->string); 255 255 256 error->string = wi_string_init_with_format(wi_string_alloc(), WI_STR("%s:% u: %s: %s (%u)"),256 error->string = wi_string_init_with_format(wi_string_alloc(), WI_STR("%s:%d: %s: %s (%u)"), 257 257 file, 258 258 line, libwired/trunk/libwired/misc/wi-settings.c
r4679 r4797 297 297 298 298 static void _wi_settings_log_error(wi_settings_t *settings, wi_string_t *name) { 299 wi_log_warn(WI_STR("Could not interpret the setting \"%@\" at %@ line % d: %m"),299 wi_log_warn(WI_STR("Could not interpret the setting \"%@\" at %@ line %lu: %m"), 300 300 name, settings->file, settings->line); 301 301 } libwired/trunk/libwired/misc/wi-test.c
r4777 r4797 105 105 106 106 wi_log_info(WI_STR("Tests stopped at %@"), wi_date_string_with_format(_wi_tests_start_date, WI_STR("%Y-%m-%d %H:%M:%S"))); 107 wi_log_info(WI_STR("% u %@ passed (%.1f%%), %u failed (%.1f%%) in %.3f seconds"),107 wi_log_info(WI_STR("%lu %@ passed (%.1f%%), %lu failed (%.1f%%) in %.3f seconds"), 108 108 wi_tests_passed, 109 109 wi_tests_passed == 1 libwired/trunk/libwired/net/wi-address.c
r4623 r4797 216 216 } 217 217 218 return wi_string_with_format(WI_STR("<%@ %p>{family = %@, address = %@, port = % u}"),218 return wi_string_with_format(WI_STR("<%@ %p>{family = %@, address = %@, port = %lu}"), 219 219 wi_runtime_class_name(address), 220 220 address, libwired/trunk/libwired/p7/wi-p7-spec.c
r4777 r4797 737 737 if(wi_hash_data_for_key(p7_spec->types_id, (void *) type->id)) { 738 738 wi_error_set_libwired_p7_error(WI_ERROR_P7_INVALIDSPEC, 739 WI_STR("Type with id % u (name \"%@\") already exists"),739 WI_STR("Type with id %lu (name \"%@\") already exists"), 740 740 type->name, type->id); 741 741 … … 776 776 if(wi_hash_data_for_key(p7_spec->fields_id, (void *) field->id)) { 777 777 wi_error_set_libwired_p7_error(WI_ERROR_P7_INVALIDSPEC, 778 WI_STR("Field with id % u (name \"%@\") already exists"),778 WI_STR("Field with id %lu (name \"%@\") already exists"), 779 779 field->id, field->name); 780 780 … … 815 815 if(wi_hash_data_for_key(p7_spec->messages_id, (void *) message->id)) { 816 816 wi_error_set_libwired_p7_error(WI_ERROR_P7_INVALIDSPEC, 817 WI_STR("Message with id % u (name \"%@\") already exists"),817 WI_STR("Message with id %lu (name \"%@\") already exists"), 818 818 message->id, message->name); 819 819 … … 961 961 if(count != other_count) { 962 962 wi_error_set_libwired_p7_error(WI_ERROR_P7_INVALIDSPEC, 963 WI_STR("Transaction \"%@\" should have % u %@, but peer has %u"),963 WI_STR("Transaction \"%@\" should have %lu %@, but peer has %lu"), 964 964 transaction->message->name, 965 965 count, … … 1092 1092 if(message->id != other_message->id) { 1093 1093 wi_error_set_libwired_p7_error(WI_ERROR_P7_INVALIDSPEC, 1094 WI_STR("Message in reply \"%@\" in transaction \"%@\" should have id % u, but peer has id %u"),1094 WI_STR("Message in reply \"%@\" in transaction \"%@\" should have id %lu, but peer has id %lu"), 1095 1095 message->name, transaction->message->name, message->id, other_message->id); 1096 1096 … … 1126 1126 if(field->id != other_field->id) { 1127 1127 wi_error_set_libwired_p7_error(WI_ERROR_P7_INVALIDSPEC, 1128 WI_STR("Field in parameter \"%@\" in reply \"%@\" in transaction \"%@\" should have id % u, but peer has id %u"),1128 WI_STR("Field in parameter \"%@\" in reply \"%@\" in transaction \"%@\" should have id %lu, but peer has id %lu"), 1129 1129 parameter->field->name, message->name, transaction->message->name, field->id, other_field->id); 1130 1130 … … 1429 1429 _wi_p7_spec_type_t *type = instance; 1430 1430 1431 return wi_string_with_format(WI_STR("<%@ %p>{name = %@, id = % u, size = %u}"),1431 return wi_string_with_format(WI_STR("<%@ %p>{name = %@, id = %lu, size = %lu}"), 1432 1432 wi_runtime_class_name(type), 1433 1433 type, … … 1536 1536 _wi_p7_spec_field_t *field = instance; 1537 1537 1538 return wi_string_with_format(WI_STR("<%@ %p>{name = %@, id = % u, type = %@}"),1538 return wi_string_with_format(WI_STR("<%@ %p>{name = %@, id = %lu, type = %@}"), 1539 1539 wi_runtime_class_name(field), 1540 1540 field, … … 1613 1613 _wi_p7_spec_message_t *message = instance; 1614 1614 1615 return wi_string_with_format(WI_STR("<%@ %p>{name = %@, id = % u, parameters = %@}"),1615 return wi_string_with_format(WI_STR("<%@ %p>{name = %@, id = %lu, parameters = %@}"), 1616 1616 wi_runtime_class_name(message), 1617 1617 message, … … 1973 1973 return WI_STR("one or more times"); 1974 1974 1975 return wi_string_with_format(WI_STR("% u %@"), reply->count, (reply->count == 1) ? WI_STR("time") : WI_STR("times"));1975 return wi_string_with_format(WI_STR("%lu %@"), reply->count, (reply->count == 1) ? WI_STR("time") : WI_STR("times")); 1976 1976 } 1977 1977 … … 1989 1989 _wi_p7_spec_reply_t *reply = instance; 1990 1990 1991 return wi_string_with_format(WI_STR("<%@ %p>{message = %@, count = % u, required = %@}"),1991 return wi_string_with_format(WI_STR("<%@ %p>{message = %@, count = %lu, required = %@}"), 1992 1992 wi_runtime_class_name(reply), 1993 1993 reply, libwired/trunk/test/tests/wi-runtime-tests.c
r4669 r4797 124 124 _wi_runtimetest_t *runtimetest = instance; 125 125 126 return wi_string_with_format(WI_STR("value=% u"), runtimetest->value);126 return wi_string_with_format(WI_STR("value=%lu"), runtimetest->value); 127 127 } 128 128
