PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | PrintfTarget |
union | PrintfArgValue |
Macros | |
#define | PG_NL_ARGMAX 31 |
Enumerations | |
enum | PrintfArgType { ATYPE_NONE = 0 , ATYPE_INT , ATYPE_LONG , ATYPE_LONGLONG , ATYPE_DOUBLE , ATYPE_CHARPTR } |
Functions | |
static void | flushbuffer (PrintfTarget *target) |
static void | dopr (PrintfTarget *target, const char *format, va_list args) |
int | pg_vsnprintf (char *str, size_t count, const char *fmt, va_list args) |
int | pg_snprintf (char *str, size_t count, const char *fmt,...) |
int | pg_vsprintf (char *str, const char *fmt, va_list args) |
int | pg_sprintf (char *str, const char *fmt,...) |
int | pg_vfprintf (FILE *stream, const char *fmt, va_list args) |
int | pg_fprintf (FILE *stream, const char *fmt,...) |
int | pg_vprintf (const char *fmt, va_list args) |
int | pg_printf (const char *fmt,...) |
static bool | find_arguments (const char *format, va_list args, PrintfArgValue *argvalues) |
static void | fmtstr (const char *value, int leftjust, int minlen, int maxwidth, int pointflag, PrintfTarget *target) |
static void | fmtptr (const void *value, 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 | fmtchar (int value, int leftjust, int minlen, PrintfTarget *target) |
static void | fmtfloat (double value, char type, int forcesign, int leftjust, int minlen, int zpad, int precision, int pointflag, PrintfTarget *target) |
static void | dostr (const char *str, int slen, PrintfTarget *target) |
static void | dopr_outch (int c, PrintfTarget *target) |
static void | dopr_outchmulti (int c, int slen, PrintfTarget *target) |
static int | adjust_sign (int is_negative, int forcesign, int *signvalue) |
static int | compute_padlen (int minlen, int vallen, int leftjust) |
static void | leading_pad (int zpad, int signvalue, int *padlen, PrintfTarget *target) |
static void | trailing_pad (int padlen, PrintfTarget *target) |
static const char * | strchrnul (const char *s, int c) |
int | pg_strfromd (char *str, size_t count, int precision, double value) |
#define PG_NL_ARGMAX 31 |
Definition at line 44 of file snprintf.c.
enum PrintfArgType |
Enumerator | |
---|---|
ATYPE_NONE | |
ATYPE_INT | |
ATYPE_LONG | |
ATYPE_LONGLONG | |
ATYPE_DOUBLE | |
ATYPE_CHARPTR |
Definition at line 142 of file snprintf.c.
|
static |
|
static |
Definition at line 1517 of file snprintf.c.
Referenced by fmtchar(), fmtfloat(), fmtint(), and fmtstr().
|
static |
Definition at line 376 of file snprintf.c.
References generate_unaccent_rules::args, PrintfArgValue::cptr, PrintfArgValue::d, dopr_outch(), dostr(), PrintfTarget::failed, find_arguments(), fmtchar(), fmtfloat(), fmtint(), fmtptr(), fmtstr(), format, i, PrintfArgValue::i, PrintfArgValue::l, PrintfArgValue::ll, PG_NL_ARGMAX, PG_STRERROR_R_BUFLEN, strchrnul(), and strerror_r.
Referenced by pg_vfprintf(), pg_vsnprintf(), and pg_vsprintf().
|
static |
Definition at line 1450 of file snprintf.c.
References PrintfTarget::bufend, PrintfTarget::bufptr, flushbuffer(), PrintfTarget::nchars, and PrintfTarget::stream.
Referenced by dopr(), dopr_outchmulti(), dostr(), fmtchar(), leading_pad(), and pg_strfromd().
|
static |
Definition at line 1466 of file snprintf.c.
References PrintfTarget::bufend, PrintfTarget::bufptr, dopr_outch(), flushbuffer(), Min, PrintfTarget::nchars, and PrintfTarget::stream.
Referenced by fmtchar(), fmtfloat(), fmtint(), fmtstr(), leading_pad(), and trailing_pad().
|
static |
Definition at line 1413 of file snprintf.c.
References PrintfTarget::bufend, PrintfTarget::bufptr, dopr_outch(), flushbuffer(), Min, PrintfTarget::nchars, str, and PrintfTarget::stream.
Referenced by dopr(), fmtfloat(), fmtint(), fmtptr(), fmtstr(), and pg_strfromd().
|
static |
Definition at line 767 of file snprintf.c.
References generate_unaccent_rules::args, ATYPE_CHARPTR, ATYPE_DOUBLE, ATYPE_INT, ATYPE_LONG, ATYPE_LONGLONG, ATYPE_NONE, PrintfArgValue::cptr, PrintfArgValue::d, format, i, PrintfArgValue::i, PrintfArgValue::l, PrintfArgValue::ll, Max, and PG_NL_ARGMAX.
Referenced by dopr().
|
static |
Definition at line 298 of file snprintf.c.
References PrintfTarget::bufptr, PrintfTarget::bufstart, PrintfTarget::failed, PrintfTarget::nchars, and PrintfTarget::stream.
Referenced by dopr_outch(), dopr_outchmulti(), dostr(), and pg_vfprintf().
|
static |
Definition at line 1157 of file snprintf.c.
References compute_padlen(), dopr_outch(), dopr_outchmulti(), trailing_pad(), and value.
Referenced by dopr(), and rfmtlong().
|
static |
Definition at line 1175 of file snprintf.c.
References adjust_sign(), compute_padlen(), convert(), dopr_outchmulti(), dostr(), PrintfTarget::failed, fmt, leading_pad(), Min, snprintf, trailing_pad(), type, and value.
Referenced by dopr().
|
static |
Definition at line 1046 of file snprintf.c.
References adjust_sign(), compute_padlen(), convert(), dopr_outchmulti(), dostr(), leading_pad(), Max, trailing_pad(), type, and value.
Referenced by dopr().
|
static |
Definition at line 1032 of file snprintf.c.
References convert(), dostr(), PrintfTarget::failed, snprintf, and value.
Referenced by dopr().
|
static |
Definition at line 1003 of file snprintf.c.
References compute_padlen(), dopr_outchmulti(), dostr(), strnlen(), trailing_pad(), and value.
Referenced by dopr(), dtcvfmtasc(), dttofmtasc(), dttofmtasc_replace(), and PGTYPEStimestamp_fmt_asc().
|
static |
Definition at line 1531 of file snprintf.c.
References dopr_outch(), and dopr_outchmulti().
Referenced by fmtfloat(), and fmtint().
int pg_fprintf | ( | FILE * | stream, |
const char * | fmt, | ||
... | |||
) |
Definition at line 264 of file snprintf.c.
References generate_unaccent_rules::args, fmt, len, pg_vfprintf(), va_end(), and va_start().
int pg_printf | ( | const char * | fmt, |
... | |||
) |
Definition at line 282 of file snprintf.c.
References generate_unaccent_rules::args, fmt, len, pg_vfprintf(), generate_unaccent_rules::stdout, va_end(), and va_start().
int pg_snprintf | ( | char * | str, |
size_t | count, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 202 of file snprintf.c.
References generate_unaccent_rules::args, fmt, len, pg_vsnprintf(), str, va_end(), and va_start().
int pg_sprintf | ( | char * | str, |
const char * | fmt, | ||
... | |||
) |
Definition at line 230 of file snprintf.c.
References generate_unaccent_rules::args, fmt, len, pg_vsprintf(), str, va_end(), and va_start().
int pg_strfromd | ( | char * | str, |
size_t | count, | ||
int | precision, | ||
double | value | ||
) |
Definition at line 1321 of file snprintf.c.
References Assert, PrintfTarget::bufend, PrintfTarget::bufptr, PrintfTarget::bufstart, convert(), dopr_outch(), dostr(), PrintfTarget::failed, fmt, PrintfTarget::nchars, snprintf, str, PrintfTarget::stream, and value.
Referenced by float4out(), and float8out_internal().
int pg_vfprintf | ( | FILE * | stream, |
const char * | fmt, | ||
va_list | args | ||
) |
Definition at line 242 of file snprintf.c.
References generate_unaccent_rules::args, PrintfTarget::bufend, PrintfTarget::bufptr, PrintfTarget::bufstart, dopr(), PrintfTarget::failed, flushbuffer(), fmt, PrintfTarget::nchars, and PrintfTarget::stream.
Referenced by pg_fprintf(), pg_printf(), and pg_vprintf().
int pg_vprintf | ( | const char * | fmt, |
va_list | args | ||
) |
Definition at line 276 of file snprintf.c.
References generate_unaccent_rules::args, fmt, pg_vfprintf(), and generate_unaccent_rules::stdout.
int pg_vsnprintf | ( | char * | str, |
size_t | count, | ||
const char * | fmt, | ||
va_list | args | ||
) |
Definition at line 174 of file snprintf.c.
References generate_unaccent_rules::args, PrintfTarget::bufend, PrintfTarget::bufptr, PrintfTarget::bufstart, dopr(), PrintfTarget::failed, fmt, PrintfTarget::nchars, str, and PrintfTarget::stream.
Referenced by pg_snprintf().
int pg_vsprintf | ( | char * | str, |
const char * | fmt, | ||
va_list | args | ||
) |
Definition at line 214 of file snprintf.c.
References generate_unaccent_rules::args, PrintfTarget::bufend, PrintfTarget::bufptr, PrintfTarget::bufstart, dopr(), PrintfTarget::failed, fmt, PrintfTarget::nchars, str, and PrintfTarget::stream.
Referenced by pg_sprintf().
|
inlinestatic |
Definition at line 350 of file snprintf.c.
Referenced by dopr().
|
static |
Definition at line 1567 of file snprintf.c.
References dopr_outchmulti().
Referenced by fmtchar(), fmtfloat(), fmtint(), and fmtstr().