/**********************                                       Michael Campbell
 * File: COMMON.DEF   *                                         26 Apr 2005
 **********************/

/* Literal definitions common to the entirety of VE                         */

#define begin {
#define end   }
#define then 

#define TRUE                  1
#define FALSE                 0

#define FOREVER               while (TRUE)

#define E_OK                  0         /* VE exception codes                */
#define E_UNKNOWN_CMD         1
#define E_MEM                 2
#define E_OPEN_ERROR          3
#define E_FN_TOO_LARGE        4
#define E_LIST_ERROR          5
#define E_EOL                 6
#define E_NO_FILE             7
#define E_BAD_FILE            8
#define E_UNCONFIRMED         9
#define E_INVALID_SELECTION   10
#define E_NO_REPLACEMENT_FILE 100

#define EOL                   NULL      /* End of list                       */
#define NIL_STRING            NULL
#define IDLE                  0         /* Idle state                        */

#define M_INSERT              0         /* VE keyboard modes                 */
#define M_OVERWRITE           1
#define M_COMMAND             2
#define M_NULL                99

#define MIN_FN_FIELD_WIDTH    26        /* Minimum width for filename field  */
#define MODE_FIELD_WIDTH      9         /* Field width for VE mode display   */
#define MSG_FIELD_WIDTH       40        /* Field width for ve_msg messages   */
#define ERR_FIELD_WIDTH       40        /* Field width for error messages    */

#define RS_TRANSPARENT        0         /* states of the read_char state     */
#define RS_LEARNING           1         /* machine                           */
#define RS_MACRO              2
#define MAX_MACRO_SIZE        512       /* Max chars recordable in a macro   */

#define P_FILE                0
#define P_FIND                1
#define P_SUBSTITUTE          2

#define DES_SIZE              sizeof(struct data_desc)  /* Size of data desc */

#define NUM_CMDS              60        /* Number of commands in VE          */
#define MAX_LINE_SIZE         384       /* Maximum size of a line            */
#define MAX_OPEN_FILES        256       /* Maximum number of open files      */

#define WRAP_MARKER           0x01      /* The marker used by text wrapping  */

typedef int                   BOOL;

