Commit Graph

23 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
096ad1042a Don't forget to va_end() the va_list we get from va_copy().
Submitted by:	Sean McNeil <sean@mcneil.com>
MFC after:	3 days
2004-08-26 06:25:28 +00:00
Stefan Farfeleder
cf6fc3417a The third operand of the conditional operator should have type void too.
Approved by:	das (mentor)
2004-06-08 12:03:48 +00:00
David Schultz
52183d4654 Rename cantwrite() to prepwrite(). The latter is less confusing,
since the macro isn't really a predicate, and it has side-effects.
2004-06-08 05:45:32 +00:00
David E. O'Brien
af15264014 Fix damaged FBSDID. 2004-05-02 20:09:14 +00:00
David Schultz
ce2551ad29 Merge vfprintf.c, v1.65:
- s/#ifdef FLOATING_POINT/#ifndef NO_FLOATING_POINT/
- Remove HEXFLOAT
2004-05-02 10:56:17 +00:00
Tim J. Robbins
ccc8c6c31f Use the correct size to allocate, copy and clear argument type tables
after their change from an array of char to an array of enum.
This fixes problems that occurred when using positional arguments in
format strings, particularly with more than STATIC_ARG_TBL_SIZE (8)
of them.

PR:		65841
Submitted by:	Steven Smith (mostly)
2004-04-22 11:35:12 +00:00
Tim J. Robbins
93996f6d58 Prepare to handle trivial state-dependent encodings. Full support for
state-dependent encodings with locking shifts will come later if there
is demand for it.
2004-04-07 09:55:05 +00:00
David Schultz
7b7e350998 Merge vfprintf.c, v1.61 and 1.62. For compatibility with __hdtoa()
and to reduce diffs between vfprintf.c and vfwprintf.c, declare xdigs*
to be char arrays rather than wchar_t arrays.

In collaboration with:	tjr
2004-01-23 22:48:16 +00:00
Jacques Vidrine
84d9142f58 Remove unused variables and function declarations. Add missing headers. 2004-01-06 18:26:15 +00:00
Tim J. Robbins
909a17f41a Use __sfvwrite() instead of __sputc() via __fputwc() to write to fake
string files (__SSTR flag set). This is necessary because __sputc()
does not respect the __SALC flag, and crashes trying to flush the buffer
instead of resizing it.

PR:		59167
2003-11-12 08:49:12 +00:00
Tim J. Robbins
2a49d3767f Pass NULL instead of a pointer to a zeroed mbstate_t object. 2003-11-05 08:20:45 +00:00
David Schultz
1f2a0cdf58 %E-like %g and %G conversions should remove trailing zeroes unless
the # flag is present.  Implement this behavior and add a comment
describing it.

Noticed by:	Enache Adrian <enache@rdslink.ro>
Pointy hat to:	das
2003-04-19 23:53:19 +00:00
Tim J. Robbins
d73c448b1c Merge in vfprintf.c rev. 1.58. 2003-04-14 12:15:59 +00:00
Tim J. Robbins
adfd6b312d Catch up with recent vfprintf.c changes. 2003-04-07 06:36:49 +00:00
David Schultz
b936664e72 Add missing #include to unbreak previous commit. 2003-04-05 22:08:53 +00:00
David Schultz
38cac8f88b Correct some buffer sizes.
- __vfprintf()'s 'buf' has never been used for floating point, so
  don't define it in terms of (incorrect) constants describing
  floating point numbers.  The actual size needed depends on
  sizeof(uintmax_t) and locale details, so I slightly overestimated.

- We don't need a 308-character buffer to store the string "308".
  With long doubles and %a we need more than three characters, though.
2003-04-05 22:03:43 +00:00
Tim J. Robbins
ce7be15190 Merge vfprintf.c revision 1.52. 2003-03-14 08:50:43 +00:00
Tim J. Robbins
15a66d2798 Unexpand RCS tag. 2003-03-14 04:46:02 +00:00
Tim J. Robbins
48755f216d MFp4: Catch up to recent __dtoa() interface changes and removal of cvt()'s
last argument.
2003-03-13 05:49:09 +00:00
Tim J. Robbins
6180233fd8 Set the error bit on the stream if an encoding error occurs. Improve
handling of multibyte sequences representing null wide characters.
2002-10-16 12:09:43 +00:00
Tim J. Robbins
927ecbf313 Add support for the XSI %C and %S formats, which are the same as %lc
and %ls.
2002-10-16 03:55:53 +00:00
Tim J. Robbins
d07090a880 Use the new va_copy macro to copy variable argument lists instead of
assignment. This is needed on powerpc but is also more correct for the
other ports.

Submitted by:	grehan
Tested on:	alpha, i386, sparc64
2002-09-24 00:47:27 +00:00
Tim J. Robbins
c5604d0a50 Add implementations of the wprintf() family of functions, which perform
formatted wide-character output.
2002-09-21 13:00:30 +00:00