3 ** A "micro-shell" to test editline library.
4 ** If given any arguments, commands aren't executed.
7 #if defined(HAVE_STDLIB)
9 #endif /* defined(HAVE_STDLIB) */
11 extern char *readline();
12 extern void add_history();
14 #if !defined(HAVE_STDLIB)
20 extern char *getenv();
21 #endif /* !defined(HAVE_STDLIB) */
24 #if defined(NEED_PERROR)
31 (voidf
)printf(stderr
, "%s: error %d\n", s
, errno
);
33 #endif /* defined(NEED_PERROR) */
47 if ((prompt
= getenv("TESTPROMPT")) == NULL
)
50 while ((p
= readline(prompt
)) != NULL
) {
51 (void)printf("\t\t\t|%s|\n", p
);
53 if (strncmp(p
, "cd ", 3) == 0) {
57 else if (system(p
) != 0)
67 * $PchId: testit.c,v 1.3 1996/02/22 21:18:51 philip Exp $