[tac_plus] possible minor bug in code in waitfor() ...
john heasley
heas at shrubbery.net
Wed Sep 8 22:42:39 UTC 2010
Wed, Sep 08, 2010 at 04:56:30PM -0400, Kambiz Aghaiepour:
> Right, but with %ld, still looking at the report() function in report.c,
> it doesn't appear the 'l' case is handled in the switch statement after
> spotting the '%' character in the format string.
>
soryr, yes, you also need the report.c fix.
Index: report.c
===================================================================
--- report.c (revision 3285)
+++ report.c (working copy)
@@ -61,7 +61,8 @@
char msg[255]; /* temporary string */
char *fp, *bufp, *charp;
int len, m, i, n;
- char digits[16];
+ long int l;
+ char digits[32];
va_list ap;
charp = NULL;
@@ -95,13 +96,19 @@
fp++;
switch (*fp) {
-
case 's':
fp++;
charp = va_arg(ap, char *);
m = strlen(charp);
break;
+ case 'l':
+ fp++;
+ l = va_arg(ap, long);
+ sprintf(digits, "%ld", l);
+ m = strlen(digits);
+ charp = digits;
+ break;
case 'u':
fp++;
i = va_arg(ap, uint);
More information about the tac_plus
mailing list