aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ttwhy/scanners/terminal_scanner.cppm16
1 files changed, 8 insertions, 8 deletions
diff --git a/ttwhy/scanners/terminal_scanner.cppm b/ttwhy/scanners/terminal_scanner.cppm
index 9284b84..4215cc8 100644
--- a/ttwhy/scanners/terminal_scanner.cppm
+++ b/ttwhy/scanners/terminal_scanner.cppm
@@ -58,23 +58,23 @@ namespace ttwhy::scanners::detail
};
constexpr auto is_printable = [](byte_received e) {
- return e.value >= 0x20 && e.value <= 0x7e;
+ return e.value >= ' ' && e.value <= '~';
};
constexpr auto is_c0_chord = [](byte_received e) {
- return e.value >= 0x00 && e.value <= 0x1f && !is_backspace(e) && !is_tab(e) && !is_escape(e);
+ return e.value >= '\0' && e.value <= '\x1f' && !is_backspace(e) && !is_tab(e) && !is_escape(e);
};
constexpr auto is_fe = [](byte_received e) {
- return e.value >= 0x40 && e.value <= 0x5f;
+ return e.value >= '@' && e.value <= '_';
};
constexpr auto is_csi = [](c1_received e) {
- return e.value == 0x9b;
+ return e.value == u'\x9b';
};
constexpr auto is_ss3 = [](c1_received e) {
- return e.value == 0x8f;
+ return e.value == u'\x8f';
};
constexpr auto is_unhandled_c1 = [](c1_received e) {
@@ -82,11 +82,11 @@ namespace ttwhy::scanners::detail
};
constexpr auto is_csi_param = [](byte_received e) {
- return e.value >= 0x20 && e.value <= 0x3f;
+ return e.value >= ' ' && e.value <= '?';
};
constexpr auto is_vt100_terminator = [](byte_received e) {
- return e.value >= 0x40 && e.value <= 0x7d;
+ return e.value >= '@' && e.value <= '}';
};
constexpr auto is_vt220_terminator = [](byte_received e) {
@@ -138,7 +138,7 @@ namespace ttwhy::scanners::detail
constexpr auto fallback_escape = [](byte_received event, Sink & sink) {
sink(control_event{control_key::escape});
- if (event.value >= 0x20 && event.value <= 0x7e)
+ if (event.value >= ' ' && event.value <= '~')
{
sink(character_event{event.value});
}