]> git.pld-linux.org Git - packages/wavplay.git/blame - wavplay-types.patch
- dropped pre-cvs changelog
[packages/wavplay.git] / wavplay-types.patch
CommitLineData
9172cfe5
JB
1diff -Nur wavplay-1.4.orig/wavfile.c wavplay-1.4/wavfile.c
2--- wavplay-1.4.orig/wavfile.c Sat Dec 4 01:06:42 1999
3+++ wavplay-1.4/wavfile.c Fri Aug 16 12:31:44 2002
4@@ -36,6 +36,7 @@
5 */
6 static const char rcsid[] = "@(#)wavfile.c $Revision$";
7
8+#include <stdint.h>
9 #include <stdio.h>
10 #include <errno.h>
11 #include <sys/types.h>
12@@ -51,29 +52,29 @@
13 #define FALSE 0
14
15 typedef struct
16-{ u_long dwSize ;
17- u_short wFormatTag ;
18- u_short wChannels ;
19- u_long dwSamplesPerSec ;
20- u_long dwAvgBytesPerSec ;
21- u_short wBlockAlign ;
22- u_short wBitsPerSample ;
23+{ uint32_t dwSize ;
24+ uint16_t wFormatTag ;
25+ uint16_t wChannels ;
26+ uint32_t dwSamplesPerSec ;
27+ uint32_t dwAvgBytesPerSec ;
28+ uint16_t wBlockAlign ;
29+ uint16_t wBitsPerSample ;
30 } WAVEFORMAT ;
31
32 typedef struct
33 { char RiffID [4] ;
34- u_long RiffSize ;
35+ uint32_t RiffSize ;
36 char WaveID [4] ;
37 char FmtID [4] ;
38- u_long FmtSize ;
39- u_short wFormatTag ;
40- u_short nChannels ;
41- u_long nSamplesPerSec ;
42- u_long nAvgBytesPerSec ;
43- u_short nBlockAlign ;
44- u_short wBitsPerSample ;
45+ uint32_t FmtSize ;
46+ uint16_t wFormatTag ;
47+ uint16_t nChannels ;
48+ uint32_t nSamplesPerSec ;
49+ uint32_t nAvgBytesPerSec ;
50+ uint16_t nBlockAlign ;
51+ uint16_t wBitsPerSample ;
52 char DataID [4] ;
53- u_long nDataBytes ;
54+ uint32_t nDataBytes ;
55 } WAVE_HEADER ;
56
57 /*=================================================================================================*/
58@@ -183,7 +184,7 @@
59 ptr += 4 ; /* Move past "fmt ".*/
60 memcpy (&waveformat, ptr, sizeof (WAVEFORMAT)) ;
61
62- if (waveformat.dwSize < (sizeof (WAVEFORMAT) - sizeof (u_long))) {
63+ if (waveformat.dwSize < (sizeof (WAVEFORMAT) - sizeof (uint32_t))) {
64 err("Bad format: Bad fmt size"); /* wwg: report error */
65 return WR_BADFORMATSIZE ;
66 }
67diff -Nur wavplay-1.4.orig/wavplay.h wavplay-1.4/wavplay.h
68--- wavplay-1.4.orig/wavplay.h Sat Dec 4 01:06:42 1999
69+++ wavplay-1.4/wavplay.h Fri Aug 16 11:49:54 2002
70@@ -61,6 +61,7 @@
71 #define WAVPLAY_VERSION "1.4"
72
73 #include <stdarg.h>
74+#include <stdint.h>
75 #include <sys/types.h>
76 #include <sys/ipc.h>
77 #include <sys/stat.h>
78@@ -151,11 +152,11 @@
79 * Types internal to wavplay, in an attempt to isolate ourselves from
80 * a dependance on a particular platform.
81 */
82-typedef unsigned char Byte;
83-typedef short Int16;
84-typedef long Int32;
85-typedef unsigned long UInt32;
86-typedef unsigned short UInt16;
87+typedef uint8_t Byte;
88+typedef int16_t Int16;
89+typedef int32_t Int32;
90+typedef uint32_t UInt32;
91+typedef uint16_t UInt16;
92
93 /*
94 * This value sets buffer sizes for temporary buffers that sprintf()
This page took 0.070084 seconds and 4 git commands to generate.