source: MondoRescue/trunk/mindi-busybox/archival/libunarchive/find_list_entry.c@ 904

Last change on this file since 904 was 904, checked in by Bruno Cornec, 17 years ago

merge -r890:902 $SVN_M/branches/stable

File size: 466 bytes
Line 
1/* vi: set sw=4 ts=4: */
2/*
3 * Copyright (C) 2002 by Glenn McGrath
4 *
5 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
6 */
7
8#include <fnmatch.h>
9#include <stdlib.h>
10#include "unarchive.h"
11
12/* Find a string in a list */
13const llist_t *find_list_entry(const llist_t *list, const char *filename)
14{
15 while (list) {
16 if (fnmatch(list->data, filename, FNM_LEADING_DIR) == 0) {
17 return (list);
18 }
19 list = list->link;
20 }
21 return(NULL);
22}
Note: See TracBrowser for help on using the repository browser.