Commit Graph

7 Commits

Author SHA1 Message Date
Sebastian Huber
ce1fb41a6c kvprintf(): Fix '+' conversion handling
For example, printf("%+i", 1) prints "+1".  However, kvprintf() did
print just "1" for this example.  According to PRINTF(3):

  A sign must always be placed before a number produced by a signed
  conversion.

For "%+r" radix conversions, keep the "+" handling as it is, since this
is a non-standard conversion.  For "%+p" pointer conversions, continue
to ignore the sign modifier to be in line with libc.

This change allows to support the ' conversion modifier in the future.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1310
2024-09-12 23:34:28 +00:00
Sebastian Huber
1e68298847 dev/io: Fix "%hhi" conversion
The signedness of "char" is implementation-dependent.
2024-06-13 17:19:35 +00:00
Sebastian Huber
30125493b5 dev/io: Remove dead code in _IO_Vprintf() 2024-06-13 17:19:35 +00:00
Warner Losh
0c7a972b3c sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2024-06-13 17:19:35 +00:00
Warner Losh
c2041d3a0b sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2024-06-13 17:19:35 +00:00
Marius Strobl
a9e1c29aa6 kvprintf(9): add missing FALLTHROUGH
Reported by:	Coverity
CID:		1005166
2024-06-13 17:19:35 +00:00
Sebastian Huber
527af2b7f2 score: Move formatted I/O functions
These functions do not belong to an super core service.
2023-07-28 11:58:32 +02:00