From 5401c775ec3ca95ad3c7d303238d9d53134414f4 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Tue, 1 Mar 2016 13:44:43 +0000 Subject: [PATCH] eolian: remove database_type_print (unused) --- src/lib/eolian/database_type.c | 80 -------------------------------- src/lib/eolian/eolian_database.h | 1 - 2 files changed, 81 deletions(-) diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index fc24d9beb9..2d5b11a092 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -291,83 +291,3 @@ database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name) eina_strbuf_append(buf, name); } } - -static void -_typedef_print(Eolian_Type *tp) -{ - printf("type %s: ", tp->full_name); - database_type_print(tp->base_type); -} - -void -database_expr_print(Eolian_Expression *exp) -{ - Eolian_Value val = eolian_expression_eval(exp, EOLIAN_MASK_ALL); - const char *ret = eolian_expression_value_to_literal(&val); - printf("%s", ret); - eina_stringshare_del(ret); -} - -void -database_type_print(Eolian_Type *tp) -{ - if (tp->type == EOLIAN_TYPE_ALIAS) - { - _typedef_print(tp); - return; - } - if (tp->is_own) - printf("own("); - if (tp->is_const) - printf("const("); - if (tp->type == EOLIAN_TYPE_REGULAR || tp->type == EOLIAN_TYPE_COMPLEX - || tp->type == EOLIAN_TYPE_CLASS) - printf("%s", tp->full_name); - else if (tp->type == EOLIAN_TYPE_VOID) - printf("void"); - else if (tp->type == EOLIAN_TYPE_STRUCT_OPAQUE) - printf("struct %s", tp->full_name); - else if (tp->type == EOLIAN_TYPE_POINTER) - { - database_type_print(tp->base_type); - putchar('*'); - } - else if (tp->type == EOLIAN_TYPE_STRUCT) - { - Eolian_Struct_Type_Field *sf; - Eina_List *m; - printf("struct "); - if (tp->full_name) printf("%s ", tp->full_name); - printf("{ "); - EINA_LIST_FOREACH(tp->field_list, m, sf) - { - printf("%s: ", sf->name); - database_type_print(sf->type); - printf("; "); - } - printf("}"); - } - else if (tp->type == EOLIAN_TYPE_ENUM) - { - Eolian_Enum_Type_Field *ef; - Eina_List *m; - printf("enum %s ", tp->full_name); - printf("{ "); - EINA_LIST_FOREACH(tp->field_list, m, ef) - { - printf("%s", ef->name); - if (ef->value) - { - printf(" = "); - database_expr_print(ef->value); - } - if (m != eina_list_last(tp->field_list)) - printf(", "); - } - printf(" }"); - } - if (tp->is_own) - putchar(')'); - if (tp->is_const) - putchar(')'); -} diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index bf9c107a5c..4919c55bf5 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -310,7 +310,6 @@ void database_typedef_del(Eolian_Type *tp); void database_typedecl_del(Eolian_Typedecl *tp); -void database_type_print(Eolian_Type *type); void database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name); /* expressions */