summaryrefslogtreecommitdiff
path: root/printf.c
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-06-23 21:34:41 -0700
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-06-23 21:34:41 -0700
commit874d317334fae1ddce316f9b6f4d0ce4e434bf52 (patch)
tree929f924d3c3696d3aa9917aca0e7048bbe3e93e8 /printf.c
parent15bd7946cc838a3151c357e4b0bc1ab85eecda62 (diff)
heirloom vi fixes from arch AUR
Diffstat (limited to 'printf.c')
-rw-r--r--printf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/printf.c b/printf.c
index 1c95186..61e1630 100644
--- a/printf.c
+++ b/printf.c
@@ -99,7 +99,7 @@ char *p_dconv(long, char *);
static int p_emit(char *, char *);
int
-printf(const char *fmt, ...)
+ex_printf(char *fmt, ...)
{
va_list ap;
int ret;
@@ -252,7 +252,7 @@ vprintf(const char *fmt, va_list ap)
*--bptr = ((int) num & mask1) + 060;
else
*--bptr = ((int) num & mask1) + 0127;
- while (num = (num >> nbits) & mask2);
+ while ((num = (num >> nbits) & mask2));
if (fcode=='o') {
if (n)
@@ -288,7 +288,7 @@ vprintf(const char *fmt, va_list ap)
else
num = (long) n;
}
- if (n = (fcode != 'u' && num < 0))
+ if ((n = (fcode != 'u' && num < 0)))
num = -num;
/* now convert to digits */
bptr = p_dconv(num, buf);
@@ -359,7 +359,7 @@ p_dconv(long value, char *buffer)
*/
bp += MAXDIGS + 1;
while (value > LRGINT) {
- *--bp = (int)(value % 10) + '0';
+ *--bp = (value % 10) + '0';
value /= 10;
}