summaryrefslogtreecommitdiffstats
path: root/firmware/logf.c
diff options
context:
space:
mode:
authorMichiel Van Der Kolk <not.valid@email.address>2005-06-30 15:14:33 +0000
committerMichiel Van Der Kolk <not.valid@email.address>2005-06-30 15:14:33 +0000
commit25b55e16bcf9bda35b770059bd8cfa7054893895 (patch)
treef85523638f368b11fc60f3b36e60bca167d71959 /firmware/logf.c
parent65ff219e8e1133469750ca4d806d8f3b2cede442 (diff)
downloadrockbox-25b55e16bcf9bda35b770059bd8cfa7054893895.tar.gz
rockbox-25b55e16bcf9bda35b770059bd8cfa7054893895.tar.bz2
rockbox-25b55e16bcf9bda35b770059bd8cfa7054893895.zip
better logf
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6949 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/logf.c')
-rw-r--r--firmware/logf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/logf.c b/firmware/logf.c
index 0b4047f214..f61797b289 100644
--- a/firmware/logf.c
+++ b/firmware/logf.c
@@ -45,18 +45,19 @@ static void displayremote(void)
/* TODO: we should have a debug option that enables/disables this! */
int w, h;
int lines;
+ int columns;
int i;
int index;
lcd_remote_getstringsize("A", &w, &h);
lines = LCD_REMOTE_HEIGHT/h;
-
+ columns = LCD_REMOTE_WIDTH/w;
lcd_remote_setmargins(0, 0);
lcd_remote_clear_display();
index = logfindex;
for(i = lines-1; i>=0; i--) {
- unsigned char buffer[MAX_LOGF_ENTRY+1];
+ unsigned char buffer[columns+1];
if(--index < 0) {
if(logfwrap)
@@ -65,8 +66,8 @@ static void displayremote(void)
break; /* done */
}
- memcpy(buffer, logfbuffer[index], MAX_LOGF_ENTRY);
- buffer[MAX_LOGF_ENTRY]=0;
+ memcpy(buffer, logfbuffer[index], columns);
+ buffer[columns]=0;
lcd_remote_puts(0, i, buffer);
}
lcd_remote_update();