2 ** A "micro-shell" to test editline library.
3 ** If given any arguments, commands aren't executed.
6 #if defined(HAVE_STDLIB)
8 #endif /* defined(HAVE_STDLIB) */
10 extern char *readline();
11 extern void add_history();
13 #if !defined(HAVE_STDLIB)
19 extern char *getenv();
20 #endif /* !defined(HAVE_STDLIB) */
23 #if defined(NEED_PERROR)
30 (voidf
)printf(stderr
, "%s: error %d\n", s
, errno
);
32 #endif /* defined(NEED_PERROR) */
46 if ((prompt
= getenv("TESTPROMPT")) == NULL
)
49 while ((p
= readline(prompt
)) != NULL
) {
50 (void)printf("\t\t\t|%s|\n", p
);
52 if (strncmp(p
, "cd ", 3) == 0) {
56 else if (system(p
) != 0)
66 * $PchId: testit.c,v 1.3 1996/02/22 21:18:51 philip Exp $