aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-12-30 01:59:53 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-12-30 01:59:53 +0000
commitd3c042fc605737643c265a7f86fc7a77c88f629e (patch)
treea1850a3ca6493fb6409e8df0a24baf1331d325f6 /include
parentfcd878efcd6df8a8d052cef753305c34c1297267 (diff)
downloadbusybox-w32-d3c042fc605737643c265a7f86fc7a77c88f629e.tar.gz
busybox-w32-d3c042fc605737643c265a7f86fc7a77c88f629e.tar.bz2
busybox-w32-d3c042fc605737643c265a7f86fc7a77c88f629e.zip
libbb: introduce fputc_printable (from ed)
netstat: print control chars as ^C etc vi: style fixlet function old new delta fputc_printable - 100 +100 unix_do_one 451 487 +36 printLines 258 190 -68 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 136/-68) Total: 68 bytes
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 1da37edb2..f35f85c33 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -426,6 +426,11 @@ char *safe_strncpy(char *dst, const char *src, size_t size);
426 * But potentially slow, don't use in one-billion-times loops */ 426 * But potentially slow, don't use in one-billion-times loops */
427int bb_putchar(int ch); 427int bb_putchar(int ch);
428char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); 428char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
429/* Prints unprintable chars ch as ^C or M-c to file
430 * (M-c is used only if ch is ORed with PRINTABLE_META),
431 * else it is printed as-is (except for ch = 0x9b) */
432enum { PRINTABLE_META = 0x100 };
433void fputc_printable(int ch, FILE *file);
429// gcc-4.1.1 still isn't good enough at optimizing it 434// gcc-4.1.1 still isn't good enough at optimizing it
430// (+200 bytes compared to macro) 435// (+200 bytes compared to macro)
431//static ALWAYS_INLINE 436//static ALWAYS_INLINE