From 1b61cc8c69025ddd394401a506b21f16df5d4e6d Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 24 Jan 2007 03:02:53 +0000 Subject: This mainly deals with code clarity- removing currently unneeded optimizations in order to make the code much more readable and type-checkable. Every enum in the library now has it's own type that should be used instead of the generic 'unsigned char'. In addition, several #define statements dealing with constants were converted to enums. Signed-off-by: Dan McGee --- lib/libalpm/deps.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lib/libalpm/deps.h') diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h index d34d1eca..f69e1d5f 100644 --- a/lib/libalpm/deps.h +++ b/lib/libalpm/deps.h @@ -30,7 +30,7 @@ /* Dependency */ struct __pmdepend_t { - unsigned char mod; + pmdepmod_t mod; char name[PKG_NAME_LEN]; char version[PKG_VERSION_LEN]; }; @@ -38,19 +38,22 @@ struct __pmdepend_t { /* Missing dependency */ struct __pmdepmissing_t { char target[PKG_NAME_LEN]; - unsigned char type; + pmdeptype_t type; pmdepend_t depend; }; -pmdepmissing_t *_alpm_depmiss_new(const char *target, unsigned char type, unsigned char depmod, - const char *depname, const char *depversion); +pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdeptype_t type, + pmdepmod_t depmod, const char *depname, + const char *depversion); int _alpm_depmiss_isin(pmdepmissing_t *needle, alpm_list_t *haystack); alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, int mode); -alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, unsigned char op, alpm_list_t *packages); +alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op, + alpm_list_t *packages); int _alpm_splitdep(char *depstr, pmdepend_t *depend); alpm_list_t *_alpm_removedeps(pmdb_t *db, alpm_list_t *targs); -int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg, alpm_list_t *list, - alpm_list_t *trail, pmtrans_t *trans, alpm_list_t **data); +int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg, + alpm_list_t *list, alpm_list_t *trail, pmtrans_t *trans, + alpm_list_t **data); #endif /* _ALPM_DEPS_H */ -- cgit v1.2.3