Lines Matching defs:pkg
56 valname(char *pkg, int wild, int presvr4flg)
62 if (wild && (strcmp(pkg, "all") == 0))
68 if ((strncmp(pkg, rsvrd[i], n) == 0) &&
69 (!pkg[n] || strchr(NMBRK, pkg[n])))
78 if (pt = strpbrk(pkg, NMBRK)) {
101 if (!isalnum((unsigned char)*pkg) ||
102 (!presvr4flg && !isalpha((unsigned char)*pkg)))
104 while (*pkg && !strchr(NMBRK, *pkg)) {
105 if (!isalnum((unsigned char)*pkg) && !strpbrk(pkg, "-+"))
107 count++, pkg++;
117 return (0); /* pkg is valid */
122 pkgnmchk(char *pkg, char *spec, int presvr4flg)
124 /* pkg is assumed to be non-NULL upon entry */
128 * NULL pkg must be valid and may be a wildcard spec
129 * "all" pkg must be valid and must be an instance
130 * "x.*" pkg must be valid and must be an instance of "x"
131 * "x*" pkg must be valid and must be an instance of "x"
134 if (valname(pkg, ((spec == NULL) ? 1 : 0), presvr4flg))
140 while (*pkg == *spec) {
144 else if (*pkg++ == '\0')
151 if ((pkg[0] == '\0') || (pkg[0] == '.'))
154 if ((spec[0] == '\0') && (strcmp(pkg, WILD3) == 0))
155 return (0); /* compare pkg.name to pkg */