Hello,
I am trying to write an ARexx interface using Reaction's arexx.class under AmigaOS 3.9. Due to an extreme lack of examples, I am unable to
compare what I have done to something working. My code compiles OK, but whenever I run it, the ARexx port is not set up because it claims that I have not set the commandlist up properly. Code snippit below:
-----SNIP--------------------------------------
struct ARexxCmd arexxCmdList[] =
{
{"QUIT", AREXX_QUIT, (void(*)())arexxQuit,
"",
NULL, NULL, NULL, NULL, NULL},
{NULL}
};
void setupArexx(void)
{
ULONG retVal;
struct EasyStruct es;
sim.obj[OBJ_AREXX] = ARexxObject,
AREXX_HostName, AREXX_HOSTNAME,
AREXX_NoSlot, TRUE,
AREXX_Commands, arexxCmdList,
AREXX_ErrorCode, &retVal,
ARexxEnd;
if(retVal)
{
es.es_StructSize = sizeof(struct EasyStruct);
es.es_Flags = 0;
es.es_Title = SIM_TITLE;
es.es_TextFormat = AREXX_FAIL;
es.es_GadgetFormat = "Oh... OK";
(void)EasyRequest(NULL, &es, NULL, arexxFailMsg[retVal]);
}
else
(void)GetAttr(AREXX_SigMask, sim.obj[OBJ_AREXX],
&(sim.arexxSignal));
return;
}
void killArexx(void)
{
if(sim.obj[OBJ_AREXX])
DisposeObject(sim.obj[OBJ_AREXX]);
return;
}
void arexxQuit(struct ARexxCmd *cmd, struct RexxMsg *msg)
{
/* Not yet written, obviously, but I will set cmd & msg params to be
registers as mentioned in arexx_cl.doc */
return;
}
-----SNIP---------------------------------
Can someone tell me where I am going wrong when setting up my
AREXX_Commands pointer/structure array, or if the class is just dodgy and I
should revert to the traditional method?
Any help would be great. I would like to use the newer methods if possible.