1: /***********************************************************
2: * Program: CMENU/RMENU Menu Compiler
3: * Written by: Leor Zolman, 11/90
4: *
5: * Module: cmenu.h -- master header file
6: *
7: * This include file contains definitions common to both
8: * the cmenu and rmenu programs.
9: ***********************************************************/
10:
11: #include <stdio.h>
12:
13: #define VERSION "1.2 (10/7/91)"
14:
15: /************** System-dependent stuff: *******************/
16:
17: #if __STDC__ || XENIX
18: # define Void void
19: #else
20: # define Void int
21: #endif
22:
23: /******************* Maximum sizes/lengths: ***************/
24:
25: #define MAX_PATH 30
26: #define MAX_MENUS 25
27: #define MAX_NEST 3
28: #define MAX_TXTWID 60
29: #define MAX_ITEMS 36
30: #define MAX_CMD 130
31: #define MAX_HELP 79
32: #define MAX_NAME 20
33:
34: /****************** Magic constants: *********************/
35:
36: #define DEFAULT 0
37: #define YES 1
38: #define NO 2
39:
40: #define ERROR (-1)
41:
42: /******************* Nextitem types: **********************/
43:
44: #define NXT_FIRST 1
45: #define NXT_LAST 2
46: #define NXT_NEXT 3
47: #define NXT_DIRECT 4
48:
49: /******************* Action types: ************************/
50:
51: #define ACT_NONE 0
52: #define ACT_CMND 1
53: #define ACT_LMENU 2
54: #define ACT_EMENU 3
55: #define ACT_EXIT 4
56:
57: /******************* typedefs: ****************************/
58:
59: typedef char BOOL;
60:
61: typedef struct menu {
62: char title[MAX_TXTWID];
63: char path[MAX_PATH];
64: int nitems;
65: char lign;
66: int columns;
67: int spacing;
68: int widest;
69: char escape;
70: } MENU;
71:
72: typedef struct item {
73: char text[MAX_TXTWID];
74: char path[MAX_PATH];
75: char action[MAX_CMD];
76: char help[MAX_HELP];
77: char pre_clear,
78: post_clear,
79: prompt;
80: char acttyp;
81: int lmenunum;
82: char nextcode;
83: int nextitem;
84: } ITEM;
/* End of File */