From fb2ba98963beea249474f5d6d7345cf9b4b7f570 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 15 Mar 2010 11:15:45 +0000 Subject: Finished the bulk of changes to use estream in most places instead of stdio. --- common/miscellaneous.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'common/miscellaneous.c') diff --git a/common/miscellaneous.c b/common/miscellaneous.c index 396f7224f..01d8c97be 100644 --- a/common/miscellaneous.c +++ b/common/miscellaneous.c @@ -117,23 +117,22 @@ print_fname_stdin (const char *s) return s; } -/* fixme: Globally replace it by print_sanitized_buffer. */ -void -print_string( FILE *fp, const byte *p, size_t n, int delim ) -{ - print_sanitized_buffer (fp, p, n, delim); -} void -print_utf8_string2 ( FILE *fp, const byte *p, size_t n, int delim ) +print_utf8_buffer2 (estream_t stream, const void *p, size_t n, int delim) { - print_sanitized_utf8_buffer (fp, p, n, delim); + char tmp[2]; + + tmp[0] = delim; + tmp[1] = 0; + es_write_sanitized_utf8_buffer (stream, p, n, tmp, NULL); } + void -print_utf8_string( FILE *fp, const byte *p, size_t n ) +print_utf8_buffer (estream_t stream, const void *p, size_t n) { - print_utf8_string2 (fp, p, n, 0); + es_write_sanitized_utf8_buffer (stream, p, n, NULL, NULL); } /* Write LENGTH bytes of BUFFER to FP as a hex encoded string. -- cgit v1.2.3