diff options
| author | ruki <[email protected]> | 2015-12-21 09:37:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-12-21 09:37:49 +0800 |
| commit | 8f8f8425df4e1ce4b71099a669dd4ccc3d4a0b0f (patch) | |
| tree | 3b5a397982c0d702a370c508a261353253ff2261 | |
| parent | 58f15142262d270d09b15e0c2648898be59b5013 (diff) | |
update tbox for linux
303 files changed, 264 insertions, 224 deletions
diff --git a/core/pkg/tbox.pkg/inc/linux/x64/tbox.config.h b/core/pkg/tbox.pkg/inc/linux/x64/tbox.config.h index 694c78de1..4ea1cce33 100755 --- a/core/pkg/tbox.pkg/inc/linux/x64/tbox.config.h +++ b/core/pkg/tbox.pkg/inc/linux/x64/tbox.config.h @@ -6,13 +6,14 @@ #define TB_CONFIG_VERSION_MAJOR 1 #define TB_CONFIG_VERSION_MINOR 5 #define TB_CONFIG_VERSION_ALTER 1 -#define TB_CONFIG_VERSION_BUILD 201512162038 +#define TB_CONFIG_VERSION_BUILD 201512210934 // defines #define TB_CONFIG_OS_LINUX #define TB_CONFIG_INFO_HAVE_VERSION #define TB_CONFIG_TYPE_HAVE_FLOAT #define TB_CONFIG_MODULE_HAVE_XML +#define TB_CONFIG_MODULE_HAVE_ZIP #define TB_CONFIG_MODULE_HAVE_ASIO #define TB_CONFIG_MODULE_HAVE_OBJECT #define TB_CONFIG_MODULE_HAVE_THREAD diff --git a/core/pkg/tbox.pkg/inc/linux/x86/tbox.config.h b/core/pkg/tbox.pkg/inc/linux/x86/tbox.config.h index 1b29bae51..2b1007c54 100755 --- a/core/pkg/tbox.pkg/inc/linux/x86/tbox.config.h +++ b/core/pkg/tbox.pkg/inc/linux/x86/tbox.config.h @@ -6,13 +6,14 @@ #define TB_CONFIG_VERSION_MAJOR 1 #define TB_CONFIG_VERSION_MINOR 5 #define TB_CONFIG_VERSION_ALTER 1 -#define TB_CONFIG_VERSION_BUILD 201512162126 +#define TB_CONFIG_VERSION_BUILD 201512210936 // defines #define TB_CONFIG_OS_LINUX #define TB_CONFIG_INFO_HAVE_VERSION #define TB_CONFIG_TYPE_HAVE_FLOAT #define TB_CONFIG_MODULE_HAVE_XML +#define TB_CONFIG_MODULE_HAVE_ZIP #define TB_CONFIG_MODULE_HAVE_ASIO #define TB_CONFIG_MODULE_HAVE_OBJECT #define TB_CONFIG_MODULE_HAVE_THREAD diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/algorithm.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/algorithm.h index e8c3981ac..e8c3981ac 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/algorithm.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/algorithm.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/binary_find.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/binary_find.h index 6a6f0b5f5..6a6f0b5f5 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/binary_find.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/binary_find.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/binary_find_if.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/binary_find_if.h index 43d9f581c..43d9f581c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/binary_find_if.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/binary_find_if.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/bubble_sort.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/bubble_sort.h index 9d98c046e..9d98c046e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/bubble_sort.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/bubble_sort.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/count.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/count.h index 58053cbef..58053cbef 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/count.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/count.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/count_if.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/count_if.h index 4800417b5..4800417b5 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/count_if.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/count_if.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/distance.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/distance.h index 268049483..268049483 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/distance.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/distance.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/find.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/find.h index be3ed6f3c..be3ed6f3c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/find.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/find.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/find_if.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/find_if.h index d5239aa5c..d5239aa5c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/find_if.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/find_if.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/for.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/for.h index 814607a3e..814607a3e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/for.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/for.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/for_if.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/for_if.h index cd2270a25..cd2270a25 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/for_if.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/for_if.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/heap_sort.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/heap_sort.h index 092ba2387..092ba2387 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/heap_sort.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/heap_sort.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/insert_sort.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/insert_sort.h index 595be6a66..595be6a66 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/insert_sort.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/insert_sort.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/predicate.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/predicate.h index 3b9e13eb2..3b9e13eb2 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/predicate.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/predicate.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/prefix.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/prefix.h index c991dc554..c991dc554 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/quick_sort.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/quick_sort.h index 51aca3eae..51aca3eae 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/quick_sort.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/quick_sort.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/remove.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/remove.h index 55d688378..55d688378 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/remove.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/remove.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_first.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_first.h index a5524d6c4..a5524d6c4 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_first.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_first.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_first_if.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_first_if.h index 12a547e41..12a547e41 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_first_if.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_first_if.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_if.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_if.h index 382a94ffd..382a94ffd 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_if.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/remove_if.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/rfind.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/rfind.h index 5c9bf5368..5c9bf5368 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/rfind.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/rfind.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/rfind_if.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/rfind_if.h index 6608f39fa..6608f39fa 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/rfind_if.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/rfind_if.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/rfor.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/rfor.h index bbe553812..bbe553812 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/rfor.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/rfor.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/rfor_if.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/rfor_if.h index 41da291b1..41da291b1 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/rfor_if.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/rfor_if.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/rwalk.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/rwalk.h index f85b0f1a3..f85b0f1a3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/rwalk.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/rwalk.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/sort.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/sort.h index 8d76f7c03..8d76f7c03 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/sort.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/sort.h diff --git a/core/pkg/tbox.pkg/inc/tbox/algorithm/walk.h b/core/pkg/tbox.pkg/inc/tbox/algorithm/walk.h index b5fe70f03..b5fe70f03 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/algorithm/walk.h +++ b/core/pkg/tbox.pkg/inc/tbox/algorithm/walk.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/aice.h b/core/pkg/tbox.pkg/inc/tbox/asio/aice.h index 5093b6b2f..5093b6b2f 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/aice.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/aice.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/aico.h b/core/pkg/tbox.pkg/inc/tbox/asio/aico.h index 9b808c738..9b808c738 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/aico.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/aico.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/aicp.h b/core/pkg/tbox.pkg/inc/tbox/asio/aicp.h index f8c0fbf62..f8c0fbf62 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/aicp.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/aicp.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/aioe.h b/core/pkg/tbox.pkg/inc/tbox/asio/aioe.h index e9c692a48..e9c692a48 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/aioe.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/aioe.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/aioo.h b/core/pkg/tbox.pkg/inc/tbox/asio/aioo.h index 372cbd86d..372cbd86d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/aioo.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/aioo.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/aiop.h b/core/pkg/tbox.pkg/inc/tbox/asio/aiop.h index 4b5cc15e3..4b5cc15e3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/aiop.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/aiop.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/asio.h b/core/pkg/tbox.pkg/inc/tbox/asio/asio.h index 8d96712c2..8d96712c2 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/asio.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/asio.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/dns.h b/core/pkg/tbox.pkg/inc/tbox/asio/dns.h index 5039b4cec..5039b4cec 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/dns.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/dns.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/http.h b/core/pkg/tbox.pkg/inc/tbox/asio/http.h index 1fddab323..1fddab323 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/http.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/http.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/prefix.h b/core/pkg/tbox.pkg/inc/tbox/asio/prefix.h index fe7990e96..fe7990e96 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/asio/ssl.h b/core/pkg/tbox.pkg/inc/tbox/asio/ssl.h index a2d192e52..a2d192e52 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/asio/ssl.h +++ b/core/pkg/tbox.pkg/inc/tbox/asio/ssl.h diff --git a/core/pkg/tbox.pkg/inc/tbox/charset/charset.h b/core/pkg/tbox.pkg/inc/tbox/charset/charset.h index e33d12436..e33d12436 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/charset/charset.h +++ b/core/pkg/tbox.pkg/inc/tbox/charset/charset.h diff --git a/core/pkg/tbox.pkg/inc/tbox/charset/prefix.h b/core/pkg/tbox.pkg/inc/tbox/charset/prefix.h index 4f36158ce..4f36158ce 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/charset/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/charset/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/config.h b/core/pkg/tbox.pkg/inc/tbox/config.h index 27ccfd550..27ccfd550 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/config.h +++ b/core/pkg/tbox.pkg/inc/tbox/config.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/bloom_filter.h b/core/pkg/tbox.pkg/inc/tbox/container/bloom_filter.h index 883e0bab9..883e0bab9 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/bloom_filter.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/bloom_filter.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/circle_queue.h b/core/pkg/tbox.pkg/inc/tbox/container/circle_queue.h index 82157147c..82157147c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/circle_queue.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/circle_queue.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/container.h b/core/pkg/tbox.pkg/inc/tbox/container/container.h index 237ceb9c1..237ceb9c1 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/container.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/container.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/element.h b/core/pkg/tbox.pkg/inc/tbox/container/element.h index 1ded4b0ff..1ded4b0ff 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/element.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/element.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/element/hash.h b/core/pkg/tbox.pkg/inc/tbox/container/element/hash.h index 54a4e411a..54a4e411a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/element/hash.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/element/hash.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/element/prefix.h b/core/pkg/tbox.pkg/inc/tbox/container/element/prefix.h index 51bf8c8a4..51bf8c8a4 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/element/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/element/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/hash_map.h b/core/pkg/tbox.pkg/inc/tbox/container/hash_map.h index 976369f6f..8ac423017 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/hash_map.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/hash_map.h @@ -153,7 +153,7 @@ tb_pointer_t tb_hash_map_get(tb_hash_map_ref_t hash_map, tb_cpointer_ * { * // get data * tb_xxxx_ref_t data = (tb_xxxx_ref_t)tb_iterator_item(hash_map, itor); - * tb_assert_abort(data); + * tb_assert(data); * * // remove it * tb_iterator_remove(hash_map, itor); diff --git a/core/pkg/tbox.pkg/inc/tbox/container/hash_set.h b/core/pkg/tbox.pkg/inc/tbox/container/hash_set.h index db0e930e8..db0e930e8 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/hash_set.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/hash_set.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/heap.h b/core/pkg/tbox.pkg/inc/tbox/container/heap.h index 612618bca..612618bca 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/heap.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/heap.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/iterator.h b/core/pkg/tbox.pkg/inc/tbox/container/iterator.h index c0d26e620..c0d26e620 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/iterator.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/iterator.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/iterator/prefix.h b/core/pkg/tbox.pkg/inc/tbox/container/iterator/prefix.h index d84483189..d84483189 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/iterator/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/iterator/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/list.h b/core/pkg/tbox.pkg/inc/tbox/container/list.h index f27c4935a..f27c4935a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/list.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/list.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/list_entry.h b/core/pkg/tbox.pkg/inc/tbox/container/list_entry.h index 810736b64..4a006a16d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/list_entry.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/list_entry.h @@ -56,7 +56,7 @@ static tb_void_t tb_xxxx_entry_copy(tb_pointer_t litem, tb_pointer_t ritem) { // check - tb_assert_return(litem && ritem); + tb_assert(litem && ritem); // copy it ((tb_xxxx_entry_t*)litem)->data = ((tb_xxxx_entry_t*)ritem)->data; @@ -155,7 +155,7 @@ tb_void_t tb_list_entry_exit(tb_list_entry_hea static __tb_inline__ tb_void_t tb_list_entry_clear(tb_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // clear it list->next = (tb_list_entry_ref_t)list; @@ -172,7 +172,7 @@ static __tb_inline__ tb_void_t tb_list_entry_clear(tb_list_entry_he static __tb_inline__ tb_size_t tb_list_entry_size(tb_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // done return list->size; @@ -188,7 +188,7 @@ static __tb_inline__ tb_size_t tb_list_entry_size(tb_list_entry_hea static __tb_inline__ tb_list_entry_ref_t tb_list_entry_next(tb_list_entry_head_ref_t list, tb_list_entry_ref_t entry) { // check - tb_assert_abort(entry); + tb_assert(entry); // done return entry->next; @@ -204,7 +204,7 @@ static __tb_inline__ tb_list_entry_ref_t tb_list_entry_next(tb_list_entry_hea static __tb_inline__ tb_list_entry_ref_t tb_list_entry_prev(tb_list_entry_head_ref_t list, tb_list_entry_ref_t entry) { // check - tb_assert_abort(entry); + tb_assert(entry); // done return entry->prev; @@ -219,7 +219,7 @@ static __tb_inline__ tb_list_entry_ref_t tb_list_entry_prev(tb_list_entry_hea static __tb_inline__ tb_list_entry_ref_t tb_list_entry_head(tb_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // done return list->next; @@ -234,7 +234,7 @@ static __tb_inline__ tb_list_entry_ref_t tb_list_entry_head(tb_list_entry_hea static __tb_inline__ tb_list_entry_ref_t tb_list_entry_last(tb_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // done return list->prev; @@ -261,7 +261,7 @@ static __tb_inline__ tb_list_entry_ref_t tb_list_entry_tail(tb_list_entry_hea static __tb_inline__ tb_bool_t tb_list_entry_is_null(tb_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // done return !list->size; @@ -277,7 +277,7 @@ static __tb_inline__ tb_bool_t tb_list_entry_is_null(tb_list_entry_ static __tb_inline__ tb_bool_t tb_list_entry_is_head(tb_list_entry_head_ref_t list, tb_list_entry_ref_t entry) { // check - tb_assert_abort(list); + tb_assert(list); // done return list->next == entry; @@ -293,7 +293,7 @@ static __tb_inline__ tb_bool_t tb_list_entry_is_head(tb_list_entry_ static __tb_inline__ tb_bool_t tb_list_entry_is_last(tb_list_entry_head_ref_t list, tb_list_entry_ref_t entry) { // check - tb_assert_abort(list); + tb_assert(list); // done return list->prev == entry; @@ -308,7 +308,7 @@ static __tb_inline__ tb_bool_t tb_list_entry_is_last(tb_list_entry_ static __tb_inline__ tb_bool_t tb_list_entry_is_valid(tb_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // done return (list->next && list->next->prev == (tb_list_entry_ref_t)list) && (list->prev && list->prev->next == (tb_list_entry_ref_t)list); @@ -324,12 +324,12 @@ static __tb_inline__ tb_bool_t tb_list_entry_is_valid(tb_list_entry static __tb_inline__ tb_void_t tb_list_entry_splice(tb_list_entry_head_ref_t list, tb_list_entry_ref_t prev, tb_list_entry_ref_t next, tb_list_entry_head_ref_t spliced_list) { // check - tb_assert_abort(list && prev && next); - tb_assert_abort(spliced_list && spliced_list->next && spliced_list->prev); + tb_assert(list && prev && next); + tb_assert(spliced_list && spliced_list->next && spliced_list->prev); // valid? - tb_assert_abort(tb_list_entry_is_valid(list)); - tb_assert_abort(tb_list_entry_is_valid(spliced_list)); + tb_assert(tb_list_entry_is_valid(list)); + tb_assert(tb_list_entry_is_valid(spliced_list)); // empty? tb_check_return(!tb_list_entry_is_null(spliced_list)); @@ -355,7 +355,7 @@ static __tb_inline__ tb_void_t tb_list_entry_splice(tb_list_entry_h static __tb_inline__ tb_void_t tb_list_entry_splice_head(tb_list_entry_head_ref_t list, tb_list_entry_head_ref_t spliced_list) { // check - tb_assert_abort(list); + tb_assert(list); // done tb_list_entry_splice(list, (tb_list_entry_ref_t)list, list->next, spliced_list); @@ -369,7 +369,7 @@ static __tb_inline__ tb_void_t tb_list_entry_splice_head(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_splice_tail(tb_list_entry_head_ref_t list, tb_list_entry_head_ref_t spliced_list) { // check - tb_assert_abort(list); + tb_assert(list); // done tb_list_entry_splice(list, list->prev, (tb_list_entry_ref_t)list, spliced_list); @@ -384,11 +384,11 @@ static __tb_inline__ tb_void_t tb_list_entry_splice_tail(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_insert_next(tb_list_entry_head_ref_t list, tb_list_entry_ref_t node, tb_list_entry_ref_t entry) { // check - tb_assert_abort(list && node && node->next && entry); - tb_assert_abort(node != entry); + tb_assert(list && node && node->next && entry); + tb_assert(node != entry); // valid? - tb_assert_abort(tb_list_entry_is_valid(list)); + tb_assert(tb_list_entry_is_valid(list)); // insert entry node->next->prev = entry; @@ -409,7 +409,7 @@ static __tb_inline__ tb_void_t tb_list_entry_insert_next(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_insert_prev(tb_list_entry_head_ref_t list, tb_list_entry_ref_t node, tb_list_entry_ref_t entry) { // check - tb_assert_abort(list && node); + tb_assert(list && node); // insert it tb_list_entry_insert_next(list, node->prev, entry); @@ -433,7 +433,7 @@ static __tb_inline__ tb_void_t tb_list_entry_insert_head(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_insert_tail(tb_list_entry_head_ref_t list, tb_list_entry_ref_t entry) { // check - tb_assert_abort(list && entry); + tb_assert(list && entry); // insert it tb_list_entry_insert_next(list, list->prev, entry); @@ -448,11 +448,11 @@ static __tb_inline__ tb_void_t tb_list_entry_insert_tail(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_replace(tb_list_entry_head_ref_t list, tb_list_entry_ref_t node, tb_list_entry_ref_t entry) { // check - tb_assert_abort(node && node->next && node->prev && entry); - tb_assert_abort(node != entry); + tb_assert(node && node->next && node->prev && entry); + tb_assert(node != entry); // valid? - tb_assert_abort(tb_list_entry_is_valid(list)); + tb_assert(tb_list_entry_is_valid(list)); // replace it entry->next = node->next; @@ -470,7 +470,7 @@ static __tb_inline__ tb_void_t tb_list_entry_replace(tb_list_entry_ static __tb_inline__ tb_void_t tb_list_entry_replace_next(tb_list_entry_head_ref_t list, tb_list_entry_ref_t node, tb_list_entry_ref_t entry) { // check - tb_assert_abort(node); + tb_assert(node); // replace it tb_list_entry_replace(list, node->next, entry); @@ -485,7 +485,7 @@ static __tb_inline__ tb_void_t tb_list_entry_replace_next(tb_list_e static __tb_inline__ tb_void_t tb_list_entry_replace_prev(tb_list_entry_head_ref_t list, tb_list_entry_ref_t node, tb_list_entry_ref_t entry) { // check - tb_assert_abort(node); + tb_assert(node); // replace it tb_list_entry_replace(list, node->prev, entry); @@ -499,7 +499,7 @@ static __tb_inline__ tb_void_t tb_list_entry_replace_prev(tb_list_e static __tb_inline__ tb_void_t tb_list_entry_replace_head(tb_list_entry_head_ref_t list, tb_list_entry_ref_t entry) { // check - tb_assert_abort(list); + tb_assert(list); // replace it tb_list_entry_replace(list, list->next, entry); @@ -513,7 +513,7 @@ static __tb_inline__ tb_void_t tb_list_entry_replace_head(tb_list_e static __tb_inline__ tb_void_t tb_list_entry_replace_last(tb_list_entry_head_ref_t list, tb_list_entry_ref_t entry) { // check - tb_assert_abort(list); + tb_assert(list); // replace it tb_list_entry_replace(list, list->prev, entry); @@ -528,10 +528,10 @@ static __tb_inline__ tb_void_t tb_list_entry_replace_last(tb_list_e static __tb_inline__ tb_void_t tb_list_entry_remove_safe(tb_list_entry_head_ref_t list, tb_list_entry_ref_t prev, tb_list_entry_ref_t next) { // check - tb_assert_abort(list && list->size && prev && next); + tb_assert(list && list->size && prev && next); // valid? - tb_assert_abort(tb_list_entry_is_valid(list)); + tb_assert(tb_list_entry_is_valid(list)); // remove entries prev->next = next; @@ -549,7 +549,7 @@ static __tb_inline__ tb_void_t tb_list_entry_remove_safe(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_remove(tb_list_entry_head_ref_t list, tb_list_entry_ref_t entry) { // check - tb_assert_abort(entry); + tb_assert(entry); // remove it tb_list_entry_remove_safe(list, entry->prev, entry->next); @@ -563,7 +563,7 @@ static __tb_inline__ tb_void_t tb_list_entry_remove(tb_list_entry_h static __tb_inline__ tb_void_t tb_list_entry_remove_next(tb_list_entry_head_ref_t list, tb_list_entry_ref_t prev) { // check - tb_assert_abort(prev && prev->next); + tb_assert(prev && prev->next); // remove it tb_list_entry_remove_safe(list, prev, prev->next->next); @@ -577,7 +577,7 @@ static __tb_inline__ tb_void_t tb_list_entry_remove_next(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_remove_prev(tb_list_entry_head_ref_t list, tb_list_entry_ref_t next) { // check - tb_assert_abort(next && next->prev); + tb_assert(next && next->prev); // remove it tb_list_entry_remove_safe(list, next->prev->prev, next); @@ -590,7 +590,7 @@ static __tb_inline__ tb_void_t tb_list_entry_remove_prev(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_remove_head(tb_list_entry_head_ref_t list) { // check - tb_assert_abort(list && list->next); + tb_assert(list && list->next); // remove it tb_list_entry_remove_safe(list, (tb_list_entry_ref_t)list, list->next->next); @@ -603,7 +603,7 @@ static __tb_inline__ tb_void_t tb_list_entry_remove_head(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_remove_last(tb_list_entry_head_ref_t list) { // check - tb_assert_abort(list && list->prev); + tb_assert(list && list->prev); // remove it tb_list_entry_remove_safe(list, list->prev->prev, (tb_list_entry_ref_t)list); @@ -634,7 +634,7 @@ static __tb_inline__ tb_void_t tb_list_entry_moveto_next(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_moveto_prev(tb_list_entry_head_ref_t list, tb_list_entry_ref_t node, tb_list_entry_ref_t entry) { // check - tb_assert_abort(node); + tb_assert(node); // move it tb_list_entry_moveto_next(list, node->prev, entry); @@ -659,7 +659,7 @@ static __tb_inline__ tb_void_t tb_list_entry_moveto_head(tb_list_en static __tb_inline__ tb_void_t tb_list_entry_moveto_tail(tb_list_entry_head_ref_t list, tb_list_entry_ref_t entry) { // check - tb_assert_abort(list); + tb_assert(list); // move it tb_list_entry_moveto_next(list, list->prev, entry); diff --git a/core/pkg/tbox.pkg/inc/tbox/container/prefix.h b/core/pkg/tbox.pkg/inc/tbox/container/prefix.h index 3dde431fe..3dde431fe 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/priority_queue.h b/core/pkg/tbox.pkg/inc/tbox/container/priority_queue.h index 2e87a64ae..2e87a64ae 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/priority_queue.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/priority_queue.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/queue.h b/core/pkg/tbox.pkg/inc/tbox/container/queue.h index 8aa5a98aa..8aa5a98aa 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/queue.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/queue.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/single_list.h b/core/pkg/tbox.pkg/inc/tbox/container/single_list.h index 861c749c0..861c749c0 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/single_list.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/single_list.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/single_list_entry.h b/core/pkg/tbox.pkg/inc/tbox/container/single_list_entry.h index a5e0923a3..c45be57b1 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/single_list_entry.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/single_list_entry.h @@ -56,7 +56,7 @@ static tb_void_t tb_xxxx_entry_copy(tb_pointer_t litem, tb_pointer_t ritem) { // check - tb_assert_return(litem && ritem); + tb_assert(litem && ritem); // copy it ((tb_xxxx_entry_t*)litem)->data = ((tb_xxxx_entry_t*)ritem)->data; @@ -150,7 +150,7 @@ tb_void_t tb_single_list_entry_exit(tb_sin static __tb_inline__ tb_void_t tb_single_list_entry_clear(tb_single_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // clear it list->next = tb_null; @@ -167,7 +167,7 @@ static __tb_inline__ tb_void_t tb_single_list_entry_clear(tb_si static __tb_inline__ tb_size_t tb_single_list_entry_size(tb_single_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // done return list->size; @@ -183,7 +183,7 @@ static __tb_inline__ tb_size_t tb_single_list_entry_size(tb_sin static __tb_inline__ tb_single_list_entry_ref_t tb_single_list_entry_next(tb_single_list_entry_head_ref_t list, tb_single_list_entry_ref_t entry) { // check - tb_assert_abort(entry); + tb_assert(entry); // done return entry->next; @@ -198,7 +198,7 @@ static __tb_inline__ tb_single_list_entry_ref_t tb_single_list_entry_next(tb_sin static __tb_inline__ tb_single_list_entry_ref_t tb_single_list_entry_head(tb_single_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // done return list->next; @@ -213,7 +213,7 @@ static __tb_inline__ tb_single_list_entry_ref_t tb_single_list_entry_head(tb_sin static __tb_inline__ tb_single_list_entry_ref_t tb_single_list_entry_last(tb_single_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // done return list->last; @@ -239,7 +239,7 @@ static __tb_inline__ tb_single_list_entry_ref_t tb_single_list_entry_tail(tb_sin static __tb_inline__ tb_bool_t tb_single_list_entry_is_null(tb_single_list_entry_head_ref_t list) { // check - tb_assert_abort(list); + tb_assert(list); // done return !list->size; @@ -254,7 +254,7 @@ static __tb_inline__ tb_bool_t tb_single_list_entry_is_null(tb_ static __tb_inline__ tb_bool_t tb_single_list_entry_is_head(tb_single_list_entry_head_ref_t list, tb_single_list_entry_ref_t entry) { // check - tb_assert_abort(list); + tb_assert(list); // done return list->next == entry; @@ -270,7 +270,7 @@ static __tb_inline__ tb_bool_t tb_single_list_entry_is_head(tb_ static __tb_inline__ tb_bool_t tb_single_list_entry_is_last(tb_single_list_entry_head_ref_t list, tb_single_list_entry_ref_t entry) { // check - tb_assert_abort(list); + tb_assert(list); // done return list->last == entry; @@ -285,8 +285,8 @@ static __tb_inline__ tb_bool_t tb_single_list_entry_is_last(tb_ static __tb_inline__ tb_void_t tb_single_list_entry_insert_next(tb_single_list_entry_head_ref_t list, tb_single_list_entry_ref_t node, tb_single_list_entry_ref_t entry) { // check - tb_assert_abort(list && node && entry); - tb_assert_abort(node != entry); + tb_assert(list && node && entry); + tb_assert(node != entry); // update last if (node == list->last || !list->next) list->last = entry; @@ -318,7 +318,7 @@ static __tb_inline__ tb_void_t tb_single_list_entry_insert_head static __tb_inline__ tb_void_t tb_single_list_entry_insert_tail(tb_single_list_entry_head_ref_t list, tb_single_list_entry_ref_t entry) { // check - tb_assert_abort(list && entry); + tb_assert(list && entry); // insert it if (list->last) tb_single_list_entry_insert_next(list, list->last, entry); @@ -334,8 +334,8 @@ static __tb_inline__ tb_void_t tb_single_list_entry_insert_tail static __tb_inline__ tb_void_t tb_single_list_entry_replace_next(tb_single_list_entry_head_ref_t list, tb_single_list_entry_ref_t node, tb_single_list_entry_ref_t entry) { // check - tb_assert_abort(node && node->next); - tb_assert_abort(node != entry); + tb_assert(node && node->next); + tb_assert(node != entry); // update last if (node->next == list->last) list->last = entry; @@ -365,7 +365,7 @@ static __tb_inline__ tb_void_t tb_single_list_entry_replace_hea static __tb_inline__ tb_void_t tb_single_list_entry_remove_safe(tb_single_list_entry_head_ref_t list, tb_single_list_entry_ref_t prev, tb_single_list_entry_ref_t next) { // check - tb_assert_abort(list && list->size && prev); + tb_assert(list && list->size && prev); // update last if (prev->next == list->last) list->last = next; @@ -385,7 +385,7 @@ static __tb_inline__ tb_void_t tb_single_list_entry_remove_safe static __tb_inline__ tb_void_t tb_single_list_entry_remove_next(tb_single_list_entry_head_ref_t list, tb_single_list_entry_ref_t prev) { // check - tb_assert_abort(prev && prev->next); + tb_assert(prev && prev->next); // remove it tb_single_list_entry_remove_safe(list, prev, prev->next->next); @@ -398,7 +398,7 @@ static __tb_inline__ tb_void_t tb_single_list_entry_remove_next static __tb_inline__ tb_void_t tb_single_list_entry_remove_head(tb_single_list_entry_head_ref_t list) { // check - tb_assert_abort(list->next); + tb_assert(list->next); // remove it tb_single_list_entry_remove_safe(list, (tb_single_list_entry_ref_t)list, list->next->next); diff --git a/core/pkg/tbox.pkg/inc/tbox/container/stack.h b/core/pkg/tbox.pkg/inc/tbox/container/stack.h index d357eca0a..d357eca0a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/stack.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/stack.h diff --git a/core/pkg/tbox.pkg/inc/tbox/container/vector.h b/core/pkg/tbox.pkg/inc/tbox/container/vector.h index 53b3e111d..53b3e111d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/container/vector.h +++ b/core/pkg/tbox.pkg/inc/tbox/container/vector.h diff --git a/core/pkg/tbox.pkg/inc/tbox/database/database.h b/core/pkg/tbox.pkg/inc/tbox/database/database.h index 26122a4ec..26122a4ec 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/database/database.h +++ b/core/pkg/tbox.pkg/inc/tbox/database/database.h diff --git a/core/pkg/tbox.pkg/inc/tbox/database/prefix.h b/core/pkg/tbox.pkg/inc/tbox/database/prefix.h index e0e7f10d5..e0e7f10d5 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/database/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/database/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/database/sql.h b/core/pkg/tbox.pkg/inc/tbox/database/sql.h index 26f66c99a..26f66c99a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/database/sql.h +++ b/core/pkg/tbox.pkg/inc/tbox/database/sql.h diff --git a/core/pkg/tbox.pkg/inc/tbox/database/value.h b/core/pkg/tbox.pkg/inc/tbox/database/value.h index a28d286ee..a28d286ee 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/database/value.h +++ b/core/pkg/tbox.pkg/inc/tbox/database/value.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/libc.h b/core/pkg/tbox.pkg/inc/tbox/libc/libc.h index 0ae380055..0ae380055 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/libc.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/libc.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/misc/ctype.h b/core/pkg/tbox.pkg/inc/tbox/libc/misc/ctype.h index 878fce45c..878fce45c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/misc/ctype.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/misc/ctype.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/misc/limits.h b/core/pkg/tbox.pkg/inc/tbox/libc/misc/limits.h index 45828a1a7..45828a1a7 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/misc/limits.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/misc/limits.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/misc/misc.h b/core/pkg/tbox.pkg/inc/tbox/libc/misc/misc.h index 84a6aebbf..84a6aebbf 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/misc/misc.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/misc/misc.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/misc/prefix.h b/core/pkg/tbox.pkg/inc/tbox/libc/misc/prefix.h index 3cd542525..3cd542525 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/misc/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/misc/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/misc/setjmp.h b/core/pkg/tbox.pkg/inc/tbox/libc/misc/setjmp.h index b8583dcfd..b8583dcfd 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/misc/setjmp.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/misc/setjmp.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/misc/signal.h b/core/pkg/tbox.pkg/inc/tbox/libc/misc/signal.h index ca15dc661..ca15dc661 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/misc/signal.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/misc/signal.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/misc/stdarg.h b/core/pkg/tbox.pkg/inc/tbox/libc/misc/stdarg.h index 16aff2378..16aff2378 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/misc/stdarg.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/misc/stdarg.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/prefix.h b/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/prefix.h index af57dee8b..af57dee8b 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/time.h b/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/time.h index d96c76432..d96c76432 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/time.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/time.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/type.h b/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/type.h index 25679768a..25679768a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/type.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/misc/time/type.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/prefix.h b/core/pkg/tbox.pkg/inc/tbox/libc/prefix.h index d01c40204..d01c40204 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/stdio/prefix.h b/core/pkg/tbox.pkg/inc/tbox/libc/stdio/prefix.h index 0b3b5db9e..0b3b5db9e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/stdio/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/stdio/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/stdio/printf_object.h b/core/pkg/tbox.pkg/inc/tbox/libc/stdio/printf_object.h index 966ddc4a9..966ddc4a9 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/stdio/printf_object.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/stdio/printf_object.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/stdio/stdio.h b/core/pkg/tbox.pkg/inc/tbox/libc/stdio/stdio.h index 99935bce8..99935bce8 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/stdio/stdio.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/stdio/stdio.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/stdlib/prefix.h b/core/pkg/tbox.pkg/inc/tbox/libc/stdlib/prefix.h index 16225fb06..16225fb06 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/stdlib/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/stdlib/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/stdlib/stdlib.h b/core/pkg/tbox.pkg/inc/tbox/libc/stdlib/stdlib.h index e22467e29..bef6c0651 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/stdlib/stdlib.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/stdlib/stdlib.h @@ -82,6 +82,11 @@ __tb_extern_c_enter__ # define tb_strtof(s, e) tb_s10tof(s) # define tb_strtod(s, e) tb_s10tod(s) #endif +#if TB_CPU_BIT64 +# define tb_atol(s) (tb_long_t)tb_s10toi64(s) +#else +# define tb_atol(s) (tb_long_t)tb_s10toi32(s) +#endif // atow #define tb_atow(s1, s2, n) tb_mbstowcs(s1, s2, n) diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/string/prefix.h b/core/pkg/tbox.pkg/inc/tbox/libc/string/prefix.h index 4a7bd507e..4a7bd507e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/string/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/string/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libc/string/string.h b/core/pkg/tbox.pkg/inc/tbox/libc/string/string.h index ead619b44..ead619b44 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libc/string/string.h +++ b/core/pkg/tbox.pkg/inc/tbox/libc/string/string.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/ceil.h b/core/pkg/tbox.pkg/inc/tbox/libm/ceil.h index eb3eaf343..eb3eaf343 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/ceil.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/ceil.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/fabs.h b/core/pkg/tbox.pkg/inc/tbox/libm/fabs.h index 2465c49e2..2465c49e2 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/fabs.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/fabs.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/floor.h b/core/pkg/tbox.pkg/inc/tbox/libm/floor.h index 8c31041c1..8c31041c1 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/floor.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/floor.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/inf.h b/core/pkg/tbox.pkg/inc/tbox/libm/inf.h index 289ead7e3..289ead7e3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/inf.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/inf.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/libm.h b/core/pkg/tbox.pkg/inc/tbox/libm/libm.h index ddcb0df07..ddcb0df07 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/libm.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/libm.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/maf.h b/core/pkg/tbox.pkg/inc/tbox/libm/maf.h index 3101d4a4a..3101d4a4a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/maf.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/maf.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/math.h b/core/pkg/tbox.pkg/inc/tbox/libm/math.h index 5f6b91737..5f6b91737 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/math.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/math.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/mif.h b/core/pkg/tbox.pkg/inc/tbox/libm/mif.h index 0518db0d3..0518db0d3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/mif.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/mif.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/nan.h b/core/pkg/tbox.pkg/inc/tbox/libm/nan.h index 0aca2f237..0aca2f237 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/nan.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/nan.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/pi.h b/core/pkg/tbox.pkg/inc/tbox/libm/pi.h index 29bbc59c7..29bbc59c7 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/pi.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/pi.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/prefix.h b/core/pkg/tbox.pkg/inc/tbox/libm/prefix.h index 0e0e72d14..0e0e72d14 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/libm/round.h b/core/pkg/tbox.pkg/inc/tbox/libm/round.h index 17e9148fc..17e9148fc 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/libm/round.h +++ b/core/pkg/tbox.pkg/inc/tbox/libm/round.h diff --git a/core/pkg/tbox.pkg/inc/tbox/math/fixed.h b/core/pkg/tbox.pkg/inc/tbox/math/fixed.h index 590578a73..590578a73 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/fixed.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/fixed.h diff --git a/core/pkg/tbox.pkg/inc/tbox/math/fixed16.h b/core/pkg/tbox.pkg/inc/tbox/math/fixed16.h index abe99aadc..7894a26b9 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/fixed16.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/fixed16.h @@ -334,7 +334,7 @@ tb_fixed16_t tb_fixed16_exp_int32(tb_fixed16_t x); static __tb_inline__ tb_fixed16_t tb_long_to_fixed16_check(tb_long_t x) { // check overflow - tb_assert_abort(x == (tb_int16_t)x); + tb_assert(x == (tb_int16_t)x); // ok return (x << 16); @@ -342,7 +342,7 @@ static __tb_inline__ tb_fixed16_t tb_long_to_fixed16_check(tb_long_t x) static __tb_inline__ tb_long_t tb_fixed16_to_long_check(tb_fixed16_t x) { // check overflow - tb_assert_abort(x >= TB_FIXED16_MIN && x <= TB_FIXED16_MAX); + tb_assert(x >= TB_FIXED16_MIN && x <= TB_FIXED16_MAX); // ok return (x >> 16); @@ -353,7 +353,7 @@ static __tb_inline__ tb_fixed16_t tb_fixed16_mul_check(tb_fixed16_t x, tb_fixed1 tb_hong_t v = (((tb_hong_t)x * y) >> 16); // check overflow - tb_assert_abort(v == (tb_int32_t)v); + tb_assert(v == (tb_int32_t)v); // ok return (tb_fixed16_t)v; @@ -361,13 +361,13 @@ static __tb_inline__ tb_fixed16_t tb_fixed16_mul_check(tb_fixed16_t x, tb_fixed1 static __tb_inline__ tb_fixed16_t tb_fixed16_div_check(tb_fixed16_t x, tb_fixed16_t y) { // check - tb_assert_abort(y); + tb_assert(y); // done tb_hong_t v = ((((tb_hong_t)x) << 16) / y); // check overflow - tb_assert_abort(v == (tb_int32_t)v); + tb_assert(v == (tb_int32_t)v); // ok return (tb_fixed16_t)v; @@ -378,7 +378,7 @@ static __tb_inline__ tb_fixed16_t tb_fixed16_sqre_check(tb_fixed16_t x) tb_hong_t v = (((tb_hong_t)x * x) >> 16); // check overflow - tb_assert_abort(v == (tb_int32_t)v); + tb_assert(v == (tb_int32_t)v); // ok return (tb_fixed16_t)v; @@ -389,7 +389,7 @@ static __tb_inline__ tb_fixed16_t tb_fixed16_imul_check(tb_fixed16_t x, tb_long_ tb_hong_t v = ((tb_hong_t)x * y); // check overflow - tb_assert_abort(v == (tb_int32_t)v); + tb_assert(v == (tb_int32_t)v); // ok return (tb_fixed16_t)v; @@ -397,7 +397,7 @@ static __tb_inline__ tb_fixed16_t tb_fixed16_imul_check(tb_fixed16_t x, tb_long_ static __tb_inline__ tb_fixed16_t tb_fixed16_idiv_check(tb_fixed16_t x, tb_long_t y) { // check - tb_assert_abort(y); + tb_assert(y); // ok return x / y; @@ -408,7 +408,7 @@ static __tb_inline__ tb_fixed16_t tb_fixed16_imuldiv_check(tb_fixed16_t x, tb_lo tb_hong_t v = ((tb_hong_t)x * y) / z; // check overflow - tb_assert_abort(v == (tb_int32_t)v); + tb_assert(v == (tb_int32_t)v); // ok return (tb_fixed16_t)v; @@ -419,7 +419,7 @@ static __tb_inline__ tb_fixed16_t tb_fixed16_imulsub_check(tb_fixed16_t x, tb_lo tb_hong_t v = ((tb_hong_t)x * y) - z; // check overflow - tb_assert_abort(v == (tb_int32_t)v); + tb_assert(v == (tb_int32_t)v); // ok return (tb_fixed16_t)v; diff --git a/core/pkg/tbox.pkg/inc/tbox/math/fixed30.h b/core/pkg/tbox.pkg/inc/tbox/math/fixed30.h index 41965701a..41965701a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/fixed30.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/fixed30.h diff --git a/core/pkg/tbox.pkg/inc/tbox/math/fixed6.h b/core/pkg/tbox.pkg/inc/tbox/math/fixed6.h index 0703e2b0d..453e4b6d0 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/fixed6.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/fixed6.h @@ -151,7 +151,7 @@ static __tb_inline__ tb_fixed6_t tb_long_to_fixed6_check(tb_long_t x) static __tb_inline__ tb_long_t tb_fixed6_to_int_check(tb_fixed6_t x) { // check overflow - tb_assert_abort(x >= TB_FIXED6_MIN && x <= TB_FIXED6_MAX); + tb_assert(x >= TB_FIXED6_MIN && x <= TB_FIXED6_MAX); // ok return (x >> 6); @@ -163,7 +163,7 @@ static __tb_inline__ tb_fixed6_t tb_fixed6_mul_inline(tb_fixed6_t x, tb_fixed6_t tb_hong_t v = (((tb_hong_t)x * y) >> 6); // check overflow - tb_assert_abort(v == (tb_int32_t)v); + tb_assert(v == (tb_int32_t)v); // ok return (tb_fixed16_t)v; @@ -171,7 +171,7 @@ static __tb_inline__ tb_fixed6_t tb_fixed6_mul_inline(tb_fixed6_t x, tb_fixed6_t static __tb_inline__ tb_fixed16_t tb_fixed6_div_inline(tb_fixed6_t x, tb_fixed6_t y) { // check - tb_assert_abort(y); + tb_assert(y); // no overflow? compute it fastly if (x == (tb_int16_t)x) return (x << 16) / y; diff --git a/core/pkg/tbox.pkg/inc/tbox/math/impl/fixed16_arm.h b/core/pkg/tbox.pkg/inc/tbox/math/impl/fixed16_arm.h index 2a84fca64..2a84fca64 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/impl/fixed16_arm.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/impl/fixed16_arm.h diff --git a/core/pkg/tbox.pkg/inc/tbox/math/impl/fixed30_arm.h b/core/pkg/tbox.pkg/inc/tbox/math/impl/fixed30_arm.h index 68ea25f26..68ea25f26 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/impl/fixed30_arm.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/impl/fixed30_arm.h diff --git a/core/pkg/tbox.pkg/inc/tbox/math/impl/prefix.h b/core/pkg/tbox.pkg/inc/tbox/math/impl/prefix.h index 55e9f3aff..55e9f3aff 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/impl/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/impl/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/math/impl/random.h b/core/pkg/tbox.pkg/inc/tbox/math/impl/random.h index c73accf88..c73accf88 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/impl/random.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/impl/random.h diff --git a/core/pkg/tbox.pkg/inc/tbox/math/int32.h b/core/pkg/tbox.pkg/inc/tbox/math/int32.h index b51d425a3..b51d425a3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/int32.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/int32.h diff --git a/core/pkg/tbox.pkg/inc/tbox/math/math.h b/core/pkg/tbox.pkg/inc/tbox/math/math.h index 9eef102c4..9eef102c4 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/math.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/math.h diff --git a/core/pkg/tbox.pkg/inc/tbox/math/prefix.h b/core/pkg/tbox.pkg/inc/tbox/math/prefix.h index e42d4e57a..e42d4e57a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/math/random.h b/core/pkg/tbox.pkg/inc/tbox/math/random.h index f21a364ee..f21a364ee 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/math/random.h +++ b/core/pkg/tbox.pkg/inc/tbox/math/random.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/allocator.h b/core/pkg/tbox.pkg/inc/tbox/memory/allocator.h index d78d66b90..d78d66b90 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/allocator.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/allocator.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/buffer.h b/core/pkg/tbox.pkg/inc/tbox/memory/buffer.h index 98c6f568e..98c6f568e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/buffer.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/buffer.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/default_allocator.h b/core/pkg/tbox.pkg/inc/tbox/memory/default_allocator.h index 4762a5e7d..4762a5e7d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/default_allocator.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/default_allocator.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/fixed_pool.h b/core/pkg/tbox.pkg/inc/tbox/memory/fixed_pool.h index 433948dd8..433948dd8 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/fixed_pool.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/fixed_pool.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/large_allocator.h b/core/pkg/tbox.pkg/inc/tbox/memory/large_allocator.h index f78e70eee..f78e70eee 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/large_allocator.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/large_allocator.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/memory.h b/core/pkg/tbox.pkg/inc/tbox/memory/memory.h index b80d00ba2..b80d00ba2 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/memory.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/memory.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/native_allocator.h b/core/pkg/tbox.pkg/inc/tbox/memory/native_allocator.h index 3df6a16dd..3df6a16dd 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/native_allocator.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/native_allocator.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/prefix.h b/core/pkg/tbox.pkg/inc/tbox/memory/prefix.h index 120511a2a..120511a2a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/queue_buffer.h b/core/pkg/tbox.pkg/inc/tbox/memory/queue_buffer.h index cb4c18d4f..cb4c18d4f 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/queue_buffer.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/queue_buffer.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/small_allocator.h b/core/pkg/tbox.pkg/inc/tbox/memory/small_allocator.h index 78100ad28..78100ad28 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/small_allocator.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/small_allocator.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/static_allocator.h b/core/pkg/tbox.pkg/inc/tbox/memory/static_allocator.h index 19334dfb9..19334dfb9 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/static_allocator.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/static_allocator.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/static_buffer.h b/core/pkg/tbox.pkg/inc/tbox/memory/static_buffer.h index daaa065fd..daaa065fd 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/static_buffer.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/static_buffer.h diff --git a/core/pkg/tbox.pkg/inc/tbox/memory/string_pool.h b/core/pkg/tbox.pkg/inc/tbox/memory/string_pool.h index a1c068a92..a1c068a92 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/memory/string_pool.h +++ b/core/pkg/tbox.pkg/inc/tbox/memory/string_pool.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/cookies.h b/core/pkg/tbox.pkg/inc/tbox/network/cookies.h index 5d6438fe9..5d6438fe9 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/cookies.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/cookies.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/dns/cache.h b/core/pkg/tbox.pkg/inc/tbox/network/dns/cache.h index b4bcdd662..b4bcdd662 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/dns/cache.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/dns/cache.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/dns/dns.h b/core/pkg/tbox.pkg/inc/tbox/network/dns/dns.h index d4553323f..d4553323f 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/dns/dns.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/dns/dns.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/dns/looker.h b/core/pkg/tbox.pkg/inc/tbox/network/dns/looker.h index b400e8108..b400e8108 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/dns/looker.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/dns/looker.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/dns/prefix.h b/core/pkg/tbox.pkg/inc/tbox/network/dns/prefix.h index ba0e8ccbe..ba0e8ccbe 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/dns/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/dns/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/dns/server.h b/core/pkg/tbox.pkg/inc/tbox/network/dns/server.h index 7a574a28c..7a574a28c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/dns/server.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/dns/server.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/http.h b/core/pkg/tbox.pkg/inc/tbox/network/http.h index 6ff4cb986..6ff4cb986 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/http.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/http.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/hwaddr.h b/core/pkg/tbox.pkg/inc/tbox/network/hwaddr.h index f3168cf24..f3168cf24 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/hwaddr.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/hwaddr.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/ipaddr.h b/core/pkg/tbox.pkg/inc/tbox/network/ipaddr.h index d24f7400d..d24f7400d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/ipaddr.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/ipaddr.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/ipv4.h b/core/pkg/tbox.pkg/inc/tbox/network/ipv4.h index 5d6639c9d..5d6639c9d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/ipv4.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/ipv4.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/ipv6.h b/core/pkg/tbox.pkg/inc/tbox/network/ipv6.h index b9b4b99d5..b9b4b99d5 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/ipv6.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/ipv6.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/network.h b/core/pkg/tbox.pkg/inc/tbox/network/network.h index 31e6b74c0..31e6b74c0 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/network.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/network.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/prefix.h b/core/pkg/tbox.pkg/inc/tbox/network/prefix.h index f84388c05..f84388c05 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/ssl.h b/core/pkg/tbox.pkg/inc/tbox/network/ssl.h index 160bec37d..160bec37d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/ssl.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/ssl.h diff --git a/core/pkg/tbox.pkg/inc/tbox/network/url.h b/core/pkg/tbox.pkg/inc/tbox/network/url.h index b82094ec8..b82094ec8 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/network/url.h +++ b/core/pkg/tbox.pkg/inc/tbox/network/url.h diff --git a/core/pkg/tbox.pkg/inc/tbox/object/array.h b/core/pkg/tbox.pkg/inc/tbox/object/array.h index 7e860acbd..7e860acbd 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/object/array.h +++ b/core/pkg/tbox.pkg/inc/tbox/object/array.h diff --git a/core/pkg/tbox.pkg/inc/tbox/object/boolean.h b/core/pkg/tbox.pkg/inc/tbox/object/boolean.h index 5ad12edb6..5ad12edb6 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/object/boolean.h +++ b/core/pkg/tbox.pkg/inc/tbox/object/boolean.h diff --git a/core/pkg/tbox.pkg/inc/tbox/object/data.h b/core/pkg/tbox.pkg/inc/tbox/object/data.h index 893f1568b..6449e8307 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/object/data.h +++ b/core/pkg/tbox.pkg/inc/tbox/object/data.h @@ -96,7 +96,7 @@ tb_size_t tb_object_data_size(tb_object_ref_t data); * * @return the data buffer */ -tb_buffer_ref_t tb_object_data_buffer(tb_object_ref_t data); +tb_buffer_ref_t tb_object_data_buffer(tb_object_ref_t data); /*! writ data to url * diff --git a/core/pkg/tbox.pkg/inc/tbox/object/date.h b/core/pkg/tbox.pkg/inc/tbox/object/date.h index 289951c85..289951c85 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/object/date.h +++ b/core/pkg/tbox.pkg/inc/tbox/object/date.h diff --git a/core/pkg/tbox.pkg/inc/tbox/object/dictionary.h b/core/pkg/tbox.pkg/inc/tbox/object/dictionary.h index fac229aa9..46d5a0d0e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/object/dictionary.h +++ b/core/pkg/tbox.pkg/inc/tbox/object/dictionary.h @@ -96,7 +96,7 @@ tb_void_t tb_object_dictionary_incr(tb_object_ref_t dictionary, tb * if (item) * { * tb_char_t const* key = item->key; - * tb_object_ref_t val = item->val; + * tb_object_ref_t val = item->val; * * // ... * } diff --git a/core/pkg/tbox.pkg/inc/tbox/object/null.h b/core/pkg/tbox.pkg/inc/tbox/object/null.h index f1e20b427..f1e20b427 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/object/null.h +++ b/core/pkg/tbox.pkg/inc/tbox/object/null.h diff --git a/core/pkg/tbox.pkg/inc/tbox/object/number.h b/core/pkg/tbox.pkg/inc/tbox/object/number.h index 830afc660..830afc660 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/object/number.h +++ b/core/pkg/tbox.pkg/inc/tbox/object/number.h diff --git a/core/pkg/tbox.pkg/inc/tbox/object/object.h b/core/pkg/tbox.pkg/inc/tbox/object/object.h index f3853df22..f3853df22 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/object/object.h +++ b/core/pkg/tbox.pkg/inc/tbox/object/object.h diff --git a/core/pkg/tbox.pkg/inc/tbox/object/prefix.h b/core/pkg/tbox.pkg/inc/tbox/object/prefix.h index 0179b06ce..0179b06ce 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/object/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/object/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/object/string.h b/core/pkg/tbox.pkg/inc/tbox/object/string.h index a3721b777..a3721b777 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/object/string.h +++ b/core/pkg/tbox.pkg/inc/tbox/object/string.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/android/android.h b/core/pkg/tbox.pkg/inc/tbox/platform/android/android.h index 3868f34e5..3868f34e5 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/android/android.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/android/android.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/android/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/android/prefix.h index 65be2ee39..65be2ee39 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/android/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/android/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/atomic.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/atomic.h index 131cd2ed3..131cd2ed3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/atomic.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/atomic.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/frame.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/frame.h index 4e0b57417..4e0b57417 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/frame.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/frame.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/prefix.h index 6e4b9b805..6e4b9b805 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/arm/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/atomic.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/atomic.h index ea9bc45d8..ea9bc45d8 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/atomic.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/atomic.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/barrier.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/barrier.h index 5c4542140..5c4542140 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/barrier.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/barrier.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/frame.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/frame.h index 9d029823a..9d029823a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/frame.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/frame.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/prefix.h index ead1d4e22..ead1d4e22 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/atomic.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/atomic.h index 8ff26d126..8ff26d126 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/atomic.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/atomic.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/barrier.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/barrier.h index 08fdb7c11..08fdb7c11 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/barrier.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/barrier.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/frame.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/frame.h index 512b06e00..512b06e00 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/frame.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/frame.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/prefix.h index c2d356bde..c2d356bde 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x64/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/atomic.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/atomic.h index b708e5d03..b708e5d03 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/atomic.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/atomic.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/barrier.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/barrier.h index e88531d88..e88531d88 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/barrier.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/barrier.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/frame.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/frame.h index bdbbcd715..bdbbcd715 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/frame.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/frame.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/prefix.h index ca366b4b1..ca366b4b1 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/arch/x86/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/atomic.h b/core/pkg/tbox.pkg/inc/tbox/platform/atomic.h index 0075668f9..0075668f9 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/atomic.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/atomic.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/atomic64.h b/core/pkg/tbox.pkg/inc/tbox/platform/atomic64.h index c7e88121d..c7e88121d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/atomic64.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/atomic64.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/backtrace.h b/core/pkg/tbox.pkg/inc/tbox/platform/backtrace.h index 733a75dbd..733a75dbd 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/backtrace.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/backtrace.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/barrier.h b/core/pkg/tbox.pkg/inc/tbox/platform/barrier.h index 5054febfe..5054febfe 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/barrier.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/barrier.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/cache_time.h b/core/pkg/tbox.pkg/inc/tbox/platform/cache_time.h index 1979c7817..1979c7817 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/cache_time.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/cache_time.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/atomic.h b/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/atomic.h index 66eba4d6d..66eba4d6d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/atomic.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/atomic.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/atomic64.h b/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/atomic64.h index e4bc06098..e4bc06098 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/atomic64.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/atomic64.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/barrier.h b/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/barrier.h index 06ac42942..06ac42942 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/barrier.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/barrier.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/prefix.h index 2900ee549..2900ee549 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/compiler/gcc/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/compiler/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/compiler/prefix.h index c41e8c01d..c41e8c01d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/compiler/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/compiler/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/directory.h b/core/pkg/tbox.pkg/inc/tbox/platform/directory.h index 23df0b329..23df0b329 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/directory.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/directory.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/dns.h b/core/pkg/tbox.pkg/inc/tbox/platform/dns.h index 8fa360c63..8fa360c63 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/dns.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/dns.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/dynamic.h b/core/pkg/tbox.pkg/inc/tbox/platform/dynamic.h index 420772d19..420772d19 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/dynamic.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/dynamic.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/environment.h b/core/pkg/tbox.pkg/inc/tbox/platform/environment.h index 238e368af..238e368af 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/environment.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/environment.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/event.h b/core/pkg/tbox.pkg/inc/tbox/platform/event.h index 48b05e008..48b05e008 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/event.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/event.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/exception.h b/core/pkg/tbox.pkg/inc/tbox/platform/exception.h index 080fb7e21..080fb7e21 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/exception.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/exception.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/file.h b/core/pkg/tbox.pkg/inc/tbox/platform/file.h index 0590e47a2..0590e47a2 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/file.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/file.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/hostname.h b/core/pkg/tbox.pkg/inc/tbox/platform/hostname.h index f6eb57090..f6eb57090 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/hostname.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/hostname.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/ifaddrs.h b/core/pkg/tbox.pkg/inc/tbox/platform/ifaddrs.h index b24acf3b8..ceb76ee61 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/ifaddrs.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/ifaddrs.h @@ -127,7 +127,7 @@ tb_ifaddrs_interface_ref_t tb_ifaddrs_interface(tb_ifaddrs_ref_t ifaddrs, tb_ch /*! the hardware address from the given interface name * * @param ifaddrs the ifaddrs - * @param name the interface name, get the first ether address if ne null + * @param name the interface name, get the first ether address if be null * @param reload force to reload the ifaddrs list, will cache list if be false * @param hwaddr the hardware address * @@ -138,7 +138,7 @@ tb_bool_t tb_ifaddrs_hwaddr(tb_ifaddrs_ref_t ifaddrs, tb_char_ /*! the hardware address from the given interface name * * @param ifaddrs the ifaddrs - * @param name the interface name, get the first ether address if ne null + * @param name the interface name, get the first ether address if be null * @param reload force to reload the ifaddrs list, will cache list if be false * @param family the address family * @param ipaddr the ip address diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/libc/exception.h b/core/pkg/tbox.pkg/inc/tbox/platform/libc/exception.h index a8ffbc1b7..a8ffbc1b7 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/libc/exception.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/libc/exception.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/libc/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/libc/prefix.h index 0b9dab421..0b9dab421 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/libc/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/libc/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/linux/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/linux/prefix.h index e131be8ad..e131be8ad 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/linux/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/linux/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/ltimer.h b/core/pkg/tbox.pkg/inc/tbox/platform/ltimer.h index 523cd2c0a..523cd2c0a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/ltimer.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/ltimer.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/mach/barrier.h b/core/pkg/tbox.pkg/inc/tbox/platform/mach/barrier.h index 3a54f5ef5..3a54f5ef5 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/mach/barrier.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/mach/barrier.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/mach/ios/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/mach/ios/prefix.h index d8bdbc6d3..d8bdbc6d3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/mach/ios/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/mach/ios/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/mach/mac/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/mach/mac/prefix.h index f4e014c91..f4e014c91 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/mach/mac/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/mach/mac/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/mach/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/mach/prefix.h index e306ad0da..e306ad0da 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/mach/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/mach/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/memory.h b/core/pkg/tbox.pkg/inc/tbox/platform/memory.h index 0cb294d35..0cb294d35 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/memory.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/memory.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/mutex.h b/core/pkg/tbox.pkg/inc/tbox/platform/mutex.h index 2600463f7..2600463f7 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/mutex.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/mutex.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/page.h b/core/pkg/tbox.pkg/inc/tbox/platform/page.h index c3c9ca9c0..c3c9ca9c0 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/page.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/page.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/path.h b/core/pkg/tbox.pkg/inc/tbox/platform/path.h index c08eb4f6c..c08eb4f6c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/path.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/path.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/platform.h b/core/pkg/tbox.pkg/inc/tbox/platform/platform.h index 7233c2272..7233c2272 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/platform.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/platform.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/posix/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/posix/prefix.h index cf88c8e85..cf88c8e85 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/posix/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/posix/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/posix/sockaddr.h b/core/pkg/tbox.pkg/inc/tbox/platform/posix/sockaddr.h index 1b18bfaf8..3d3529c01 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/posix/sockaddr.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/posix/sockaddr.h @@ -114,7 +114,7 @@ static __tb_inline__ tb_size_t tb_sockaddr_save(tb_ipaddr_ref_t ipaddr, struct } break; default: - tb_assert_abort(0); + tb_assert(0); break; } @@ -187,7 +187,7 @@ static __tb_inline__ tb_size_t tb_sockaddr_load(struct sockaddr_storage* saddr, } break; default: - tb_assert_abort(0); + tb_assert(0); break; } diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/prefix.h index 0795b9f37..0795b9f37 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/print.h b/core/pkg/tbox.pkg/inc/tbox/platform/print.h index a7b00e490..a7b00e490 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/print.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/print.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/process.h b/core/pkg/tbox.pkg/inc/tbox/platform/process.h index 1bc0d09c7..1bc0d09c7 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/process.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/process.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/processor.h b/core/pkg/tbox.pkg/inc/tbox/platform/processor.h index 16ca7360c..16ca7360c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/processor.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/processor.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/sched.h b/core/pkg/tbox.pkg/inc/tbox/platform/sched.h index 09ca92f27..09ca92f27 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/sched.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/sched.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/semaphore.h b/core/pkg/tbox.pkg/inc/tbox/platform/semaphore.h index 1eb800ce8..1eb800ce8 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/semaphore.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/semaphore.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/socket.h b/core/pkg/tbox.pkg/inc/tbox/platform/socket.h index 2f05ca48e..2f05ca48e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/socket.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/socket.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/spinlock.h b/core/pkg/tbox.pkg/inc/tbox/platform/spinlock.h index 583943c26..cd4f91376 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/spinlock.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/spinlock.h @@ -52,7 +52,7 @@ static __tb_inline_force__ tb_bool_t tb_spinlock_init(tb_spinlock_ref_t lock) { // check - tb_assert_return_val(lock, tb_false); + tb_assert(lock); // init *lock = 0; @@ -68,7 +68,7 @@ static __tb_inline_force__ tb_bool_t tb_spinlock_init(tb_spinlock_ref_t lock) static __tb_inline_force__ tb_void_t tb_spinlock_exit(tb_spinlock_ref_t lock) { // check - tb_assert_return(lock); + tb_assert(lock); // exit *lock = 0; @@ -81,7 +81,7 @@ static __tb_inline_force__ tb_void_t tb_spinlock_exit(tb_spinlock_ref_t lock) static __tb_inline_force__ tb_void_t tb_spinlock_enter(tb_spinlock_ref_t lock) { // check - tb_assert_return(lock); + tb_assert(lock); // init tryn tb_size_t tryn = 5; @@ -129,7 +129,7 @@ static __tb_inline_force__ tb_void_t tb_spinlock_enter(tb_spinlock_ref_t lock) static __tb_inline_force__ tb_void_t tb_spinlock_enter_without_profiler(tb_spinlock_ref_t lock) { // check - tb_assert_return(lock); + tb_assert(lock); // init tryn tb_size_t tryn = 5; @@ -159,7 +159,7 @@ static __tb_inline_force__ tb_void_t tb_spinlock_enter_without_profiler(tb_spinl static __tb_inline_force__ tb_bool_t tb_spinlock_enter_try(tb_spinlock_ref_t lock) { // check - tb_assert_return_val(lock, tb_false); + tb_assert(lock); #ifndef TB_LOCK_PROFILER_ENABLE // try locking it @@ -185,7 +185,7 @@ static __tb_inline_force__ tb_bool_t tb_spinlock_enter_try(tb_spinlock_ref_t loc static __tb_inline_force__ tb_bool_t tb_spinlock_enter_try_without_profiler(tb_spinlock_ref_t lock) { // check - tb_assert_return_val(lock, tb_false); + tb_assert(lock); // try locking it return !tb_atomic_fetch_and_pset((tb_atomic_t*)lock, 0, 1); @@ -198,7 +198,7 @@ static __tb_inline_force__ tb_bool_t tb_spinlock_enter_try_without_profiler(tb_s static __tb_inline_force__ tb_void_t tb_spinlock_leave(tb_spinlock_ref_t lock) { // check - tb_assert_return(lock); + tb_assert(lock); // leave *((tb_atomic_t*)lock) = 0; diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/systemv/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/systemv/prefix.h index 64c917a0f..64c917a0f 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/systemv/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/systemv/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/thread.h b/core/pkg/tbox.pkg/inc/tbox/platform/thread.h index e1de62e96..e1de62e96 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/thread.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/thread.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/thread_pool.h b/core/pkg/tbox.pkg/inc/tbox/platform/thread_pool.h index 2f8df50dc..2f8df50dc 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/thread_pool.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/thread_pool.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/thread_store.h b/core/pkg/tbox.pkg/inc/tbox/platform/thread_store.h index ea15fe37e..ea15fe37e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/thread_store.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/thread_store.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/time.h b/core/pkg/tbox.pkg/inc/tbox/platform/time.h index bc9009c70..bc9009c70 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/time.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/time.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/timer.h b/core/pkg/tbox.pkg/inc/tbox/platform/timer.h index 9e18ecd57..5ed487e1f 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/timer.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/timer.h @@ -57,8 +57,6 @@ typedef struct{}* tb_timer_task_ref_t; /*! init timer * - * lower tick and limit range, but faster - * * @param maxn the timer maxn * @param ctime using ctime? * diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/unix/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/unix/prefix.h index c5735c89c..c5735c89c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/unix/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/unix/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/unix/syscall.h b/core/pkg/tbox.pkg/inc/tbox/platform/unix/syscall.h index ffa028f34..ffa028f34 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/unix/syscall.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/unix/syscall.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/atomic.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/atomic.h index 6d11e832a..87f4f161c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/atomic.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/atomic.h @@ -61,7 +61,7 @@ static __tb_inline__ tb_long_t tb_atomic_fetch_and_pset_windows(tb_atomic_t* a, { // check tb_assert_static(sizeof(tb_atomic_t) == sizeof(LONGLONG)); - tb_assert_abort(tb_kernel32()->InterlockedCompareExchange64); + tb_assert(tb_kernel32()->InterlockedCompareExchange64); // done return (tb_long_t)tb_kernel32()->InterlockedCompareExchange64((LONGLONG __tb_volatile__*)a, v, p); diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/atomic64.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/atomic64.h index 3cf651b98..3cf651b98 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/atomic64.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/atomic64.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/barrier.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/barrier.h index 61e27d51c..61e27d51c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/barrier.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/barrier.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/exception.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/exception.h index 132d38d17..132d38d17 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/exception.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/exception.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/dbghelp.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/dbghelp.h index 582082055..582082055 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/dbghelp.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/dbghelp.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/interface.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/interface.h index 24e843258..24e843258 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/interface.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/interface.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/iphlpapi.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/iphlpapi.h index 677690f66..677690f66 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/iphlpapi.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/iphlpapi.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/kernel32.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/kernel32.h index aafd97c91..aafd97c91 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/kernel32.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/kernel32.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/mswsock.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/mswsock.h index b791d5c07..b791d5c07 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/mswsock.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/mswsock.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/prefix.h index c65ec26ab..c65ec26ab 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/shell32.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/shell32.h index 54f3d38ca..54f3d38ca 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/shell32.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/shell32.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/user32.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/user32.h index a1875436c..a1875436c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/user32.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/user32.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/ws2_32.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/ws2_32.h index d53b99cfb..d53b99cfb 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/ws2_32.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/interface/ws2_32.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/ntstatus.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/ntstatus.h index c57efe865..c57efe865 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/ntstatus.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/ntstatus.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/prefix.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/prefix.h index d14a6fea8..d14a6fea8 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/platform/windows/socket_pool.h b/core/pkg/tbox.pkg/inc/tbox/platform/windows/socket_pool.h index ff8fde64a..ff8fde64a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/platform/windows/socket_pool.h +++ b/core/pkg/tbox.pkg/inc/tbox/platform/windows/socket_pool.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix.h b/core/pkg/tbox.pkg/inc/tbox/prefix.h index c72e3af69..c72e3af69 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/abort.h b/core/pkg/tbox.pkg/inc/tbox/prefix/abort.h index a882013f9..a882013f9 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/abort.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/abort.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/arch.h b/core/pkg/tbox.pkg/inc/tbox/prefix/arch.h index 6bebf5f90..6bebf5f90 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/arch.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/arch.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/asm.h b/core/pkg/tbox.pkg/inc/tbox/prefix/asm.h index 7480e805d..7480e805d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/asm.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/asm.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/arm/prefix.S b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/arm/prefix.S index 85744e43e..85744e43e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/arm/prefix.S +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/arm/prefix.S diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/arm/prefix.h b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/arm/prefix.h index 58d8a6e9f..58d8a6e9f 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/arm/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/arm/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/asm.h b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/asm.h index f3c6bbfa4..f3c6bbfa4 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/asm.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/asm.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/cache.h b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/cache.h index 9ffa51d6d..9ffa51d6d 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/cache.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/cache.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/prefix.S b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/prefix.S index 574675b8a..574675b8a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/prefix.S +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/prefix.S diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/prefix.h b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/prefix.h index d211e155e..d211e155e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/asm/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/asm/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/assembler.h b/core/pkg/tbox.pkg/inc/tbox/prefix/assembler.h index 8f55841a3..8f55841a3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/assembler.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/assembler.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/assert.h b/core/pkg/tbox.pkg/inc/tbox/prefix/assert.h index cf42f6770..15bfeccda 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/assert.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/assert.h @@ -53,41 +53,23 @@ __tb_extern_c_enter__ // assert #ifdef __tb_debug__ # if defined(TB_COMPILER_IS_GCC) -# define tb_assertf(x, fmt, arg...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, ##arg); tb_assert_backtrace_dump(); } } while(0) -# define tb_assertf_abort(x, fmt, arg...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, ##arg); tb_assert_backtrace_dump(); tb_abort(); } } while(0) -# define tb_assertf_return(x, fmt, arg...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, ##arg); tb_assert_backtrace_dump(); return ; } } while(0) -# define tb_assertf_return_val(x, v, fmt, arg...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, ##arg); tb_assert_backtrace_dump(); return (v); } } while(0) -# define tb_assertf_goto(x, b, fmt, arg...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, ##arg); tb_assert_backtrace_dump(); goto b; } } while(0) -# define tb_assertf_break(x, fmt, arg...) { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, ##arg); tb_assert_backtrace_dump(); break ; } } -# define tb_assertf_continue(x, fmt, arg...) { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, ##arg); tb_assert_backtrace_dump(); continue ; } } -# define tb_assertf_and_check_abort(x, fmt, arg...) tb_assertf_abort(x, fmt, ##arg) -# define tb_assertf_and_check_return(x, fmt, arg...) tb_assertf_return(x, fmt, ##arg) -# define tb_assertf_and_check_return_val(x, v, fmt, arg...) tb_assertf_return_val(x, v, fmt, ##arg) -# define tb_assertf_and_check_goto(x, b, fmt, arg...) tb_assertf_goto(x, b, fmt, ##arg) -# define tb_assertf_and_check_break(x, fmt, arg...) tb_assertf_break(x, fmt, ##arg) -# define tb_assertf_and_check_continue(x, fmt, arg...) tb_assertf_continue(x, fmt, ##arg) +# define tb_assertf(x, fmt, arg...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, ##arg); tb_assert_backtrace_dump(); tb_abort(); } } while(0) +# define tb_assertf_and_check_abort(x, fmt, arg...) tb_assertf(x, fmt, ##arg) +# define tb_assertf_and_check_return(x, fmt, arg...) tb_assertf(x, fmt, ##arg) +# define tb_assertf_and_check_return_val(x, v, fmt, arg...) tb_assertf(x, fmt, ##arg) +# define tb_assertf_and_check_goto(x, b, fmt, arg...) tb_assertf(x, fmt, ##arg) +# define tb_assertf_and_check_break(x, fmt, arg...) tb_assertf(x, fmt, ##arg) +# define tb_assertf_and_check_continue(x, fmt, arg...) tb_assertf(x, fmt, ##arg) # elif defined(TB_COMPILER_IS_MSVC) && TB_COMPILER_VERSION_BE(13, 0) -# define tb_assertf(x, fmt, ...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, __VA_ARGS__); tb_assert_backtrace_dump(); } } while(0) -# define tb_assertf_abort(x, fmt, ...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, __VA_ARGS__); tb_assert_backtrace_dump(); tb_abort(); } } while(0) -# define tb_assertf_return(x, fmt, ...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, __VA_ARGS__); tb_assert_backtrace_dump(); return ; } } while(0) -# define tb_assertf_return_val(x, v, fmt, ...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, __VA_ARGS__); tb_assert_backtrace_dump(); return (v); } } while(0) -# define tb_assertf_goto(x, b, fmt, ...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, __VA_ARGS__); tb_assert_backtrace_dump(); goto b; } } while(0) -# define tb_assertf_break(x, fmt, ...) { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, __VA_ARGS__); tb_assert_backtrace_dump(); break ; } } -# define tb_assertf_continue(x, fmt, ...) { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, __VA_ARGS__); tb_assert_backtrace_dump(); continue ; } } -# define tb_assertf_and_check_abort(x, fmt, ...) tb_assertf_abort(x, fmt, __VA_ARGS__) -# define tb_assertf_and_check_return(x, fmt, ...) tb_assertf_return(x, fmt, __VA_ARGS__) -# define tb_assertf_and_check_return_val(x, v, fmt, ...) tb_assertf_return_val(x, v, fmt, __VA_ARGS__) -# define tb_assertf_and_check_goto(x, b, fmt, ...) tb_assertf_goto(x, b, fmt, __VA_ARGS__) -# define tb_assertf_and_check_break(x, fmt, ...) tb_assertf_break(x, fmt, __VA_ARGS__) -# define tb_assertf_and_check_continue(x, fmt, ...) tb_assertf_continue(x, fmt, __VA_ARGS__) +# define tb_assertf(x, fmt, ...) do { if (!(x)) {tb_trace_a("expr[%s]: " fmt, #x, __VA_ARGS__); tb_assert_backtrace_dump(); tb_abort(); } } while(0) +# define tb_assertf_and_check_abort(x, fmt, ...) tb_assertf(x, fmt, __VA_ARGS__) +# define tb_assertf_and_check_return(x, fmt, ...) tb_assertf(x, fmt, __VA_ARGS__) +# define tb_assertf_and_check_return_val(x, v, fmt, ...) tb_assertf(x, fmt, __VA_ARGS__) +# define tb_assertf_and_check_goto(x, b, fmt, ...) tb_assertf(x, fmt, __VA_ARGS__) +# define tb_assertf_and_check_break(x, fmt, ...) tb_assertf(x, fmt, __VA_ARGS__) +# define tb_assertf_and_check_continue(x, fmt, ...) tb_assertf(x, fmt, __VA_ARGS__) # else # define tb_assertf -# define tb_assertf_abort -# define tb_assertf_return -# define tb_assertf_return_val -# define tb_assertf_goto -# define tb_assertf_break -# define tb_assertf_continue # define tb_assertf_and_check_abort tb_abort(); # define tb_assertf_and_check_return tb_abort(); # define tb_assertf_and_check_return_val tb_abort(); @@ -97,13 +79,7 @@ __tb_extern_c_enter__ # endif #else # if defined(TB_COMPILER_IS_GCC) -# define tb_assertf(x, fmt, arg...) -# define tb_assertf_abort(x, fmt, arg...) -# define tb_assertf_return(x, fmt, arg...) -# define tb_assertf_return_val(x, v, fmt, arg...) -# define tb_assertf_goto(x, b, fmt, arg...) -# define tb_assertf_break(x, fmt, arg...) -# define tb_assertf_continue(x, fmt, arg...) +# define tb_assertf(x, fmt, arg...) # define tb_assertf_and_check_abort(x, fmt, arg...) tb_check_abort(x) # define tb_assertf_and_check_return(x, fmt, arg...) tb_check_return(x) # define tb_assertf_and_check_return_val(x, v, fmt, arg...) tb_check_return_val(x, v) @@ -111,13 +87,7 @@ __tb_extern_c_enter__ # define tb_assertf_and_check_break(x, fmt, arg...) tb_check_break(x) # define tb_assertf_and_check_continue(x, fmt, arg...) tb_check_continue(x) # elif defined(TB_COMPILER_IS_MSVC) && TB_COMPILER_VERSION_BE(13, 0) -# define tb_assertf(x, fmt, ...) -# define tb_assertf_abort(x, fmt, ...) -# define tb_assertf_return(x, fmt, ...) -# define tb_assertf_return_val(x, v, fmt, ...) -# define tb_assertf_goto(x, b, fmt, ...) -# define tb_assertf_break(x, fmt, ...) -# define tb_assertf_continue(x, fmt, ...) +# define tb_assertf(x, fmt, ...) # define tb_assertf_and_check_abort(x, fmt, ...) tb_check_abort(x) # define tb_assertf_and_check_return(x, fmt, ...) tb_check_return(x) # define tb_assertf_and_check_return_val(x, v, fmt, ...) tb_check_return_val(x, v) @@ -125,14 +95,7 @@ __tb_extern_c_enter__ # define tb_assertf_and_check_break(x, fmt, ...) tb_check_break(x) # define tb_assertf_and_check_continue(x, fmt, ...) tb_check_continue(x) # else -# error -# define tb_assertf -# define tb_assertf_abort -# define tb_assertf_return -# define tb_assertf_return_val -# define tb_assertf_goto -# define tb_assertf_break -# define tb_assertf_continue +# define tb_assertf tb_abort(); # define tb_assertf_and_check_abort tb_abort(); # define tb_assertf_and_check_return tb_abort(); # define tb_assertf_and_check_return_val tb_abort(); @@ -144,38 +107,15 @@ __tb_extern_c_enter__ #ifdef __tb_debug__ # define tb_assert(x) tb_assert_impl(!!(x), #x __tb_debug_vals__) -# define tb_assert_abort(x) tb_assert_abort_impl(!!(x), #x __tb_debug_vals__) -# define tb_assert_return(x) do { if (!(x)) {tb_trace_a("expr[%s]", #x); tb_assert_backtrace_dump(); return ; } } while(0) -# define tb_assert_return_val(x, v) do { if (!(x)) {tb_trace_a("expr[%s]", #x); tb_assert_backtrace_dump(); return (v); } } while(0) -# define tb_assert_goto(x, b) do { if (!(x)) {tb_trace_a("expr[%s]", #x); tb_assert_backtrace_dump(); goto b; } } while(0) -# define tb_assert_break(x) { if (!(x)) {tb_trace_a("expr[%s]", #x); tb_assert_backtrace_dump(); break ; } } -# define tb_assert_continue(x) { if (!(x)) {tb_trace_a("expr[%s]", #x); tb_assert_backtrace_dump(); continue ; } } -# define tb_assert_break_state(x, s, v) { if (!(x)) { (s) = (v); tb_trace_a("expr[%s]", #x); tb_assert_backtrace_dump(); break ; } } - -# define tb_assert_and_check_abort(x) tb_assert_abort(x) -# define tb_assert_and_check_return(x) tb_assert_return(x) -# define tb_assert_and_check_return_val(x, v) tb_assert_return_val(x, v) -# define tb_assert_and_check_goto(x, b) tb_assert_goto(x, b) -# define tb_assert_and_check_break(x) tb_assert_break(x) -# define tb_assert_and_check_continue(x) tb_assert_continue(x) -# define tb_assert_and_check_break_state(x, s, v) tb_assert_break_state(x, s, v) - -# define tb_assert_abort_and_check_return(x) tb_assert_abort(x) -# define tb_assert_abort_and_check_return_val(x, v) tb_assert_abort(x) -# define tb_assert_abort_and_check_goto(x, b) tb_assert_abort(x) -# define tb_assert_abort_and_check_break(x) tb_assert_abort(x) -# define tb_assert_abort_and_check_continue(x) tb_assert_abort(x) -# define tb_assert_abort_and_check_break_state(x, s, v) tb_assert_abort(x) +# define tb_assert_and_check_abort(x) tb_assert(x) +# define tb_assert_and_check_return(x) tb_assert(x) +# define tb_assert_and_check_return_val(x, v) tb_assert(x) +# define tb_assert_and_check_goto(x, b) tb_assert(x) +# define tb_assert_and_check_break(x) tb_assert(x) +# define tb_assert_and_check_continue(x) tb_assert(x) +# define tb_assert_and_check_break_state(x, s, v) tb_assert(x) #else # define tb_assert(x) tb_assert_empty_impl() -# define tb_assert_abort(x) tb_assert_empty_impl() -# define tb_assert_return(x) -# define tb_assert_return_val(x, v) -# define tb_assert_goto(x, b) -# define tb_assert_break(x) -# define tb_assert_continue(x) -# define tb_assert_break_state(x, s, v) - # define tb_assert_and_check_abort(x) tb_check_abort(x) # define tb_assert_and_check_return(x) tb_check_return(x) # define tb_assert_and_check_return_val(x, v) tb_check_return_val(x, v) @@ -183,15 +123,16 @@ __tb_extern_c_enter__ # define tb_assert_and_check_break(x) tb_check_break(x) # define tb_assert_and_check_continue(x) tb_check_continue(x) # define tb_assert_and_check_break_state(x, s, v) tb_check_break_state(x, s, v) - -# define tb_assert_abort_and_check_return(x) tb_check_return(x) -# define tb_assert_abort_and_check_return_val(x, v) tb_check_return_val(x, v) -# define tb_assert_abort_and_check_goto(x, b) tb_check_goto(x, b) -# define tb_assert_abort_and_check_break(x) tb_check_break(x) -# define tb_assert_abort_and_check_continue(x) tb_check_continue(x) -# define tb_assert_abort_and_check_break_state(x, s, v) tb_check_break_state(x, s, v) #endif +/*! the static assert + * + * @code + * + * tb_assert_static(sizeof(tb_uint32_t) == 4); + * + * @endcode + */ #define tb_assert_static(x) do { typedef int __tb_static_assert__[(x)? 1 : -1]; __tb_volatile__ __tb_static_assert__ __a; tb_used(__a); } while(0) /* ////////////////////////////////////////////////////////////////////////////////////// @@ -234,35 +175,6 @@ static __tb_inline__ tb_bool_t tb_assert_impl(tb_bool_t x, tb_char_t const* exp // dump backtrace tb_assert_backtrace_dump(); - } - - // ok? - return x; -} - -/* the assert and abort implementation - * - * @code - * tb_size_t v = (tb_assert_abort(x), value); - * tb_assert_abort(v); - * @endcode - * - * @param x the boolean value of the expression - * @param expr the expression string - * - * @return the boolean value of the expression - */ -static __tb_inline__ tb_bool_t tb_assert_abort_impl(tb_bool_t x, tb_char_t const* expr __tb_debug_decl__) -{ - // failed? - if (!x) - { - // trace - tb_trace_i("[assert]: expr[%s] at %s(): %d, %s", expr __tb_debug_args__); - tb_trace_sync(); - - // dump backtrace - tb_assert_backtrace_dump(); // abort it tb_abort(); diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/check.h b/core/pkg/tbox.pkg/inc/tbox/prefix/check.h index b64aacd55..b64aacd55 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/check.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/check.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/compiler.h b/core/pkg/tbox.pkg/inc/tbox/prefix/compiler.h index aab9863e5..aab9863e5 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/compiler.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/compiler.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/config.h b/core/pkg/tbox.pkg/inc/tbox/prefix/config.h index d8b62dcb3..d8b62dcb3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/config.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/config.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/cpu.h b/core/pkg/tbox.pkg/inc/tbox/prefix/cpu.h index 1ce3717de..1ce3717de 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/cpu.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/cpu.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/endian.h b/core/pkg/tbox.pkg/inc/tbox/prefix/endian.h index 04ce3c8db..04ce3c8db 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/endian.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/endian.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/keyword.h b/core/pkg/tbox.pkg/inc/tbox/prefix/keyword.h index 246310bd2..246310bd2 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/keyword.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/keyword.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/limits.h b/core/pkg/tbox.pkg/inc/tbox/prefix/limits.h index 7bc322f8c..7bc322f8c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/limits.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/limits.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/malloc.h b/core/pkg/tbox.pkg/inc/tbox/prefix/malloc.h index 37651ad51..37651ad51 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/malloc.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/malloc.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/packed.h b/core/pkg/tbox.pkg/inc/tbox/prefix/packed.h index 815c294bb..815c294bb 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/packed.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/packed.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/prefix.h b/core/pkg/tbox.pkg/inc/tbox/prefix/prefix.h index db4bf42f3..db4bf42f3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/state.h b/core/pkg/tbox.pkg/inc/tbox/prefix/state.h index d8e5dc454..d8e5dc454 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/state.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/state.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/trace.h b/core/pkg/tbox.pkg/inc/tbox/prefix/trace.h index 15fcbf4a4..15fcbf4a4 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/trace.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/trace.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/type.h b/core/pkg/tbox.pkg/inc/tbox/prefix/type.h index d8b08ee95..d8b08ee95 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/type.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/type.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/utils.h b/core/pkg/tbox.pkg/inc/tbox/prefix/utils.h index 51c4e35b5..51c4e35b5 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/utils.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/utils.h diff --git a/core/pkg/tbox.pkg/inc/tbox/prefix/version.h b/core/pkg/tbox.pkg/inc/tbox/prefix/version.h index 9d066993f..9d066993f 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/prefix/version.h +++ b/core/pkg/tbox.pkg/inc/tbox/prefix/version.h diff --git a/core/pkg/tbox.pkg/inc/tbox/stream/async_stream.h b/core/pkg/tbox.pkg/inc/tbox/stream/async_stream.h index 4f7517d66..4f7517d66 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/stream/async_stream.h +++ b/core/pkg/tbox.pkg/inc/tbox/stream/async_stream.h diff --git a/core/pkg/tbox.pkg/inc/tbox/stream/async_transfer.h b/core/pkg/tbox.pkg/inc/tbox/stream/async_transfer.h index 525820a59..525820a59 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/stream/async_transfer.h +++ b/core/pkg/tbox.pkg/inc/tbox/stream/async_transfer.h diff --git a/core/pkg/tbox.pkg/inc/tbox/stream/filter.h b/core/pkg/tbox.pkg/inc/tbox/stream/filter.h index f6c1535e2..f6c1535e2 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/stream/filter.h +++ b/core/pkg/tbox.pkg/inc/tbox/stream/filter.h diff --git a/core/pkg/tbox.pkg/inc/tbox/stream/prefix.h b/core/pkg/tbox.pkg/inc/tbox/stream/prefix.h index f2e4b50d7..f2e4b50d7 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/stream/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/stream/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/stream/static_stream.h b/core/pkg/tbox.pkg/inc/tbox/stream/static_stream.h index 3cead8dc0..3cead8dc0 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/stream/static_stream.h +++ b/core/pkg/tbox.pkg/inc/tbox/stream/static_stream.h diff --git a/core/pkg/tbox.pkg/inc/tbox/stream/stream.h b/core/pkg/tbox.pkg/inc/tbox/stream/stream.h index 1cf448447..d41d4f7af 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/stream/stream.h +++ b/core/pkg/tbox.pkg/inc/tbox/stream/stream.h @@ -309,16 +309,32 @@ tb_void_t tb_stream_exit(tb_stream_ref_t stream); /*! init stream from url * + * @code + * + // init stream + tb_stream_ref_t stream = tb_stream_init_from_url("http://www.xxx.com/file"); + if (stream) + { + // open stream + if (tb_stream_open(stream)) + { + // ... + } + + // exit stream + tb_stream_exit(stream); + } + * + * @endcode + * * @param url the url - * <pre> - * data://base64 - * file://path or unix path: e.g. /root/xxxx/file - * sock://host:port?tcp= - * sock://host:port?udp= - * socks://host:port - * http://host:port/path?arg0=&arg1=... - * https://host:port/path?arg0=&arg1=... - * </pre> + * - data://base64 + * - file://path or unix path: e.g. /root/xxxx/file + * - sock://host:port?tcp= + * - sock://host:port?udp= + * - socks://host:port + * - http://host:port/path?arg0=&arg1=... + * - https://host:port/path?arg0=&arg1=... * * @return the stream */ @@ -563,6 +579,33 @@ tb_bool_t tb_stream_open(tb_stream_ref_t stream); tb_bool_t tb_stream_clos(tb_stream_ref_t stream); /*! read data, non-blocking + * + * @code + + tb_long_t read = 0; + tb_byte_t data[TB_STREAM_BLOCK_MAXN]; + while (!tb_stream_beof(stream)) + { + // read data + tb_long_t real = tb_stream_read(stream, data, sizeof(data)); + + // ok? + if (real > 0) read += real; + // no data? continue it + else if (!real) + { + // wait + real = tb_stream_wait(stream, TB_STREAM_WAIT_READ, tb_stream_timeout(stream)); + tb_check_break(real > 0); + + // has read? + tb_assert_and_check_break(real & TB_STREAM_WAIT_READ); + } + // failed or end? + else break; + } + + * @endcode * * @param stream the stream * @param data the data @@ -583,6 +626,30 @@ tb_long_t tb_stream_read(tb_stream_ref_t stream, tb_byte_t* data, tb_long_t tb_stream_writ(tb_stream_ref_t stream, tb_byte_t const* data, tb_size_t size); /*! block read + * + * @code + * + // get stream size + // + // @note + // size may be < -1 for the http(chunked)/filter/.. stream + // we need call tb_stream_read for reading data if size < 0 + // + tb_hong_t size = tb_stream_size(stream); + tb_assert(size > 0); + + // make data + tb_byte_t* data = tb_malloc((tb_size_t)size); + if (data) + { + // read data + tb_bool_t ok = tb_stream_bread(stream, data, size); + + // exit data + tb_free(data) + } + * + * @endcode * * @param stream the stream * @param data the data @@ -613,6 +680,17 @@ tb_bool_t tb_stream_sync(tb_stream_ref_t stream, tb_bool_t bclosin /*! need stream * + * @code + + // need 16-bytes data + tb_byte_t* data = tb_null; + if (tb_stream_need(stream, &data, 16)) + { + // .. + } + + * @endcode + * * @param stream the stream * @param data the data * @param size the size @@ -650,6 +728,19 @@ tb_long_t tb_stream_printf(tb_stream_ref_t stream, tb_char_t const /*! block read line * + * @code + * + // read line + tb_long_t size = 0; + tb_char_t line[8192]; + while ((size = tb_stream_bread_line(stream, line, sizeof(line))) >= 0) + { + // trace + tb_trace_i("line: %s", line); + } + * + * @endcode + * * @param stream the stream * @param data the data * @param size the size @@ -668,6 +759,38 @@ tb_long_t tb_stream_bread_line(tb_stream_ref_t stream, tb_char_t* */ tb_long_t tb_stream_bwrit_line(tb_stream_ref_t stream, tb_char_t* data, tb_size_t size); +/*! block read all data + * + * @code + * + // read all data + tb_size_t size = 0; + tb_byte_t* data = tb_stream_bread_all(stream, tb_false, &size); + if (data) + { + // exit data + tb_free(data); + } + + // read all cstr and append '\0' + tb_size_t size = 0; + tb_char_t* cstr = (tb_char_t*)tb_stream_bread_all(stream, tb_true, &size); + if (cstr) + { + // exit cstr + tb_free(cstr); + } + + * @endcode + * + * @param stream the stream + * @param is_cstr will append '\0' if be c-string + * @param psize the size pointer, optional + * + * @return the data + */ +tb_byte_t* tb_stream_bread_all(tb_stream_ref_t stream, tb_bool_t is_cstr, tb_size_t* psize); + /*! block read uint8 integer * * @param stream the stream diff --git a/core/pkg/tbox.pkg/inc/tbox/stream/transfer.h b/core/pkg/tbox.pkg/inc/tbox/stream/transfer.h index f82a23308..f82a23308 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/stream/transfer.h +++ b/core/pkg/tbox.pkg/inc/tbox/stream/transfer.h diff --git a/core/pkg/tbox.pkg/inc/tbox/stream/transfer_pool.h b/core/pkg/tbox.pkg/inc/tbox/stream/transfer_pool.h index a251b099c..a251b099c 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/stream/transfer_pool.h +++ b/core/pkg/tbox.pkg/inc/tbox/stream/transfer_pool.h diff --git a/core/pkg/tbox.pkg/inc/tbox/string/prefix.h b/core/pkg/tbox.pkg/inc/tbox/string/prefix.h index baa78f413..baa78f413 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/string/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/string/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/string/static_string.h b/core/pkg/tbox.pkg/inc/tbox/string/static_string.h index 8f97aeacb..8f97aeacb 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/string/static_string.h +++ b/core/pkg/tbox.pkg/inc/tbox/string/static_string.h diff --git a/core/pkg/tbox.pkg/inc/tbox/string/string.h b/core/pkg/tbox.pkg/inc/tbox/string/string.h index f59bb04ae..f59bb04ae 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/string/string.h +++ b/core/pkg/tbox.pkg/inc/tbox/string/string.h diff --git a/core/pkg/tbox.pkg/inc/tbox/tbox.h b/core/pkg/tbox.pkg/inc/tbox/tbox.h index c97db64f1..c97db64f1 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/tbox.h +++ b/core/pkg/tbox.pkg/inc/tbox/tbox.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/adler32.h b/core/pkg/tbox.pkg/inc/tbox/utils/adler32.h index dc0240a55..dc0240a55 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/adler32.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/adler32.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/base32.h b/core/pkg/tbox.pkg/inc/tbox/utils/base32.h index 912139a89..912139a89 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/base32.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/base32.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/base64.h b/core/pkg/tbox.pkg/inc/tbox/utils/base64.h index 957dd0910..957dd0910 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/base64.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/base64.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/bits.h b/core/pkg/tbox.pkg/inc/tbox/utils/bits.h index cdc05ad66..cdc05ad66 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/bits.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/bits.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/crc.h b/core/pkg/tbox.pkg/inc/tbox/utils/crc.h index 047ca5142..047ca5142 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/crc.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/crc.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/dump.h b/core/pkg/tbox.pkg/inc/tbox/utils/dump.h index 07f254673..07f254673 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/dump.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/dump.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_arm.h b/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_arm.h index 988e2a311..988e2a311 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_arm.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_arm.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_gcc.h b/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_gcc.h index 70df7ae14..70df7ae14 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_gcc.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_gcc.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_sh4.h b/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_sh4.h index d73418104..d73418104 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_sh4.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_sh4.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_x86.h b/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_x86.h index 2eef8b0fd..2eef8b0fd 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_x86.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/impl/bits_x86.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/impl/crc_arm.h b/core/pkg/tbox.pkg/inc/tbox/utils/impl/crc_arm.h index e3164bd20..e3164bd20 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/impl/crc_arm.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/impl/crc_arm.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/impl/prefix.h b/core/pkg/tbox.pkg/inc/tbox/utils/impl/prefix.h index 0f32a6b68..0f32a6b68 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/impl/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/impl/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/lock_profiler.h b/core/pkg/tbox.pkg/inc/tbox/utils/lock_profiler.h index 657d5ee31..657d5ee31 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/lock_profiler.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/lock_profiler.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/md5.h b/core/pkg/tbox.pkg/inc/tbox/utils/md5.h index 3503712cf..3503712cf 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/md5.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/md5.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/option.h b/core/pkg/tbox.pkg/inc/tbox/utils/option.h index f1c67cc5e..f1c67cc5e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/option.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/option.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/prefix.h b/core/pkg/tbox.pkg/inc/tbox/utils/prefix.h index c9bbc618f..c9bbc618f 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/sha.h b/core/pkg/tbox.pkg/inc/tbox/utils/sha.h index 845dd5c64..845dd5c64 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/sha.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/sha.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/singleton.h b/core/pkg/tbox.pkg/inc/tbox/utils/singleton.h index bc4557d61..bc4557d61 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/singleton.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/singleton.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/trace.h b/core/pkg/tbox.pkg/inc/tbox/utils/trace.h index ffdd0efd3..ffdd0efd3 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/trace.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/trace.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/url.h b/core/pkg/tbox.pkg/inc/tbox/utils/url.h index e8b671152..e8b671152 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/url.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/url.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/used.h b/core/pkg/tbox.pkg/inc/tbox/utils/used.h index 624ce2acd..624ce2acd 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/used.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/used.h diff --git a/core/pkg/tbox.pkg/inc/tbox/utils/utils.h b/core/pkg/tbox.pkg/inc/tbox/utils/utils.h index 8be786da1..8be786da1 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/utils/utils.h +++ b/core/pkg/tbox.pkg/inc/tbox/utils/utils.h diff --git a/core/pkg/tbox.pkg/inc/tbox/xml/node.h b/core/pkg/tbox.pkg/inc/tbox/xml/node.h index 23da09d11..23da09d11 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/xml/node.h +++ b/core/pkg/tbox.pkg/inc/tbox/xml/node.h diff --git a/core/pkg/tbox.pkg/inc/tbox/xml/prefix.h b/core/pkg/tbox.pkg/inc/tbox/xml/prefix.h index eddf8bca1..eddf8bca1 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/xml/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/xml/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/xml/reader.h b/core/pkg/tbox.pkg/inc/tbox/xml/reader.h index df67e03b3..1f6dd84f2 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/xml/reader.h +++ b/core/pkg/tbox.pkg/inc/tbox/xml/reader.h @@ -126,9 +126,9 @@ tb_void_t tb_xml_reader_clos(tb_xml_reader_ref_t reader); break; case TB_XML_READER_EVENT_ELEMENT_EMPTY: { - tb_char_t const* name = tb_xml_reader_element(reader); - tb_xml_node_ref_t attr = tb_xml_reader_attributes(reader); - tb_size_t t = tb_xml_reader_level(reader); + tb_char_t const* name = tb_xml_reader_element(reader); + tb_xml_node_ref_t attr = tb_xml_reader_attributes(reader); + tb_size_t t = tb_xml_reader_level(reader); while (t--) tb_printf("\t"); if (!attr) tb_printf("<%s/>\n", name); else @@ -142,9 +142,9 @@ tb_void_t tb_xml_reader_clos(tb_xml_reader_ref_t reader); break; case TB_XML_READER_EVENT_ELEMENT_BEG: { - tb_char_t const* name = tb_xml_reader_element(reader); - tb_xml_node_ref_t attr = tb_xml_reader_attributes(reader); - tb_size_t t = tb_xml_reader_level(reader) - 1; + tb_char_t const* name = tb_xml_reader_element(reader); + tb_xml_node_ref_t attr = tb_xml_reader_attributes(reader); + tb_size_t t = tb_xml_reader_level(reader) - 1; while (t--) tb_printf("\t"); if (!attr) tb_printf("<%s>\n", name); else diff --git a/core/pkg/tbox.pkg/inc/tbox/xml/writer.h b/core/pkg/tbox.pkg/inc/tbox/xml/writer.h index 8541ba03e..8541ba03e 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/xml/writer.h +++ b/core/pkg/tbox.pkg/inc/tbox/xml/writer.h diff --git a/core/pkg/tbox.pkg/inc/tbox/xml/xml.h b/core/pkg/tbox.pkg/inc/tbox/xml/xml.h index 4c0214775..4c0214775 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/xml/xml.h +++ b/core/pkg/tbox.pkg/inc/tbox/xml/xml.h diff --git a/core/pkg/tbox.pkg/inc/tbox/zip/gzip.h b/core/pkg/tbox.pkg/inc/tbox/zip/gzip.h index e614e1a5f..e614e1a5f 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/zip/gzip.h +++ b/core/pkg/tbox.pkg/inc/tbox/zip/gzip.h diff --git a/core/pkg/tbox.pkg/inc/tbox/zip/prefix.h b/core/pkg/tbox.pkg/inc/tbox/zip/prefix.h index 76f5d0884..76f5d0884 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/zip/prefix.h +++ b/core/pkg/tbox.pkg/inc/tbox/zip/prefix.h diff --git a/core/pkg/tbox.pkg/inc/tbox/zip/zip.h b/core/pkg/tbox.pkg/inc/tbox/zip/zip.h index 04d8a145a..04d8a145a 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/zip/zip.h +++ b/core/pkg/tbox.pkg/inc/tbox/zip/zip.h diff --git a/core/pkg/tbox.pkg/inc/tbox/zip/zlib.h b/core/pkg/tbox.pkg/inc/tbox/zip/zlib.h index f6b2ae730..f6b2ae730 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/zip/zlib.h +++ b/core/pkg/tbox.pkg/inc/tbox/zip/zlib.h diff --git a/core/pkg/tbox.pkg/inc/tbox/zip/zlibraw.h b/core/pkg/tbox.pkg/inc/tbox/zip/zlibraw.h index 805f7c50b..805f7c50b 100644..100755 --- a/core/pkg/tbox.pkg/inc/tbox/zip/zlibraw.h +++ b/core/pkg/tbox.pkg/inc/tbox/zip/zlibraw.h diff --git a/core/src/xmake/os/find.c b/core/src/xmake/os/find.c index 725c08e5f..e5007d1ec 100755 --- a/core/src/xmake/os/find.c +++ b/core/src/xmake/os/find.c @@ -87,8 +87,8 @@ static tb_bool_t xm_os_find_walk(tb_char_t const* path, tb_file_info_t const* in tb_assert_and_check_return_val(rootdir && rootlen, tb_false); // check - tb_assert_abort(!tb_strcmp(path, rootdir)); - tb_assert_abort(rootlen + 1 <= tb_strlen(path)); + tb_assert(!tb_strcmp(path, rootdir)); + tb_assert(rootlen + 1 <= tb_strlen(path)); // skip the rootdir path += rootlen + 1; |
