summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-06-15 14:50:00 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-07-18 12:53:41 +0200
commit1c9633d669948155455e29b0c6e770995a8b1ca3 (patch)
tree9fac4ba6ccdd564b36caa2363999667aa601f182 /Makefile.am
parent28622e8f5b28412d97bf2f3a5df49c419be1e2c5 (diff)
terminal: add parser state-machine
The term-parser is used to parse any input from TTY-clients. It reads CSI, DCS, OSC and ST control sequences and normal escape sequences. It doesn't do anything with the parsed data besides detecting the sequence and returning it. The caller has to react to them. The parser also comes with its own UTF-8 helpers. The reason for that is that we don't want to assert() or hard-fail on parsing errors. Instead, we treat any invalid UTF-8 sequences as ISO-8859-1. This allows pasting invalid data into a terminal (which cannot be controlled through the TTY, anyway) and we still deal with it in a proper manner. This is _required_ for 8-bit and 7-bit DEC modes (including the g0-g3 mappings), so it's not just an ugly fallback because we can (it's still horribly ugly but at least we have an excuse).
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index db846ad426..73f1252d30 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2839,7 +2839,9 @@ libsystemd_terminal_la_CFLAGS = \
libsystemd_terminal_la_SOURCES = \
src/libsystemd-terminal/term-internal.h \
+ src/libsystemd-terminal/term-charset.c \
src/libsystemd-terminal/term-page.c \
+ src/libsystemd-terminal/term-parser.c \
src/libsystemd-terminal/term-wcwidth.c
libsystemd_terminal_la_LIBADD = \
@@ -2854,8 +2856,17 @@ test_term_page_LDADD = \
libsystemd-internal.la \
libsystemd-shared.la
+test_term_parser_SOURCES = \
+ src/libsystemd-terminal/test-term-parser.c
+
+test_term_parser_LDADD = \
+ libsystemd-terminal.la \
+ libsystemd-internal.la \
+ libsystemd-shared.la
+
tests += \
- test-term-page
+ test-term-page \
+ test-term-parser
# ------------------------------------------------------------------------------
if ENABLE_GTK_DOC