X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fmemcp.c;h=3b846e78fa5025616631a921a752623cd73a4817;hb=7bfd925c54662cf1f67b651559dd91f77bfe8817;hp=9123028b44509fff5007c8c9c92b3825a9d940be;hpb=113160884d25c401dc352cfab093b5b7b1a4fde0;p=awesomized%2Flibmemcached diff --git a/src/memcp.c b/src/memcp.c index 9123028b..3b846e78 100644 --- a/src/memcp.c +++ b/src/memcp.c @@ -12,6 +12,9 @@ #include "client_options.h" #include "utilities.h" +#define PROGRAM_NAME "memcp" +#define PROGRAM_DESCRIPTION "Copy a set of files to a memcached cluster." + /* Prototypes */ void options_parse(int argc, char *argv[]); @@ -122,6 +125,11 @@ void options_parse(int argc, char *argv[]) int option_index= 0; int option_rv; + memcached_programs_help_st help_options[]= + { + {0}, + }; + static struct option long_options[]= { {"version", no_argument, NULL, OPT_VERSION}, @@ -154,11 +162,11 @@ void options_parse(int argc, char *argv[]) opt_verbose = OPT_DEBUG; break; case OPT_VERSION: /* --version or -V */ - printf("memcache tools, memcp, v1.0\n"); - exit(0); + version_command(PROGRAM_NAME); + break; case OPT_HELP: /* --help or -h */ - printf("useful help messages go here\n"); - exit(0); + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, help_options); + break; case OPT_SERVERS: /* --servers or -s */ opt_servers= strdup(optarg); break;