summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/term.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-10-02 16:36:09 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-10-03 15:57:00 +0200
commitf1f5b2a3bdc3178d57c4088a7cd7758afaeba9cb (patch)
treee173b2fadb2df9c814fe9a3185e9fb90be30f64f /src/libsystemd-terminal/term.h
parentdb1a606610e5a528903a4380f30c9934a0c5a134 (diff)
terminal: make utf8 decoder return length
Lets return the parsed length in term_utf8_decode() instead of a buffer pointer. Store the pointer in the passed argument. This makes it adhere to the systemd coding-style, were we always avoid returning pointers, but store them in output arguments. In this case, the storage is not allocated, so it doesn't fit 100% to this idiom, but still looks much nicer.
Diffstat (limited to 'src/libsystemd-terminal/term.h')
-rw-r--r--src/libsystemd-terminal/term.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-terminal/term.h b/src/libsystemd-terminal/term.h
index 021cf1c42b..d5b934fc59 100644
--- a/src/libsystemd-terminal/term.h
+++ b/src/libsystemd-terminal/term.h
@@ -111,7 +111,7 @@ struct term_utf8 {
};
size_t term_utf8_encode(char *out_utf8, uint32_t g);
-const uint32_t *term_utf8_decode(term_utf8 *p, size_t *out_len, char c);
+size_t term_utf8_decode(term_utf8 *p, uint32_t **out_buf, char c);
/*
* Parsers