/*
 * P$MENU - Show single choice menu
 */

#ifdef DOCUMENTATION

title    p$menu   Display Single-Choice Menu
index             Display Single-Choice Menu

synopsis

	 char *action;    /* --> buffer to receive action str */
	 int maxlen;      /* Size of action string buffer */
	 int addopt;      /* TRUE = enable additional opt's */
	 char *msg1;      /* Message for line 23 or NULL */
	 char *msg2;      /* Message for line 24 or NULL */
	 int *stat;       /* --> 2 word status block */

	 p$menu(action, maxlen, addopt, msg1, msg2, stat)

description

	The p$menu directive displays a frame from the default static
	menu buffer. To display the Additional Options flag and return control
	to the user if he selects the Additional Options key, pass a non-zero
	character in the addopt variable.

author

	 Bob Denny

#endif

extern menu();

p$menu(action, maxlen, addopt, msg1, msg2, stat)
char *action;                           /* --> buffer to receive action str */
int maxlen;                             /* Size of action string buffer */
int addopt;                             /* TRUE = enable additional opt's */
char *msg1;                             /* Message for line 23 or NULL */
char *msg2;                             /* Message for line 24 or NULL */
int *stat;                              /* --> 2 word status block */
   {
   int actlen, m1len, m2len;

   m1len = strlen(msg1);
   m2len = strlen(msg2);
   call(menu, 10, stat, action, &maxlen, &actlen, 0, &addopt,
         msg1, &m1len, msg2, &m2len);
   action[actlen] = '\0';
   return(stat[0]);
   }
