44#define PG_NL_ARGMAX 31
253 target.
bufend = buffer +
sizeof(buffer);
354#if !HAVE_DECL_STRCHRNUL
356#define strchrnul pg_strchrnul
358static inline const char *
361 while (*s !=
'\0' && *s !=
c)
475 accum = accum * 10 + (
ch -
'0');
567#if SIZEOF_INTMAX_T == SIZEOF_LONG
569#elif SIZEOF_INTMAX_T == SIZEOF_LONG_LONG
572#error "cannot find integer type of the same size as intmax_t"
576#if SIZEOF_SIZE_T == SIZEOF_LONG
578#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
581#error "cannot find integer type of the same size as size_t"
705 fvalue =
va_arg(args,
double);
715 errbuf,
sizeof(errbuf));
805 accum = accum * 10 + (
ch -
'0');
821 if (argtypes[accum] &&
839#if SIZEOF_INTMAX_T == SIZEOF_LONG
841#elif SIZEOF_INTMAX_T == SIZEOF_LONG_LONG
844#error "cannot find integer type of the same size as intmax_t"
848#if SIZEOF_SIZE_T == SIZEOF_LONG
850#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
853#error "cannot find integer type of the same size as size_t"
1021 unsigned long long uvalue;
1024 const char *
cvt =
"0123456789abcdef";
1051 cvt =
"0123456789ABCDEF";
1061#pragma warning(push)
1062#pragma warning(disable: 4146)
1095 else if (base == 16)
1193 static const double dzero = 0.0;
1299 else if (precision > 32)
1313 static const double dzero = 0.0;
#define Assert(condition)
#define PG_STRERROR_R_BUFLEN
static void dostr(const char *str, int slen, PrintfTarget *target)
static void dopr_outch(int c, PrintfTarget *target)
static void fmtint(long long value, char type, int forcesign, int leftjust, int minlen, int zpad, int precision, int pointflag, PrintfTarget *target)
static void leading_pad(int zpad, int signvalue, int *padlen, PrintfTarget *target)
int pg_strfromd(char *str, size_t count, int precision, double value)
static void fmtptr(const void *value, PrintfTarget *target)
static void flushbuffer(PrintfTarget *target)
int pg_printf(const char *fmt,...)
static void fmtchar(int value, int leftjust, int minlen, PrintfTarget *target)
static void fmtstr(const char *value, int leftjust, int minlen, int maxwidth, int pointflag, PrintfTarget *target)
int pg_vprintf(const char *fmt, va_list args)
int pg_snprintf(char *str, size_t count, const char *fmt,...)
static int compute_padlen(int minlen, int vallen, int leftjust)
int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
static void trailing_pad(int padlen, PrintfTarget *target)
static void fmtfloat(double value, char type, int forcesign, int leftjust, int minlen, int zpad, int precision, int pointflag, PrintfTarget *target)
int pg_sprintf(char *str, const char *fmt,...)
static bool find_arguments(const char *format, va_list args, PrintfArgValue *argvalues)
int pg_vsprintf(char *str, const char *fmt, va_list args)
static void dopr(PrintfTarget *target, const char *format, va_list args)
static void dopr_outchmulti(int c, int slen, PrintfTarget *target)
int pg_fprintf(FILE *stream, const char *fmt,...)
int pg_vfprintf(FILE *stream, const char *fmt, va_list args)
static int adjust_sign(int is_negative, int forcesign, int *signvalue)
static void convert(const int_fast32_t val, char *const buf)