Lines Matching refs:item
160 * If 'item' is on 'list', returns 1, otherwise 0.
162 int slp_onlist(const char *item, const char *list) {
172 if (strlen(item) != span) {
179 if (strncasecmp(item, s, span) == 0)
188 * Adds item to *list if it is not already on it. If *list == NULL,
191 * whether to look to item on the current list. This is a small
192 * optimization for callers which are that item is not on *list, or
195 void slp_add2list(const char *item, char **list, SLPBoolean check_onlist) {
197 if (!(*list = strdup(item)))
204 if (slp_onlist(item, *list))
207 if (!(*list = realloc(*list, strlen(*list) + strlen(item) + 2))) {
212 (void) strcat(*list, item);
216 * Removes the first instance of item from *list.
220 void slp_list_subtract(const char *item, char **list) {
223 if (!*list || !slp_onlist(item, *list))
225 /* find item's location on the list */
232 if (strlen(item) != span)
234 if (strncasecmp(item, s, span) == 0)
240 /* item is only one on list */