aboutsummaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
authorltoetsch <>2001-03-16 16:40:17 +0000
committerltoetsch <>2001-03-16 16:40:17 +0000
commitd028f79336840a076542ccd17bdbca2e2f25357e (patch)
tree169f4a2f4abeba86179b873110769a0100e339ce /parser.c
parentb0650f9131a98a02ca65ab15a7f41e99b6822e90 (diff)
downloadlcd4linux-d028f79336840a076542ccd17bdbca2e2f25357e.tar.gz
[lcd4linux @ 2001-03-16 16:40:17 by ltoetsch]
implemented time bar
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/parser.c b/parser.c
index 2e2f9a1..246a639 100644
--- a/parser.c
+++ b/parser.c
@@ -1,4 +1,4 @@
-/* $Id: parser.c,v 1.15 2001/03/14 13:19:29 ltoetsch Exp $
+/* $Id: parser.c,v 1.16 2001/03/16 16:40:17 ltoetsch Exp $
*
* row definition parser
*
@@ -20,6 +20,9 @@
*
*
* $Log: parser.c,v $
+ * Revision 1.16 2001/03/16 16:40:17 ltoetsch
+ * implemented time bar
+ *
* Revision 1.15 2001/03/14 13:19:29 ltoetsch
* Added pop3/imap4 mail support
*
@@ -181,6 +184,8 @@ static int bar_type (char tag)
return BAR_U;
case 'd':
return BAR_D;
+ case 't':
+ return BAR_T;
default:
return 0;
}
@@ -272,6 +277,8 @@ char *parse_row (char *string, int supported_bars, int usage[])
break;
}
}
+ else if (*s == ',' && (type & BAR_T))
+ token2=strtol(++s, &s, 10); /* get horizontal length */
*p++='$';
*p++=type;
*p++=len;
@@ -279,7 +286,7 @@ char *parse_row (char *string, int supported_bars, int usage[])
if (token>256) *p++=token>>8;
if (token2!=-1) {
*p++=token2&255;
- if (token>256) *p++=token2>>8;
+ if (token>256 && !(type & BAR_T)) *p++=token2>>8;
}
break;