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 const char version_string[] = "4.321";
14 extern char *readline();
15 extern void add_history();
17 #if !defined(HAVE_STDLIB)
23 #endif /* !defined(HAVE_STDLIB) */
26 #if defined(NEED_PERROR)
33 (voidf)printf(stderr, "%s: error %d\n", s, errno);
35 #endif /* defined(NEED_PERROR) */
48 while ((p = readline("testit> ")) != NULL) {
49 (void)printf("\t\t\t|%s|\n", p);
51 if (strncmp(p, "cd ", 3) == 0) {
55 else if (system(p) != 0)