chiark / gitweb /
terminal: make utf8 decoder return length
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 2 Oct 2014 14:36:09 +0000 (16:36 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Fri, 3 Oct 2014 13:57:00 +0000 (15:57 +0200)
commitf1f5b2a3bdc3178d57c4088a7cd7758afaeba9cb
treee173b2fadb2df9c814fe9a3185e9fb90be30f64f
parentdb1a606610e5a528903a4380f30c9934a0c5a134
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.
src/libsystemd-terminal/subterm.c
src/libsystemd-terminal/term-parser.c
src/libsystemd-terminal/term-screen.c
src/libsystemd-terminal/term.h
src/libsystemd-terminal/test-term-parser.c