version 1.3.14.1, 2013/10/08 08:30:33
|
version 1.3.14.2, 2013/10/08 09:30:55
|
Line 53 cliCommands_t commands[] = {
|
Line 53 cliCommands_t commands[] = {
|
}; |
}; |
*/ |
*/ |
|
|
|
static int |
|
oho(void *buf, int idx, char **argv) |
|
{ |
|
printf("Oho!!!! level 0\n"); |
|
return 0; |
|
} |
|
|
|
static int |
|
boho(void *buf, int idx, char **argv) |
|
{ |
|
printf("Boho !!!! level 1\n"); |
|
return 0; |
|
} |
|
|
// --------------------------------------- |
// --------------------------------------- |
|
|
int |
int |
Line 63 main(int argc, char **argv)
|
Line 77 main(int argc, char **argv)
|
|
|
// ret = cliExec(commands, "test>"); |
// ret = cliExec(commands, "test>"); |
t = cliInit(0, 1, argv[1]); |
t = cliInit(0, 1, argv[1]); |
|
cli_addCommand(t, "oho", 0, oho, "oho [args]", "oho - is test level 0"); |
|
cli_addCommand(t, "boho", 1, boho, "boho [args]", "boho - is test level 1"); |
ret = cliLoop(t, NULL); |
ret = cliLoop(t, NULL); |
cliEnd(t); |
cliEnd(t); |
|
|