2 * Copyright (c) 2007, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
12 /* we need FNM_CASEFOLD */
21 #include "poolvendor.h"
24 const char *vendors[] = {
25 "!openSUSE Build Service*",
32 "ATI Technologies Inc.*",
38 Id pool_vendor2mask(Pool *pool, Id vendor)
47 for (i = 0; i < pool->vendormap.count; i += 2)
48 if (pool->vendormap.elements[i] == vendor)
49 return pool->vendormap.elements[i + 1];
50 vstr = id2str(pool, vendor);
53 for (v = vendors; ; v++)
56 if (vs == 0) /* end of block? */
63 m <<= 1; /* next vendor equivalence class */
65 if (fnmatch(*vs == '!' ? vs + 1 : vs, vstr, FNM_CASEFOLD) == 0)
69 while (v[1]) /* forward to next block */
73 queue_push(&pool->vendormap, vendor);
74 queue_push(&pool->vendormap, mask);