pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/gramofile Apply a patch from Ole Hellqvist in PR...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c7c519b4f47d
branches:  trunk
changeset: 484714:c7c519b4f47d
user:      agc <agc%pkgsrc.org@localhost>
date:      Mon Nov 29 09:17:10 2004 +0000

description:
Apply a patch from Ole Hellqvist in PR 26206 to make the main
structure definition use fixed-size fields, which should go some way
to fixing some problems on LP64 platforms.

diffstat:

 audio/gramofile/distinfo         |   3 +-
 audio/gramofile/patches/patch-ac |  83 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+), 1 deletions(-)

diffs (99 lines):

diff -r a3b285537e6d -r c7c519b4f47d audio/gramofile/distinfo
--- a/audio/gramofile/distinfo  Mon Nov 29 09:08:07 2004 +0000
+++ b/audio/gramofile/distinfo  Mon Nov 29 09:17:10 2004 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.3 2004/07/09 12:02:04 xtraeme Exp $
+$NetBSD: distinfo,v 1.4 2004/11/29 09:17:10 agc Exp $
 
 SHA1 (gramofile-1.6.tar.gz) = 6e5365d9e04801725be694fefcff5fc10ea2f912
 Size (gramofile-1.6.tar.gz) = 108596 bytes
 SHA1 (patch-aa) = 0e3912dc5c5470f5ca9cb5916467af7ffa8b52fb
 SHA1 (patch-ab) = cdb6ed27cb4e4f6fc91a34a12369caa2a52e94d9
+SHA1 (patch-ac) = 38094ec6a4e1e90e3d03eef5ce3f6fdb8d0621bb
diff -r a3b285537e6d -r c7c519b4f47d audio/gramofile/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/gramofile/patches/patch-ac  Mon Nov 29 09:17:10 2004 +0000
@@ -0,0 +1,83 @@
+$NetBSD: patch-ac,v 1.3 2004/11/29 09:17:10 agc Exp $
+
+Use fixed size fields
+
+--- fmtheaders.h.orig  2000-03-28 22:07:26.000000000 +0100
++++ fmtheaders.h       2004-11-29 09:12:19.000000000 +0000
+@@ -7,16 +7,16 @@
+ 
+ #define VOC_MAGIC     "Creative Voice File\032"
+ 
+-#define DATALEN(bp)   ((u_long)(bp.BlockLen[0]) | \
+-                         ((u_long)(bp.BlockLen[1]) << 8) | \
+-                         ((u_long)(bp.BlockLen[2]) << 16) )
++#define DATALEN(bp)   ((u_int32_t)(bp.BlockLen[0]) | \
++                         ((u_int32_t)(bp.BlockLen[1]) << 8) | \
++                         ((u_int32_t)(bp.BlockLen[2]) << 16) )
+ 
+ typedef struct vochead
+   {
+     u_char Magic[20];         /* must be VOC_MAGIC */
+-    u_short BlockOffset;      /* Offset to first block from top of file */
+-    u_short Version;          /* VOC-file version */
+-    u_short IDCode;           /* complement of version + 0x1234 */
++    u_int16_t BlockOffset;    /* Offset to first block from top of file */
++    u_int16_t Version;                /* VOC-file version */
++    u_int16_t IDCode;         /* complement of version + 0x1234 */
+   }
+ vochead;
+ 
+@@ -36,7 +36,7 @@
+ 
+ typedef struct blockT8
+   {
+-    u_short TimeConstant;
++    u_int16_t TimeConstant;
+     u_char PackMethod;
+     u_char VoiceMode;
+   }
+@@ -47,7 +47,7 @@
+     u_int SamplesPerSec;
+     u_char BitsPerSample;
+     u_char Channels;
+-    u_short Format;
++    u_int16_t Format;
+     u_char reserved[4];
+   }
+ blockT9;
+@@ -62,21 +62,21 @@
+  */
+ typedef struct wavhead
+   {
+-    u_long main_chunk;                /* 'RIFF' */
+-    u_long length;            /* Length of rest of file */
+-    u_long chunk_type;                /* 'WAVE' */
+-
+-    u_long sub_chunk;         /* 'fmt ' */
+-    u_long sc_len;            /* length of sub_chunk, =16 (rest of chunk) */
+-    u_short format;           /* should be 1 for PCM-code */
+-    u_short modus;            /* 1 Mono, 2 Stereo */
+-    u_long sample_fq;         /* frequence of sample */
+-    u_long byte_p_sec;
+-    u_short byte_p_spl;               /* samplesize; 1 or 2 bytes */
+-    u_short bit_p_spl;                /* 8, 12 or 16 bit */
++    u_int32_t main_chunk;             /* 'RIFF' */
++    u_int32_t length;         /* Length of rest of file */
++    u_int32_t chunk_type;             /* 'WAVE' */
++
++    u_int32_t sub_chunk;              /* 'fmt ' */
++    u_int32_t sc_len;         /* length of sub_chunk, =16 (rest of chunk) */
++    u_int16_t format;         /* should be 1 for PCM-code */
++    u_int16_t modus;          /* 1 Mono, 2 Stereo */
++    u_int32_t sample_fq;              /* frequence of sample */
++    u_int32_t byte_p_sec;
++    u_int16_t byte_p_spl;             /* samplesize; 1 or 2 bytes */
++    u_int16_t bit_p_spl;              /* 8, 12 or 16 bit */
+ 
+-    u_long data_chunk;                /* 'data' */
+-    u_long data_length;               /* samplecount (lenth of rest of block?) */
++    u_int32_t data_chunk;             /* 'data' */
++    u_int32_t data_length;            /* samplecount (lenth of rest of block?) */
+   }
+ wavhead;
+ 



Home | Main Index | Thread Index | Old Index