Re: [Libclc-developers] Introducing the double linked list interface
Status: Planning
Brought to you by:
augestad
|
From: <pha...@al...> - 2003-03-28 03:22:37
|
>On Sunday 23 March 2003 09:14 pm, Peter "Shaggy" Haywood wrote: >> From: Bryan Donlan <bd...@bd...> >> Subject: Re: [Libclc-developers] Introducing the double linked list >> interface > >> >How about FindPrev to walk the list backwards? >> >> That's what the dir member (of CLC_DL_SEARCH_DATA) is for. This indicates >> whether to search forward or backward, and is set by clc_dl_FIND_FIRST(). > >No, undoing FindNext. The lack of such a function defeats much of the purpose >of a doubly-linked list. You have to walk the entire list just to look at the >prior node. Oh, I see what you mean. Yes, I could write this. >> > What about removing arbitrar= >> >y=20 >> >nodes and replacing them during such a search? >> >> Huh? I don't understand. > >Walk through the list, and if some test is true, delete the current node and >continue to the next. I still don't understand. Why would one want to remove a node during a search? What good would that do? Or is that what you're asking, what happens when someone removes a node found with clc_dl_Find*() before calling clc_dl_FindNext()? Dig the sig! _-/~~~~~~/\ |------ pha...@al... -------| ////| /^^\ |-----------------------------------------------| ||||||\ |()()|___ | name Peter Haywood | | |||||||| | _---6|9- | alias Shaggy | Remove .NOSPAM to reply | |||||||| |/ \_/| | alias Wolvaen | | |||||||| | A | | alias HEY YOU! | | |||||||| | (===/\\/ |-----------------------------------------------| \||||/ /------\|/ | Dig my groovy web page! | """" " | http://alphalink.com.au.au/~phaywood/ | - Aint I'm a Dawg! --|--------------- Shaggy was here! --------------| (This sig best viewed with a fixed pitch font.) |