yeah, that's the way to do it... I feel like an idiot... it's been too
long since my old CS classes...

Thanks to all who replied,

Alex

--- Sven Luther <[EMAIL PROTECTED]> wrote:
> On Fri, May 30, 2003 at 08:24:31AM -0700, Alex Deucher wrote:
> > If that's the case then's what's the best way to iterate through
> the
> > mode list without getting stuck in an endless loop?  It's probably
> > somehting simple, but it's just not coming to me...
> 
> For a circular list, you need to keep the original pointer around,
> and
> then travel the list until you get NULL (for the non circular list)
> or
> the original pointer, Something like :
> 
> for (test=FALSE, p=modes; p!=NULL && (test && p != modes); test=TRUE,
> p = p->next);
> 
> Fully untested, and may contain typos, but you get the idea.
> 
> Friendly,
> 
> Sven Luther


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to