summaryrefslogtreecommitdiffstats
path: root/apps/logfdisp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-06-01 13:21:20 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-06-01 13:21:20 +0000
commit6ebdbe8df31e4abbc1466f827c9207339522d9f5 (patch)
tree0364fb78c9b18a13467660877cead9b9d69fb0cb /apps/logfdisp.c
parent1c5374fe79bc753672f3862b829c4456212bfb20 (diff)
downloadrockbox-6ebdbe8df31e4abbc1466f827c9207339522d9f5.tar.gz
rockbox-6ebdbe8df31e4abbc1466f827c9207339522d9f5.tar.bz2
rockbox-6ebdbe8df31e4abbc1466f827c9207339522d9f5.zip
Modified logf to use a define for the log width, and changed it to default to
21 as that is what fits in an iriver LCD by default since the font is 6 pixels wide. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6547 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/logfdisp.c')
-rw-r--r--apps/logfdisp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/logfdisp.c b/apps/logfdisp.c
index e3aa29fb76..2e85b5ce30 100644
--- a/apps/logfdisp.c
+++ b/apps/logfdisp.c
@@ -59,7 +59,7 @@ bool logfdisplay(void)
do {
index = logfindex;
for(i = lines-1; i>=0; i--) {
- unsigned char buffer[17];
+ unsigned char buffer[MAX_LOGF_ENTRY + 1];
if(--index < 0) {
if(logfwrap)
@@ -68,8 +68,8 @@ bool logfdisplay(void)
break; /* done */
}
- memcpy(buffer, logfbuffer[index], 16);
- buffer[16]=0;
+ memcpy(buffer, logfbuffer[index], MAX_LOGF_ENTRY);
+ buffer[MAX_LOGF_ENTRY]=0;
lcd_puts(0, i, buffer);
}
lcd_update();
@@ -100,7 +100,7 @@ bool logfdump(void)
fd = open("/.rockbox/logf.txt", O_CREAT|O_WRONLY);
if(-1 != fd) {
- unsigned char buffer[17];
+ unsigned char buffer[MAX_LOGF_ENTRY +1];
int index = logfindex-1;
int stop = logfindex;
@@ -113,8 +113,8 @@ bool logfdump(void)
break; /* done */
}
- memcpy(buffer, logfbuffer[index], 16);
- buffer[16]=0;
+ memcpy(buffer, logfbuffer[index], MAX_LOGF_ENTRY);
+ buffer[MAX_LOGF_ENTRY]=0;
fdprintf(fd, "%s\n", buffer);
index--;
}