# HG changeset patch # User mas01mc # Date 1220625344 0 # Node ID ccf15a8c3e46377adc013b6f63ff26fc856dd0c8 # Parent fe4d5b763086a15540a7af9fbfaa0c55270edd5c 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 diff -r fe4d5b763086 -r ccf15a8c3e46 audioDB.cpp --- 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) diff -r fe4d5b763086 -r ccf15a8c3e46 gengetopt.in --- 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