diff options
author | Werner Koch <wk@gnupg.org> | 2000-01-27 17:50:45 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2000-01-27 17:50:45 +0100 |
commit | baa30ad117e12c5182a78ede84c5103bea23616b (patch) | |
tree | f1d174362ee1855c5af77dcb917451e026c0a8d5 /g10/plaintext.c | |
parent | See ChangeLog: Mon Jan 24 22:24:38 CET 2000 Werner Koch (diff) | |
download | gnupg2-baa30ad117e12c5182a78ede84c5103bea23616b.tar.xz gnupg2-baa30ad117e12c5182a78ede84c5103bea23616b.zip |
See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner Koch
Diffstat (limited to 'g10/plaintext.c')
-rw-r--r-- | g10/plaintext.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c index 88b76bc70..f0c01ca8e 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -68,7 +68,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( !fname ) fname = ask_outfile_name( pt->name, pt->namelen ); if( !fname ) { - rc = G10ERR_CREATE_FILE; + rc = GPGERR_CREATE_FILE; goto leave; } } @@ -83,7 +83,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, fp = stdout; } else if( !overwrite_filep( fname ) ) { - rc = G10ERR_CREATE_FILE; + rc = GPGERR_CREATE_FILE; goto leave; } @@ -91,7 +91,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, ; else if( !(fp = fopen(fname,"wb")) ) { log_error("Error creating `%s': %s\n", fname, strerror(errno) ); - rc = G10ERR_CREATE_FILE; + rc = GPGERR_CREATE_FILE; goto leave; } @@ -102,7 +102,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( (c = iobuf_get(pt->buf)) == -1 ) { log_error("Problem reading source (%u bytes remaining)\n", (unsigned)pt->len); - rc = G10ERR_READ_FILE; + rc = GPGERR_READ_FILE; goto leave; } if( mfx->md ) @@ -113,7 +113,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( putc( c, fp ) == EOF ) { log_error("Error writing to `%s': %s\n", fname, strerror(errno) ); - rc = G10ERR_WRITE_FILE; + rc = GPGERR_WRITE_FILE; goto leave; } } @@ -127,7 +127,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( len == -1 ) { log_error("Problem reading source (%u bytes remaining)\n", (unsigned)pt->len); - rc = G10ERR_READ_FILE; + rc = GPGERR_READ_FILE; gcry_free( buffer ); goto leave; } @@ -137,7 +137,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( fwrite( buffer, 1, len, fp ) != len ) { log_error("Error writing to `%s': %s\n", fname, strerror(errno) ); - rc = G10ERR_WRITE_FILE; + rc = GPGERR_WRITE_FILE; gcry_free( buffer ); goto leave; } @@ -158,7 +158,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( putc( c, fp ) == EOF ) { log_error("Error writing to `%s': %s\n", fname, strerror(errno) ); - rc = G10ERR_WRITE_FILE; + rc = GPGERR_WRITE_FILE; goto leave; } } @@ -185,7 +185,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( fwrite( buffer, 1, len, fp ) != len ) { log_error("Error writing to `%s': %s\n", fname, strerror(errno) ); - rc = G10ERR_WRITE_FILE; + rc = GPGERR_WRITE_FILE; gcry_free( buffer ); goto leave; } @@ -203,7 +203,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( putc( c, fp ) == EOF ) { log_error("Error writing to `%s': %s\n", fname, strerror(errno) ); - rc = G10ERR_WRITE_FILE; + rc = GPGERR_WRITE_FILE; goto leave; } } @@ -240,7 +240,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( fp && fp != stdout && fclose(fp) ) { log_error("Error closing `%s': %s\n", fname, strerror(errno) ); fp = NULL; - rc = G10ERR_WRITE_FILE; + rc = GPGERR_WRITE_FILE; goto leave; } fp = NULL; @@ -315,7 +315,7 @@ ask_for_detached_datafile( GCRY_MD_HD md, GCRY_MD_HD md2, _("Please enter name of data file: ")); cpr_kill_prompt(); if( any && !*answer ) { - rc = G10ERR_READ_FILE; + rc = GPGERR_READ_FILE; goto leave; } fp = iobuf_open(answer); @@ -325,7 +325,7 @@ ask_for_detached_datafile( GCRY_MD_HD md, GCRY_MD_HD md2, } else if( !fp ) { log_error("can't open `%s': %s\n", answer, strerror(errno) ); - rc = G10ERR_READ_FILE; + rc = GPGERR_READ_FILE; goto leave; } } while( !fp ); @@ -380,7 +380,7 @@ hash_datafiles( GCRY_MD_HD md, GCRY_MD_HD md2, STRLIST files, print_fname_stdin(sl->d)); if( !files ) free_strlist(sl); - return G10ERR_OPEN_FILE; + return GPGERR_OPEN_FILE; } do_hash( md, md2, fp, textmode ); iobuf_close(fp); |