changeset 337:ccf15a8c3e46

gengetopt does not support multiple dependencies, so added test for database_given for INDEX command. Still cannot figure out why sometimes error(...) throws char* exception and SIG_ABORT
author mas01mc
date Fri, 05 Sep 2008 14:35:44 +0000
parents fe4d5b763086
children cdb31e8b94e3
files audioDB.cpp gengetopt.in
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB.cpp	Fri Sep 05 14:16:21 2008 +0000
+++ b/audioDB.cpp	Fri Sep 05 14:35:44 2008 +0000
@@ -458,6 +458,8 @@
     if(!(sequenceLength>0 && sequenceLength <= O2_MAXSEQLEN))
       error("INDEXing requires 1 <= sequenceLength <= 1000");
     command=COM_INDEX;
+    if(!args_info.database_given)
+      error("INDEXing requires a database");
     dbName=args_info.database_arg;
 
     // Whether to store LSH hash tables for query in core (FORMAT2)
--- a/gengetopt.in	Fri Sep 05 14:16:21 2008 +0000
+++ b/gengetopt.in	Fri Sep 05 14:35:44 2008 +0000
@@ -66,7 +66,7 @@
 
 section "Locality-sensitive hashing (LSH) parameters" sectiondesc="These parameters control LSH indexing and retrieval\n"
 
-option "INDEX"  X "build an index for -d database at -R radius and -l sequenceLength" dependon="database" dependon="radius" optional
+option "INDEX"  X "build an index for -d database at -R radius and -l sequenceLength" dependon="radius" optional
 option "lsh_w" - "width of LSH hash-function bins. " double default="4.0" dependon="INDEX" optional hidden
 option "lsh_k" - "even number of independent hash functions to employ with LSH" int typestr="size" default="8" dependon="INDEX" optional
 option "lsh_m" - "number of hash tables is m(m-1)/2" int typestr="size" default="5" dependon="INDEX" optional