summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/package.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/package.h')
-rw-r--r--lib/libalpm/package.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index d96f8d41..1b834cb8 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -28,13 +28,15 @@
#if defined(__APPLE__) || defined(__sun__)
#include <time.h>
#endif
-#include "list.h"
+
+#include "alpm.h"
enum {
PKG_FROM_CACHE = 1,
PKG_FROM_FILE
};
+/* Packages */
#define PKG_NAME_LEN 256
#define PKG_VERSION_LEN 64
#define PKG_FULLNAME_LEN (PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1
@@ -47,7 +49,7 @@ enum {
#define PKG_SHA1SUM_LEN 41
#define PKG_ARCH_LEN 32
-typedef struct __pmpkg_t {
+struct __pmpkg_t {
char name[PKG_NAME_LEN];
char version[PKG_VERSION_LEN];
char desc[PKG_DESC_LEN];
@@ -80,16 +82,9 @@ typedef struct __pmpkg_t {
unsigned char origin;
void *data;
unsigned char infolevel;
-} pmpkg_t;
-
-#define FREEPKG(p) \
-do { \
- if(p) { \
- _alpm_pkg_free(p); \
- p = NULL; \
- } \
-} while(0)
+};
+#define FREEPKG(p) do { if(p){_alpm_pkg_free(p); p = NULL;}} while(0)
#define FREELISTPKGS(p) _FREELIST(p, _alpm_pkg_free)
pmpkg_t* _alpm_pkg_new(const char *name, const char *version);
@@ -101,6 +96,7 @@ pmpkg_t *_alpm_pkg_isin(char *needle, pmlist_t *haystack);
char *_alpm_pkg_makefilename(pmpkg_t *pkg);
int _alpm_pkg_splitname(char *target, char *name, char *version, int witharch);
+
#endif /* _ALPM_PACKAGE_H */
/* vim: set ts=2 sw=2 noet: */