#
360659a1 |
| 06-Dec-2019 |
christos <christos@NetBSD.org> |
Formalize that the printf formats should be uintmax_t so we can uniformly use 'j' in the user-provided formatting strings instead of depending on _LP64 to use 'll' or 'l' (and the PRI macros). The al
Formalize that the printf formats should be uintmax_t so we can uniformly use 'j' in the user-provided formatting strings instead of depending on _LP64 to use 'll' or 'l' (and the PRI macros). The alternative is to parse the printf format manually to determine which modifier to apply which would make this transparent to the user (they could still always use '%u' or '%x'), but that's too painful.
show more ...
|
#
45d729cd |
| 17-Jun-2019 |
christos <christos@NetBSD.org> |
PR/54300: Andreas Gustafsson: Remove useless case. should fix lib/libutil/t_snprintb test regression on sparc
|
#
723c68f0 |
| 29-Apr-2019 |
kre <kre@NetBSD.org> |
snprintb(3) says that, in the new(?) Torek format, all fields specs end with \0 The F spec is one of those, it should be terminated with \0 just like all the others (irrelevant that it has no extra d
snprintb(3) says that, in the new(?) Torek format, all fields specs end with \0 The F spec is one of those, it should be terminated with \0 just like all the others (irrelevant that it has no extra data to delimit).
Fix <sys/mman.h> to define the snprintb() format string correctly (include the missing \0's). Fix the copy of that definition included into snprintb(3) to match the updated mman.h version (ride the date bump from the day before yesterday .. this is the same change, just corrected).
Undo the previous snprintb.c change ("off by one" fix) which was an attempt to make the broken mman.h usage work (and did, but not the way it should be done). Also, after using the new * format (instead of only when something has already matched) skip the associated data so we don't attempt to interpret it as more field specifiers. This func needs lots of TLC!
Fix the ATF tests for snprintb() to not assume that F format is really exactly like f format, and has data after the field specifier. It doesn't. Add several more tests (including testing the '*' field operator recently added).
show more ...
|
#
31cdbc77 |
| 27-Apr-2019 |
christos <christos@NetBSD.org> |
Fix an off-by-one in the F modifier that ended up skipping the first : or = entry, and add a * specifier for a "default case".
|
#
22255e22 |
| 26-Jul-2018 |
kamil <kamil@NetBSD.org> |
Avoid undefined behavior in snprintb.c
Do not change the signedness bit with a left shift operation. Switch to unsigned integer to prevent this.
snprintb.c:178:17, left shift of 1 by 31 places cann
Avoid undefined behavior in snprintb.c
Do not change the signedness bit with a left shift operation. Switch to unsigned integer to prevent this.
snprintb.c:178:17, left shift of 1 by 31 places cannot be represented in type 'int'
Detected with micro-UBSan in the user mode.
show more ...
|
#
8f380e24 |
| 14-Oct-2017 |
ryo <ryo@NetBSD.org> |
doesn't work new format 'F' with a strings of length 1, or a string beginning with 'F'
|
#
18414ea0 |
| 02-Aug-2014 |
ryo <ryo@NetBSD.org> |
fix lack of '>' pointed out in PR/48517
|
#
6e615e5a |
| 06-Jun-2014 |
shm <shm@NetBSD.org> |
PR/48517 do not add extra '>' to string-converted value when nothing matches
|
#
054d2187 |
| 08-Aug-2013 |
pgoyette <pgoyette@NetBSD.org> |
Now that all of the macros are enclosed in "do { ... } while 0" we can remove unneded parenthesization of their invocations.
OK mrg@
|
#
c6a2d2f7 |
| 08-Aug-2013 |
agc <agc@NetBSD.org> |
Get the correct inttypes.h header, so this can build on !NetBSD.
|
#
2f25ff21 |
| 08-Aug-2013 |
mrg <mrg@NetBSD.org> |
apply some do { ... } while (0) so that macros aren't broken, completing the previous change.
|
#
96bbecdb |
| 07-Aug-2013 |
pgoyette <pgoyette@NetBSD.org> |
The PUT* things are macros. Use { ... } to make sure they expand correctly.
|
#
380c8f65 |
| 07-Aug-2013 |
pgoyette <pgoyette@NetBSD.org> |
Fix boundary condition in multi-line format. When the '=' following a field name exactly filled a line, the back-up logic failed and really messed up the formatting!
|
#
26ad9006 |
| 06-Aug-2013 |
apb <apb@NetBSD.org> |
If HAVE_SNPRINTB_M is defined, then do not define the snprintb() and snprintb_m() functions. This should allow this file to be compiled from a tools build regardless of whether or not the host defin
If HAVE_SNPRINTB_M is defined, then do not define the snprintb() and snprintb_m() functions. This should allow this file to be compiled from a tools build regardless of whether or not the host defines these functions.
show more ...
|
#
9060a0b0 |
| 09-Jul-2013 |
uwe <uwe@NetBSD.org> |
Use "unsigned int" instead of "u_int" to make it easier to steal. u_int is out of fashion anyway...
|
#
78722a6c |
| 23-Jan-2012 |
christos <christos@NetBSD.org> |
also handle the separator after the F field.
|
#
c0b593e4 |
| 23-Jan-2012 |
christos <christos@NetBSD.org> |
In the new format F did not print a separator as required.
|
#
28469fc2 |
| 13-May-2009 |
pgoyette <pgoyette@NetBSD.org> |
Implement snprintb_m(3) to provide multi-line bit/bit-field decode. Discussed on tech-kern.
|
#
c5eb4ab6 |
| 18-Jan-2009 |
lukem <lukem@NetBSD.org> |
fix -Wsign-compare issues
|
#
d2196120 |
| 14-Jan-2009 |
pooka <pooka@NetBSD.org> |
Include sys/param.h in the kernel to make the vax properly pick up memset. Otherwise vax/macros.h doesn't get included and the usual lossage ensues. (I bet you saw that one coming)
|
#
2d2593ab |
| 17-Dec-2008 |
christos <christos@NetBSD.org> |
We don't need this for _STANDALONE, and it needs snprintf to work.
|
#
cec60a58 |
| 16-Dec-2008 |
christos <christos@NetBSD.org> |
share with kernel; replaces bitmask_snprintf which was very broken: - subtracted one from len without checking if len was 0 - checked for a minimum buffer size - arguments order was inconsistent with
share with kernel; replaces bitmask_snprintf which was very broken: - subtracted one from len without checking if len was 0 - checked for a minimum buffer size - arguments order was inconsistent with other printf like functions - no way to tell if it overflowed
show more ...
|