diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-06-17 17:28:03 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-06-17 17:28:03 +0300 |
commit | 656190b0a063686b9bd675bbffe43fbebf4aacab (patch) | |
tree | 3f0336fb2080b938fc447ed4c155769be0211fb2 /src/apk_defines.h | |
parent | ade8d0b4e9c206ab67dc8ef2006e8070011aae83 (diff) | |
download | apk-tools-656190b0a063686b9bd675bbffe43fbebf4aacab.tar.gz apk-tools-656190b0a063686b9bd675bbffe43fbebf4aacab.tar.bz2 apk-tools-656190b0a063686b9bd675bbffe43fbebf4aacab.tar.xz apk-tools-656190b0a063686b9bd675bbffe43fbebf4aacab.zip |
io: get rid of APK_PROGRESS_SCALE
no need to muldiv all the time, just pass the current amount of bytes
done, and let callbacks use that directly.
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r-- | src/apk_defines.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h index 629ca7b..00a6f9e 100644 --- a/src/apk_defines.h +++ b/src/apk_defines.h @@ -16,6 +16,7 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #define BIT(x) (1 << (x)) +#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) #ifndef TRUE @@ -102,8 +103,6 @@ static inline size_t muldiv(size_t a, size_t b, size_t c) typedef void (*apk_progress_cb)(void *cb_ctx, size_t); -#define APK_PROGRESS_SCALE 0x100 - void *apk_array_resize(void *array, size_t new_size, size_t elem_size); #define APK_ARRAY(array_type_name, elem_type_name) \ |