summaryrefslogtreecommitdiff
path: root/usr.bin/printf/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/printf/printf.c')
-rw-r--r--usr.bin/printf/printf.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c
index 4c787834f6365..25acd157bacbb 100644
--- a/usr.bin/printf/printf.c
+++ b/usr.bin/printf/printf.c
@@ -56,10 +56,6 @@ static char const sccsid[] = "@(#)printf.c 8.1 (Berkeley) 7/20/93";
#ifdef SHELL
#define main printfcmd
#include "bltin/bltin.h"
-#else
-#define warnx1(a, b, c) warnx(a)
-#define warnx2(a, b, c) warnx(a, b)
-#define warnx3(a, b, c) warnx(a, b, c)
#endif
#define PF(f, func) { \
@@ -140,7 +136,7 @@ next: for (start = fmt;; ++fmt) {
if (!*fmt) {
/* avoid infinite loop */
if (end == 1) {
- warnx1("missing format character",
+ warnx("missing format character",
NULL, NULL);
return (1);
}
@@ -190,7 +186,7 @@ next: for (start = fmt;; ++fmt) {
} else
precision = 0;
if (!*fmt) {
- warnx1("missing format character", NULL, NULL);
+ warnx("missing format character", NULL, NULL);
return (1);
}
@@ -231,7 +227,7 @@ next: for (start = fmt;; ++fmt) {
break;
}
default:
- warnx2("illegal format character %c", convch, NULL);
+ warnx("illegal format character %c", convch, NULL);
return (1);
}
*fmt = nextch;
@@ -342,7 +338,7 @@ getint(ip)
if (getlong(&val))
return (1);
if (val > INT_MAX) {
- warnx3("%s: %s", *gargv, strerror(ERANGE));
+ warnx("%s: %s", *gargv, strerror(ERANGE));
return (1);
}
*ip = val;
@@ -364,16 +360,16 @@ getlong(lp)
errno = 0;
val = strtol(*gargv, &ep, 0);
if (*ep != '\0') {
- warnx2("%s: illegal number", *gargv, NULL);
+ warnx("%s: illegal number", *gargv, NULL);
return (1);
}
if (errno == ERANGE)
if (val == LONG_MAX) {
- warnx3("%s: %s", *gargv, strerror(ERANGE));
+ warnx("%s: %s", *gargv, strerror(ERANGE));
return (1);
}
if (val == LONG_MIN) {
- warnx3("%s: %s", *gargv, strerror(ERANGE));
+ warnx("%s: %s", *gargv, strerror(ERANGE));
return (1);
}