MCPcopy Create free account
hub / github.com/coreboot/coreboot / scale_menu

Function scale_menu

payloads/libpayload/curses/menu/m_scale.c:53–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51| E_NOT_CONNECTED - no items are connected to menu
52+--------------------------------------------------------------------------*/
53NCURSES_EXPORT(int)
54scale_menu(const MENU * menu, int *rows, int *cols)
55{
56 T((T_CALLED("scale_menu(%p,%p,%p)"),
57 (const void *)menu,
58 (void *)rows,
59 (void *)cols));
60
61 if (!menu)
62 RETURN(E_BAD_ARGUMENT);
63
64 if (menu->items && *(menu->items))
65 {
66 if (rows)
67 *rows = menu->height;
68 if (cols)
69 *cols = menu->width;
70 RETURN(E_OK);
71 }
72 else
73 RETURN(E_NOT_CONNECTED);
74}
75
76/* m_scale.c ends here */

Callers 1

show_menuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected