From c0c2c58054923d506f61ce9a71d509b48a381211 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 18 Jun 2003 19:56:13 +0000 Subject: Finished the bulk of changes for gnupg 1.9. This included switching to libgcrypt functions, using shared error codes from libgpg-error, replacing the old functions we used to have in ../util by those in ../jnlib and ../common, renaming the malloc functions and a couple of types. Note, that not all changes are listed below becuause they are too similar and done at far too many places. As of today the code builds using the current libgcrypt from CVS but it is very unlikely that it actually works. --- g10/dearmor.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'g10/dearmor.c') diff --git a/g10/dearmor.c b/g10/dearmor.c index 4ec8fa012..4f9fa2db7 100644 --- a/g10/dearmor.c +++ b/g10/dearmor.c @@ -1,5 +1,5 @@ /* dearmor.c - Armor utility - * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -25,6 +25,7 @@ #include #include +#include "gpg.h" #include "errors.h" #include "iobuf.h" #include "memory.h" @@ -42,7 +43,7 @@ int dearmor_file( const char *fname ) { armor_filter_context_t afx; - IOBUF inp = NULL, out = NULL; + iobuf_t inp = NULL, out = NULL; int rc = 0; int c; @@ -50,9 +51,9 @@ dearmor_file( const char *fname ) /* prepare iobufs */ if( !(inp = iobuf_open(fname)) ) { + rc = gpg_error_from_errno (errno); log_error("can't open %s: %s\n", fname? fname: "[stdin]", strerror(errno) ); - rc = G10ERR_OPEN_FILE; goto leave; } @@ -84,7 +85,7 @@ int enarmor_file( const char *fname ) { armor_filter_context_t afx; - IOBUF inp = NULL, out = NULL; + iobuf_t inp = NULL, out = NULL; int rc = 0; int c; @@ -92,9 +93,9 @@ enarmor_file( const char *fname ) /* prepare iobufs */ if( !(inp = iobuf_open(fname)) ) { + rc = gpg_error_from_errno (errno); log_error("can't open %s: %s\n", fname? fname: "[stdin]", strerror(errno) ); - rc = G10ERR_OPEN_FILE; goto leave; } -- cgit v1.2.3