lkml.org 
[lkml]   [2004]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectmconf : find_menu
From
Date
Hi,

I'd like to have some function able to find a menu struct with filename
& prompt in mconf.This one doesn't seem to give the best results.Someone
could help ? (Roman ?).

I'm scanning internal list of menus, then next menu's list then parent
list ....

Regards,
FabF


struct menu* find_menu (const char *szfile, const char *szprompt, struct
menu* currentmenu)
{
if (!strcmp(menu_get_prompt(currentmenu), szprompt)){
return currentmenu;
}else
if(currentmenu->list){
find_menu(szfile, szprompt, currentmenu->list);
}else
if(currentmenu->next){
find_menu(szfile, szprompt,currentmenu->next);
}
else if
((currentmenu->parent)&&(currentmenu->parent->next)){
find_menu(szfile, szprompt,
currentmenu->parent->next);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.026 / U:1.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site