/*  001  20-Apr-87  menu.h

        Copyright (c) 1987 by Blue Sky Software.  All rights reserved.
*/

/* menu selection entry structure */

typedef struct menu_selection {
   char *choice;
   char *prompt;
   int (*func)();
   struct menu_selection *sub_menu;
} MENU;

/* menu state control block */

#define MAX_MENU_SELECTIONS 20

typedef struct {
   MENU *current_menu;
   int number_selections;
   int current_selection;
   struct {
      unsigned char position;
      unsigned char length;
   } selection[MAX_MENU_SELECTIONS];
} MENU_STATE;

/* function declaration stuff */

#define ALTCALL pascal         /* alternate calling method reduces overhead */

#ifdef LINT_ARGS
void ALTCALL menu_save(void);
void ALTCALL menu_restore(void);
void ALTCALL menu_init(void);
void ALTCALL menu_advance(void);
void ALTCALL menu_backup(void);
int  ALTCALL menu_do_char(int);
void ALTCALL menu_do_current(void);
#else
void ALTCALL menu_save();
void ALTCALL menu_restore();
void ALTCALL menu_init();
void ALTCALL menu_advance();
void ALTCALL menu_backup();
int  ALTCALL menu_do_char();
void ALTCALL menu_do_current();
#endif