summaryrefslogtreecommitdiff
path: root/src/libudev/utf8.h
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-01-09 14:02:56 -0500
committerAnthony G. Basile <blueness@gentoo.org>2014-01-09 14:02:56 -0500
commit855ce449eba82c417c005d17aa680aba2048ed8d (patch)
tree9c9c5c9cdd30ed2dfbbdef820118124e891b6662 /src/libudev/utf8.h
parent7ed87c74dfb81761cbcefc10cd4f79394a1d36a3 (diff)
device-nodes: move device node specific code to own file
In the process, rename udev_encode_string which is poorly named for what it does. It deals specifically with encoding names that udev creates and has its own rules: utf8 is valid but some ascii is not (e.g. path separators), and everything else is simply escaped. Rename it to encode_devnode_name. Adopted for eudev: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/libudev/utf8.h')
-rw-r--r--src/libudev/utf8.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libudev/utf8.h b/src/libudev/utf8.h
index 380036da18..9d09153c1c 100644
--- a/src/libudev/utf8.h
+++ b/src/libudev/utf8.h
@@ -21,6 +21,11 @@
#include "macro.h"
+char *ascii_is_valid(const char *s) _pure_;
+
+bool utf8_is_printable(const char* str, size_t length) _pure_;
+
+char *utf16_to_utf8(const void *s, size_t length);
+
int utf8_encoded_valid_unichar(const char *str);
-int is_utf8_encoding_whitelisted(char c, const char *white);
-int udev_encode_string(const char *str, char *str_enc, size_t len);
+int utf8_encoded_to_unichar(const char *str);