/*
 * Source generated with ARexxBox 1.12 (May 18 1993)
 * which is Copyright (c) 1992,1993 Michael Balzer
 */

#include <exec/types.h>
#include <dos/dos.h>
#include <rexx/storage.h>

#define NO_GLOBALS
#include "MPMorph.h"

#define RESINDEX(stype) (((long) &((struct stype *)0)->res) / sizeof(long))

char	RexxPortBaseName[80] = "MPM";
char	*rexx_extension = "MPM";

struct rxs_command rxs_commandlist[] =
{
	{ "ADDGRID", "X/K/A/N,Y/K/A/N,FORCE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_addgrid, 1 },
	{ "ADDPOINT", "X1/K/A/N,Y1/K/A/N,X2/K/A/N,Y2/K/A/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_addpoint, 1 },
	{ "CLEAR", "FORCE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_clear, 1 },
	{ "DELETEPOINT", "X/K/A/N,Y/K/A/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_deletepoint, 1 },
	{ "EDITPOINTS", NULL, NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_editpoints, 1 },
	{ "EXITPOINTS", NULL, NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_exitpoints, 1 },
	{ "GETATTR", "NAME/A", "VALUE", RESINDEX(rxd_getattr), (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_getattr, 1 },
	{ "HELP", "COMMAND,PROMPT/S", "COMMANDDESC,COMMANDLIST/M", RESINDEX(rxd_help), (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_help, 1 },
	{ "LINKPOINTS", "X1/K/A/N,Y1/K/A/N,X2/K/A/N,Y2/K/A/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_linkpoints, 1 },
	{ "LOCKGUI", NULL, NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_lockgui, 1 },
	{ "MOVEPOINT", "X/K/A/N,Y/K/A/N,X1/K/A/N,Y1/K/A/N,X2/K/A/N,Y2/K/A/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_movepoint, 1 },
	{ "NEWPOINTS", "FORCE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_newpoints, 1 },
	{ "OPEN", "FILENAME/K,FORCE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_open, 1 },
	{ "OPENPOINTS", "FILENAME/K,FORCE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_openpoints, 1 },
	{ "QUIT", "FORCE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_quit, 1 },
	{ "SAVE", NULL, NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_save, 1 },
	{ "SAVEAS", "FILENAME/K,COPY/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_saveas, 1 },
	{ "SCALE", "X/K/A/N,Y/K/A/N,FORCE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_scale, 1 },
	{ "SETATTR", "NAME/A,VALUE/A", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setattr, 1 },
	{ "SETCURR", "N/A/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setcurr, 1 },
	{ "SETMAX", "N/A/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setmax, 1 },
	{ "SETMESSAGE", "MESSAGE/A", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setmessage, 1 },
	{ "SETSIZE", "X/K/A/N,Y/K/A/N,FORCE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setsize, 1 },
	{ "TRIANGULATE", "FORCE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_triangulate, 1 },
	{ "UNLINKPOINTS", "X1/K/A/N,Y1/K/A/N,X2/K/A/N,Y2/K/A/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_unlinkpoints, 1 },
	{ "UNLOCKGUI", NULL, NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_unlockgui, 1 },
	{ NULL, NULL, NULL, NULL, NULL }
};

int		command_cnt = 26;

static struct arb_p_link link0[] = {
	{"UNL", 1}, {"TRIANGULATE", 4}, {"S", 5}, {"QUIT", 16}, {"OPEN", 17}, {"NEWPOINTS", 19},
	{"MOVEPOINT", 20}, {"L", 21}, {"HELP", 24}, {"GETATTR", 25}, {"E", 26}, {"DELETEPOINT", 29},
	{"CLEAR", 30}, {"ADD", 31}, {NULL, 0} };

static struct arb_p_link link1[] = {
	{"OCKGUI", 2}, {"INKPOINTS", 3}, {NULL, 0} };

static struct arb_p_link link5[] = {
	{"ET", 6}, {"CALE", 13}, {"AVE", 14}, {NULL, 0} };

static struct arb_p_link link6[] = {
	{"SIZE", 7}, {"M", 8}, {"CURR", 11}, {"ATTR", 12}, {NULL, 0} };

static struct arb_p_link link8[] = {
	{"ESSAGE", 9}, {"AX", 10}, {NULL, 0} };

static struct arb_p_link link14[] = {
	{"AS", 15}, {NULL, 0} };

static struct arb_p_link link17[] = {
	{"POINTS", 18}, {NULL, 0} };

static struct arb_p_link link21[] = {
	{"OCKGUI", 22}, {"INKPOINTS", 23}, {NULL, 0} };

static struct arb_p_link link26[] = {
	{"XITPOINTS", 27}, {"DITPOINTS", 28}, {NULL, 0} };

static struct arb_p_link link31[] = {
	{"POINT", 32}, {"GRID", 33}, {NULL, 0} };

struct arb_p_state arb_p_state[] = {
	{-1, link0}, {24, link1}, {25, NULL}, {24, NULL}, {23, NULL},
	{15, link5}, {18, link6}, {22, NULL}, {20, link8}, {21, NULL},
	{20, NULL}, {19, NULL}, {18, NULL}, {17, NULL}, {15, link14},
	{16, NULL}, {14, NULL}, {12, link17}, {13, NULL}, {11, NULL},
	{10, NULL}, {8, link21}, {9, NULL}, {8, NULL}, {7, NULL},
	{6, NULL}, {4, link26}, {5, NULL}, {4, NULL}, {3, NULL},
	{2, NULL}, {0, link31}, {1, NULL}, {0, NULL}  };

