From 43d32a32bcfb879268237ccbc1e34913077a889c Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Thu, 4 Jul 2013 16:55:40 -0600 Subject: [PATCH] Automated commit for upstream build of version 0.9.0 --- debian/rules | 14 +++++++++----- wdq2wav.cpp | 15 ++++++++------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/debian/rules b/debian/rules index 93db313..8853463 100755 --- a/debian/rules +++ b/debian/rules @@ -17,9 +17,9 @@ configure-stamp: touch configure-stamp -build: build-stamp +build: build-stamp build-arch build-indep -build-stamp: configure-stamp +build-stamp: configure-stamp dh_testdir $(MAKE) touch build-stamp @@ -37,11 +37,11 @@ install: build dh_testroot dh_prep dh_installdirs - $(MAKE) install DESTDIR=$(CURDIR)/debian/wdq2wav + dpkg-buildflags $(MAKE) install DESTDIR=$(CURDIR)/debian/wdq2wav -binary-indep: build install +build-indep: -binary-arch: build install +build-arch: dh_testdir dh_testroot dh_installdocs @@ -61,5 +61,9 @@ binary-arch: build install dh_md5sums dh_builddeb +binary-indep: build-indep + +binary-arch: build-arch + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure diff --git a/wdq2wav.cpp b/wdq2wav.cpp index 23e764b..1c7791f 100644 --- a/wdq2wav.cpp +++ b/wdq2wav.cpp @@ -374,19 +374,20 @@ bool read_int4 (int fd, unsigned int& n) bool read_float8 (int fd, double& f) { - unsigned char buf[8]; - if (read (fd, &buf, 8) != 8) + unsigned char p[8]; + if (read (fd, p, 8) != 8) return false; #if WORDS_BIG_ENDIAN unsigned char c; - c = buf[0]; buf[0] = buf[7]; buf[7] = c; - c = buf[1]; buf[1] = buf[6]; buf[6] = c; - c = buf[2]; buf[2] = buf[5]; buf[5] = c; - c = buf[3]; buf[3] = buf[4]; buf[4] = c; + c = p[0]; p[0] = p[7]; p[7] = c; + c = p[1]; p[1] = p[6]; p[6] = c; + c = p[2]; p[2] = p[5]; p[5] = c; + c = p[3]; p[3] = p[4]; p[4] = c; #endif - f = *(reinterpret_cast(buf)); + double *pd = reinterpret_cast(&p[0]); + f = *pd; return true; } -- 2.34.1