summaryrefslogtreecommitdiffstats
path: root/include/Makefile
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-12-16 18:56:39 +0000
committerphk <phk@FreeBSD.org>2005-12-16 18:56:39 +0000
commit9b8cbdad18a2201ad1a67715e0fa2823f9328fc6 (patch)
treebd5d57df456cddc66bc6d7f0d8d200712a39d273 /include/Makefile
parentf69d4d5fa8d8f5a3f56bf9f07a20dbf05bdeeca4 (diff)
downloadFreeBSD-src-9b8cbdad18a2201ad1a67715e0fa2823f9328fc6.zip
FreeBSD-src-9b8cbdad18a2201ad1a67715e0fa2823f9328fc6.tar.gz
Add an extensible version of our *printf(3) implementation to libc
on probationary terms: it may go away again if it transpires it is a bad idea. This extensible printf version will only be used if either environment variable USE_XPRINTF is defined or one of the extension functions are called. or the global variable __use_xprintf is set greater than zero. In all other cases our traditional printf implementation will be used. The extensible version is slower than the default printf, mostly because less opportunity for combining I/O operation exists when faced with extensions. The default printf on the other hand is a bad case of spaghetti code. The extension API has a GLIBC compatible part and a FreeBSD version of same. The FreeBSD version exists because the GLIBC version may run afoul of our FILE * locking in multithreaded programs and it even further eliminate the opportunities for combining I/O operations. Include three demo extensions which can be enabled if desired: time (%T), hexdump (%H) and strvis (%V). %T can format time_t (%T), struct timeval (%lT) and struct timespec (%llT) in one of two human readable duration formats: "%.3llT" -> "20349.245" "%#.3llT" -> "5h39m9.245" %H will hexdump a sequence of bytes and takes a pointer and a length argument. The width specifies number of bytes per line. "%4H" -> "65 72 20 65" "%+4H" -> "0000 65 72 20 65" "%#4H" -> "65 72 20 65 |er e|" "%+#4H" -> "0000 65 72 20 65 |er e|" %V will dump a string in strvis format. "%V" -> "Hello\tWor\377ld" (C-style) "%0V" -> "Hello\011Wor\377ld" (octal) "%+V" -> "Hello%09Wor%FFld" (http-style) Tests, comments, bugreports etc are most welcome.
Diffstat (limited to 'include/Makefile')
-rw-r--r--include/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/Makefile b/include/Makefile
index 89554f0..e488788 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -14,7 +14,7 @@ INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \
locale.h malloc.h memory.h monetary.h mpool.h mqueue.h \
ndbm.h netconfig.h \
netdb.h nl_types.h nlist.h nss.h nsswitch.h objformat.h paths.h \
- proc_service.h pthread.h \
+ printf.h proc_service.h pthread.h \
pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h regexp.h \
resolv.h runetype.h search.h setjmp.h sgtty.h \
signal.h stab.h \
OpenPOWER on IntegriCloud