MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / wmenuSimple

Function wmenuSimple

src/intrfn.c:437–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435 * Luckily, most of time we can do with this function */
436
437int wmenuSimple(WINDOW *window,const struct MenuItem *menuItems, const unsigned int menuDefault)
438{
439 unsigned int i, itemLength = 0;
440 char available[MENU_MAX_ITEMS];
441
442 for(i = 0; menuItems[i].key; i++)
443 {
444 const unsigned int j = strlen(menuItems[i].name);
445 if( j > itemLength ) itemLength = j;
446 available[i] = menuItems[i].key;
447 }
448 available[i] = 0;
449 return wmenuSelect(window, 23, 18, 0, menuItems, itemLength, available, MENU_HORIZ | MENU_BUTTON, menuDefault);
450}
451
452/* End of command menu support code */
453

Callers 8

display_messageFunction · 0.85
change_geometry_ncursesFunction · 0.85

Calls 1

wmenuSelectFunction · 0.85

Tested by

no test coverage detected