Commit 0c42d594 authored by Yoni Fogel's avatar Yoni Fogel

Re-ordered options

git-svn-id: file:///svn/tokudb@1041 c7de825b-a66e-492c-adef-691d508d4ae1
parent ee6adf09
......@@ -60,25 +60,41 @@ int main(int argc, char *argv[]) {
while ((ch = getopt(argc, argv, "klNpRrVd:f:h:P:s:")) != EOF) {
switch (ch) {
case ('d'): {
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('f'): {
if (freopen(optarg, "w", stdout) == NULL) {
fprintf(stderr,
"%s: %s: reopen: %s\n",
g.progname, optarg, strerror(errno));
goto error;
}
break;
}
case ('h'): {
g.homedir = optarg;
break;
}
case ('k'): {
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('l'): {
//TODO: Implement (Requires master database support)
ERRORX("-%c option not supported.\n", ch);
ERRORX("-%c option not supported.\n", ch); //YET!
goto error;
}
case ('N'): {
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('T'): {
g.plaintext = true;
g.leadingspace = false;
g.header = false;
g.footer = false;
break;
case ('P'): {
/* Clear password. */
memset(optarg, 0, strlen(optarg));
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('p'): {
g.plaintext = true;
......@@ -100,37 +116,21 @@ int main(int argc, char *argv[]) {
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('s'): {
g.subdatabase = optarg;
goto error;
}
case ('V'): {
printf("%s\n", db_version(NULL, NULL, NULL));
goto cleanup;
}
case ('d'): {
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('f'): {
if (freopen(optarg, "w", stdout) == NULL) {
fprintf(stderr,
"%s: %s: reopen: %s\n",
g.progname, optarg, strerror(errno));
goto error;
}
break;
}
case ('h'): {
g.homedir = optarg;
case ('T'): {
g.plaintext = true;
g.leadingspace = false;
g.header = false;
g.footer = false;
break;
}
case ('P'): {
/* Clear password. */
memset(optarg, 0, strlen(optarg));
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('s'): {
g.subdatabase = optarg;
goto error;
}
case ('?'):
default: {
g.exitcode = usage();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment