mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
* status.h, status.c (get_status_string), plaintext.c (handle_plaintext):
New status tags PLAINTEXT and PLAINTEXT_LENGTH.
This commit is contained in:
parent
1e0c29a238
commit
0180c207e2
@ -1,3 +1,9 @@
|
||||
2004-06-18 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* status.h, status.c (get_status_string), plaintext.c
|
||||
(handle_plaintext): New status tags PLAINTEXT and
|
||||
PLAINTEXT_LENGTH.
|
||||
|
||||
2004-06-16 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* keygen.c (make_backsig): Make sure that the backsig was built
|
||||
|
@ -58,6 +58,24 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
||||
int c;
|
||||
int convert = (pt->mode == 't' || pt->mode == 'u');
|
||||
|
||||
/* 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 )
|
||||
;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* status.c
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002,
|
||||
* 2004 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
* 2004 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
@ -151,6 +151,8 @@ get_status_string ( int no )
|
||||
case STATUS_EXPKEYSIG : s = "EXPKEYSIG"; break;
|
||||
case STATUS_REVKEYSIG : s = "REVKEYSIG"; break;
|
||||
case STATUS_ATTRIBUTE : s = "ATTRIBUTE"; break;
|
||||
case STATUS_PLAINTEXT : s = "PLAINTEXT"; break;
|
||||
case STATUS_PLAINTEXT_LENGTH:s = "PLAINTEXT_LENGTH"; break;
|
||||
default: s = "?"; break;
|
||||
}
|
||||
return s;
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* status.h
|
||||
* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
* 2004 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
@ -20,7 +21,6 @@
|
||||
#ifndef G10_STATUS_H
|
||||
#define G10_STATUS_H
|
||||
|
||||
|
||||
#define STATUS_ENTER 1
|
||||
#define STATUS_LEAVE 2
|
||||
#define STATUS_ABORT 3
|
||||
@ -29,7 +29,6 @@
|
||||
#define STATUS_BADSIG 5
|
||||
#define STATUS_ERRSIG 6
|
||||
|
||||
|
||||
#define STATUS_BADARMOR 7
|
||||
|
||||
#define STATUS_RSA_OR_IDEA 8
|
||||
@ -100,6 +99,8 @@
|
||||
#define STATUS_IMPORT_OK 68
|
||||
#define STATUS_IMPORT_CHECK 69
|
||||
#define STATUS_REVKEYSIG 70
|
||||
#define STATUS_PLAINTEXT 71
|
||||
#define STATUS_PLAINTEXT_LENGTH 72
|
||||
|
||||
/*-- status.c --*/
|
||||
void set_status_fd ( int fd );
|
||||
@ -124,5 +125,4 @@ void cpr_kill_prompt(void);
|
||||
int cpr_get_answer_is_yes( const char *keyword, const char *prompt );
|
||||
int cpr_get_answer_yes_no_quit( const char *keyword, const char *prompt );
|
||||
|
||||
|
||||
#endif /*G10_STATUS_H*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user