r3831: *** empty log message ***
[wdq2wav.git] / wdq2wav.cpp
index 3fbe18f75723b0a175ba35c467db5d4b118c5a36..5c1816913d66dbff48c35107d5fae7b7ca818954 100644 (file)
@@ -8,7 +8,7 @@
 **
 **  Copyright (c) 2003 Kevin Rosenberg
 **
-**  $Id: wdq2wav.cpp,v 1.8 2003/01/21 07:37:13 kevin Exp $
+**  $Id: wdq2wav.cpp,v 1.9 2003/01/21 09:38:59 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -38,14 +38,12 @@ static struct option my_options[] =
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: wdq2wav.cpp,v 1.8 2003/01/21 07:37:13 kevin Exp $";
+static const char* g_szIdStr = "$Id: wdq2wav.cpp,v 1.9 2003/01/21 09:38:59 kevin Exp $";
 
 static bool g_quiet = false;
 static bool g_verbose = false;
 static bool g_debug = false;
 
-#define MAX_INPUT_STR 256
-
 void
 error_msg (const char *msg)
 {
@@ -103,7 +101,6 @@ usage (const char* progname)
   std::cout << "     --help      Print this help message\n";
 }
 
-bool wdq2wav (const char* wdq_fname, const int channel, const char *wav_fname);
 
 int
 main (int argc, char *argv[])
@@ -284,14 +281,13 @@ WindaqFile::ReadHeader ()
   unsigned int tmp4;
 
   m_valid = false;
-  if ((m_fd = open (m_strFile.c_str(), O_RDONLY)) == 0) {
+  if ((m_fd = open (m_strFile.c_str(), O_RDONLY)) < 0) {
     m_error = "Unable to open file";
     return false;
   }
 
   lseek (0, 0, SEEK_SET);
   if (read (m_fd, &tmp2, sizeof(tmp2)) != sizeof(tmp2)) {
-    m_error = "Unable to read beginning of file";
     return false;
   }
   m_nChannels = tmp2 & 0x1f;