summaryrefslogtreecommitdiff
path: root/include/con-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/con-utils.h')
-rw-r--r--include/con-utils.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/con-utils.h b/include/con-utils.h
new file mode 100644
index 0000000..86c0df0
--- /dev/null
+++ b/include/con-utils.h
@@ -0,0 +1,30 @@
+/*
+ * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+/*
+ * Console utilities
+ */
+
+#ifndef CON_UTILS_H
+#define CON_UTILS_H
+
+uint_fast8_t tstc(void);
+
+int my_getchar(uint_fast8_t waitforchar);
+
+/* test if ctrl-c was pressed */
+uint_fast8_t ctrlc(void);
+
+
+/* pass 1 to disable ctrlc() checking, 0 to enable.
+ * returns previous state
+ */
+uint_fast8_t disable_ctrlc(uint_fast8_t disable);
+
+uint_fast8_t had_ctrlc (void);
+void clear_ctrlc(void);
+
+#endif /* CON_UTILS_H */