| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
this commit, sprintf("%s", "") could fail depending on what happened
to be on the stack.
Found by: LLVM/Clang Static Checker
|
|
|
|
| |
bit by removing some calls to the inline function addtype().
|
|
|
|
|
|
| |
by moving the positional argument handling code to a new file,
printf-pos.c, and moving common definitions to printflocal.h.
No functional change intended.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular, encapsulate the state of the type table in a struct,
and add inline functions to initialize, free, and manipulate that
state. This replaces some ugly macros that made proper error handling
impossible.
While here, remove an unneeded test for NULL and a variable that is
initialized (many times!) but never used. The compiler didn't catch
these because of rampant use of the same variable to mean different
things in different places.
This commit should not cause any changes in functionality.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__sFILE. This was supposed to be done in 6.0. Some notes:
- Where possible I restored the various lines to their pre-__sFILEX state.
- Retire INITEXTRA() and just initialize the wchar bits (orientation and
mbstate) explicitly instead. The various places that used INITEXTRA
didn't need the locking fields or _up initialized. (Some places needed
_up to exist and not be off the end of a NULL or garbage pointer, but
they didn't require it to be initialized to a specific value.)
- For now, stdio.h "knows" that pthread_t is a 'struct pthread *' to
avoid namespace pollution of including all the pthread types in stdio.h.
Once we remove all the inlines and make __sFILE private it can go back
to using pthread_t, etc.
- This does not remove any of the inlines currently and does not change
any of the public ABI of 'FILE'.
MFC after: 1 month
Reviewed by: peter
|
| |
|
|
|
|
|
|
| |
clause.
# If I've done so improperly on a file, please let me know.
|
| |
|
| |
|
|
|
|
| |
printf("%#.0o", 0). Cite an amusing passage from a defect report.
|
|
|
|
|
| |
Submitted by: Sean McNeil <sean@mcneil.com>
MFC after: 3 days
|
|
|
|
| |
Approved by: das (mentor)
|
|
|
|
| |
since the macro isn't really a predicate, and it has side-effects.
|
| |
|
|
|
|
|
| |
- s/#ifdef FLOATING_POINT/#ifndef NO_FLOATING_POINT/
- Remove HEXFLOAT
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
state-dependent encodings with locking shifts will come later if there
is demand for it.
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
the # flag is present. Implement this behavior and add a comment
describing it.
Noticed by: Enache Adrian <enache@rdslink.ro>
Pointy hat to: das
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- __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.
|
| |
|
| |
|
|
|
|
| |
last argument.
|
|
|
|
| |
handling of multibyte sequences representing null wide characters.
|
|
|
|
| |
and %ls.
|
|
|
|
|
|
|
|
| |
assignment. This is needed on powerpc but is also more correct for the
other ports.
Submitted by: grehan
Tested on: alpha, i386, sparc64
|
|
formatted wide-character output.
|