| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
users from assuming that fpos_t is an integral type.
|
|
|
|
| |
related functions - __sgetc() and __sputc() will set it when necessary.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
ferror(), fileno() and clearerr(), using the value of __isthreaded to
decide between the fast inline single-threaded code and the more
general function equivalent. This gives most of the performance
benefits of the old unsafe macros while preserving thread safety.
|
| |
|
|
|
|
|
| |
setting it redundantly when called from ungetwc(), vfscanf() etc.,
which already set the orientation.
|
| |
|
|
|
|
| |
detour through putc().
|
|
|
|
| |
detour through getc().
|
|
|
|
| |
__srefill() to do it.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
structure and call stdio functions. In 5.X this was broken when FILE
locking was introduced into libc.
This change makes most (relevant) stdio functions work again when the
_extra file in FILE isn't initialised (and can't be without a libc
function to do it since the __sFILEX structure is private to libc).
|
|
|
|
|
|
|
| |
in order to get SUSv2 conformant behavior in higher level calls like
fputs() and puts().
Reviewed by: bde
|
| |
|
| |
|
|
|
|
|
|
|
| |
Note that this bug is unrelated to recent work in this area; it seems
to have been present since revision 1.1.
Obtained from: NetBSD
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Update and improve the documentation for %[aA]
o Like %[eE], %[aA] may round the result if a precision is specified.
o Grammar police: Fix a split infinitive.
o The FreeBSD implementation does better than the minimum required
by C99 (literal translation of the mantissa). The digit before
the hexadecimal-point is never 0 unless the number itself is 0.
o Clarify that the exponent field represents a decimal exponent of 2.
o Discuss the fact that multiple valid representations are possible.
o Remove the entry in the BUGS section claiming that %[aA] is not
implemented.
- Remove the entry in the BUGS section claiming that the ' flag for
printing thousands separators is unimplemented for floating-point.
- Remove the entry in the BUGS section claiming that the L modifier
reduces the precision to "double" before conversion.
|
|
|
|
| |
and %A, which print floating-point numbers in hexadecimal.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
these are not fully implemented and ifdef'd out, the bugs have
never manifested themselves. Specifically:
- Fix a memory leak in the case where %a follows another
floating-point format.
- Make the %a/%A code behave like %e/%E with respect to
precision.
- It is no longer valid to assume that '-' and '0x' are
mutually exclusive.
- Address other minor issues.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
mbstate_t object that they ignore. The zeroing is fairly expensive, and it
will never be necessary in these functions; when we support state-dependent
encodings, we will pass in a pointer to the file's mbstate_t object, and
only zero it at the time the file gets opened.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
by sizeof(wchar_t) to get the number of wide characters it contains.
Remove the !hardway micro-optimisation from the CT_INT case to avoid
having to fix it for wide characters.
|
| |
|
|
|
|
|
|
|
|
|
| |
is made an array of two, to explicitly avoid stack corruption due to
null-terminating (which is doesn't actually happen due to stack alignment
padding).
Submitted by: Ed Moy <emoy@apple.com>
Obtained from: Apple Computer, Inc.
|
|
|
|
|
|
|
| |
documentation for %a, and document it correctly instead.
s/one of aefg/one of a, e, f, or g/
Reviewed by: standards@
|
|
|
|
|
|
|
|
| |
[+|-]Inf, [+|-]NaN, nan(...), and hexidecimal FP constants.
While here, add %a and %A, which are aliases for %e, and
add support for long doubles.
Reviewed by: standards@
|
|
|
|
| |
instead of .Xr when needed
|
|
|
|
| |
Approved by: re (blanket)
|
|
|
|
|
|
|
|
| |
the # flag is present. Implement this behavior and add a comment
describing it.
Noticed by: Enache Adrian <enache@rdslink.ro>
Pointy hat to: das
|
| |
|
|
|
|
|
|
|
|
|
| |
%f and sufficiently short %g specifiers where the precision was
explicitly zero, no '#' flag was specified, and the floating point
argument was > 0 and <= 0.5. While at it, add some comments to better
explain the relevant bits of code.
Noticed by: Christoph Kukulies <kuku@physik.rwth-aachen.de>
|
| |
|
| |
|
|
|
|
|
|
| |
into the last commit.
Noticed by: mike
|
|
|
|
|
|
|
|
| |
be printed.
- Fix %f conversions where the number of significant digits is < expt.
This would be a one-line change were it not for thousands separators.
Noticed by tjr.
- Remove some unnecessary code in the parsing of precision specifiers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- We used to round long double arguments to double. Now we print
them properly.
- Bugs involving '%F', corner cases of '#' and 'g' format
specifiers, and the '.*' precision specifier have been
fixed.
- Added support for the "'" specifier to print thousands' grouping
characters in a locale-dependent manner.
- Implement the __vfprintf() side of hexadecimal floating point
support. All that is still needed is a routine to convert the
mantissa to hex digits one nibble at a time in the style of ultoa().
Reviewed by: silence on standards@
|
| |
|