aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2016-12-22 22:30:42 +0000
committerEnji Cooper <ngie@FreeBSD.org>2016-12-22 22:30:42 +0000
commit7c39dd2e165c26b81c6238275f7b01a5d396f8b8 (patch)
treea009f4f71b66a97dc9ea23a5e0036f9b6444e994 /lib
parent0a201eeac2957ec4f3fc26fa68993722ea53a4e5 (diff)
downloadsrc-7c39dd2e165c26b81c6238275f7b01a5d396f8b8.tar.gz
src-7c39dd2e165c26b81c6238275f7b01a5d396f8b8.zip
Revert r310138
Adding %b support to vfprintf for parity with kernel space requires more discussion/review. In particular, many parties were concerned over introducing a non-standard format qualifier to *printf(3) which didn't already exist in other OSes, e.g. Linux, thus making code which used %b harder to port to other operating systems. Requested by: many
Notes
Notes: svn path=/head/; revision=310433
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdio/vfprintf.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index 37b8f3f00d86..bf45bfb421ed 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -611,37 +611,6 @@ reswitch: switch (ch) {
case 'z':
flags |= SIZET;
goto rflag;
- case 'b':
- {
- const char *q;
- int anybitset, bit;
-
- ulval = (u_int)GETARG(int);
- cp = GETARG(char *);
-
- q = __ultoa(ulval, buf + BUF, *cp++, 0, xdigs_lower);
- PRINT(q, buf + BUF - q);
-
- if (ulval == 0)
- break;
-
- for (anybitset = 0; *cp;) {
- bit = *cp++;
- if (ulval & (1 << (bit - 1))) {
- PRINT(anybitset ? "," : "<", 1);
- q = cp;
- for (; (bit = *cp) > ' '; ++cp)
- continue;
- PRINT(q, cp - q);
- anybitset = 1;
- } else
- for (; *cp > ' '; ++cp)
- continue;
- }
- if (anybitset)
- PRINT(">", 1);
- }
- continue;
case 'C':
flags |= LONGINT;
/*FALLTHROUGH*/