chiark / gitweb /
terminal: make utf8 decoder return length
[elogind.git] / src / libsystemd-terminal / subterm.c
index 46ab6b4a1e7c85ecd96e1b0cc9adc9cba244a5dc..adc4caa42e8549bea0ab369baa971d05661266f5 100644 (file)
@@ -386,7 +386,7 @@ static void output_draw_frame(Output *o) {
 static void output_draw_menu(Output *o) {
         assert(o);
 
-        output_frame_printl(o, "");
+        output_frame_printl(o, "%s", "");
         output_frame_printl(o, "    Menu: (the following keys are recognized)");
         output_frame_printl(o, "      q: quit");
         output_frame_printl(o, "     ^C: send ^C to the PTY");
@@ -564,7 +564,7 @@ static void output_draw(Output *o, bool menu, term_screen *screen) {
  */
 
 static void terminal_dirty(Terminal *t) {
-        uint64_t usec;
+        usec_t usec;
         int r;
 
         assert(t);
@@ -716,10 +716,10 @@ static int terminal_io_fn(sd_event_source *source, int fd, uint32_t revents, voi
 
         for (i = 0; i < len; ++i) {
                 const term_seq *seq;
-                const uint32_t *str;
+                uint32_t *str;
                 size_t n_str, j;
 
-                str = term_utf8_decode(&t->utf8, &n_str, buf[i]);
+                n_str = term_utf8_decode(&t->utf8, &str, buf[i]);
                 for (j = 0; j < n_str; ++j) {
                         type = term_parser_feed(t->parser, &seq, str[j]);
                         if (type < 0) {