Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

menu_items(3) [netbsd man page]

MENU_ITEMS(3)						   BSD Library Functions Manual 					     MENU_ITEMS(3)

NAME
item_count, menu_items, set_menu_items -- attach items to menus or check correspondences LIBRARY
Curses Menu Library (libmenu, -lmenu) SYNOPSIS
#include <menu.h> int item_count(MENU *menu); ITEMS ** menu_items(MENU *menu); int set_menu_items(MENU *menu, ITEM **items); DESCRIPTION
The item_count() menu function returns the number of items currently attached to the menu passed. The menu_items() function returns a pointer to an array of item pointers that represent the menu items currently attached to the given menu. Apart from using new_menu() (see menu_new(3)) menu items may be attached to a menu by calling set_menu_items() any items currently attached to the menu will be detached and the NULL terminated array of new items will be attached to the menu. RETURN VALUES
Any function returning a string pointer will return NULL if an error occurs. Functions returning an integer will return one of the follow- ing: E_OK The function was successful. E_POSTED The menu is already posted. E_CONNECTED An item was already connected to a menu. SEE ALSO
curses(3), menus(3) NOTES
The header <menu.h> automatically includes both <curses.h> and <eti.h>. BSD
September 10, 1999 BSD

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.10 31 Dec 1996 menu_items(3CURSES)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sub menu's

I have designed a script menu, but I would like to to create sub menus e.g. I have my normal menu, then have a few options, and I for example choose option 2 and I would like it to take me to a whole new page (well, clear the screen) then allow me to choose from 5/6 options, which are functional.... (20 Replies)
Discussion started by: Makaveli.2003
20 Replies

2. UNIX for Dummies Questions & Answers

modifieing the .fwmrc

i have a prob with the .fwmrc - file. i wanted to add an entry to the 'applications'-menu. so i modified the menu in the .twmrc . i added a function to the menu, that opened an xterm. it looks like this: !"xterm&" but that's not all i want. i also want to modifie the bg and the fg -... (3 Replies)
Discussion started by: pink_goblin
3 Replies

3. UNIX for Dummies Questions & Answers

switching between machines

I work for a local authority, and have been asked to extend a project I recently worked on currently there are two (2) menus in operation each menu allows us to allow or deny access to users the problem the menus are on seperate machines (Iwant to make these menus sub menus) I want to... (1 Reply)
Discussion started by: w33man
1 Replies

4. Shell Programming and Scripting

Dynamic select with multiple word menu items

Hello all, I'm developing a deployment script at work and at one point it would need to display something like this: Which version of ADMIN would you like to deploy? 1) 1.0.0 (store1, 10 Jan 2004) 2) 1.0.1 (store1, 20 Jun 2004) 3) 1.0.2 (store1, 15 Jul 2004) Select a version : I know... (5 Replies)
Discussion started by: domivv
5 Replies

5. Shell Programming and Scripting

using fmli to create menu's

I am currently having a problem creating a dynamic Menu that reads in from a file and appends this Menu list with an exit menu item. the syntax I am using to create the dynamic Menu is menu="$ARG1 Host names" `cat Hosts.data | regex '^(''.*)$0$' ' name="$m0" action=open... (2 Replies)
Discussion started by: craigmckeeman
2 Replies

6. UNIX for Advanced & Expert Users

Menu Driven UNIX Admin

I need to have a script that can do an automated IPL function (how to reboot the box). I think ‘reboot’ would do the trick. However, how would I go about doing it, for example if the user states from a menu script that I would like to reboot now. The problem is when I do the ‘reboot’ command I... (6 Replies)
Discussion started by: ad4m88
6 Replies

7. Shell Programming and Scripting

Interactive Array Menu

This should be simple, but i haven't done it before... KSH I am reading a file into an array and currently displaying the values to the screen. What I need to do is to display a subset of those values, likely numbered, and prompt the user to select one. When they enter the number, it... (2 Replies)
Discussion started by: gecko2424
2 Replies

8. Shell Programming and Scripting

Menu help with array selection

Hi there all I got the following I got multiple arrays named for example STAT_AAAA STAT_AAAB STAT_AAAC STAT_AAAD Now what I want I have chosen an option in a menu to select 1 but I dont want to write for all the same thing so I made it a signle one now what I want is to get STAT_ and... (6 Replies)
Discussion started by: draco
6 Replies

9. Shell Programming and Scripting

UniX Process not getting logout.

Hi, We have UNIX menu. when we exit the menu the processes are not getting log out. please suggest me how to log out the process after exit from the UNIX Menu. Regards, laknar. (3 Replies)
Discussion started by: laknar
3 Replies

10. AIX

Menu base AIX script

Hi, I am trying to create a menu on AIX systen for operators in our office. Please suggest how can I loop back to menu by pressing any key from a online running file. For example I can view the Database alert log file by tail -f command but how should I loop back to menu again. If I press <ctrl... (1 Reply)
Discussion started by: dwiravi
1 Replies

11. UNIX for Advanced & Expert Users

Shell menus And Oracle

Dear All, Kindly suggest on how should i proceed with the following requirement I need to develop an interactive shell script menu which would enable the user to inquire the value of a column based on a key value . The output can be more records.. Also is it possible to do the following 1)... (2 Replies)
Discussion started by: ksm
2 Replies

12. Shell Programming and Scripting

Question on returning back a level with menus

Hi Agian Sorry for all these questions...: Last one for a whie, I promise This is an example of a menu script I am using. It works OK...when I get to the 2nd menu level, if the command is issued or canceled, I would like to go back to the first menu (# MAIN SECTION) This is NOT the... (7 Replies)
Discussion started by: olearydc
7 Replies

13. Shell Programming and Scripting

How to automate user menu selections?

Hello all, I am sort of new to Shell programming and to this forum. I want to create a script that auto selects menu options. lets say I have a menu. MAIN MENU 1.) opt1 2.)opt2 3.)opt3 I want the script to automatically select option 1. (6 Replies)
Discussion started by: gerry8a
6 Replies

14. Shell Programming and Scripting

Removing duplicate items from an array

Hello Experts, I am trying to write a shell script to find duplicate items in an array, this is what i have tried : #!/bin/bash echo "This is another sample Progg to remove duplicate items from an array" echo "How many number do you want to insert" read n for (( i=0; i<$n; i++ )) do ... (5 Replies)
Discussion started by: mukulverma2408
5 Replies