unicode: fix logging messages
Use new logging style in unicode layer. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
1648c9101b
commit
a31455a10b
@ -69,10 +69,11 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "unicode.h"
|
#include "unicode.h"
|
||||||
|
|
||||||
|
#define LOG_SUBSYSTEM "unicode"
|
||||||
|
|
||||||
#define KMSCON_UCS4_MAXLEN 10
|
#define KMSCON_UCS4_MAXLEN 10
|
||||||
#define KMSCON_UCS4_MAX 0x7fffffffUL
|
#define KMSCON_UCS4_MAX 0x7fffffffUL
|
||||||
#define KMSCON_UCS4_INVALID 0xfffd
|
#define KMSCON_UCS4_INVALID 0xfffd
|
||||||
@ -190,7 +191,7 @@ void kmscon_symbol_table_unref(struct kmscon_symbol_table *st)
|
|||||||
kmscon_symbol_t kmscon_symbol_make(uint32_t ucs4)
|
kmscon_symbol_t kmscon_symbol_make(uint32_t ucs4)
|
||||||
{
|
{
|
||||||
if (ucs4 > KMSCON_UCS4_MAX) {
|
if (ucs4 > KMSCON_UCS4_MAX) {
|
||||||
log_warn("unicode: invalid ucs4 character\n");
|
log_warn("invalid ucs4 character");
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return ucs4;
|
return ucs4;
|
||||||
@ -208,7 +209,7 @@ kmscon_symbol_t kmscon_symbol_append(struct kmscon_symbol_table *st,
|
|||||||
return sym;
|
return sym;
|
||||||
|
|
||||||
if (ucs4 > KMSCON_UCS4_MAX) {
|
if (ucs4 > KMSCON_UCS4_MAX) {
|
||||||
log_warn("unicode: invalid ucs4 character\n");
|
log_warn("invalid ucs4 character");
|
||||||
return sym;
|
return sym;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +225,7 @@ kmscon_symbol_t kmscon_symbol_append(struct kmscon_symbol_table *st,
|
|||||||
if (nsym)
|
if (nsym)
|
||||||
return nsym;
|
return nsym;
|
||||||
|
|
||||||
log_debug("unicode: adding new composed symbol\n");
|
log_debug("adding new composed symbol");
|
||||||
|
|
||||||
nval = malloc(sizeof(uint32_t) * s);
|
nval = malloc(sizeof(uint32_t) * s);
|
||||||
if (!nval)
|
if (!nval)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user