+wdq2wav (0.3.2-1) unstable; urgency=low
+
+ * New upstream, fix for opening binary files with cygwin
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Tue, 11 Feb 2003 23:06:52 -0700
+
wdq2wav (0.3.1-1) unstable; urgency=low
* Update manpage
**
** Copyright (c) 2003 Kevin Rosenberg
**
-** $Id: wdq2wav.cpp,v 1.14 2003/01/21 19:52:20 kevin Exp $
+** $Id: wdq2wav.cpp,v 1.15 2003/02/12 06:10:19 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
#include <wdq2wav.h>
-const char* g_szIdStr = "$Id: wdq2wav.cpp,v 1.14 2003/01/21 19:52:20 kevin Exp $";
+const char* g_szIdStr = "$Id: wdq2wav.cpp,v 1.15 2003/02/12 06:10:19 kevin Exp $";
bool g_quiet = false;
bool g_verbose = false;
bool g_debug = false;
+// Define as NULL for non-Windows platforms
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+
void
error_msg (const char *msg)
{
unsigned short int tmp2;
m_valid = false;
- if ((m_fd = open (m_strFile.c_str(), O_RDONLY)) < 0) {
+ if ((m_fd = open (m_strFile.c_str(), O_RDONLY | O_BINARY)) < 0) {
m_error = "Unable to open file";
return false;
}
return false;
if (m_fd == 0)
- if ((m_fd = open (m_strFile.c_str(), O_WRONLY | O_TRUNC | O_CREAT,
+ if ((m_fd = open (m_strFile.c_str(), O_WRONLY | O_BINARY | O_TRUNC | O_CREAT,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == 0) {
std::ostringstream os;
os << "Error opening output file " << m_strFile.c_str();