diff options
author | David Shaw <[email protected]> | 2004-07-15 21:00:35 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-07-15 21:00:35 +0000 |
commit | 2cba999f22c05e0f85339b5abeadb1bb86866766 (patch) | |
tree | ae7c1d987e715656f05ff234def597aa0c50fdc3 /g10/plaintext.c | |
parent | * ring-a-party: ElGamal -> Elgamal (diff) | |
download | gnupg-2cba999f22c05e0f85339b5abeadb1bb86866766.tar.gz gnupg-2cba999f22c05e0f85339b5abeadb1bb86866766.zip |
* g10.c (main): Alias --charset as --display-charset to help avoid the
continuing confusion and make room for possible changes in devel.
* parse-packet.c (parse_plaintext): Show the hex value for the literal
packet mode since it may not be printable.
* keygen.c (make_backsig): Make sure that the backsig was built
successfully before we try and use it.
* status.h, status.c (get_status_string), plaintext.c (handle_plaintext):
New status tags PLAINTEXT and PLAINTEXT_LENGTH.
Diffstat (limited to '')
-rw-r--r-- | g10/plaintext.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c index 26a5cad3b..66d9d8e96 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -61,6 +61,24 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, int filetype = 0xfff; #endif + /* Let people know what the plaintext info is. This allows the + receiving program to try and do something different based on + the format code (say, recode UTF-8 to local). */ + if(!nooutput && is_status_enabled()) + { + char status[20]; + + sprintf(status,"%X %lu ",(byte)pt->mode,(ulong)pt->timestamp); + write_status_text_and_buffer(STATUS_PLAINTEXT, + status,pt->name,pt->namelen,0); + + if(!pt->is_partial) + { + sprintf(status,"%lu",(ulong)pt->len); + write_status_text(STATUS_PLAINTEXT_LENGTH,status); + } + } + /* create the filename as C string */ if( nooutput ) ; |