summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/metadata/metadata_common.c12
-rw-r--r--apps/metadata/metadata_common.h12
2 files changed, 12 insertions, 12 deletions
diff --git a/apps/metadata/metadata_common.c b/apps/metadata/metadata_common.c
index 1ad89d1b7a..781123717a 100644
--- a/apps/metadata/metadata_common.c
+++ b/apps/metadata/metadata_common.c
@@ -155,7 +155,7 @@ uint64_t get_uint64_le(void* buf)
155} 155}
156 156
157/* Read an unaligned 32-bit little endian long from buffer. */ 157/* Read an unaligned 32-bit little endian long from buffer. */
158unsigned long get_long_le(void* buf) 158uint32_t get_long_le(void* buf)
159{ 159{
160 unsigned char* p = (unsigned char*) buf; 160 unsigned char* p = (unsigned char*) buf;
161 161
@@ -163,7 +163,7 @@ unsigned long get_long_le(void* buf)
163} 163}
164 164
165/* Read an unaligned 16-bit little endian short from buffer. */ 165/* Read an unaligned 16-bit little endian short from buffer. */
166unsigned short get_short_le(void* buf) 166uint16_t get_short_le(void* buf)
167{ 167{
168 unsigned char* p = (unsigned char*) buf; 168 unsigned char* p = (unsigned char*) buf;
169 169
@@ -171,7 +171,7 @@ unsigned short get_short_le(void* buf)
171} 171}
172 172
173/* Read an unaligned 32-bit big endian long from buffer. */ 173/* Read an unaligned 32-bit big endian long from buffer. */
174unsigned long get_long_be(void* buf) 174uint32_t get_long_be(void* buf)
175{ 175{
176 unsigned char* p = (unsigned char*) buf; 176 unsigned char* p = (unsigned char*) buf;
177 177
@@ -179,7 +179,7 @@ unsigned long get_long_be(void* buf)
179} 179}
180 180
181/* Read an unaligned 16-bit little endian short from buffer. */ 181/* Read an unaligned 16-bit little endian short from buffer. */
182unsigned short get_short_be(void* buf) 182uint16_t get_short_be(void* buf)
183{ 183{
184 unsigned char* p = (unsigned char*) buf; 184 unsigned char* p = (unsigned char*) buf;
185 185
@@ -187,14 +187,14 @@ unsigned short get_short_be(void* buf)
187} 187}
188 188
189/* Read an unaligned 32-bit little endian long from buffer. */ 189/* Read an unaligned 32-bit little endian long from buffer. */
190long get_slong(void* buf) 190int32_t get_slong(void* buf)
191{ 191{
192 unsigned char* p = (unsigned char*) buf; 192 unsigned char* p = (unsigned char*) buf;
193 193
194 return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24); 194 return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
195} 195}
196 196
197unsigned long get_itunes_int32(char* value, int count) 197uint32_t get_itunes_int32(char* value, int count)
198{ 198{
199 static const char hexdigits[] = "0123456789ABCDEF"; 199 static const char hexdigits[] = "0123456789ABCDEF";
200 const char* c; 200 const char* c;
diff --git a/apps/metadata/metadata_common.h b/apps/metadata/metadata_common.h
index a48c2a4e89..db91729de4 100644
--- a/apps/metadata/metadata_common.h
+++ b/apps/metadata/metadata_common.h
@@ -59,11 +59,11 @@ int read_uint64be(int fd, uint64_t* buf);
59#endif 59#endif
60 60
61uint64_t get_uint64_le(void* buf); 61uint64_t get_uint64_le(void* buf);
62unsigned long get_long_le(void* buf); 62uint32_t get_long_le(void* buf);
63unsigned short get_short_le(void* buf); 63uint16_t get_short_le(void* buf);
64unsigned long get_long_be(void* buf); 64uint32_t get_long_be(void* buf);
65unsigned short get_short_be(void* buf); 65uint16_t get_short_be(void* buf);
66long get_slong(void* buf); 66int32_t get_slong(void* buf);
67unsigned long get_itunes_int32(char* value, int count); 67uint32_t get_itunes_int32(char* value, int count);
68long parse_tag(const char* name, char* value, struct mp3entry* id3, 68long parse_tag(const char* name, char* value, struct mp3entry* id3,
69 char* buf, long buf_remaining, enum tagtype type); 69 char* buf, long buf_remaining, enum tagtype type);