menu_item_new(3CURSES) Curses Library Functions menu_item_new(3CURSES)NAME
menu_item_new, new_item, free_item - create and destroy menus items
SYNOPSIS
cc [ flag... ] file... -lmenu -lcurses [ library... ]
#include <menu.h>
ITEM *new_item(char *name, char *desc);
int free_item(ITEM *item);
DESCRIPTION
new_item() creates a new item from name and description, and returns a pointer to the new item.
free_item() frees the storage allocated for item. Once an item is freed, the user can no longer connect it to a menu.
RETURN VALUES
new_item() returns NULL on error.
free_item() returns one of the following:
E_OK The routine returned successfully.
E_SYSTEM_ERROR System error.
E_BAD_ARGUMENT An incorrect argument was passed to the routine.
E_CONNECTED One or more items are already connected to another menu.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO curses(3CURSES), menus(3CURSES), attributes(5)NOTES
The header <menu.h> automatically includes the headers <eti.h> and <curses.h>.
SunOS 5.10 31 Dec 1996 menu_item_new(3CURSES)
Check Out this Related Man Page
menu_items(3CURSES) Curses Library Functions menu_items(3CURSES)NAME
menu_items, set_menu_items, item_count - connect and disconnect items to and from menus
SYNOPSIS
cc [ flag... ] file... -lmenu-lcurses [ library... ]
#include <menu.h>
int set_menu_items(MENU *menu, ITEM **items);
ITEM **menu_items(MENU *menu);
int item_count(MENU *menu);
DESCRIPTION
set_menu_items() changes the item pointer array connected to menu to the item pointer array items.menu_items() returns a pointer to the
item pointer array connected to menu.item_count() returns the number of items in menu.
RETURN VALUES
menu_items() returns NULL on error.
item_count() returns -1 on error.
set_menu_items() returns one of the following:
E_OK The routine returned successfully.
E_SYSTEM_ERROR System error.
E_BAD_ARGUMENT An incorrect argument was passed to the routine.
E_POSTED The menu is already posted.
E_CONNECTED One or more items are already connected to another menu.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO curses(3CURSES), menus(3CURSES), attributes(5)NOTES
The header <menu.h> automatically includes the headers <eti.h> and <curses.h>.
SunOS 5.11 31 Dec 1996 menu_items(3CURSES)
So, I've been told and heard a million times that malloc and free are expensive calls to be avoided. So many times I avoid malloc by reusing already allocated memory blocks. Store them on free lists somewhere myself and don't call free when I know malloc will be called very shortly thereafter.
... (6 Replies)
I have a field MPN-BANK-NUMBERO:006,00:N in a file FILE1
How can i display the length of the Bank Number.Any idea ?
The output shud take the following format
FILE 1 6
Where 1 is the starting position and 6 is the Ending position. (9 Replies)
We have an old ProLiant ML370 server (10-15 years old) running SCO (version yet to be confirmed), with a single bespoke Cobol app. The server is failing and I need to get the app up and running on new hardware or cloud.
I've supported ProLiant servers running Windows for many years but have... (12 Replies)