changeset 9:378c2483c926

Apparently, gengetopt only allows single dependencies between options. Make -I/--INSERT (single insert) depend on -f/--features, and -f/--features depend on -d/--database. Slightly better error message for one failure mode
author mas01cr
date Wed, 25 Jul 2007 16:06:21 +0000
parents 12be3560ff0f
children 3ab41608a474
files audioDB.cpp gengetopt.in
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB.cpp	Wed Jul 25 15:39:26 2007 +0000
+++ b/audioDB.cpp	Wed Jul 25 16:06:21 2007 +0000
@@ -464,7 +464,7 @@
   
   // open the input file
   if (inFile && (infid = open (inFile, O_RDONLY)) < 0)
-    error("can't open feature file for reading", inFile);
+    error("can't open input file for reading", inFile);
 
   // find size of input file
   if (inFile && fstat (infid,&statbuf) < 0)
--- a/gengetopt.in	Wed Jul 25 15:39:26 2007 +0000
+++ b/gengetopt.in	Wed Jul 25 16:06:21 2007 +0000
@@ -47,7 +47,7 @@
 option "DUMP"   D "output all entries: index key size." dependon="database" optional
 option "L2NORM" L "unit norm vectors and norm all future inserts." dependon="database" optional
 section "Database Insertion" sectiondesc="The following commands insert feature files, with optional keys and timestamps.\n"
-option "INSERT"      I "add feature vectors to an existing database." dependon="features" dependon="database" optional
+option "INSERT"      I "add feature vectors to an existing database." dependon="features" optional
 option "UPDATE"      U "replace inserted vectors associated with key with new input vectors." dependon="features" dependon="key" dependon="database" optional hidden
 option "features" f "binary series of vectors file {int sz:ieee double[][sz]:eof}." string typestr="filename" dependon="database" optional
 option "times"    t "list of time points (ascii) for feature vectors." string typestr="filename" dependon="features" optional