blob: ebda9fb8b001258ae35504b60160fd5b43bcaf60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#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;
}
write(mapfd(0), "\n\r", 2);
promptstr = " ";
runner->line++;
*flag = 0;
}
return 1;
}
|