added read applescript command

This commit is contained in:
chombier 2001-03-30 15:48:41 +00:00
parent ef07f005e3
commit e6b206d59e
7 changed files with 20 additions and 4 deletions

View File

@ -327,6 +327,8 @@ void initmac( void)
FatalAlert(AE_PROBLEM_ERR, 0, 0);
if ((err = AEInstallEventHandler(kNCSACreatorSignature,'WaiT',MyHandleWaitUPP,0,FALSE)) != noErr)
FatalAlert(AE_PROBLEM_ERR, 0, 0);
if ((err = AEInstallEventHandler(kNCSACreatorSignature,'ReaD',MyHandleReadUPP,0,FALSE)) != noErr)
FatalAlert(AE_PROBLEM_ERR, 0, 0);
if ((err = AEInstallEventHandler(kNCSACreatorSignature,'susp',MyHandleSuspendUPP,0,FALSE)) != noErr)
FatalAlert(AE_PROBLEM_ERR, 0, 0);
if ((err = AEInstallEventHandler(kNCSACreatorSignature,'!sus',MyHandleUnSuspendUPP,0,FALSE)) != noErr)

View File

@ -1144,7 +1144,7 @@ void ConnectionDataEvent(short port)
i=WindByPort(port); /* BYU */
if (i<0) {return; } /* BYU */
if (TelInfo->ScrlLock || !screens[i].enabled) /* BYU LSC */
if (TelInfo->ScrlLock || (!screens[i].enabled && !screens[i].waWeHaveAppleEvent)) /* BYU LSC */
netputuev( CONCLASS, CONDATA, port,0);
else {
cnt = netread(port,gReadspace,gBlocksize); /* BYU LSC */
@ -1177,7 +1177,6 @@ void ConnectionDataEvent(short port)
cnt--;
st++;
}
if (/*screens[i].protocol != 4*/ true ) // ssh handles differently
parse( &screens[i], st, cnt); /* BYU LSC */
else {

View File

@ -388,7 +388,6 @@ void parse (struct WindRec *tw, unsigned char *st, short cnt)
*/
if (!tw->timing) {
if (tw->termstate == TEKTYPE) {
short i;
i = VGwrite( tw->curgraph,(char *) orig, st-orig); /* BYU LSC */
if (i < (st - orig)) {
@ -397,7 +396,6 @@ void parse (struct WindRec *tw, unsigned char *st, short cnt)
}
}
else if (tw->termstate == RASTYPE) {
short i;
i= VRwrite((char *) orig, st-orig); /* BYU LSC */
if (i <(st-orig)) {
@ -410,6 +408,12 @@ void parse (struct WindRec *tw, unsigned char *st, short cnt)
otpauto(tw, (char *) orig, st-orig);
if (tw->waWaiting)
handlewait(tw, (char *) orig, st-orig);
/* NONO */
else if (tw->waWeHaveAppleEvent)
handleread(tw, (char *) orig, st-orig);
/* NONO */
VSwritefast( tw->vs,(char *) orig,st-orig); /* BYU LSC - send to virtual VT102 */
}
}
@ -1127,3 +1131,13 @@ void handlewait(struct WindRec *tw, char *string, short len)
tempstring++;
}
}
void handleread(struct WindRec *tw, char *string, short len)
{
/* add 'string' to AppleEvent reply */
OSErr err = AEPutParamPtr(&tw->waAEReply, keyDirectObject, typeChar, string, len);
tw->waWeHaveAppleEvent = 0;
tw->enabled = tw->waWasEnabled;
AEResumeTheCurrentEvent(&tw->waAppleEvent, &tw->waAEReply,
MyHandleReadUPP, (err == noErr) ? 1 : 2);
}

View File

@ -11,3 +11,4 @@ void send_do(short port, short option);
void send_dont(short port, short option);
void otpauto(struct WindRec *, char *, short);
void handlewait(struct WindRec *, char *, short);
void handleread(struct WindRec *tw, char *string, short len);

Binary file not shown.

Binary file not shown.

Binary file not shown.