Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Apr 2013 14:20:45 -0700
From:      Sean Bruno <seanwbruno@gmail.com>
To:        freebsd-hackers <freebsd-hackers@FreeBSD.org>
Subject:   extend printf(9) %b format to allow 0 bits set
Message-ID:  <1365110445.1404.22.camel@localhost>

next in thread | raw e-mail | index | archive | help

--=-jFOVTSqVq3pJcG5Xa1dE
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

A small patch from my wanderings today for your review.  This patch to
kvprintf() allows me to set a %b format string of:

 "\20\0unset\1ONESET\2TWOSET"

In the case that the variable being compared has the value of 0, it will
display "0x0<unset>"

http://people.freebsd.org/~sbruno/subr_prf.txt

Sean

--=-jFOVTSqVq3pJcG5Xa1dE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (FreeBSD)

iQEcBAABAgAGBQJRXe6tAAoJEBkJRdwI6BaHHs4H/3Qc5WCCo7sgULKE62x8nIYw
sKPauUoHVN4qimAMSV+boDPRbg1Ta1ZsNlb2QCIgIhDXE7tyzYYCjXm993c1KWXy
AN4vxzg4XAs5Z5MNN67olwHlY1LNRrajCxrgfQgYETk5KDqB+vp822TY3H3oG3w6
lBZ9jx0xKrIw0kznVaeVNxN32bN+DCcM/zO1fQKt4XjUH2+iM+Vc2Sgc5YejIIC5
6fR540zu0u/G1lLZEMXuVxGUaYSSvBtrXV+OF4aoi1HQ9nqJ44lbpmptHNAA9Qce
7A/XvQ8oh1xQyn38M3WkHKPHsUCnyBUCngz0IQDQOzp3QVau52F5Jo+VmAFdNf8=
=/EqN
-----END PGP SIGNATURE-----

--=-jFOVTSqVq3pJcG5Xa1dE--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1365110445.1404.22.camel>