summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitya Selivanov <0x7fffff@guattari.ru>2022-08-07 00:37:38 +0400
committerMitya Selivanov <0x7fffff@guattari.ru>2022-08-07 00:37:38 +0400
commit653f939ac56ad27468318e4b9913f23d31105098 (patch)
tree4b706607d42ee7ff4cb64081519ea35ff10ec57b
parent89b41695439cf5729d2fee343af2ee6f86c0310d (diff)
downloadkit-653f939ac56ad27468318e4b9913f23d31105098.zip
bix _Bool
-rw-r--r--source/kit/array_ref.c15
-rw-r--r--source/kit/array_ref.h2
-rw-r--r--source/kit/async_function.h2
-rw-r--r--source/kit/input_buffer.h2
-rw-r--r--source/kit_test/run_tests.c4
-rw-r--r--source/kit_test/test.h5
6 files changed, 15 insertions, 15 deletions
diff --git a/source/kit/array_ref.c b/source/kit/array_ref.c
index c1367f4..f2a0988 100644
--- a/source/kit/array_ref.c
+++ b/source/kit/array_ref.c
@@ -2,10 +2,10 @@
#include <string.h>
-_Bool kit_ar_equal_bytes(ptrdiff_t left_element_size, ptrdiff_t left_size,
- void const *left_data,
- ptrdiff_t right_element_size,
- ptrdiff_t right_size, void const *right_data) {
+int kit_ar_equal_bytes(ptrdiff_t left_element_size,
+ ptrdiff_t left_size, void const *left_data,
+ ptrdiff_t right_element_size,
+ ptrdiff_t right_size, void const *right_data) {
if (left_element_size != right_element_size)
return 0;
if (left_size != right_size)
@@ -19,9 +19,10 @@ _Bool kit_ar_equal_bytes(ptrdiff_t left_element_size, ptrdiff_t left_size,
}
int kit_ar_compare(ptrdiff_t left_element_size, ptrdiff_t left_size,
- void const *left_data, ptrdiff_t right_element_size,
- ptrdiff_t right_size, void const *right_data,
- kit_ar_compare_fn compare) {
+ void const *left_data,
+ ptrdiff_t right_element_size, ptrdiff_t right_size,
+ void const *right_data,
+ kit_ar_compare_fn compare) {
if (left_element_size < right_element_size)
return -1;
if (left_element_size > right_element_size)
diff --git a/source/kit/array_ref.h b/source/kit/array_ref.h
index 20a6723..194faf7 100644
--- a/source/kit/array_ref.h
+++ b/source/kit/array_ref.h
@@ -9,7 +9,7 @@ extern "C" {
typedef int (*kit_ar_compare_fn)(void const *left, void const *right);
-_Bool kit_ar_equal_bytes(ptrdiff_t left_element_size,
+int kit_ar_equal_bytes(ptrdiff_t left_element_size,
ptrdiff_t left_size, void const *left_data,
ptrdiff_t right_element_size,
ptrdiff_t right_size,
diff --git a/source/kit/async_function.h b/source/kit/async_function.h
index ec870bb..2d93726 100644
--- a/source/kit/async_function.h
+++ b/source/kit/async_function.h
@@ -218,7 +218,7 @@ typedef struct {
case KIT_AF_LINE_(): \
self->_index = KIT_AF_LINE_(); \
KIT_AF_RESUME_AND_JOIN_N((promises_), (size_)); \
- _Bool kit_af_done_; \
+ int kit_af_done_; \
KIT_AF_FINISHED_N(kit_af_done_, (promises_), (size_)); \
if (!kit_af_done_) \
return; \
diff --git a/source/kit/input_buffer.h b/source/kit/input_buffer.h
index 2ecef3b..4ebffdf 100644
--- a/source/kit/input_buffer.h
+++ b/source/kit/input_buffer.h
@@ -9,7 +9,7 @@ extern "C" {
#endif
struct kit_ib_handle {
- _Bool error;
+ int error;
ptrdiff_t offset;
void *internal;
DA(data, char);
diff --git a/source/kit_test/run_tests.c b/source/kit_test/run_tests.c
index 19fea96..a4ebd12 100644
--- a/source/kit_test/run_tests.c
+++ b/source/kit_test/run_tests.c
@@ -5,7 +5,7 @@
struct kit_tests_list kit_tests_list = { 0 };
-static void report(int i, char const *file, int line, _Bool ok) {
+static void report(int i, char const *file, int line, int ok) {
int const n = kit_tests_list.tests[i].assertions++;
kit_tests_list.tests[i].file[n] = file;
@@ -23,7 +23,7 @@ static long long sec_to_ms(long long sec) {
enum code_value { white, yellow, red, green };
-static void color_code(_Bool term_color, int c) {
+static void color_code(int term_color, int c) {
if (term_color) {
if (c == white)
printf("\x1b[37m");
diff --git a/source/kit_test/test.h b/source/kit_test/test.h
index f53ab88..365c43c 100644
--- a/source/kit_test/test.h
+++ b/source/kit_test/test.h
@@ -24,8 +24,7 @@ extern "C" {
# define KIT_TEST_STRING_SIZE 0x100
#endif
-typedef void (*kit_test_report)(int, char const *file, int line,
- _Bool);
+typedef void (*kit_test_report)(int, char const *file, int line, int);
typedef void (*kit_test_function)(int, kit_test_report);
struct kit_test_case {
@@ -34,7 +33,7 @@ struct kit_test_case {
int assertions;
char const *file[KIT_TEST_ASSERTIONS_LIMIT];
int line[KIT_TEST_ASSERTIONS_LIMIT];
- _Bool status[KIT_TEST_ASSERTIONS_LIMIT];
+ int status[KIT_TEST_ASSERTIONS_LIMIT];
};
struct kit_tests_list {