diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-06-23 17:21:03 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-06-23 17:21:03 -0400 |
commit | 3c711911fba4ac0eea9fc74e0d9a181fb1e3c14b (patch) | |
tree | 27ef09f05ad8c9659f9eb5542aff15975287ecd5 /librazor | |
parent | fa4aba092832c1de58db59bd918b114db99d6608 (diff) |
Move a couple of unrelated functions out of transaction.c.
Diffstat (limited to 'librazor')
-rw-r--r-- | librazor/razor.c | 41 | ||||
-rw-r--r-- | librazor/transaction.c | 41 |
2 files changed, 41 insertions, 41 deletions
diff --git a/librazor/razor.c b/librazor/razor.c index 76412f9..021480a 100644 --- a/librazor/razor.c +++ b/librazor/razor.c @@ -397,6 +397,47 @@ razor_package_get_details(struct razor_set *set, *license = &pool[package->license]; } +RAZOR_EXPORT const char * +razor_property_relation_to_string(struct razor_property *p) +{ + switch (p->flags & RAZOR_PROPERTY_RELATION_MASK) { + case RAZOR_PROPERTY_LESS: + return "<"; + + case RAZOR_PROPERTY_LESS | RAZOR_PROPERTY_EQUAL: + return "<="; + + case RAZOR_PROPERTY_EQUAL: + return "="; + + case RAZOR_PROPERTY_GREATER | RAZOR_PROPERTY_EQUAL: + return ">="; + + case RAZOR_PROPERTY_GREATER: + return ">"; + + default: + return "?"; + } +} + +RAZOR_EXPORT const char * +razor_property_type_to_string(struct razor_property *p) +{ + switch (p->flags & RAZOR_PROPERTY_TYPE_MASK) { + case RAZOR_PROPERTY_REQUIRES: + return "requires"; + case RAZOR_PROPERTY_PROVIDES: + return "provides"; + case RAZOR_PROPERTY_CONFLICTS: + return "conflicts"; + case RAZOR_PROPERTY_OBSOLETES: + return "obsoletes"; + default: + return NULL; + } +} + RAZOR_EXPORT struct razor_entry * razor_set_find_entry(struct razor_set *set, struct razor_entry *dir, const char *pattern) diff --git a/librazor/transaction.c b/librazor/transaction.c index 23515ad..3d8bf2f 100644 --- a/librazor/transaction.c +++ b/librazor/transaction.c @@ -461,47 +461,6 @@ clear_requires_flags(struct transaction_set *ts) } } -RAZOR_EXPORT const char * -razor_property_relation_to_string(struct razor_property *p) -{ - switch (p->flags & RAZOR_PROPERTY_RELATION_MASK) { - case RAZOR_PROPERTY_LESS: - return "<"; - - case RAZOR_PROPERTY_LESS | RAZOR_PROPERTY_EQUAL: - return "<="; - - case RAZOR_PROPERTY_EQUAL: - return "="; - - case RAZOR_PROPERTY_GREATER | RAZOR_PROPERTY_EQUAL: - return ">="; - - case RAZOR_PROPERTY_GREATER: - return ">"; - - default: - return "?"; - } -} - -RAZOR_EXPORT const char * -razor_property_type_to_string(struct razor_property *p) -{ - switch (p->flags & RAZOR_PROPERTY_TYPE_MASK) { - case RAZOR_PROPERTY_REQUIRES: - return "requires"; - case RAZOR_PROPERTY_PROVIDES: - return "provides"; - case RAZOR_PROPERTY_CONFLICTS: - return "conflicts"; - case RAZOR_PROPERTY_OBSOLETES: - return "obsoletes"; - default: - return NULL; - } -} - static void mark_satisfied_requires(struct razor_transaction *trans, struct transaction_set *rts, |