Use type-specific inline function imax() instead of deprecated macro MAX().

Prodded by:	bde
This commit is contained in:
jkim 2010-07-12 15:32:45 +00:00
parent 5bc7afa9ee
commit 06b6c2769b
2 changed files with 2 additions and 3 deletions

View File

@ -151,7 +151,6 @@ ksprintn(char *nbuf, uintmax_t num, int base, int *lenp, int upper)
static int
kvprintf(char const *fmt, void (*func)(int), void *arg, int radix, va_list ap)
{
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define PCHAR(c) {int cc=(c); if (func) (*func)(cc); else *d++ = cc; retval++; }
char nbuf[MAXNBUF];
char *d;
@ -422,7 +421,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
if (!ladjust && padc == '0')
dwidth = width - tmp;
width -= tmp + MAX(dwidth, n);
width -= tmp + imax(dwidth, n);
dwidth -= n;
if (!ladjust)
while (width-- > 0)

View File

@ -813,7 +813,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
if (!ladjust && padc == '0')
dwidth = width - tmp;
width -= tmp + MAX(dwidth, n);
width -= tmp + imax(dwidth, n);
dwidth -= n;
if (!ladjust)
while (width-- > 0)