summaryrefslogtreecommitdiffstats
path: root/src/c_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_init.c')
-rw-r--r--src/c_init.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/c_init.c b/src/c_init.c
new file mode 100644
index 0000000..5cf46f3
--- /dev/null
+++ b/src/c_init.c
@@ -0,0 +1,32 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* u_init.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */
+/* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */
+/* */
+/* ************************************************************************** */
+
+#include <term.h>
+#include <curses.h>
+
+void u_handle_sigwinch(int dummy_signal)
+{
+ (void)dummy_signal;
+ tputs(LC, 1, ft_putchar);
+ fflush(stdout);
+}
+
+int16_t c_init_tcaps(void)
+{
+ char *bp;
+ char *term;
+ char *LC;
+
+ term = getenv("TERM");
+ tgetent(bp, term);
+ LC = tgetstr("lc", &term);
+}