diff options
author | Timo Teräs <timo.teras@iki.fi> | 2020-09-30 14:11:37 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-10-09 16:09:19 +0300 |
commit | efe0c4afecb9fd3da2ab4849d2b8edd5bea14d08 (patch) | |
tree | b04a9d2533148a1fcb4a28560ffd76c4bbc5e5ad /src/apk_defines.h | |
parent | 81782bfc150225df75b11efa4fa0ade428ae3676 (diff) | |
download | apk-tools-efe0c4afecb9fd3da2ab4849d2b8edd5bea14d08.tar.gz apk-tools-efe0c4afecb9fd3da2ab4849d2b8edd5bea14d08.tar.bz2 apk-tools-efe0c4afecb9fd3da2ab4849d2b8edd5bea14d08.tar.xz apk-tools-efe0c4afecb9fd3da2ab4849d2b8edd5bea14d08.zip |
adb: introduce apk-tools database format, and few applets
This is a flat buffers inspired format that allows fast
mmaped access to the data with low overhead, signature support
and relatively good forward support.
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r-- | src/apk_defines.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h index 505b212..dc38a0e 100644 --- a/src/apk_defines.h +++ b/src/apk_defines.h @@ -34,6 +34,8 @@ #define EAPKBADURL 1024 #define EAPKSTALEINDEX 1025 +#define EAPKFORMAT 1026 +#define EAPKDEPFORMAT 1027 static inline void *ERR_PTR(long error) { return (void*) error; } static inline void *ERR_CAST(const void *ptr) { return (void*) ptr; } @@ -63,6 +65,9 @@ static inline int IS_ERR_OR_NULL(const void *ptr) { return IS_ERR(ptr) || !ptr; (type *)( (char *)__mptr - offsetof(type,member) );}) #endif +#define ROUND_DOWN(x,a) ((x) & ~(a-1)) +#define ROUND_UP(x,a) (((x)+(a)-1) & ~((a)-1)) + extern int apk_verbosity; extern unsigned int apk_flags, apk_force; extern const char *apk_arch; |