From a6a8f1e706bd7e528262151bc04ebb9409c2eeed Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 9 Mar 1998 21:44:06 +0000 Subject: partial DSA support --- util/miscutil.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'util/miscutil.c') diff --git a/util/miscutil.c b/util/miscutil.c index 9dbb13ac1..cad89e8ab 100644 --- a/util/miscutil.c +++ b/util/miscutil.c @@ -37,13 +37,21 @@ make_timestamp() * Print a string to FP, but filter all control characters out. */ void -print_string( FILE *fp, byte *p, size_t n ) +print_string( FILE *fp, byte *p, size_t n, int delim ) { for( ; n; n--, p++ ) - if( iscntrl( *p ) ) { + if( iscntrl( *p ) || *p == delim ) { putc('\\', fp); if( *p == '\n' ) putc('n', fp); + else if( *p == '\r' ) + putc('r', fp); + else if( *p == '\f' ) + putc('f', fp); + else if( *p == '\v' ) + putc('v', fp); + else if( *p == '\b' ) + putc('b', fp); else if( !*p ) putc('0', fp); else -- cgit