diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2011-10-31 12:54:00 -0700 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2011-11-01 19:08:23 +0100 |
commit | e11835e2995d130890ca9f45cb3e304f2ea3a6a9 (patch) | |
tree | cfc5345e9d98b231de0699714771a5d7f54c6ce1 /payloads/libpayload/curses/menu | |
parent | dd6906328904309e4d93e4bcb04a6cfa3646f29d (diff) |
libpayload: remove trailing whitespace and run dos2unix
Change-Id: Iffed3602456f5306711c65f06c873c58d4086e11
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/363
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'payloads/libpayload/curses/menu')
21 files changed, 164 insertions, 164 deletions
diff --git a/payloads/libpayload/curses/menu/m_attribs.c b/payloads/libpayload/curses/menu/m_attribs.c index c41d558ec9..1ea5c7a904 100644 --- a/payloads/libpayload/curses/menu/m_attribs.c +++ b/payloads/libpayload/curses/menu/m_attribs.c @@ -72,69 +72,69 @@ NCURSES_IMPEXP chtype NCURSES_API menu_ ## name (const MENU * menu)\ } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_fore(MENU *menu, chtype attr) -| +| | Description : Set the attribute for selectable items. In single- | valued menus this is used to highlight the current | item ((i.e. where the cursor is), in multi-valued | menus this is used to highlight the selected items. | | Return Values : E_OK - success -| E_BAD_ARGUMENT - an invalid value has been passed +| E_BAD_ARGUMENT - an invalid value has been passed +--------------------------------------------------------------------------*/ GEN_MENU_ATTR_SET_FCT(fore) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : chtype menu_fore(const MENU* menu) -| +| | Description : Return the attribute used for selectable items that | are current (single-valued menu) or selected (multi- -| valued menu). +| valued menu). | | Return Values : Attribute value +--------------------------------------------------------------------------*/ GEN_MENU_ATTR_GET_FCT(fore) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_back(MENU *menu, chtype attr) -| +| | Description : Set the attribute for selectable but not yet selected | items. | -| Return Values : E_OK - success +| Return Values : E_OK - success | E_BAD_ARGUMENT - an invalid value has been passed +--------------------------------------------------------------------------*/ GEN_MENU_ATTR_SET_FCT(back) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : chtype menu_back(const MENU *menu) -| +| | Description : Return the attribute used for selectable but not yet -| selected items. +| selected items. | | Return Values : Attribute value +--------------------------------------------------------------------------*/ GEN_MENU_ATTR_GET_FCT(back) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_grey(MENU *menu, chtype attr) -| +| | Description : Set the attribute for unselectable items. | | Return Values : E_OK - success -| E_BAD_ARGUMENT - an invalid value has been passed +| E_BAD_ARGUMENT - an invalid value has been passed +--------------------------------------------------------------------------*/ GEN_MENU_ATTR_SET_FCT(grey) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : chtype menu_grey(const MENU *menu) -| +| | Description : Return the attribute used for non-selectable items | | Return Values : Attribute value diff --git a/payloads/libpayload/curses/menu/m_global.c b/payloads/libpayload/curses/menu/m_global.c index 90f6f25925..73227f3382 100644 --- a/payloads/libpayload/curses/menu/m_global.c +++ b/payloads/libpayload/curses/menu/m_global.c @@ -53,7 +53,7 @@ NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = { 0, /* length of widest description */ 1, /* length of mark */ 1, /* length of one item */ - 1, /* Spacing for descriptor */ + 1, /* Spacing for descriptor */ 1, /* Spacing for columns */ 1, /* Spacing for rows */ (char *)0, /* buffer used to store match chars */ @@ -68,7 +68,7 @@ NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = { 0, /* Top row of menu */ (chtype)A_REVERSE, /* Attribute for selection */ (chtype)A_NORMAL, /* Attribute for nonselection */ - (chtype)A_UNDERLINE, /* Attribute for inactive */ + (chtype)A_UNDERLINE, /* Attribute for inactive */ ' ', /* Pad character */ (Menu_Hook)0, /* Menu init */ (Menu_Hook)0, /* Menu term */ @@ -77,7 +77,7 @@ NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = { (void *)0, /* userptr */ mark, /* mark */ ALL_MENU_OPTS, /* options */ - 0 /* status */ + 0 /* status */ }; NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item = { @@ -98,9 +98,9 @@ NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item = { /* *INDENT-ON* */ /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : static void ComputeMaximum_NameDesc_Lenths(MENU *menu) -| +| | Description : Calculates the maximum name and description lengths | of the items connected to the menu | @@ -132,9 +132,9 @@ ComputeMaximum_NameDesc_Lengths(MENU * menu) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : static void ResetConnectionInfo(MENU *, ITEM **) -| +| | Description : Reset all informations in the menu and the items in | the item array that indicates a connection | @@ -160,7 +160,7 @@ ResetConnectionInfo(MENU * menu, ITEM ** items) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : bool _nc_Connect_Items(MENU *menu, ITEM **items) | | Description : Connect the items in the item array to the menu. @@ -218,16 +218,16 @@ _nc_Connect_Items(MENU * menu, ITEM ** items) } } - /* If we fall through to this point, we have to reset all items connection + /* If we fall through to this point, we have to reset all items connection and inform about a reject connection */ ResetConnectionInfo(menu, items); return (FALSE); } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void _nc_Disconnect_Items(MENU *menu) -| +| | Description : Disconnect the menus item array from the menu | | Return Values : - @@ -240,9 +240,9 @@ _nc_Disconnect_Items(MENU * menu) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int _nc_Calculate_Text_Width(const TEXT * item) -| +| | Description : Calculate the number of columns for a TEXT. | | Return Values : the width @@ -328,9 +328,9 @@ calculate_actual_width(MENU * menu, bool name) #endif /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void _nc_Calculate_Item_Length_and_Width(MENU *menu) -| +| | Description : Calculate the length of an item and the width of the | whole menu. | @@ -366,9 +366,9 @@ _nc_Calculate_Item_Length_and_Width(MENU * menu) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void _nc_Link_Item(MENU *menu) -| +| | Description : Statically calculate for every item its four neighbors. | This depends on the orientation of the menu. This | static approach simplifies navigation in the menu a lot. @@ -495,9 +495,9 @@ _nc_Link_Items(MENU * menu) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void _nc_Show_Menu(const MENU* menu) -| +| | Description : Update the window that is associated with the menu | | Return Values : - @@ -530,12 +530,12 @@ _nc_Show_Menu(const MENU * menu) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void _nc_New_TopRow_and_CurrentItem( -| MENU *menu, -| int new_toprow, +| MENU *menu, +| int new_toprow, | ITEM *new_current_item) -| +| | Description : Redisplay the menu so that the given row becomes the | top row and the given item becomes the new current | item. diff --git a/payloads/libpayload/curses/menu/m_hook.c b/payloads/libpayload/curses/menu/m_hook.c index 6125d052e7..df78d0af1e 100644 --- a/payloads/libpayload/curses/menu/m_hook.c +++ b/payloads/libpayload/curses/menu/m_hook.c @@ -57,9 +57,9 @@ NCURSES_IMPEXP Menu_Hook NCURSES_API typ ## _ ## name ( const MENU *menu )\ } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_init(MENU *menu, void (*f)(MENU *)) -| +| | Description : Set user-exit which is called when menu is posted | or just after the top row changes. | @@ -68,11 +68,11 @@ NCURSES_IMPEXP Menu_Hook NCURSES_API typ ## _ ## name ( const MENU *menu )\ GEN_HOOK_SET_FUNCTION(menu, init) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void (*)(MENU *) menu_init(const MENU *menu) -| +| | Description : Return address of user-exit function which is called -| when a menu is posted or just after the top row +| when a menu is posted or just after the top row | changes. | | Return Values : Menu init function address or NULL @@ -80,9 +80,9 @@ GEN_HOOK_SET_FUNCTION(menu, init) GEN_HOOK_GET_FUNCTION(menu, init) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_term (MENU *menu, void (*f)(MENU *)) -| +| | Description : Set user-exit which is called when menu is unposted | or just before the top row changes. | @@ -91,11 +91,11 @@ GEN_HOOK_GET_FUNCTION(menu, init) GEN_HOOK_SET_FUNCTION(menu, term) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void (*)(MENU *) menu_term(const MENU *menu) -| +| | Description : Return address of user-exit function which is called -| when a menu is unposted or just before the top row +| when a menu is unposted or just before the top row | changes. | | Return Values : Menu finalization function address or NULL @@ -103,9 +103,9 @@ GEN_HOOK_SET_FUNCTION(menu, term) GEN_HOOK_GET_FUNCTION(menu, term) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_item_init (MENU *menu, void (*f)(MENU *)) -| +| | Description : Set user-exit which is called when menu is posted | or just after the current item changes. | @@ -114,11 +114,11 @@ GEN_HOOK_GET_FUNCTION(menu, term) GEN_HOOK_SET_FUNCTION(item, init) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void (*)(MENU *) item_init (const MENU *menu) -| +| | Description : Return address of user-exit function which is called -| when a menu is posted or just after the current item +| when a menu is posted or just after the current item | changes. | | Return Values : Item init function address or NULL @@ -126,9 +126,9 @@ GEN_HOOK_SET_FUNCTION(item, init) GEN_HOOK_GET_FUNCTION(item, init) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_item_term (MENU *menu, void (*f)(MENU *)) -| +| | Description : Set user-exit which is called when menu is unposted | or just before the current item changes. | @@ -137,11 +137,11 @@ GEN_HOOK_GET_FUNCTION(item, init) GEN_HOOK_SET_FUNCTION(item, term) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void (*)(MENU *) item_init (const MENU *menu) -| +| | Description : Return address of user-exit function which is called -| when a menu is unposted or just before the current item +| when a menu is unposted or just before the current item | changes. | | Return Values : Item finalization function address or NULL diff --git a/payloads/libpayload/curses/menu/m_item_cur.c b/payloads/libpayload/curses/menu/m_item_cur.c index 18b1a2726a..189e61bd32 100644 --- a/payloads/libpayload/curses/menu/m_item_cur.c +++ b/payloads/libpayload/curses/menu/m_item_cur.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_item_cur.c,v 1.18 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_current_item(MENU *menu, const ITEM *item) -| +| | Description : Make the item the current item | | Return Values : E_OK - success @@ -81,9 +81,9 @@ set_current_item(MENU * menu, ITEM * item) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : ITEM *current_item(const MENU *menu) -| +| | Description : Return the menus current item | | Return Values : Item pointer or NULL if failure @@ -96,9 +96,9 @@ current_item(const MENU * menu) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int item_index(const ITEM *) -| +| | Description : Return the logical index of this item. | | Return Values : The index or ERR if this is an invalid item pointer diff --git a/payloads/libpayload/curses/menu/m_item_nam.c b/payloads/libpayload/curses/menu/m_item_nam.c index 3ed1d37668..eb6f58aa8c 100644 --- a/payloads/libpayload/curses/menu/m_item_nam.c +++ b/payloads/libpayload/curses/menu/m_item_nam.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_item_nam.c,v 1.15 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : char *item_name(const ITEM *item) -| +| | Description : Return name of menu item | | Return Values : See above; returns NULL if item is invalid @@ -55,9 +55,9 @@ item_name(const ITEM * item) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : char *item_description(const ITEM *item) -| +| | Description : Returns description of item | | Return Values : See above; Returns NULL if item is invalid diff --git a/payloads/libpayload/curses/menu/m_item_new.c b/payloads/libpayload/curses/menu/m_item_new.c index 1debc2b344..a10ec4b5b6 100644 --- a/payloads/libpayload/curses/menu/m_item_new.c +++ b/payloads/libpayload/curses/menu/m_item_new.c @@ -47,9 +47,9 @@ MODULE_ID("$Id: m_item_new.c,v 1.30 2010/01/23 21:20:11 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : bool Is_Printable_String(const char *s) -| +| | Description : Checks whether or not the string contains only printable | characters. | @@ -97,9 +97,9 @@ Is_Printable_String(const char *s) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : ITEM *new_item(char *name, char *description) -| +| | Description : Create a new item with name and description. Return | a pointer to this new item. | N.B.: an item must(!) have a name. @@ -149,15 +149,15 @@ new_item(const char *name, const char *description) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int free_item(ITEM *item) -| -| Description : Free the allocated storage for this item. +| +| Description : Free the allocated storage for this item. | N.B.: a connected item can't be freed. | | Return Values : E_OK - success | E_BAD_ARGUMENT - invalid value has been passed -| E_CONNECTED - item is still connected to a menu +| E_CONNECTED - item is still connected to a menu +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) free_item(ITEM * item) @@ -176,16 +176,16 @@ free_item(ITEM * item) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_mark( MENU *menu, const char *mark ) -| +| | Description : Set the mark string used to indicate the current | item (single-valued menu) or the selected items | (multi-valued menu). -| The mark argument may be NULL, in which case no +| The mark argument may be NULL, in which case no | marker is used. -| This might be a little bit tricky, because this may -| affect the geometry of the menu, which we don't allow +| This might be a little bit tricky, because this may +| affect the geometry of the menu, which we don't allow | if it is already posted. | | Return Values : E_OK - success @@ -258,9 +258,9 @@ set_menu_mark(MENU * menu, const char *mark) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : char *menu_mark(const MENU *menu) -| +| | Description : Return a pointer to the marker string | | Return Values : The marker string pointer or NULL if no marker defined diff --git a/payloads/libpayload/curses/menu/m_item_opt.c b/payloads/libpayload/curses/menu/m_item_opt.c index 91385da121..de5eb8d63f 100644 --- a/payloads/libpayload/curses/menu/m_item_opt.c +++ b/payloads/libpayload/curses/menu/m_item_opt.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_item_opt.c,v 1.18 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu -| Function : int set_item_opts(ITEM *item, Item_Options opts) -| +| Facility : libnmenu +| Function : int set_item_opts(ITEM *item, Item_Options opts) +| | Description : Set the options of the item. If there are relevant | changes, the item is connected and the menu is posted, | the menu will be redisplayed. @@ -85,9 +85,9 @@ set_item_opts(ITEM * item, Item_Options opts) } /*--------------------------------------------------------------------------- -| Facility : libnmenu -| Function : int item_opts_off(ITEM *item, Item_Options opts) -| +| Facility : libnmenu +| Function : int item_opts_off(ITEM *item, Item_Options opts) +| | Description : Switch of the options for this item. | | Return Values : E_OK - success @@ -113,9 +113,9 @@ item_opts_off(ITEM * item, Item_Options opts) } /*--------------------------------------------------------------------------- -| Facility : libnmenu -| Function : int item_opts_on(ITEM *item, Item_Options opts) -| +| Facility : libnmenu +| Function : int item_opts_on(ITEM *item, Item_Options opts) +| | Description : Switch on the options for this item. | | Return Values : E_OK - success @@ -142,9 +142,9 @@ item_opts_on(ITEM * item, Item_Options opts) } /*--------------------------------------------------------------------------- -| Facility : libnmenu -| Function : Item_Options item_opts(const ITEM *item) -| +| Facility : libnmenu +| Function : Item_Options item_opts(const ITEM *item) +| | Description : Switch of the options for this item. | | Return Values : Items options diff --git a/payloads/libpayload/curses/menu/m_item_top.c b/payloads/libpayload/curses/menu/m_item_top.c index 752e20d9ed..89f831609d 100644 --- a/payloads/libpayload/curses/menu/m_item_top.c +++ b/payloads/libpayload/curses/menu/m_item_top.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_item_top.c,v 1.11 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_top_row(MENU *menu, int row) -| +| | Description : Makes the specified row the top row in the menu | | Return Values : E_OK - success @@ -84,9 +84,9 @@ set_top_row(MENU * menu, int row) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int top_row(const MENU *) -| +| | Description : Return the top row of the menu | | Return Values : The row number or ERR if there is no row diff --git a/payloads/libpayload/curses/menu/m_item_use.c b/payloads/libpayload/curses/menu/m_item_use.c index 8cf294bc29..4a25a85d6e 100644 --- a/payloads/libpayload/curses/menu/m_item_use.c +++ b/payloads/libpayload/curses/menu/m_item_use.c @@ -40,11 +40,11 @@ MODULE_ID("$Id: m_item_use.c,v 1.17 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_item_userptr(ITEM *item, void *userptr) -| +| | Description : Set the pointer that is reserved in any item to store -| application relevant informations. +| application relevant informations. | | Return Values : E_OK - success +--------------------------------------------------------------------------*/ @@ -57,9 +57,9 @@ set_item_userptr(ITEM * item, void *userptr) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void *item_userptr(const ITEM *item) -| +| | Description : Return the pointer that is reserved in any item to store | application relevant informations. | diff --git a/payloads/libpayload/curses/menu/m_item_val.c b/payloads/libpayload/curses/menu/m_item_val.c index 337dbfcc68..c628338b2b 100644 --- a/payloads/libpayload/curses/menu/m_item_val.c +++ b/payloads/libpayload/curses/menu/m_item_val.c @@ -40,14 +40,14 @@ MODULE_ID("$Id: m_item_val.c,v 1.15 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_item_value(ITEM *item, int value) -| +| | Description : Programmatically set the item's selection value. This is | only allowed if the item is selectable at all and if | it is not connected to a single-valued menu. | If the item is connected to a posted menu, the menu -| will be redisplayed. +| will be redisplayed. | | Return Values : E_OK - success | E_REQUEST_DENIED - not selectable or single valued menu @@ -86,9 +86,9 @@ set_item_value(ITEM * item, bool value) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : bool item_value(const ITEM *item) -| +| | Description : Return the selection value of the item | | Return Values : TRUE - if item is selected diff --git a/payloads/libpayload/curses/menu/m_item_vis.c b/payloads/libpayload/curses/menu/m_item_vis.c index ff84740543..312f0a0ba4 100644 --- a/payloads/libpayload/curses/menu/m_item_vis.c +++ b/payloads/libpayload/curses/menu/m_item_vis.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_item_vis.c,v 1.16 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : bool item_visible(const ITEM *item) -| +| | Description : A item is visible if it currently appears in the | subwindow of a posted menu. | diff --git a/payloads/libpayload/curses/menu/m_items.c b/payloads/libpayload/curses/menu/m_items.c index 539768551d..e1755f1f90 100644 --- a/payloads/libpayload/curses/menu/m_items.c +++ b/payloads/libpayload/curses/menu/m_items.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_items.c,v 1.17 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_items(MENU *menu, ITEM **items) -| +| | Description : Sets the item pointer array connected to menu. | | Return Values : E_OK - success @@ -77,9 +77,9 @@ set_menu_items(MENU * menu, ITEM ** items) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : ITEM **menu_items(const MENU *menu) -| +| | Description : Returns a pointer to the item pointer array of the menu | | Return Values : NULL on error @@ -92,11 +92,11 @@ menu_items(const MENU * menu) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int item_count(const MENU *menu) -| +| | Description : Get the number of items connected to the menu. If the -| menu pointer is NULL we return -1. +| menu pointer is NULL we return -1. | | Return Values : Number of items or -1 to indicate error. +--------------------------------------------------------------------------*/ diff --git a/payloads/libpayload/curses/menu/m_new.c b/payloads/libpayload/curses/menu/m_new.c index 79f9292a7b..2f9fe55052 100644 --- a/payloads/libpayload/curses/menu/m_new.c +++ b/payloads/libpayload/curses/menu/m_new.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_new.c,v 1.21 2010/01/23 21:20:11 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : MENU* _nc_new_menu(SCREEN*, ITEM **items) -| +| | Description : Creates a new menu connected to the item pointer | array items and returns a pointer to the new menu. | The new menu is initialized with the values from the @@ -90,9 +90,9 @@ NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : MENU *new_menu(ITEM **items) -| +| | Description : Creates a new menu connected to the item pointer | array items and returns a pointer to the new menu. | The new menu is initialized with the values from the @@ -109,10 +109,10 @@ new_menu(ITEM ** items) #endif /*--------------------------------------------------------------------------- -| Facility : libnmenu -| Function : int free_menu(MENU *menu) -| -| Description : Disconnects menu from its associated item pointer +| Facility : libnmenu +| Function : int free_menu(MENU *menu) +| +| Description : Disconnects menu from its associated item pointer | array and frees the storage allocated for the menu. | | Return Values : E_OK - success diff --git a/payloads/libpayload/curses/menu/m_pad.c b/payloads/libpayload/curses/menu/m_pad.c index caa2f9e207..379ce7cfc1 100644 --- a/payloads/libpayload/curses/menu/m_pad.c +++ b/payloads/libpayload/curses/menu/m_pad.c @@ -48,11 +48,11 @@ MODULE_ID("$Id: m_pad.c,v 1.12 2010/01/23 21:20:10 tom Exp $") } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_pad(MENU* menu, int pad) -| +| | Description : Set the character to be used to separate the item name -| from its description. This must be a printable +| from its description. This must be a printable | character. | | Return Values : E_OK - success @@ -78,9 +78,9 @@ set_menu_pad(MENU * menu, int pad) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int menu_pad(const MENU *menu) -| +| | Description : Return the value of the padding character | | Return Values : The pad character diff --git a/payloads/libpayload/curses/menu/m_pattern.c b/payloads/libpayload/curses/menu/m_pattern.c index 1764d05fbc..ebede0a190 100644 --- a/payloads/libpayload/curses/menu/m_pattern.c +++ b/payloads/libpayload/curses/menu/m_pattern.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_pattern.c,v 1.16 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : char *menu_pattern(const MENU *menu) -| +| | Description : Return the value of the pattern buffer. | | Return Values : NULL - if there is no pattern buffer allocated @@ -60,9 +60,9 @@ menu_pattern(const MENU * menu) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_pattern(MENU *menu, const char *p) -| +| | Description : Set the match pattern for a menu and position to the | first item that matches. | diff --git a/payloads/libpayload/curses/menu/m_req_name.c b/payloads/libpayload/curses/menu/m_req_name.c index cad8758020..50c0c68c50 100644 --- a/payloads/libpayload/curses/menu/m_req_name.c +++ b/payloads/libpayload/curses/menu/m_req_name.c @@ -63,9 +63,9 @@ static const char *request_names[MAX_MENU_COMMAND - MIN_MENU_COMMAND + 1] = #define A_SIZE (sizeof(request_names)/sizeof(request_names[0])) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : const char * menu_request_name (int request); -| +| | Description : Get the external name of a menu request. | | Return Values : Pointer to name - on success @@ -85,9 +85,9 @@ menu_request_name(int request) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int menu_request_by_name (const char *str); -| +| | Description : Search for a request with this name. | | Return Values : Request Id - on success diff --git a/payloads/libpayload/curses/menu/m_scale.c b/payloads/libpayload/curses/menu/m_scale.c index 068a1cc8c5..26a560e757 100644 --- a/payloads/libpayload/curses/menu/m_scale.c +++ b/payloads/libpayload/curses/menu/m_scale.c @@ -40,11 +40,11 @@ MODULE_ID("$Id: m_scale.c,v 1.10 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int scale_menu(const MENU *menu) -| +| | Description : Returns the minimum window size necessary for the -| subwindow of menu. +| subwindow of menu. | | Return Values : E_OK - success | E_BAD_ARGUMENT - invalid menu pointer diff --git a/payloads/libpayload/curses/menu/m_sub.c b/payloads/libpayload/curses/menu/m_sub.c index 27123586bc..4bb373f3f2 100644 --- a/payloads/libpayload/curses/menu/m_sub.c +++ b/payloads/libpayload/curses/menu/m_sub.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_sub.c,v 1.12 2010/01/23 21:20:11 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_sub(MENU *menu, WINDOW *win) -| +| | Description : Sets the subwindow of the menu. | | Return Values : E_OK - success @@ -81,9 +81,9 @@ set_menu_sub(MENU * menu, WINDOW *win) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : WINDOW* menu_sub(const MENU *menu) -| +| | Description : Returns a pointer to the subwindow of the menu | | Return Values : NULL on error, otherwise a pointer to the window diff --git a/payloads/libpayload/curses/menu/m_userptr.c b/payloads/libpayload/curses/menu/m_userptr.c index a7359c99d0..67d6ecd425 100644 --- a/payloads/libpayload/curses/menu/m_userptr.c +++ b/payloads/libpayload/curses/menu/m_userptr.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_userptr.c,v 1.17 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_userptr(MENU *menu, void *userptr) -| +| | Description : Set the pointer that is reserved in any menu to store | application relevant informations. | @@ -57,9 +57,9 @@ set_menu_userptr(MENU * menu, void *userptr) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void *menu_userptr(const MENU *menu) -| +| | Description : Return the pointer that is reserved in any menu to | store application relevant informations. | diff --git a/payloads/libpayload/curses/menu/m_win.c b/payloads/libpayload/curses/menu/m_win.c index 5ddb1af9d3..d025c1bc46 100644 --- a/payloads/libpayload/curses/menu/m_win.c +++ b/payloads/libpayload/curses/menu/m_win.c @@ -40,9 +40,9 @@ MODULE_ID("$Id: m_win.c,v 1.17 2010/01/23 21:20:11 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_win(MENU *menu, WINDOW *win) -| +| | Description : Sets the window of the menu. | | Return Values : E_OK - success @@ -81,9 +81,9 @@ set_menu_win(MENU * menu, WINDOW *win) } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : WINDOW* menu_win(const MENU*) -| +| | Description : Returns pointer to the window of the menu | | Return Values : NULL on error, otherwise pointer to window diff --git a/payloads/libpayload/curses/menu/menu.h b/payloads/libpayload/curses/menu/menu.h index 67396f7637..1fdd9e795d 100644 --- a/payloads/libpayload/curses/menu/menu.h +++ b/payloads/libpayload/curses/menu/menu.h @@ -67,18 +67,18 @@ typedef struct unsigned short length; } TEXT; -typedef struct tagITEM +typedef struct tagITEM { TEXT name; /* name of menu item */ - TEXT description; /* description of item, optional in display */ + TEXT description; /* description of item, optional in display */ struct tagMENU *imenu; /* Pointer to parent menu */ - void *userptr; /* Pointer to user defined per item data */ - Item_Options opt; /* Item options */ + void *userptr; /* Pointer to user defined per item data */ + Item_Options opt; /* Item options */ short index; /* Item number if connected to a menu */ short y; /* y and x location of item in menu */ short x; bool value; /* Selection value */ - + struct tagITEM *left; /* neighbor items */ struct tagITEM *right; struct tagITEM *up; @@ -88,7 +88,7 @@ typedef struct tagITEM typedef void (*Menu_Hook)(struct tagMENU *); -typedef struct tagMENU +typedef struct tagMENU { short height; /* Nr. of chars high */ short width; /* Nr. of chars wide */ @@ -103,14 +103,14 @@ typedef struct tagMENU short itemlen; /* Length of one item */ short spc_desc; /* Spacing for descriptor */ short spc_cols; /* Spacing for columns */ - short spc_rows; /* Spacing for rows */ + short spc_rows; /* Spacing for rows */ char *pattern; /* Buffer to store match chars */ short pindex; /* Index into pattern buffer */ WINDOW *win; /* Window containing menu */ WINDOW *sub; /* Subwindow for menu display */ WINDOW *userwin; /* User's window */ WINDOW *usersub; /* User's subwindow */ - ITEM **items; /* array of items */ + ITEM **items; /* array of items */ short nitems; /* Nr. of items in menu */ ITEM *curitem; /* Current item */ short toprow; /* Top row of menu */ |