/* ******************************************************************************* * Copyright (c) 1996 Martin Poole * ******************************************************************************* ** ** WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! ** ** Any changes to be made to this file should first be checked with ** mplib1 source control for library integrity. ** ** mplib1 source control can be reached at mplib1@quatermass.co.uk ** * * $Source: /home/cvs/cvsroot/onelan/onelan/src/mplib1/libsrc/dl_l_010.c,v $ * $Author: mpoole $ * $Date: 2002/10/07 09:37:38 $ * $Revision: 1.2 $ * Purpose : Double-linked list handling * ******************************************************************************* * * Change History * * $Log: dl_l_010.c,v $ * Revision 1.2 2002/10/07 09:37:38 mpoole * Initial checkin of mplib1-3.1.0 * * Revision 1.1 2002/10/07 09:36:56 mpoole * Initial checkin of mplib1-3.1.0 * * ******************************************************************************* */ #ident "$Header: /home/cvs/cvsroot/onelan/onelan/src/mplib1/libsrc/dl_l_010.c,v 1.2 2002/10/07 09:37:38 mpoole Exp $" /* ------------------------------------------------------------------ Include files ------------------------------------------------------------------ */ #include #include #include #include #include #include /* ------------------------------------------------------------------ defines ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ Code starts here ------------------------------------------------------------------ */ void * dl_Find_Next_Item_By_Name( dl_Node_t *node, const char *name ) { void *item=NULL; int ic; if (name && *name) { ic = (node->ln_List->ln_Flags & LN_IGNORECASE); node = node->ln_Succ; /* walk the list until we find the matching entry */ while (node->ln_Succ && item == NULL) { if ( node->ln_Name && ( (ic && stricmp(name,node->ln_Name)==0) || (!ic && strcmp(name,node->ln_Name)==0) ) ) item = node->ln_Item; node = node->ln_Succ; }; } return(item); } /* -- End of File -- */