From 6e444c70add7ea8720d86559a4f13cdab5167be9 Mon Sep 17 00:00:00 2001 From: verdant Date: Sun, 24 May 2026 13:03:35 +0800 Subject: chore: add comment --- utils.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'utils.c') diff --git a/utils.c b/utils.c index da5fe12..d965e4f 100644 --- a/utils.c +++ b/utils.c @@ -1,5 +1,7 @@ #include +#include #include "utils.h" +#include "keys.h" static struct termios original_term; @@ -17,3 +19,44 @@ void enable_term_echo() { tcsetattr(0, TCSANOW, &original_term); } + +void print_cfg_route(struct config *cfg) +{ +} + +/* void print_pure(struct input_event *ie, struct config *cfg) */ +/* { */ +/* if (!cfg || !ie) { */ +/* fprintf(stderr, "NULL.\n"); */ +/* return; */ +/* } */ + +/* if (!cfg->repeat && !cfg->show_shifted) { */ +/* printf("%s\n", key_names[ie->code]); */ +/* return; */ +/* } */ + +/* if (cfg->repeat) { */ +/* printf("%s\r", key_names[ie->code]); */ +/* return; */ +/* } */ + +/* /\* if (cfg->show_shifted) { *\/ */ +/* /\* } *\/ */ +/* } */ +/* void print_with_time(struct input_event *ie, struct config *cfg) */ +/* { */ +/* if (!cfg || !ie) { */ +/* fprintf(stderr, "NULL.\n"); */ +/* return; */ +/* } */ + +/* struct tm *tm_info; */ +/* char time_buf[64]; */ +/* time_t sec = (time_t)ie->input_event_sec; */ +/* tm_info = localtime(&sec); */ +/* strftime(time_buf, sizeof(time_buf), "%F %T", tm_info); */ + +/* printf("%s.%06ld: %s\n", time_buf, (long)ie->time.tv_usec, */ +/* key_names[ie->code]); */ +/* } */ -- cgit v1.2.3