--- libaitcli/example/test.c 2010/04/16 13:20:29 1.1.1.1 +++ libaitcli/example/test.c 2010/06/07 09:04:45 1.2.2.1 @@ -4,11 +4,11 @@ // This export commands, good place for write is global header file -CLI_REGISTER_COMMANDS(commands) +//CLI_REGISTER_COMMANDS(commands) // // --------------------------------------------------------------- - +/* int cmd_test1(void *cmds, int idx, FILE *out, char ** __restrict args) { cliCommands_t *c = cmds; @@ -51,15 +51,19 @@ cliCommands_t commands[] = { { "exit", cli_Cmd_Exit, "Exit from console", "exit ", NULL }, { NULL, NULL, NULL, NULL, NULL } }; +*/ - // --------------------------------------- int main() { int ret; + linebuffer_t *t; - ret = cliExec(commands, stdout, "test>"); +// ret = cliExec(commands, "test>"); + t = cliInit(0, 1, "test>"); + ret = cliLoop(t, NULL); + cliEnd(t); return 0; }