head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.54 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.52 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.50 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.48 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.46 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.44 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.42 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.40 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.38 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.36 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.34 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.32 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.30 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.28 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.26 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.24 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.22 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.20 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.18 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.16 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.14 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.12 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.10 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.8 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.6 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.4 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.2 pkgsrc-2003Q4-base:1.2 buildlink2-base:1.2 netbsd-1-4-PATCH002:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.2 date 2000.02.29.16.57.47; author scw; state dead; branches; next 1.1; 1.1 date 99.12.04.12.56.31; author scw; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 99.12.04.12.56.31; author scw; state Exp; branches; next ; desc @@ 1.2 log @Update to version 2.1.1. The author has incorporated the stdio changes which were originally in the patch files being deleted. @ text @$NetBSD: patch-ak,v 1.1 1999/12/04 12:56:31 scw Exp $ --- libaudiofile/raw.c.orig Fri Nov 12 17:46:53 1999 +++ libaudiofile/raw.c Tue Nov 30 15:54:00 1999 @@@@ -29,7 +29,7 @@@@ /*--------------------------------------------------------------------------- | FUNCTION AFreadRAW ---------------------------------------------------------------------------*/ -AFfilehandle AFreadRAW (int file, rawType details) +AFfilehandle AFreadRAW (fhandle file, rawType details) { struct stat s; aiffHandle handleAct; @@@@ -61,7 +61,11 @@@@ handle->aiff.width = 16; // Can calculate frames from size of file +#ifndef USE_STDIO if (fstat (file,&s) == -1) return AF_NULL_FILEHANDLE; +#else + if (fstat (fileno(file),&s) == -1) return AF_NULL_FILEHANDLE; +#endif handle->aiff.framecount = s.st_size / details.channels; switch (details.dataFormat) @@@@ -83,7 +87,7 @@@@ /*--------------------------------------------------------------------------- | FUNCTION AFwriteRAW ---------------------------------------------------------------------------*/ -AFfilehandle AFwriteRAW (int file,AFfilesetup setup) +AFfilehandle AFwriteRAW (fhandle file,AFfilesetup setup) { aiffHandle handleAct; AFfilehandle handle = &handleAct; @@@@ -114,7 +118,11 @@@@ // If error then return negative number if (!handle) return -1; +#ifndef USE_STDIO if (close (handle->file) == -1) return -1; +#else + if (fclose (handle->file) == -1) return -1; +#endif free (handle); return 0; } @@@@ -127,7 +135,7 @@@@ int i; int j; int frameCount; - int file; + fhandle file; unsigned char uctemp; signed char ctemp; unsigned short ustemp; @@@@ -147,7 +155,11 @@@@ i = 0; frameCount = 0; while (handle->actualFrames < handle->aiff.framecount && +#ifndef USE_STDIO frameCount < count) // && !(feof (file))) +#else + frameCount < count && !(feof (file))) +#endif { for (j=0; jaiff.channels; j++) { @@@@ -252,7 +264,7 @@@@ int i; int j; int frameCount; - int file; + fhandle file; unsigned char uctemp; signed char ctemp; unsigned short ustemp; @@@@ -271,7 +283,11 @@@@ i = 0; frameCount = 0; +#ifndef USE_STDIO while (frameCount < count) // && !(feof (file))) +#else + while (frameCount < count && !(feof (file))) +#endif { for (j=0; jaiff.channels; j++) { @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ @ 1.1.1.1 log @Digital audio recording and processing package. @ text @@