* Skeleton build for 'ctdlsh' utility. Warning: this is extremely gnuuey, it's got...
[citadel] / ctdlsh / src / main.c
1 /*
2  * (c) 2009 by Art Cancro and citadel.org
3  * This program is released under the terms of the GNU General Public License v3.
4  */
5
6 #include <config.h>
7 #include <stdio.h>
8 #include <readline/readline.h>
9
10 int main(int argc, char **argv)
11 {
12         char *cmd = NULL;
13         char *prompt = "> ";
14
15         while (cmd = readline(prompt)) {
16
17                 if ((cmd) && (*cmd)) {
18                         add_history(cmd);
19                 }
20
21                 printf("\nHaha, you said: '%s'\n\n", cmd);
22                 free(cmd);
23         }
24
25         exit(0);
26 }