From d46183860c1f3f10095e95023adcb79b1896ab0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 22 Mar 2019 20:11:11 +0100 Subject: Move C and Scheme code into subdirs. --- termios.scm.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 termios.scm.c (limited to 'termios.scm.c') diff --git a/termios.scm.c b/termios.scm.c deleted file mode 100644 index 939c3574..00000000 --- a/termios.scm.c +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include -#include - -static struct termios *oldt, *newt; - -SCM_DEFINE(termios_lflags_and, "c-lflags-disable!", 2, 0, 0, - (SCM _fd, SCM _bits), - "") -{ - - int fd = scm_to_int (_fd); - int bits = scm_to_int (_bits); - - printf("Setting bits [%x]\n", bits); - - tcgetattr(fd, oldt); - *newt = *oldt; - - // Make the terminal not echo back, - // along with enabling cononical mode - newt->c_lflag &= ~ bits; - tcsetattr(fd, TCSANOW, newt); - return SCM_UNSPECIFIED; -} - -SCM_DEFINE(termios_restore, "c-lflag-restore!", 1, 0, 0, - (SCM _fd), - "") -{ - int fd = scm_to_int (_fd); - tcsetattr(fd, TCSANOW, oldt); - return SCM_UNSPECIFIED; -} - -void init_termios (void) { - oldt = scm_gc_malloc(sizeof(*oldt), "Termios"); - newt = scm_gc_malloc(sizeof(*newt), "Termios"); - -#ifndef SCM_MAGIC_SNARFER -#include "termios.x" -#endif -} -- cgit v1.2.3