2 * Copyright (c) 2007, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
8 #ifndef LIBSOLV_POOLARCH_H
9 #define LIBSOLV_POOLARCH_H
13 extern void pool_setarch(Pool *, const char *);
14 extern void pool_setarchpolicy(Pool *, const char *);
15 extern unsigned char pool_arch2color_slow(Pool *pool, Id arch);
17 #define ARCHCOLOR_32 1
18 #define ARCHCOLOR_64 2
19 #define ARCHCOLOR_ALL 255
21 static inline unsigned char pool_arch2color(Pool *pool, Id arch)
23 if (arch > pool->lastarch)
25 if (pool->id2color && pool->id2color[arch])
26 return pool->id2color[arch];
27 return pool_arch2color_slow(pool, arch);
30 static inline int pool_colormatch(Pool *pool, Solvable *s1, Solvable *s2)
32 if (s1->arch == s2->arch)
34 if ((pool_arch2color(pool, s1->arch) & pool_arch2color(pool, s2->arch)) != 0)
39 #endif /* LIBSOLV_POOLARCH_H */