diff options
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h index c0178801f..7581cd4c4 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1587,15 +1587,21 @@ typedef struct bb_progress_t { off_t lastsize; unsigned lastupdate_sec; unsigned start_sec; - smallint inited; + const char *curfile; } bb_progress_t; -void bb_progress_init(bb_progress_t *p) FAST_FUNC; -void bb_progress_update(bb_progress_t *p, const char *curfile, +#define is_bb_progress_inited(p) ((p)->curfile != NULL) +#define bb_progress_free(p) do { \ + if (ENABLE_UNICODE_SUPPORT) free((char*)((p)->curfile)); \ + (p)->curfile = NULL; \ +} while (0) +void bb_progress_init(bb_progress_t *p, const char *curfile) FAST_FUNC; +void bb_progress_update(bb_progress_t *p, uoff_t beg_range, uoff_t transferred, uoff_t totalsize) FAST_FUNC; + extern const char *applet_name; /* Some older linkers don't perform string merging, we used to have common strings |