Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

menu_userptr(3x) [opendarwin man page]

menu_userptr(3X)														  menu_userptr(3X)

NAME
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_userptr(3CURSES)					     Curses Library Functions					     menu_userptr(3CURSES)

NAME
menu_userptr, set_menu_userptr - associate application data with menus SYNOPSIS
cc [ flag... ] file... -lmenu -lcurses [ library... ] #include <menu.h> char *menu_userptr(MENU *menu); int set_menu_userptr(MENU *menu, char *userptr); DESCRIPTION
Every menu has an associated user pointer that can be used to store relevant information. set_menu_userptr() sets the user pointer of menu. menu_userptr() returns the user pointer of menu. RETURN VALUES
menu_userptr() returns NULL on error. set_menu_userptr() returns one of the following: E_OK The routine returned successfully. E_SYSTEM_ERROR System error. 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_userptr(3CURSES)
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 there..in 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