AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
MEMORY (3C} MEMORY (3C) Character movement is performed differently in different implementations. Thus overlapping moves may yield surprises. - 2-
MENU (3T) {AT&T UNIX PC only ) MENU ( 3T ) NAME menu - display and accept menus SYNOPSIS #include < menu.h > int menu(menu, op) menu_t *menu; int op; DESCRIPTION This routine manipulates a menu as determined by the operation code ( op ). If the op arg is M_BEGIN, the menu is initialized and displayed. If op is M_INPUT, user input is accepted. If op is M_END, the menu is terminated and removed from the display. If op is M_DESEL, all currently-selected items are de-selected before the menu is processed. These functions may be combined in many ways. By specifying (M_DESEL I M_BEGIN I M_INPUT I M_END), the caller creates a "pop-up" menu which is initialized (displayed), used for input, then removed. Generally, (M_BEGIN I M_INPUT) is used for the first call, M_INPUT for each subsequent interaction, and M_END when the menu is to be discarded. M_DESEL can be added to clear bad choices after an error. During the M_INPUT function, the user may point to items with the mouse or with the keyboard (arrows, Prev, Next, Beg, Home, End). The user may mark entries with the mouse or keyboard (Sleet, Mark), or may qualify one or more items by typing. The Cancl, Clear Line, Back Space, and Return keys perform their generic editing functions. For larger menus, the Roll and Page keys may be used to scroll through choices which do not fit in the prevailing window. All other keys, including Enter, are returned to the caller. The menu structure has the following form: typedef struct { char char char char char char char char char int track_t int int int mitem_t mitem_t *m_label; *m_title; *m_prompt; m_rows; m_cols; m_iwidth; m_iheight; m_fiags; m_lbuf[M_MAXLINE]; m_win; *m_track; m_oldwidth; m_oldheight; m_selcnt; *m_items; *m_curi; - 1 - /* menu label *I /* menu title *I /* menu prompt *I /* desired rows *I /* desired cols *I /* item width *I /* item height * I I* flags * I /* input buffer *I /* window pointer *I /* menu track list ptr *I /* last window width *I /* last window height *I /* count of # selected *I I* pointer to items *I /* current item *I
- Page 878 and 879: GETPWENT ( 3C ) GETPWENT ( 3C ) par
- Page 881 and 882: GETUT ( 3C ) GETUT ( 3C ) NAME getu
- Page 883 and 884: HSEARCH ( 3C ) HSEARCH ( 3C ) NAME
- Page 885 and 886: HYPOT ( 3M ) HYPOT (3M) NAME hypot
- Page 887: L3TOL (3C) L3TOL (3C) NAME 13tol, l
- Page 890 and 891: (�
- Page 893: LDFHREAD ( 3X ) LDFHREAD ( 3X ) NAM
- Page 897 and 898: LDLSEEK ( 3X ) LDLSEEK ( 3X ) NAME
- Page 899 and 900: LDOHSEEK ( 3X ) (not on PDP-11) LDO
- Page 901 and 902: LDOPEN{3X) LDOPEN { 3X) NAME ldopen
- Page 903 and 904: LDRSEEK ( 3X ) LDRSEEK ( 3X ) NAME
- Page 905: LDSHREAD ( 3X ) LDSHREAD ( 3X ) NAM
- Page 908 and 909: ,ry
- Page 910 and 911: � '"'"--
- Page 912 and 913: I!) r) ·--... .._ _ .. .
- Page 914 and 915: y I
- Page 916 and 917: LOCKF (3C) LOCKF (3C) F _LOCK and F
- Page 918 and 919: I� ' .... ._ .·
- Page 920 and 921: LSEARCH ( 3C ) LSEARCH ( 3C ) unsig
- Page 922 and 923: MALLOC (3C) MALLOC (3C) M_NLBLKS Se
- Page 924 and 925: MA THERR (3M) MATHERR (3M) } BESSEL
- Page 926 and 927: () . -�
- Page 930 and 931: MENU (3T) (AT&T UNIX PC only ) MENU
- Page 932 and 933: MENU (3T) (AT&T UNIX PC only ) mite
- Page 934 and 935: MENU (3T) (AT&T UNIX PC only ) FILE
- Page 936 and 937: MESSAGE ( 3T ) ( AT&T UNIX PC only
- Page 939: MONITOR ( 3C ) MONITOR ( 3C ) NAME
- Page 943 and 944: PASTE (3T) (AT&T UNIX PC only ) PAS
- Page 945 and 946: PASTE ( 3T ) ( AT&T UNIX PC only )
- Page 947: PERROR (3C) PERROR (3C) NAME perror
- Page 950 and 951: (� / I I I I I I I I I I I I I I
- Page 952 and 953: PRINTF (3S) PRINTF (3S) A field wid
- Page 955 and 956: PUTC ( 3S ) PUTC ( 3S ) NAME putc,
- Page 957: PUTENV (3C) PUTENV (3C) NAME putenv
- Page 960 and 961: ···- ·
- Page 962 and 963: I� ·-.---·
- Page 964 and 965: ' ' .} ' 1 . ' .____.,.:
- Page 966 and 967: � ·�
- Page 968 and 969: REGCMP {3X) REGCMP {3X) ( . . . ) P
- Page 970 and 971: SCANF(3S) u 0 X SCANF(3S) an unsign
- Page 973 and 974: � I SETBUF (3S) SETBUF (3S) NAME
- Page 975 and 976: SETJMP (3C) SETJMP ( 3C ) NAME setj
- Page 977 and 978: SINII ( 3M ) SINH ( 3M ) NAME sinh,
MENU (3T) {AT&T UNIX PC only ) MENU ( 3T )<br />
NAME<br />
menu - display and accept menus<br />
SYNOPSIS<br />
#include < menu.h ><br />
int menu(menu, op)<br />
menu_t *menu;<br />
int op;<br />
DESCRIPTION<br />
This routine manipulates a menu as determined by the operation<br />
code ( op ). If the op arg is M_BEGIN, the menu is initialized and<br />
displayed. If op is M_INPUT, user input is accepted. If op is<br />
M_END, the menu is terminated and removed from the display.<br />
If op is M_DESEL, all currently-selected items are de-selected<br />
before the menu is processed. These functions may be combined<br />
in many ways. By specifying<br />
(M_DESEL I M_BEGIN I M_INPUT I M_END), the caller creates<br />
a "pop-up" menu which is initialized (displayed), used for input,<br />
then removed. Generally, (M_BEGIN I M_INPUT) is used for the<br />
first call, M_INPUT for each subsequent interaction, and M_END<br />
when the menu is to be discarded. M_DESEL can be added to<br />
clear bad choices after an error.<br />
During the M_INPUT function, the user may point to items with<br />
the mouse or with the keyboard (arrows, Prev, Next, Beg, Home,<br />
End). The user may mark entries with the mouse or keyboard<br />
(Sleet, Mark), or may qualify one or more items by typing. The<br />
Cancl, Clear Line, Back Space, and Return keys perform their<br />
generic editing functions. For larger menus, the Roll and Page<br />
keys may be used to scroll through choices which do not fit in the<br />
prevailing window.<br />
All other keys, including Enter, are returned to the caller.<br />
The menu structure has the following form:<br />
typedef struct<br />
{<br />
char<br />
char<br />
char<br />
char<br />
char<br />
char<br />
char<br />
char<br />
char<br />
int<br />
track_t<br />
int<br />
int<br />
int<br />
mitem_t<br />
mitem_t<br />
*m_label;<br />
*m_title;<br />
*m_prompt;<br />
m_rows;<br />
m_cols;<br />
m_iwidth;<br />
m_iheight;<br />
m_fiags;<br />
m_lbuf[M_MAXLINE];<br />
m_win;<br />
*m_track;<br />
m_oldwidth;<br />
m_oldheight;<br />
m_selcnt;<br />
*m_items;<br />
*m_curi;<br />
- 1 -<br />
/* menu label *I<br />
/* menu title *I<br />
/* menu prompt *I<br />
/* desired rows *I<br />
/* desired cols *I<br />
/* item width *I<br />
/* item height * I<br />
I* flags * I<br />
/* input buffer *I<br />
/* window pointer *I<br />
/* menu track list ptr *I<br />
/* last window width *I<br />
/* last window height *I<br />
/* count of # selected *I<br />
I* pointer to items *I<br />
/* current item *I