diff options
author | Werner Koch <[email protected]> | 1998-03-09 21:44:06 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1998-03-09 21:44:06 +0000 |
commit | a6a8f1e706bd7e528262151bc04ebb9409c2eeed (patch) | |
tree | 20b5771581e695a22559d8ffe3f90862afb11e3d /util/miscutil.c | |
parent | removed g10maint.c (diff) | |
download | gnupg-a6a8f1e706bd7e528262151bc04ebb9409c2eeed.tar.gz gnupg-a6a8f1e706bd7e528262151bc04ebb9409c2eeed.zip |
partial DSA support
Diffstat (limited to 'util/miscutil.c')
-rw-r--r-- | util/miscutil.c | 12 |
1 files changed, 10 insertions, 2 deletions
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 |