From ce05175372a9ddca1a225db0765ace1127a39293 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Fri, 12 Nov 2021 09:22:01 -0800 Subject: chore: simplified organizational structure --- sys/cmd/rc/prompt.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 sys/cmd/rc/prompt.c (limited to 'sys/cmd/rc/prompt.c') diff --git a/sys/cmd/rc/prompt.c b/sys/cmd/rc/prompt.c deleted file mode 100644 index 1122d54..0000000 --- a/sys/cmd/rc/prompt.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "rc.h" - -/* static char promptbuf[7] = {'>', ' ', 0, ' ' , ' ', ' ', 0}; */ -static char *base= "\x1b[1;31m" ">" "\x1b[0;0m" " ", *promptstr; - -void -resetprompt(void) -{ - promptstr = base; -} - -int -prompt(ushort *flag) -{ - int f = *flag; - - if(f){ - if(!readline(promptstr)){ - runner->flag.eof = 1; - return 0; - } - if(runner->cmd.io->e[-1] == '\n'){ - runner->cmd.io->e[-1] = 0; - addhistory(runner->cmd.io->b); - runner->cmd.io->e[-1] = '\n'; - } - - write(mapfd(0), "\n\r", 2); - promptstr = " "; - - runner->line++; - *flag = 0; - } - - return 1; -} -- cgit v1.2.1