home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_01
/
cmenu.exe
/
CMENU.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-18
|
2KB
|
85 lines
/************************************************************
* Program: CMENU/RMENU Menu Compiler
* Written by: Leor Zolman, 11/90
*
* Module: cmenu.h -- master header file
*
* This include file contains definitions common to both
* the cmenu and rmenu programs.
************************************************************/
#include <stdio.h>
#define VERSION "1.2 (12/18/91)"
/************** System-dependent stuff: *********************/
#if __STDC__ || XENIX
# define Void void
#else
# define Void int
#endif
/******************** Maximum sizes/lengths: ****************/
#define MAX_PATH 30
#define MAX_MENUS 25
#define MAX_NEST 3
#define MAX_TXTWID 60
#define MAX_ITEMS 36
#define MAX_CMD 130
#define MAX_HELP 79
#define MAX_NAME 20
/****************** Magic constants: ************************/
#define DEFAULT 0
#define YES 1
#define NO 2
#define ERROR (-1)
/******************** Nextitem types: ***********************/
#define NXT_FIRST 1
#define NXT_LAST 2
#define NXT_NEXT 3
#define NXT_DIRECT 4
/********************** Action types: ***********************/
#define ACT_NONE 0
#define ACT_CMND 1
#define ACT_LMENU 2
#define ACT_EMENU 3
#define ACT_EXIT 4
/*********************** typedefs: **************************/
typedef char BOOL;
typedef struct menu {
char title[MAX_TXTWID];
char path[MAX_PATH];
int nitems;
char align;
int columns;
int spacing;
int widest;
char escape;
} MENU;
typedef struct item {
char text[MAX_TXTWID];
char path[MAX_PATH];
char action[MAX_CMD];
char help[MAX_HELP];
char pre_clear,
post_clear,
prompt;
char acttyp;
int lmenunum;
char nextcode;
int nextitem;
} ITEM;