1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

See ChangeLog: Tue Jun 1 16:01:46 CEST 1999 Werner Koch

This commit is contained in:
Werner Koch 1999-06-01 14:08:57 +00:00
parent c34c676958
commit 3dddf602dd
19 changed files with 272 additions and 71 deletions

View file

@ -63,6 +63,13 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
log_info(_("data not saved; use option \"--output\" to save it\n"));
nooutput = 1;
}
else if( !opt.use_embedded_filename ) {
fname = make_outfile_name( iobuf_get_real_fname(pt->buf) );
if( !fname ) {
rc = G10ERR_CREATE_FILE;
goto leave;
}
}
else {
fname = m_alloc( pt->namelen +1 );
memcpy( fname, pt->name, pt->namelen );
@ -90,7 +97,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
if( pt->len ) {
assert( !clearsig );
if( convert ) { // text mode
if( convert ) { /* text mode */
for( ; pt->len; pt->len-- ) {
if( (c = iobuf_get(pt->buf)) == -1 ) {
log_error("Problem reading source (%u bytes remaining)\n",
@ -112,7 +119,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
}
}
}
else { // binary mode
else { /* binary mode */
byte *buffer = m_alloc( 32768 );
while( pt->len ) {
int len = pt->len > 32768 ? 32768 : pt->len;
@ -141,7 +148,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
}
}
else if( !clearsig ) {
if( convert ) { // text mode
if( convert ) { /* text mode */
while( (c = iobuf_get(pt->buf)) != -1 ) {
if( mfx->md )
md_putc(mfx->md, c );
@ -157,7 +164,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
}
}
}
else { // binary mode
else { /* binary mode */
byte *buffer = m_alloc( 32768 );
for( ;; ) {
int len = iobuf_read( pt->buf, buffer, 32768 );