2 #include <readline/readline.h>
6 /* Read-Send-Print-Loop */
7 void rspl(int pin, int pout)
9 static char *line = (char *)NULL;
18 line = readline("gacela>");
22 if (strcmp(line, "(quit)") == 0)
25 write(pout, line, strlen(line));
32 int main (int argc, char *argv[])
47 while (read(pfd[0], &buf, 1) > 0) {
49 write(STDOUT_FILENO, "-\n", 2);
51 write(STDOUT_FILENO, &buf, 1);