aboutsummaryrefslogtreecommitdiffstats
path: root/g10/progress.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-06-18 19:56:13 +0000
committerWerner Koch <[email protected]>2003-06-18 19:56:13 +0000
commitc0c2c58054923d506f61ce9a71d509b48a381211 (patch)
treea8f82bffb44eb68eb726ff6db41fa715bcd29193 /g10/progress.c
parentA small step for GnuPG but a huge leap for error codes. (diff)
downloadgnupg-c0c2c58054923d506f61ce9a71d509b48a381211.tar.gz
gnupg-c0c2c58054923d506f61ce9a71d509b48a381211.zip
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.
Diffstat (limited to 'g10/progress.c')
-rw-r--r--g10/progress.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/g10/progress.c b/g10/progress.c
index bb414faae..9d9805065 100644
--- a/g10/progress.c
+++ b/g10/progress.c
@@ -21,6 +21,7 @@
#include <config.h>
#include <stdio.h>
+#include "gpg.h"
#include "iobuf.h"
#include "filter.h"
#include "status.h"
@@ -32,7 +33,7 @@
*/
int
progress_filter (void *opaque, int control,
- IOBUF a, byte *buf, size_t *ret_len)
+ iobuf_t a, byte *buf, size_t *ret_len)
{
int rc = 0;
progress_filter_context_t *pfx = opaque;
@@ -86,7 +87,7 @@ progress_filter (void *opaque, int control,
/* Note, that we must always dealloc resources of a filter
within the filter handler and not anywhere else. (We set it
to NULL and check all uses just in case.) */
- m_free (pfx->what);
+ xfree (pfx->what);
pfx->what = NULL;
}
else if (control == IOBUFCTRL_DESC)
@@ -95,7 +96,7 @@ progress_filter (void *opaque, int control,
}
void
-handle_progress (progress_filter_context_t *pfx, IOBUF inp, const char *name)
+handle_progress (progress_filter_context_t *pfx, iobuf_t inp, const char *name)
{
off_t filesize = 0;
@@ -111,7 +112,7 @@ handle_progress (progress_filter_context_t *pfx, IOBUF inp, const char *name)
filesize = opt.set_filesize;
/* register the progress filter */
- pfx->what = m_strdup (name ? name : "stdin");
+ pfx->what = xstrdup (name ? name : "stdin");
pfx->total = filesize;
iobuf_push_filter (inp, progress_filter, pfx);
}