changeset 46:4d07f61dba3f

* Add -v option to print version
author Chris Cannam
date Mon, 18 Oct 2010 14:19:11 +0100
parents 69c438d4b9d3
children 91d20795a109
files configure configure.ac runner/FeatureExtractionManager.cpp runner/main.cpp
diffstat 4 files changed, 22 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Mon Oct 18 14:17:48 2010 +0100
+++ b/configure	Mon Oct 18 14:19:11 2010 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for Sonic Annotator 0.5.
+# Generated by GNU Autoconf 2.65 for Sonic Annotator 0.6hg.
 #
 # Report bugs to <cannam@all-day-breakfast.com>.
 #
@@ -552,8 +552,8 @@
 # Identity of this package.
 PACKAGE_NAME='Sonic Annotator'
 PACKAGE_TARNAME='sonic-annotator'
-PACKAGE_VERSION='0.5'
-PACKAGE_STRING='Sonic Annotator 0.5'
+PACKAGE_VERSION='0.6hg'
+PACKAGE_STRING='Sonic Annotator 0.6hg'
 PACKAGE_BUGREPORT='cannam@all-day-breakfast.com'
 PACKAGE_URL=''
 
@@ -1301,7 +1301,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Sonic Annotator 0.5 to adapt to many kinds of systems.
+\`configure' configures Sonic Annotator 0.6hg to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1362,7 +1362,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Sonic Annotator 0.5:";;
+     short | recursive ) echo "Configuration of Sonic Annotator 0.6hg:";;
    esac
   cat <<\_ACEOF
 
@@ -1513,7 +1513,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Sonic Annotator configure 0.5
+Sonic Annotator configure 0.6hg
 generated by GNU Autoconf 2.65
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1855,7 +1855,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Sonic Annotator $as_me 0.5, which was
+It was created by Sonic Annotator $as_me 0.6hg, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
@@ -7745,7 +7745,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Sonic Annotator $as_me 0.5, which was
+This file was extended by Sonic Annotator $as_me 0.6hg, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7798,7 +7798,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Sonic Annotator config.status 0.5
+Sonic Annotator config.status 0.6hg
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
@@ -8897,7 +8897,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Sonic Annotator $as_me 0.5, which was
+This file was extended by Sonic Annotator $as_me 0.6hg, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -8950,7 +8950,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Sonic Annotator config.status 0.5
+Sonic Annotator config.status 0.6hg
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
--- a/configure.ac	Mon Oct 18 14:17:48 2010 +0100
+++ b/configure.ac	Mon Oct 18 14:19:11 2010 +0100
@@ -1,5 +1,5 @@
 
-AC_INIT([Sonic Annotator], 0.5, cannam@all-day-breakfast.com)
+AC_INIT([Sonic Annotator], [0.6hg], cannam@all-day-breakfast.com)
 
 AC_CONFIG_SRCDIR(runner/main.cpp)
 
--- a/runner/FeatureExtractionManager.cpp	Mon Oct 18 14:17:48 2010 +0100
+++ b/runner/FeatureExtractionManager.cpp	Mon Oct 18 14:19:11 2010 +0100
@@ -651,6 +651,7 @@
 
         int index;
         int fc = (int)frames.size();
+
         if (m_channels == 1) { // only case in which we can sensibly mix down
             for (int j = 0; j < m_blockSize; ++j) {
                 data[0][j] = 0.f;
--- a/runner/main.cpp	Mon Oct 18 14:17:48 2010 +0100
+++ b/runner/main.cpp	Mon Oct 18 14:19:11 2010 +0100
@@ -157,7 +157,7 @@
     cerr << "         " << myname.toStdString()
          << " -s <transform>" << endl;
     cerr << "         " << myname.toStdString()
-         << " [-lh]" << endl;
+         << " [-lhv]" << endl;
     cerr << endl;
     cerr << "Where <audio> is an audio file or URL to use as input: either a local file" << endl;
     cerr << "path, local \"file://\" URL, or remote \"http://\" or \"ftp://\" URL." << endl;
@@ -256,11 +256,12 @@
     cerr << "  -s, --skeleton <I>  Generate a skeleton transform file for transform id <I>" << endl;
     cerr << "                      and write it to standard output." << endl;
     cerr << endl;
+    cerr << "  -v, --version       Show the version number and exit." << endl;
     cerr << "  -h, --help          Show this help." << endl;
 
     cerr << endl;
-    cerr << "If no -w (or --writer) options are supplied, either the -l -s or -h option (or" << endl;
-    cerr << "long equivalent) must be given instead." << endl;
+    cerr << "If no -w (or --writer) options are supplied, either the -l -s -v or -h option" << endl;
+    cerr << "(or long equivalent) must be given instead." << endl;
 
     for (set<string>::const_iterator i = writers.begin();
          i != writers.end(); ++i) {
@@ -385,6 +386,11 @@
             usage(myname);
         }
 
+        if (arg == "-v" || arg == "--version") {
+            std::cout << RUNNER_VERSION << std::endl;
+            return 0;
+        }
+
         if (arg == "-w" || arg == "--writer") {
             if (last || args[i+1].startsWith("-")) {
                 cerr << myname.toStdString() << ": argument expected for \""