aboutsummaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;