47 extern CONST ECHAR el_NIL[];
52 CONST ECHAR *el_Input = el_NIL;
54 extern void TTYflush();
58 void rl_ttyset(
int Reset)
60 HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
61 hStdin = GetStdHandle(STD_INPUT_HANDLE);
63 SetConsoleMode(hStdin, 0);
64 SetConsoleMode(hStdout, ENABLE_PROCESSED_OUTPUT);
79 if (!ReadFile(hStdin, &c, 1, &n, NULL))
85 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
88 void rl_add_slash(
char *path,
char *p)
93 if (stat(path, &Sb) >= 0)
94 (void)strcat(p, S_ISDIR(Sb.st_mode) ?
"\\" :
" ");
98 int el_is_directory(
char *path)
104 if ((stat(path, &Sb) >= 0) && S_ISDIR(Sb.st_mode))
115 kill(getpid(),SIGINT);
119 int tgetent(
char *bp,
const char *name)
125 int tgetnum(
const char *
id)
127 if (strcmp(
id,
"co") == 0)
129 else if (strcmp(
id,
"li") == 0)
138 int tgetstr(
const char *
id,
char **area)
140 if (strcmp(
id,
"le") == 0)
142 else if (strcmp(
id,
"up") == 0)
144 else if (strcmp(
id,
"cl") == 0)
145 return (
int)ESCB
"H" ESCB
"J";
146 else if (strcmp(
id,
"nl") == 0)
148 else if (strcmp(
id,
"cr") == 0)
150 else if (strcmp(
id,
"nd") == 0)