Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

menu_userptr(3x) [opendarwin man page]

menu_userptr(3X)														  menu_userptr(3X)

menu_userptr - associate application data with a menu item SYNOPSIS
#include <menu.h> int set_menu_userptr(MENU *menu, void *userptr); void *menu_userptr(const MENU *menu); DESCRIPTION
Every menu and every menu item has a field that can be used to hold application-specific data (that is, the menu-driver code leaves it alone). These functions get and set the menu user pointer field. RETURN VALUE
Except for menu_userptr (which returns NULL on error), each function returns one of the following: E_OK The routine succeeded. E_SYSTEM_ERROR System error occurred (see errno). SEE ALSO
curses(3X), menu(3X). NOTES
The header file <menu.h> automatically includes the header file <curses.h>. PORTABILITY
These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. The user pointer should be a void pointer. We leave it as a char pointer for SVr4 compatibility. AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. menu_userptr(3X)

Check Out this Related Man Page

menu_items(3X)															    menu_items(3X)

menu_items - make and break connections between items and menus SYNOPSIS
#include <menu.h> int set_menu_items(MENU *menu, ITEM **items); ITEM **menu_items(const MENU *menu); int item_count(const MENU *menu); DESCRIPTION
The function set_menu_items changes the item pointer array of the given menu. The array must be terminated by a NULL. The function menu_items returns the item array of the given menu. The function item_count returns the count of items in menu. RETURN VALUE
The function menu_items returns a pointer (which may be NULL). It does not set errno. The function item_count returns ERR (the general curses error return value) if its menu parameter is NULL. The function set_menu_items returns one of the following codes on error: E_OK The routine succeeded. E_BAD_ARGUMENT Routine detected an incorrect or out-of-range argument. E_NOT_CONNECTED No items are connected to the menu. E_POSTED The menu is already posted. E_SYSTEM_ERROR System error occurred (see errno). SEE ALSO
curses(3X), menu(3X). NOTES
The header file <menu.h> automatically includes the header file <curses.h>. PORTABILITY
These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. The SVr4 menu library documentation specifies the item_count error value as -1 (which is the value of ERR). AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. menu_items(3X)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shadow a user (pcany like connection)

Can anyone give me a clue as to where to begin on shadowing users. Often, I get there is an error, or a user just can't see on the screen where I am describing a particular function or menu item is. Is there a way I can backdoor in and type for them or at least be able to see their screen?????????? (2 Replies)
Discussion started by: Jim
2 Replies

2. UNIX for Dummies Questions & Answers

Can anyone help

This is how far I have got, but it still doesnt do what it is supposed to The code is to be written on KornShell and has to be done command line and menu form, im trying to do the menu code first then the command line will be simpler. The question is: for each file in the directory... (1 Reply)
Discussion started by: madtim
1 Replies

3. Programming

code help

why does this code present me the menu twice everytime i chose an option? i think it has something to do with the while loop. #include <stdio.h> void main(){ char choice; int enter =1; while(enter ==1){ printf("choose from options\n"); printf("a do something\n");... (3 Replies)
Discussion started by: bb00y
3 Replies

4. UNIX for Dummies Questions & Answers

running yast

At the end of the installation of my video card driver's, there is this note on the isntruction from intel 1. Run SuSE's own configurator called 'YAST' under System from SuSE application broswer menu a. Select the 'Hardware' icon b. Select the 'Graphics Card and Monitor' icon c. Select... (3 Replies)
Discussion started by: cherupop
3 Replies

5. UNIX for Advanced & Expert Users

Change a users primary group after login

When users login, they are directed to menu (aix script). The menu enables the user to choose an environment to work in. Each environment has a different group id. When a user chooses a menu option, I want to change his primary group to that specific environment's group id. Is this at all possible... (3 Replies)
Discussion started by: terrym
3 Replies

6. Shell Programming and Scripting

Need help with script for menu

I'm working on a script for a basic menu with four options. The first option for the menu asks a user to put in anyone's user name and is supposed to display the user's home directory. If a user does not enter a name, then their own home directory should be displayed. The second menu option is... (0 Replies)
Discussion started by: sinjin
0 Replies

7. UNIX for Advanced & Expert Users

2007/11/09! 03.56.29! E00549! Enq_pty! Tty.c! 119! PID (22597)! Operations ioctl (TCS

helo, i got accessing system from putty. a user has had System Telnet up (for hours at a time) and been running various commands from the CUI menu.(its just client application) The following message appears over and over again in the account log: 2007/11/09! 03.56.29! E00549! Enq_pty! Tty.c!... (0 Replies)
Discussion started by: amitpansuria
0 Replies

8. Shell Programming and Scripting

Presenting the user a menu in Bash ...

Hello, I am trying to write a bash script function to present the user a menu of options. The following is what I have so far: function MainMenu { while ] do echo "--------------------------------------------------------------------------------" echo... (4 Replies)
Discussion started by: ckoeber
4 Replies

9. Shell Programming and Scripting

Validate an IP address - Return to menu

hi! I need a script that, among other things, presents a menu to the user, checks the user input for an IP address (in quad dotted notation), and then "redirects" (with sed) that IP address to the Firewall script. The script must check that all of the inputs are valid IP addresses (numeric,... (1 Reply)
Discussion started by: zetetic
1 Replies

10. UNIX for Dummies Questions & Answers

removing application from the unity menu

Hello I have removed wine but the symbols of it application were in the unity menu (though nothing happened when I clicked on them). How can I remove symbols from the unity menu? (1 Reply)
Discussion started by: programAngel
1 Replies

11. UNIX for Dummies Questions & Answers

application with menu

Hi, Actually i need to develop a bash script with menu features. For example a Title should be always there . under that some menu options will be each menu, submenus will be there. In order to build the script with menu features , which library is the preferable one in linux?... (1 Reply)
Discussion started by: pandeesh
1 Replies

12. Post Here to Contact Site Administrators and Moderators

Searching for "menu generator"

Hello. Happy new year for everybody. I would like to search for "menu generator" not for menu or generator. Is it possible ? I get an error : Array What is the meaning ? (5 Replies)
Discussion started by: jcdole
5 Replies

13. UNIX for Dummies Questions & Answers

Dynamic menu selection? Help..

Hi guys, i would like to create a program that allow user to show the information of certain thing such as network card. I would like the menu to be dynamic, for example: my computer system have 2 network card inserted at the moment, therefore the menu will have 2 choice for the user. eth0... (12 Replies)
Discussion started by: malfolozy
12 Replies

14. 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

15. Shell Programming and Scripting

Display user selction from bash menu

I am trying to display the text the user selects from a bash menu. The below will display the menu and allow the user to enter a number, but will not display the choice selected. bash while true do printf "\n please make a selection from the MENU \n ... (4 Replies)
Discussion started by: cmccabe
4 Replies