1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

- fixed args order in list_is_ptrin()

This commit is contained in:
Aurelien Foret 2005-04-20 19:41:22 +00:00
parent 77520f9d43
commit 170dd807f5
2 changed files with 15 additions and 2 deletions

View File

@ -217,7 +217,7 @@ int pm_list_count(PMList *list)
return(i);
}
int pm_list_is_ptrin(PMList *haystack, void *needle)
int pm_list_is_ptrin(void *needle, PMList *haystack)
{
PMList *lp;
@ -272,4 +272,16 @@ PMList* _alpm_list_reverse(PMList *list)
return(newlist);
}
PMList *_alpm_list_strdup(PMList *list)
{
PMList *newlist = NULL;
PMList *lp;
for(lp = list; lp; lp = lp->next) {
newlist = pm_list_add(newlist, strdup(lp->data));
}
return(newlist);
}
/* vim: set ts=2 sw=2 noet: */

View File

@ -52,10 +52,11 @@ PMList *pm_list_add(PMList *list, void *data);
PMList *pm_list_add_sorted(PMList *list, void *data, pm_fn_cmp fn);
PMList* _alpm_list_remove(PMList* list, PMList* item);
int pm_list_count(PMList *list);
int pm_list_is_ptrin(PMList *haystack, void *needle);
int pm_list_is_ptrin(void *needle, PMList *haystack);
PMList *pm_list_is_strin(char *needle, PMList *haystack);
PMList *pm_list_last(PMList *list);
PMList *_alpm_list_reverse(PMList *list);
PMList *_alpm_list_strdup(PMList *list);
#endif /* _ALPM_LIST_H */