diff options
Diffstat (limited to 'apps/codecs/libwavpack/bits.c')
-rw-r--r-- | apps/codecs/libwavpack/bits.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/codecs/libwavpack/bits.c b/apps/codecs/libwavpack/bits.c index bf056a9392..0a148e123f 100644 --- a/apps/codecs/libwavpack/bits.c +++ b/apps/codecs/libwavpack/bits.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | static void bs_read (Bitstream *bs); | 25 | static void bs_read (Bitstream *bs); |
26 | 26 | ||
27 | void bs_open_read (Bitstream *bs, uchar *buffer_start, uchar *buffer_end, read_stream file, ulong file_bytes) | 27 | void bs_open_read (Bitstream *bs, uchar *buffer_start, uchar *buffer_end, read_stream file, uint32_t file_bytes) |
28 | { | 28 | { |
29 | CLEAR (*bs); | 29 | CLEAR (*bs); |
30 | bs->buf = buffer_start; | 30 | bs->buf = buffer_start; |
@@ -49,7 +49,7 @@ void bs_open_read (Bitstream *bs, uchar *buffer_start, uchar *buffer_end, read_s | |||
49 | static void bs_read (Bitstream *bs) | 49 | static void bs_read (Bitstream *bs) |
50 | { | 50 | { |
51 | if (bs->file && bs->file_bytes) { | 51 | if (bs->file && bs->file_bytes) { |
52 | ulong bytes_read, bytes_to_read = bs->end - bs->buf; | 52 | uint32_t bytes_read, bytes_to_read = bs->end - bs->buf; |
53 | 53 | ||
54 | if (bytes_to_read > bs->file_bytes) | 54 | if (bytes_to_read > bs->file_bytes) |
55 | bytes_to_read = bs->file_bytes; | 55 | bytes_to_read = bs->file_bytes; |
@@ -100,12 +100,12 @@ static void bs_write (Bitstream *bs) | |||
100 | // This function forces a flushing write of the specified BitStream, and | 100 | // This function forces a flushing write of the specified BitStream, and |
101 | // returns the total number of bytes written into the buffer. | 101 | // returns the total number of bytes written into the buffer. |
102 | 102 | ||
103 | ulong bs_close_write (Bitstream *bs) | 103 | uint32_t bs_close_write (Bitstream *bs) |
104 | { | 104 | { |
105 | ulong bytes_written; | 105 | uint32_t bytes_written; |
106 | 106 | ||
107 | if (bs->error) | 107 | if (bs->error) |
108 | return (ulong) -1; | 108 | return (uint32_t) -1; |
109 | 109 | ||
110 | while (bs->bc || ((bs->ptr - bs->buf) & 1)) putbit_1 (bs); | 110 | while (bs->bc || ((bs->ptr - bs->buf) & 1)) putbit_1 (bs); |
111 | bytes_written = bs->ptr - bs->buf; | 111 | bytes_written = bs->ptr - bs->buf; |
@@ -118,13 +118,13 @@ ulong bs_close_write (Bitstream *bs) | |||
118 | void little_endian_to_native (void *data, char *format) | 118 | void little_endian_to_native (void *data, char *format) |
119 | { | 119 | { |
120 | uchar *cp = (uchar *) data; | 120 | uchar *cp = (uchar *) data; |
121 | long temp; | 121 | int32_t temp; |
122 | 122 | ||
123 | while (*format) { | 123 | while (*format) { |
124 | switch (*format) { | 124 | switch (*format) { |
125 | case 'L': | 125 | case 'L': |
126 | temp = cp [0] + ((long) cp [1] << 8) + ((long) cp [2] << 16) + ((long) cp [3] << 24); | 126 | temp = cp [0] + ((int32_t) cp [1] << 8) + ((int32_t) cp [2] << 16) + ((int32_t) cp [3] << 24); |
127 | * (long *) cp = temp; | 127 | * (int32_t *) cp = temp; |
128 | cp += 4; | 128 | cp += 4; |
129 | break; | 129 | break; |
130 | 130 | ||
@@ -148,12 +148,12 @@ void little_endian_to_native (void *data, char *format) | |||
148 | void native_to_little_endian (void *data, char *format) | 148 | void native_to_little_endian (void *data, char *format) |
149 | { | 149 | { |
150 | uchar *cp = (uchar *) data; | 150 | uchar *cp = (uchar *) data; |
151 | long temp; | 151 | int32_t temp; |
152 | 152 | ||
153 | while (*format) { | 153 | while (*format) { |
154 | switch (*format) { | 154 | switch (*format) { |
155 | case 'L': | 155 | case 'L': |
156 | temp = * (long *) cp; | 156 | temp = * (int32_t *) cp; |
157 | *cp++ = (uchar) temp; | 157 | *cp++ = (uchar) temp; |
158 | *cp++ = (uchar) (temp >> 8); | 158 | *cp++ = (uchar) (temp >> 8); |
159 | *cp++ = (uchar) (temp >> 16); | 159 | *cp++ = (uchar) (temp >> 16); |