Lines Matching refs:item
157 * If 'item' is on 'list', returns 1, otherwise 0.
159 int slp_onlist(const char *item, const char *list) {
169 if (strlen(item) != span) {
176 if (strncasecmp(item, s, span) == 0)
185 * Adds item to *list if it is not already on it. If *list == NULL,
188 * whether to look to item on the current list. This is a small
189 * optimization for callers which are that item is not on *list, or
192 void slp_add2list(const char *item, char **list, SLPBoolean check_onlist) {
194 if (!(*list = strdup(item)))
201 if (slp_onlist(item, *list))
204 if (!(*list = realloc(*list, strlen(*list) + strlen(item) + 2))) {
209 (void) strcat(*list, item);
213 * Removes the first instance of item from *list.
217 void slp_list_subtract(const char *item, char **list) {
220 if (!*list || !slp_onlist(item, *list))
222 /* find item's location on the list */
229 if (strlen(item) != span)
231 if (strncasecmp(item, s, span) == 0)
237 /* item is only one on list */