{\r
case 0:\r
break;\r
+ case OPT_VERBOSE: /* --verbose or -v */\r
+ opt_verbose = OPT_VERBOSE;\r
+ break;\r
+ case OPT_DEBUG: /* --debug or -d */\r
+ opt_verbose = OPT_DEBUG;\r
+ break;\r
case OPT_VERSION: /* --version or -V */\r
printf("memcache tools, memcat, v1.0\n");\r
exit(0);\r
{\r
static char *opstr[] = { "set", "add", "replace" };\r
printf("op: %s\nsource file: %s\nlength: %zu\n"\r
- "key: %s\nflags: %x\n expires: %llu\n",\r
- opstr[opt_method], argv[optind], (size_t)sbuf.st_size,\r
+ "key: %s\nflags: %x\nexpires: %llu\n",\r
+ opstr[opt_method - OPT_SET], argv[optind], (size_t)sbuf.st_size,\r
ptr, opt_flags, (unsigned long long)opt_expires);\r
}\r
\r
{\r
case 0:\r
break;\r
+ case OPT_VERBOSE: /* --verbose or -v */\r
+ opt_verbose = OPT_VERBOSE;\r
+ break;\r
+ case OPT_DEBUG: /* --debug or -d */\r
+ opt_verbose = OPT_DEBUG;\r
+ break;\r
case OPT_VERSION: /* --version or -V */\r
printf("memcache tools, memcp, v1.0\n");\r
exit(0);\r
{\r
case 0:\r
break;\r
+ case OPT_VERBOSE: /* --verbose or -v */\r
+ opt_verbose = OPT_VERBOSE;\r
+ break;\r
+ case OPT_DEBUG: /* --debug or -d */\r
+ opt_verbose = OPT_DEBUG;\r
+ break;\r
case OPT_VERSION: /* --version or -V */\r
printf("memcache tools, memrm, v1.0\n");\r
exit(0);\r
{
case 0:
break;
+ case OPT_VERBOSE: /* --verbose or -v */
+ opt_verbose = OPT_VERBOSE;
+ break;
+ case OPT_DEBUG: /* --debug or -d */
+ opt_verbose = OPT_DEBUG;
+ break;
case OPT_VERSION: /* --version or -V */
printf("memcache tools, memcat, v1.0\n");
exit(0);