diff options
author | David Shaw <[email protected]> | 2003-09-23 03:52:55 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2003-09-23 03:52:55 +0000 |
commit | b224756fbe317989f520a7c90d8b9ef09ed41e37 (patch) | |
tree | e029ef075a98e25b971ba6b7439855ff88ea0885 /g10/armor.c | |
parent | 2003-09-21 Timo Schulz <[email protected]> (diff) | |
download | gnupg-b224756fbe317989f520a7c90d8b9ef09ed41e37.tar.gz gnupg-b224756fbe317989f520a7c90d8b9ef09ed41e37.zip |
* g10.c (main): Deprecate --default-comment in favor of --no-comments.
* options.h, g10.c (main), armor.c (armor_filter): Allow using --comment
multiple times to get multiple Comment: header lines. --no-comments resets
list.
Diffstat (limited to 'g10/armor.c')
-rw-r--r-- | g10/armor.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/g10/armor.c b/g10/armor.c index 89d267294..4632db69a 100644 --- a/g10/armor.c +++ b/g10/armor.c @@ -925,6 +925,7 @@ armor_filter( void *opaque, int control, else if( control == IOBUFCTRL_FLUSH && !afx->cancel ) { if( !afx->status ) { /* write the header line */ const char *s; + STRLIST comment=opt.comments; if( afx->what >= DIM(head_strings) ) log_bug("afx->what=%d", afx->what); @@ -935,22 +936,23 @@ armor_filter( void *opaque, int control, iobuf_writestr(a, "Version: GnuPG v" VERSION " (" PRINTABLE_OS_NAME ")" LF ); - /* write the comment string or a default one */ - s = opt.comment_string; - if( s && *s ) { + /* write the comment strings */ + for(s=comment->d;comment;comment=comment->next,s=comment->d) + { iobuf_writestr(a, "Comment: " ); - for( ; *s; s++ ) { + for( ; *s; s++ ) + { if( *s == '\n' ) - iobuf_writestr(a, "\\n" ); + iobuf_writestr(a, "\\n" ); else if( *s == '\r' ) - iobuf_writestr(a, "\\r" ); + iobuf_writestr(a, "\\r" ); else if( *s == '\v' ) - iobuf_writestr(a, "\\v" ); + iobuf_writestr(a, "\\v" ); else - iobuf_put(a, *s ); - } + iobuf_put(a, *s ); + } iobuf_writestr(a, LF ); - } + } if ( afx->hdrlines ) { for ( s = afx->hdrlines; *s; s++ ) { |