From 555a3d17acb50e238913c0215d0c54427e8b6749 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sat, 6 May 2023 23:09:12 +0400 Subject: [PATCH] Rename C funcs --- src/builtins.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/builtins.c b/src/builtins.c index c2384ef..4c32a1e 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -21,14 +21,14 @@ static struct Object *func_cdr(size_t args_count, struct Object **args_array); static struct Object *func_cons(size_t args_count, struct Object **args_array); static struct Object *func_list(size_t args_count, struct Object **args_array); // Type predicates -static struct Object *func_booleanQN(size_t args_count, struct Object **args_array); -static struct Object *func_charQN(size_t args_count, struct Object **args_array); -static struct Object *func_nullQN(size_t args_count, struct Object **args_array); -static struct Object *func_numberQN(size_t args_count, struct Object **args_array); -static struct Object *func_pairQN(size_t args_count, struct Object **args_array); -static struct Object *func_procedureQN(size_t args_count, struct Object **args_array); -static struct Object *func_stringQN(size_t args_count, struct Object **args_array); -static struct Object *func_symbolQN(size_t args_count, struct Object **args_array); +static struct Object *func_boolean_QN(size_t args_count, struct Object **args_array); +static struct Object *func_char_QN(size_t args_count, struct Object **args_array); +static struct Object *func_null_QN(size_t args_count, struct Object **args_array); +static struct Object *func_number_QN(size_t args_count, struct Object **args_array); +static struct Object *func_pair_QN(size_t args_count, struct Object **args_array); +static struct Object *func_procedure_QN(size_t args_count, struct Object **args_array); +static struct Object *func_string_QN(size_t args_count, struct Object **args_array); +static struct Object *func_symbol_QN(size_t args_count, struct Object **args_array); // Equivalence predicates static struct Object *func_equal_QN(size_t args_count, struct Object **args_array); // Type conversion @@ -57,14 +57,14 @@ static struct Object builtins[] = { { .type = TYPE_PROCEDURE, .procedure = { "cons", func_cons } }, { .type = TYPE_PROCEDURE, .procedure = { "list", func_list } }, // Type predicates - { .type = TYPE_PROCEDURE, .procedure = { "boolean?", func_booleanQN } }, - { .type = TYPE_PROCEDURE, .procedure = { "char?", func_charQN } }, - { .type = TYPE_PROCEDURE, .procedure = { "null?", func_nullQN } }, - { .type = TYPE_PROCEDURE, .procedure = { "number?", func_numberQN } }, - { .type = TYPE_PROCEDURE, .procedure = { "pair?", func_pairQN } }, - { .type = TYPE_PROCEDURE, .procedure = { "procedure?", func_procedureQN } }, - { .type = TYPE_PROCEDURE, .procedure = { "string?", func_stringQN } }, - { .type = TYPE_PROCEDURE, .procedure = { "symbol?", func_symbolQN } }, + { .type = TYPE_PROCEDURE, .procedure = { "boolean?", func_boolean_QN } }, + { .type = TYPE_PROCEDURE, .procedure = { "char?", func_char_QN } }, + { .type = TYPE_PROCEDURE, .procedure = { "null?", func_null_QN } }, + { .type = TYPE_PROCEDURE, .procedure = { "number?", func_number_QN } }, + { .type = TYPE_PROCEDURE, .procedure = { "pair?", func_pair_QN } }, + { .type = TYPE_PROCEDURE, .procedure = { "procedure?", func_procedure_QN } }, + { .type = TYPE_PROCEDURE, .procedure = { "string?", func_string_QN } }, + { .type = TYPE_PROCEDURE, .procedure = { "symbol?", func_symbol_QN } }, // Equivalence predicates { .type = TYPE_PROCEDURE, .procedure = { "equal?", func_equal_QN } }, // Type conversion @@ -298,7 +298,7 @@ struct Object *func_list( * Type predicates * *******************/ -struct Object *func_booleanQN( +struct Object *func_boolean_QN( const size_t args_count, struct Object **const args_array ) { @@ -307,7 +307,7 @@ struct Object *func_booleanQN( return Object_new_boolean(object && object->type == TYPE_BOOLEAN); } -struct Object *func_charQN( +struct Object *func_char_QN( const size_t args_count, struct Object **const args_array ) { @@ -316,7 +316,7 @@ struct Object *func_charQN( return Object_new_boolean(object && object->type == TYPE_CHAR); } -struct Object *func_nullQN( +struct Object *func_null_QN( const size_t args_count, struct Object **const args_array ) { @@ -325,7 +325,7 @@ struct Object *func_nullQN( return Object_new_boolean(object == NULL); } -struct Object *func_numberQN( +struct Object *func_number_QN( const size_t args_count, struct Object **const args_array ) { @@ -334,7 +334,7 @@ struct Object *func_numberQN( return Object_new_boolean(object && object->type == TYPE_NUMBER); } -struct Object *func_pairQN( +struct Object *func_pair_QN( const size_t args_count, struct Object **const args_array ) { @@ -343,7 +343,7 @@ struct Object *func_pairQN( return Object_new_boolean(object && object->type == TYPE_PAIR); } -struct Object *func_procedureQN( +struct Object *func_procedure_QN( const size_t args_count, struct Object **const args_array ) { @@ -352,7 +352,7 @@ struct Object *func_procedureQN( return Object_new_boolean(object && Object_is_procedure(object)); } -struct Object *func_stringQN( +struct Object *func_string_QN( const size_t args_count, struct Object **const args_array ) { @@ -361,7 +361,7 @@ struct Object *func_stringQN( return Object_new_boolean(object && object->type == TYPE_STRING); } -struct Object *func_symbolQN( +struct Object *func_symbol_QN( const size_t args_count, struct Object **const args_array ) {