#define MAX_MENU_DEPTH 8
typedef struct menu_arg {
- char *ma_doc; /* Short doc for completion */
- char *ma_prompt; /* For prompting in menu */
-} Menu_Arg;
+ char *ma_doc; /* Short doc for completion */
+ char *ma_prompt; /* For prompting in menu */
+} Menu_Arg;
typedef struct menu_line {
- int (*ml_function) ();
- struct menu *ml_submenu;
- int ml_argc;
- struct menu_arg ml_args[MAX_ARGC];
-} Menu_Line;
+ int (*ml_function)();
+ struct menu *ml_submenu;
+ int ml_argc;
+ struct menu_arg ml_args[MAX_ARGC];
+} Menu_Line;
#define ml_doc ml_args[0].ma_prompt
#define ml_command ml_args[0].ma_doc
typedef struct menu {
- int (*m_entry) ();
- int (*m_exit) ();
- char *m_title;
- int m_length;
- struct menu_line m_lines[MAX_LINES];
-} Menu;
+ int (*m_entry)();
+ int (*m_exit)();
+ char *m_title;
+ int m_length;
+ struct menu_line m_lines[MAX_LINES];
+} Menu;
/* Return codes for Do_menu */
/* These should also be used by functions called from Do_menu */
/* Macros for initializing menu lines */
#define NULLFUNC ((int (*)()) 0)
-#define NULLMENU ((struct menu *) 0)
+#define NULLMENU NULL
#define SUBMENU(cmd, doc, menu) { NULLFUNC, menu, 1, { { cmd, doc } } }
#define SIMPLEFUNC(cmd, doc, func) { func, NULLMENU, 1, { { cmd, doc } } }