Commit 179cacd8 authored by Michael Smith's avatar Michael Smith

Add a --version/-V option to vorbiscomment (someone wanted this, god knows why.)

svn path=/trunk/vorbis-tools/; revision=2993
parent a93b2e14
......@@ -26,6 +26,7 @@ struct option long_options[] = {
{"write",0,0,'w'},
{"help",0,0,'h'},
{"quiet",0,0,'q'},
{"version", 0, 0, 'V'},
{"commentfile",1,0,'c'},
{NULL,0,0,0}
};
......@@ -331,7 +332,7 @@ void parse_options(int argc, char *argv[], param_t *param)
setlocale(LC_ALL, "");
while ((ret = getopt_long(argc, argv, "alwhqc:t:",
while ((ret = getopt_long(argc, argv, "alwhqVc:t:",
long_options, &option_index)) != -1) {
switch (ret) {
case 0:
......@@ -347,6 +348,10 @@ void parse_options(int argc, char *argv[], param_t *param)
case 'a':
param->mode = MODE_APPEND;
break;
case 'V':
fprintf(stderr, "Vorbiscomment " VERSION "\n");
exit(0);
break;
case 'h':
usage();
exit(0);
......
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