summaryrefslogtreecommitdiff
path: root/src/port/snprintf.c
AgeCommit message (Collapse)Author
2006-11-28protect vfprintf from hijacking by Windows gettext just like other members ↵Andrew Dunstan
of the *printf family.
2006-10-04pgindent run for 8.2.Bruce Momjian
2005-12-05Document return-value conventions used by this implementation, perTom Lane
suggestion from Bruce.
2005-12-05Fix a rather sizable number of problems in our homegrown snprintf, such asTom Lane
incorrect implementation of argument reordering, arbitrary limit of output size for sprintf and fprintf, willingness to access more bytes than "%.Ns" specification allows, wrong formatting of LONGLONG_MIN, various field-padding bugs and omissions. I believe it now accurately implements a subset of the Single Unix Spec requirements (remaining unimplemented features are documented, too). Bruce Momjian and Tom Lane.
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-07-28Fix a whole bunch of #includes that were either wrong or redundant.Tom Lane
The first rule of portability for us is 'thou shalt have no other gods before c.h', and a whole lot of these files were either not including c.h at all, or including random system headers beforehand, either of which sins can mess up largefile support nicely. Once you have included c.h, there is no need to re-include what it includes, either.
2005-04-14Must count '*' characters as potential arguments.Tom Lane
2005-03-20Add mention of why malloc() has to be used in snprintf.c.Bruce Momjian
2005-03-20Department of second thoughts. Remove FRONTEND from snprintf.c becauseBruce Momjian
snprintf is called before the memory system is started. We have to just malloc/free. There are no elogs in the code so we should be fine.
2005-03-17Factor duplicate snprintf code into functions.Bruce Momjian
2005-03-16Add sprintf support, that were were missing.Bruce Momjian
Add support for snprintf '+', 'h', and %* length settings.
2005-03-16pgindent snprintf.c for consistency.Bruce Momjian
2005-03-16Fix snprintf for %*$.Bruce Momjian
2005-03-16Fix snprintf to handle %$ properly by storing and reordering theBruce Momjian
arguments. Nicolai Tufar
2005-03-12Fix snprintf() to properly handle precision specification for %f.Bruce Momjian
2005-03-11Add fprintf() custom version to libpgport.Bruce Momjian
Document use of macros for pg_printf functions. Bump major versions of all interfaces to handle movement of get_progname from libpq to libpgport in 8.0, and probably other libpgport changes in 8.1.
2005-03-11Define snprintf() to call pg_snprintf() so our own snprintf-likeBruce Momjian
implementation doesn't export out via libpq and get used by a user application.
2005-03-02Move snprintf int64 compatibility letters into a NOT_USED block.Bruce Momjian
2005-03-02Fix for %I64d snprintf.Bruce Momjian
2005-03-02snprintf() %I64d code fix.Bruce Momjian
2005-03-02Use our own snprintf() only if NLS is enabled, and support %qd and %I64d.Bruce Momjian
2005-03-02Prevent large allocation in snprintf to hold positional parameters.Bruce Momjian
Allocated size based on format string.
2005-03-02Fix snprintf on Win32:Bruce Momjian
* If vsnprintf() is not before snprintf() in this file, snprintf() * will call the system vsnprintf() on MinGW.
2005-03-02Make port snprintf.c finally thread-safe.Bruce Momjian
2005-03-01Make snprintf() use already-defined int64/uint64 typedefs rather thanBruce Momjian
defining its own.
2005-03-01And while we are on it, I would like to submit minorBruce Momjian
changes to make snprintf() vsnprintf() and printf() functions in src/port/snprintf.c thread-safe. Nicolai Tufar
2005-02-28snprintf.c has no sys/ioctl.h. Trivial patch below:Bruce Momjian
Magnus Hagander
2005-02-22Add semicolon so snprintf.c goto has a statement to attach to:Bruce Momjian
nochar: /* nothing */ ; /* semicolon required because a goto has to be attached to a statement */
2005-02-22Add support to port/snprintf.c for position parameter specification:Bruce Momjian
+ # Determine if printf supports %1$ argument selection, e.g. %5$ selects + # the fifth argument after the printf print string. + # This is not in the C99 standard, but in the Single Unix Specification (SUS). + # It is used in our langauge translation strings. Nicolai Tufar with configure changes by Bruce.
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-01-08Throw compile error if our non-thread-safe snprintf is used.Bruce Momjian
2003-11-29make sure the $Id tags are converted to $PostgreSQL as well ...PostgreSQL Daemon
2002-07-18Move libc replacement files from src/backend/port to src/port.Bruce Momjian