X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=cli.c;h=bedef6dbbed012490ead5622e8ec09ea94a6faf8;hp=1fe7cc72758346b30516d237b9a987aae5ecbfbd;hb=333ef9e09be5ac9c191625cca4efcebdbfc22073;hpb=8a3154a1db5078cf211c3ea76171956ba076dd76 diff --git a/cli.c b/cli.c index 1fe7cc7..bedef6d 100644 --- a/cli.c +++ b/cli.c @@ -12,19 +12,48 @@ */ #include #include +#include #include "uci.h" +static const char *appname = "uci"; +static enum { + CLI_FLAG_MERGE = (1 << 0), +} flags; +static FILE *input = stdin; + static struct uci_context *ctx; -static char *buf = NULL; -static int buflen = 256; +enum { + /* section cmds */ + CMD_GET, + CMD_SET, + CMD_DEL, + CMD_RENAME, + /* package cmds */ + CMD_SHOW, + CMD_IMPORT, + CMD_EXPORT, + CMD_COMMIT, +}; static void uci_usage(int argc, char **argv) { fprintf(stderr, "Usage: %s [] []\n\n" "Commands:\n" - "\tshow [[.
[.