summaryrefslogtreecommitdiffabout
path: root/src/bi_sprintf.m4
Side-by-side diff
Diffstat (limited to 'src/bi_sprintf.m4') (more/less context) (ignore whitespace changes)
-rw-r--r--src/bi_sprintf.m419
1 files changed, 9 insertions, 10 deletions
diff --git a/src/bi_sprintf.m4 b/src/bi_sprintf.m4
index afd63d3..051d2dc 100644
--- a/src/bi_sprintf.m4
+++ b/src/bi_sprintf.m4
@@ -150,8 +150,7 @@ MF_DEFUN_VARARGS(sprintf, STRING, STRING format)
if (isdigit(*p)) {
char *q = get_num(p, &n);
if (*q == '$') {
- num = (unsigned) MF_VA_ARG(n-1,
- NUMBER);
+ MF_VA_ARG(n-1, NUMBER, num);
p = q + 1;
if (num < 0) {
flags |= FMT_SPACEPFX;
@@ -161,7 +160,7 @@ MF_DEFUN_VARARGS(sprintf, STRING, STRING format)
break;
}
}
- num = MF_VA_ARG(i, NUMBER);
+ MF_VA_ARG(i, NUMBER, num);
i++;
if (num < 0) {
/* A negative field width is taken
@@ -193,14 +192,14 @@ MF_DEFUN_VARARGS(sprintf, STRING, STRING format)
if (isdigit(*p)) {
char *q = get_num(p, &n);
if (*q == '$') {
- num = MF_VA_ARG(n-1, NUMBER);
+ MF_VA_ARG(n-1, NUMBER, num);
if (num > 0)
prec = (unsigned) num;
p = q + 1;
break;
}
}
- num = MF_VA_ARG(i, NUMBER);
+ MF_VA_ARG(i, NUMBER, num);
i++;
if (num > 0)
prec = (unsigned) num;
@@ -211,7 +210,7 @@ MF_DEFUN_VARARGS(sprintf, STRING, STRING format)
argnum = i++;
switch (*p) {
case 's':
- str = MF_VA_ARG(argnum,STRING);
+ MF_VA_ARG(argnum, STRING, str);
n = strlen(str);
if (prec && prec < n)
n = prec;
@@ -235,7 +234,7 @@ MF_DEFUN_VARARGS(sprintf, STRING, STRING format)
case 'i':
case 'd':
- num = MF_VA_ARG(argnum,NUMBER);
+ MF_VA_ARG(argnum, NUMBER, num);
if (num < 0) {
negative = 1;
num = - num;
@@ -290,7 +289,7 @@ MF_DEFUN_VARARGS(sprintf, STRING, STRING format)
break;
case 'u':
- num = MF_VA_ARG(argnum,NUMBER);
+ MF_VA_ARG(argnum, NUMBER, num);
/* If a precision is given with a
numeric conversion, the 0 flag is ignored.
*/
@@ -323,7 +322,7 @@ MF_DEFUN_VARARGS(sprintf, STRING, STRING format)
case 'x':
case 'X':
- num = MF_VA_ARG(argnum,NUMBER);
+ MF_VA_ARG(argnum, NUMBER, num);
/* If a precision is given with a
numeric conversion, the 0 flag is ignored.
*/
@@ -369,7 +368,7 @@ MF_DEFUN_VARARGS(sprintf, STRING, STRING format)
break;
case 'o':
- num = MF_VA_ARG(argnum,NUMBER);
+ MF_VA_ARG(argnum, NUMBER, num);
/* If a precision is given with a
numeric conversion, the 0 flag is ignored.
*/

Return to:

Send suggestions and report system problems to the System administrator.