aboutsummaryrefslogtreecommitdiffstats
path: root/common/miscellaneous.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-03-15 11:15:45 +0000
committerWerner Koch <[email protected]>2010-03-15 11:15:45 +0000
commitfb2ba98963beea249474f5d6d7345cf9b4b7f570 (patch)
tree3c9b25d63f90a71caec5685fca945341d54bef9d /common/miscellaneous.c
parentUse a custom log handler for libassuan. (diff)
downloadgnupg-fb2ba98963beea249474f5d6d7345cf9b4b7f570.tar.gz
gnupg-fb2ba98963beea249474f5d6d7345cf9b4b7f570.zip
Finished the bulk of changes to use estream in most places instead of
stdio.
Diffstat (limited to 'common/miscellaneous.c')
-rw-r--r--common/miscellaneous.c19
1 files changed, 9 insertions, 10 deletions
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.