aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils.c43
-rw-r--r--utils.h6
2 files changed, 49 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index da5fe12..d965e4f 100644
--- a/utils.c
+++ b/utils.c
@@ -1,5 +1,7 @@
#include <termios.h>
+#include <stdio.h>
#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]); */
+/* } */
diff --git a/utils.h b/utils.h
index b556bbf..e6e6558 100644
--- a/utils.h
+++ b/utils.h
@@ -1,7 +1,13 @@
#ifndef KL_UTILS_H
#define KL_UTILS_H
+#include <linux/input.h>
+#include "config.h"
+
void disable_term_echo();
void enable_term_echo();
+/* void print_pure(struct input_event *ie, struct config *cfg); */
+/* void print_with_time(struct input_event *ie, struct config *cfg); */
+
#endif