From 52d2eb09b1da3a6e636d0d7f4257946216ff1b71 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 18 Sep 2012 11:04:50 +0200 Subject: [PATCH] tsm: unicode: remove log_* calls The logging-layer is not a dependency of TSM so we cannot use it. It is also not needed anymore, as the unicode-layer is working pretty well. Signed-off-by: David Herrmann --- src/tsm_unicode.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/tsm_unicode.c b/src/tsm_unicode.c index 4f1fc65..b2baccf 100644 --- a/src/tsm_unicode.c +++ b/src/tsm_unicode.c @@ -59,13 +59,10 @@ #include #include #include -#include "log.h" #include "shl_array.h" #include "shl_hashtable.h" #include "tsm_unicode.h" -#define LOG_SUBSYSTEM "unicode" - /* * Unicode Symbol Handling * The main goal of the tsm_symbol_* functions is to provide a datatype which @@ -157,10 +154,8 @@ static int table__init() table_next_id = TSM_UCS4_MAX + 2; ret = shl_array_new(&table_index, sizeof(uint32_t*), 4); - if (ret) { - log_err("cannot allocate table-index"); + if (ret) return ret; - } /* first entry is not used so add dummy */ shl_array_push(table_index, &val); @@ -177,12 +172,10 @@ static int table__init() tsm_symbol_t tsm_symbol_make(uint32_t ucs4) { - if (ucs4 > TSM_UCS4_MAX) { - log_warn("invalid ucs4 character"); + if (ucs4 > TSM_UCS4_MAX) return 0; - } else { + else return ucs4; - } } /* @@ -257,7 +250,6 @@ tsm_symbol_t tsm_symbol_append(tsm_symbol_t sym, uint32_t ucs4) } if (ucs4 > TSM_UCS4_MAX) { - log_warn("invalid ucs4 character"); rsym = sym; goto unlock; } @@ -278,8 +270,6 @@ tsm_symbol_t tsm_symbol_append(tsm_symbol_t sym, uint32_t ucs4) goto unlock; } - log_debug("adding new composed symbol"); - nval = malloc(sizeof(uint32_t) * s); if (!nval) { rsym = sym;