aboutsummaryrefslogtreecommitdiffstats
path: root/g10/progress.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2006-04-19 11:26:11 +0000
committerWerner Koch <[email protected]>2006-04-19 11:26:11 +0000
commit29b23dea9731e8f258211bc6fd733d205c18e2a8 (patch)
treeff2a0f66bda0c1f050e8fa00cbf610e18b91c9f7 /g10/progress.c
parent2006-04-14 Marcus Brinkmann <[email protected]> (diff)
downloadgnupg-29b23dea9731e8f258211bc6fd733d205c18e2a8.tar.gz
gnupg-29b23dea9731e8f258211bc6fd733d205c18e2a8.zip
Merged with gpg 1.4.3 code.
The gpg part does not yet build.
Diffstat (limited to '')
-rw-r--r--g10/progress.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/g10/progress.c b/g10/progress.c
index 9d9805065..148bf7e2d 100644
--- a/g10/progress.c
+++ b/g10/progress.c
@@ -1,4 +1,4 @@
-/* progress.c
+/* progress.c - emit progress status lines
* Copyright (C) 2003 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
@@ -15,7 +15,8 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
*/
#include <config.h>
@@ -33,7 +34,7 @@
*/
int
progress_filter (void *opaque, int control,
- iobuf_t a, byte *buf, size_t *ret_len)
+ IOBUF a, byte *buf, size_t *ret_len)
{
int rc = 0;
progress_filter_context_t *pfx = opaque;
@@ -96,7 +97,7 @@ progress_filter (void *opaque, int control,
}
void
-handle_progress (progress_filter_context_t *pfx, iobuf_t inp, const char *name)
+handle_progress (progress_filter_context_t *pfx, IOBUF inp, const char *name)
{
off_t filesize = 0;
@@ -106,8 +107,8 @@ handle_progress (progress_filter_context_t *pfx, iobuf_t inp, const char *name)
if (!is_status_enabled ())
return;
- if (name && *name && !(*name == '-' && !name[1]))
- filesize = iobuf_get_filelength (inp);
+ if ( !iobuf_is_pipe_filename (name) && *name )
+ filesize = iobuf_get_filelength (inp, NULL);
else if (opt.set_filesize)
filesize = opt.set_filesize;