From 93be7266dd3f05b297c7b25920d6362452a447f9 Mon Sep 17 00:00:00 2001 From: reinelt Date: Mon, 21 Jul 2003 06:34:14 +0000 Subject: [lcd4linux @ 2003-07-21 06:34:14 by reinelt] bars on virtual rows fixed git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@201 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- processor.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/processor.c b/processor.c index 31101e2..46aed32 100644 --- a/processor.c +++ b/processor.c @@ -1,4 +1,4 @@ -/* $Id: processor.c,v 1.33 2003/07/21 06:10:11 reinelt Exp $ +/* $Id: processor.c,v 1.34 2003/07/21 06:34:14 reinelt Exp $ * * main data processing * @@ -20,6 +20,9 @@ * * * $Log: processor.c,v $ + * Revision 1.34 2003/07/21 06:34:14 reinelt + * bars on virtual rows fixed + * * Revision 1.33 2003/07/21 06:10:11 reinelt * removed maxlen parameter from process_row() * @@ -619,12 +622,13 @@ static void collect_data (void) } -static char *process_row (int r) +static char *process_row (char *data, int row, int len) { static char buffer[256]; - char *s=row[r]; char *p=buffer; + char *s=data; int token; + int n; do { if (*s=='%') { @@ -649,11 +653,11 @@ static char *process_row (int r) else if (type & BAR_T) val2 = *(unsigned char*)++s; /* width */ if (type & BAR_H) - lcd_bar (type, r, p-buffer+1, len*xres, val1*len*xres, val2*len*xres); + lcd_bar (type, row, p-buffer+1, len*xres, val1*len*xres, val2*len*xres); else if (type & BAR_T) - lcd_bar (type, r, p-buffer+1, len*yres, val1*len*yres, val2*xres); + lcd_bar (type, row, p-buffer+1, len*yres, val1*len*yres, val2*xres); else - lcd_bar (type, r, p-buffer+1, len*yres, val1*len*yres, val2*len*yres); + lcd_bar (type, row, p-buffer+1, len*yres, val1*len*yres, val2*len*yres); if (type & BAR_H) { for (i=0; i 0.0); @@ -798,7 +808,7 @@ void process (int smooth) while (j>lines) { j-=lines; } - txt=process_row (j); + txt=process_row (row[j], i, cols); if (smooth==0) lcd_put (i, 1, txt); } -- cgit v1.2.3