summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-03-17 09:54:28 +0000
committerJens Arnold <amiconn@rockbox.org>2007-03-17 09:54:28 +0000
commitf68362ad6ffef77261e2f64cedc08a023c721ae7 (patch)
tree455e19964b6efb605374ea192b97d8eed0307c97 /firmware
parent75e1fd718f4d354afbee4cf5251e03d5101c0daf (diff)
Fix simulator builds, and some debugf() format strings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12817 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/debug.h2
-rw-r--r--firmware/export/logf.h2
-rw-r--r--firmware/id3.c8
-rw-r--r--firmware/mp3data.c15
4 files changed, 14 insertions, 13 deletions
diff --git a/firmware/export/debug.h b/firmware/export/debug.h
index ef56ea6092..17c4bdfdd6 100644
--- a/firmware/export/debug.h
+++ b/firmware/export/debug.h
@@ -19,7 +19,7 @@
#ifndef DEBUG_H
#define DEBUG_H
-#include <_ansi.h>
+#include "../include/_ansi.h"
extern void debug_init(void);
extern void debugf(const char* fmt,...) ATTRIBUTE_PRINTF(1, 2);
diff --git a/firmware/export/logf.h b/firmware/export/logf.h
index 016425f334..868e8fc723 100644
--- a/firmware/export/logf.h
+++ b/firmware/export/logf.h
@@ -20,7 +20,7 @@
#define LOGF_H
#include <config.h>
#include <stdbool.h>
-#include "_ansi.h"
+#include "../include/_ansi.h"
#ifdef ROCKBOX_HAS_LOGF
diff --git a/firmware/id3.c b/firmware/id3.c
index 88bc399b71..92327ed92b 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -768,7 +768,7 @@ static void setid3v2title(int fd, struct mp3entry *entry)
/* Keep track of the total size */
totframelen = framelen;
- DEBUGF("framelen = %d\n", framelen);
+ DEBUGF("framelen = %ld\n", framelen);
if(framelen == 0){
if (header[0] == 0 && header[1] == 0 && header[2] == 0)
return;
@@ -1000,7 +1000,7 @@ static int getsonglength(int fd, struct mp3entry *entry)
bytecount = get_mp3file_info(fd, &info);
- DEBUGF("Space between ID3V2 tag and first audio frame: 0x%x bytes\n",
+ DEBUGF("Space between ID3V2 tag and first audio frame: 0x%lx bytes\n",
bytecount);
if(bytecount < 0)
@@ -1021,7 +1021,7 @@ static int getsonglength(int fd, struct mp3entry *entry)
|| (info.byte_count < expected - diff))
{
DEBUGF("Note: info.byte_count differs from expected value by "
- "%d bytes\n", labs((long) (expected - info.byte_count)));
+ "%ld bytes\n", labs((long) (expected - info.byte_count)));
info.byte_count = 0;
info.frame_count = 0;
info.file_time = 0;
@@ -1085,7 +1085,7 @@ static int getsonglength(int fd, struct mp3entry *entry)
/* Update the seek point for the first playable frame */
entry->first_frame_offset = bytecount;
- DEBUGF("First frame is at %x\n", entry->first_frame_offset);
+ DEBUGF("First frame is at %lx\n", entry->first_frame_offset);
return filetime;
}
diff --git a/firmware/mp3data.c b/firmware/mp3data.c
index 2ebb620ed6..f62afda62f 100644
--- a/firmware/mp3data.c
+++ b/firmware/mp3data.c
@@ -185,7 +185,7 @@ static bool mp3headerinfo(struct mp3info *info, unsigned long header)
info->emphasis = header & EMPHASIS_MASK;
#ifdef DEBUG_VERBOSE
- DEBUGF( "Header: %08x, Ver %d, lay %d, bitr %d, freq %ld, "
+ DEBUGF( "Header: %08lx, Ver %d, lay %d, bitr %d, freq %ld, "
"chmode %d, mode_ext %d, emph %d, bytes: %d time: %d/%d\n",
header, info->version, info->layer+1, info->bitrate,
info->frequency, info->channel_mode, info->mode_extension,
@@ -232,7 +232,7 @@ static unsigned long __find_next_frame(int fd, long *offset, long max_offset,
#if defined(DEBUG) || defined(SIMULATOR)
if(*offset)
- DEBUGF("Warning: skipping %d bytes of garbage\n", *offset);
+ DEBUGF("Warning: skipping %ld bytes of garbage\n", *offset);
#endif
return header;
@@ -495,7 +495,8 @@ int get_mp3file_info(int fd, struct mp3info *info)
if(!mp3headerinfo(info, header))
return -7;
- DEBUGF("%04x: %04x %04x ", 0, header >> 16, header & 0xffff);
+ DEBUGF("%04x: %04x %04x ", 0, (short)(header >> 16),
+ (short)(header & 0xffff));
for(i = 4;i < (int)sizeof(frame)-4;i+=2) {
if(i % 16 == 0) {
DEBUGF("\n%04x: ", i-4);
@@ -529,8 +530,8 @@ int get_mp3file_info(int fd, struct mp3info *info)
frames_per_entry = bytes2int(0, 0, vbrheader[24], vbrheader[25]);
DEBUGF("Frame size (%dkpbs): %d bytes (0x%x)\n",
info->bitrate, info->frame_size, info->frame_size);
- DEBUGF("Frame count: %x\n", info->frame_count);
- DEBUGF("Byte count: %x\n", info->byte_count);
+ DEBUGF("Frame count: %lx\n", info->frame_count);
+ DEBUGF("Byte count: %lx\n", info->byte_count);
DEBUGF("Offsets: %d\n", num_offsets);
DEBUGF("Frames/entry: %d\n", frames_per_entry);
@@ -540,7 +541,7 @@ int get_mp3file_info(int fd, struct mp3info *info)
{
j = bytes2int(0, 0, vbrheader[26+i*2], vbrheader[27+i*2]);
offset += j;
- DEBUGF("%03d: %x (%x)\n", i, offset - bytecount, j);
+ DEBUGF("%03d: %lx (%x)\n", i, offset - bytecount, j);
}
}
@@ -695,7 +696,7 @@ int create_xing_header(int fd, long startpos, long filesize,
toc[i] = filepos * 256 / filesize;
}
- DEBUGF("Pos %d: %d relpos: %d filepos: %x tocentry: %x\n",
+ DEBUGF("Pos %d: %ld relpos: %ld filepos: %lx tocentry: %x\n",
i, pos, pos-last_pos, filepos, toc[i]);
last_pos = pos;