summaryrefslogtreecommitdiff
path: root/common/strutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/strutils.c')
-rw-r--r--common/strutils.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/common/strutils.c b/common/strutils.c
index 3b0a1db..a877c2e 100644
--- a/common/strutils.c
+++ b/common/strutils.c
@@ -18,10 +18,11 @@
*/
#include <string.h>
+#include <syslog.h>
#include <glib.h>
#include "strutils.h"
-
+#include "logutils.h"
char *
@@ -85,9 +86,9 @@ resolve_relative (const char *source, const char *point_to)
return g_strdup (point_to);
rel = g_build_filename (source, point_to, NULL);
- log ("resolve_relative: rel = '%s'\n", rel);
+ log_debug ("resolve_relative: rel = '%s'", rel);
canon = canonicalize_filename (rel);
- log ("resolve_relative: canon = '%s'\n", canon);
+ log_debug ("resolve_relative: canon = '%s'", canon);
g_free (rel);
return canon;
@@ -214,7 +215,7 @@ wide_to_utf8 (const wchar_t *src)
if (ch < 0x80) /* 0x00-0x7f: 1 byte */
{
if (!len--) {
- log ("wide_to_utf8: error converting input string, overflow.\n");
+ log_debug ("wide_to_utf8: error converting input string, overflow.");
break; /* overflow */
}
*dst++ = ch;
@@ -224,7 +225,7 @@ wide_to_utf8 (const wchar_t *src)
if (ch < 0x800) /* 0x80-0x7ff: 2 bytes */
{
if ((len -= 2) < 0) {
- log ("wide_to_utf8: error converting input string, overflow.\n");
+ log_debug ("wide_to_utf8: error converting input string, overflow.");
break; /* overflow */
}
dst[1] = 0x80 | (ch & 0x3f);
@@ -236,7 +237,7 @@ wide_to_utf8 (const wchar_t *src)
/* 0x800-0xffff: 3 bytes */
if ((len -= 3) < 0) {
- log ("wide_to_utf8: error converting input string, overflow.\n");
+ log_debug ("wide_to_utf8: error converting input string, overflow.");
break; /* overflow */
}
dst[2] = 0x80 | (ch & 0x3f);