summaryrefslogtreecommitdiff
path: root/audio/xwave/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'audio/xwave/patches/patch-ab')
-rw-r--r--audio/xwave/patches/patch-ab74
1 files changed, 71 insertions, 3 deletions
diff --git a/audio/xwave/patches/patch-ab b/audio/xwave/patches/patch-ab
index efda22015a2..6c2d54e8117 100644
--- a/audio/xwave/patches/patch-ab
+++ b/audio/xwave/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.2 1998/08/07 10:36:22 agc Exp $
+$NetBSD: patch-ab,v 1.3 2001/11/18 15:03:39 itohy Exp $
---- orig/xwave/src/aifc.c Mon Nov 25 13:30:37 1996
-+++ src/aifc.c Sat Sep 13 04:18:47 1997
+--- src/aifc.c.orig Thu Aug 13 08:27:09 1998
++++ src/aifc.c Sun Nov 18 22:28:26 2001
@@ -9,7 +9,7 @@
#ifdef linux
@@ -11,3 +11,71 @@ $NetBSD: patch-ab,v 1.2 1998/08/07 10:36:22 agc Exp $
#include <machine/endian.h>
#elif defined (sgi)
#include <sys/endian.h>
+@@ -21,8 +21,8 @@
+ #include "types.h"
+ #include "audio_file.h"
+ #include "ieee/ieee.h"
+-#include "aifc.h"
+ #include "endian.h"
++#include "aifc.h"
+
+ static int aifc_new(Audio_File *af);
+
+@@ -49,8 +49,8 @@
+ int i,count;
+ Aif_Form form;
+ Aif_Chunk chunk;
+- ulong frames,stamp,block_size,offset;
+- short channels,bps;
++ u_int32_t frames,stamp,block_size,offset;
++ int16_t channels,bps;
+ ID comp_typ;
+ unsigned char freq[10],plength,*pstring;
+ bool com_found=False;
+@@ -177,7 +177,7 @@
+ Com_Chunk com;
+ int headoffs=0;
+ char freq[10];
+- ulong stamp,offset,block_size;
++ u_int32_t stamp,offset,block_size;
+ int i;
+
+ com.channels=af->channels;
+@@ -291,7 +291,7 @@
+ M_32_SWAP(form.type);
+ #endif
+
+- if (aifc_seek(*af,0,SEEK_SET)==AF_ERROR) {
++ if (lseek(af->fd,0,SEEK_SET)==-1) {
+ if (com.pstring!=NULL) free(com.pstring);
+ return(AF_ERROR);
+ }
+@@ -301,7 +301,7 @@
+ return(AF_ERROR);
+ }
+
+- if (aifc_seek(*af,headoffs,SEEK_SET)==AF_ERROR) {
++ if (lseek(af->fd,headoffs,SEEK_SET)==-1) {
+ if (com.pstring!=NULL) free(com.pstring);
+ return(AF_ERROR);
+ }
+@@ -348,14 +348,16 @@
+ {
+ switch (af.comp) {
+ case AF_PCM:
+- return(lseek(af.fd,pos,mode));
++ break;
++ default:
++ return(AF_ERROR);
+ }
+- return(AF_ERROR);
++ return(lseek(af.fd, mode == SEEK_SET ? pos + af.headoffs : pos, mode));
+ }
+
+ int aifc_close(Audio_File af)
+ {
+- if (aifc_seek(af,0,SEEK_SET)==AF_ERROR) return(AF_ERROR);
++ if (lseek(af.fd,0,SEEK_SET)==-1) return(AF_ERROR);
+ if (aifc_new (&af)==AF_ERROR) return(AF_ERROR);
+ return(close(af.fd));
+ }