/*
* snprintf functions for CUPS.
*
+ * Copyright © 2021 by Michael R Sweet
* Copyright © 2007-2019 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products.
*
format ++;
width = va_arg(ap, int);
- snprintf(tptr, sizeof(tformat) - (tptr - tformat), "%d", width);
+ /* Note: Can't use snprintf here since we are implementing this function... */
+ sprintf(tptr, "%d", width);
tptr += strlen(tptr);
}
else
format ++;
prec = va_arg(ap, int);
- snprintf(tptr, sizeof(tformat) - (tptr - tformat), "%d", prec);
+ /* Note: Can't use snprintf here since we are implementing this function... */
+ sprintf(tptr, "%d", prec);
tptr += strlen(tptr);
}
else
if ((width + 2) > sizeof(temp))
break;
- snprintf(temp, sizeof(temp), tformat, va_arg(ap, double));
+ /* Note: Can't use snprintf here since we are implementing this function... */
+ sprintf(temp, tformat, va_arg(ap, double));
templen = strlen(temp);
bytes += (int)templen;
if ((width + 2) > sizeof(temp))
break;
- snprintf(temp, sizeof(temp), tformat, va_arg(ap, int));
+ /* Note: Can't use snprintf here since we are implementing this function... */
+ sprintf(temp, tformat, va_arg(ap, int));
templen = strlen(temp);
bytes += (int)templen;
if ((width + 2) > sizeof(temp))
break;
- snprintf(temp, sizeof(temp), tformat, va_arg(ap, void *));
+ /* Note: Can't use snprintf here since we are implementing this function... */
+ sprintf(temp, tformat, va_arg(ap, void *));
templen = strlen(temp);
bytes += (int)templen;