aboutsummaryrefslogtreecommitdiffstats
path: root/src/apk_defines.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-09-09 16:31:11 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-09-09 16:32:31 +0300
commita5a7021658212748e9f787ce23181d3e099aba73 (patch)
tree459384995fc52f096007c3ed4d8d88ca865f998c /src/apk_defines.h
parent0e24207c2e4fedb9c0656ed98bc37cd37df44d91 (diff)
downloadaports-a5a7021658212748e9f787ce23181d3e099aba73.tar.bz2
aports-a5a7021658212748e9f787ce23181d3e099aba73.tar.xz
applets: start using solver code
still todo: - 'fix' is missing - 'del -R' does not work - 'upgrade' does not do self-upgrade first ... and a lot of testing.
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r--src/apk_defines.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h
index b11d18123a..deb550e448 100644
--- a/src/apk_defines.h
+++ b/src/apk_defines.h
@@ -56,14 +56,11 @@ extern char **apk_argv;
#define APK_SIMULATE 0x0002
#define APK_CLEAN_PROTECTED 0x0004
#define APK_PROGRESS 0x0008
-#define APK_UPGRADE 0x0010
#define APK_RECURSIVE 0x0020
-#define APK_PREFER_AVAILABLE 0x0040
#define APK_UPDATE_CACHE 0x0080
#define APK_ALLOW_UNTRUSTED 0x0100
#define APK_PURGE 0x0200
#define APK_INTERACTIVE 0x0400
-#define APK_RECURSIVE_DELETE 0x0800
#define APK_NO_NETWORK 0x1000
#define APK_OVERLAY_FROM_STDIN 0x2000
@@ -108,6 +105,12 @@ void *apk_array_resize(void *array, size_t new_size, size_t elem_size);
{ \
*a = apk_array_resize(*a, size, sizeof(elem_type_name));\
} \
+ static inline void \
+ array_type_name##_copy(struct array_type_name **a, struct array_type_name *b)\
+ { \
+ *a = apk_array_resize(*a, b->num, sizeof(elem_type_name));\
+ memcpy((*a)->item, b->item, b->num * sizeof(elem_type_name));\
+ } \
static inline elem_type_name * \
array_type_name##_add(struct array_type_name **a) \
{ \