🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #10333

Re: VANILLAKEYS and various other things

#10333
From: Chuck McManis
Date: Tue, 22 Nov 1988 00:00
43 lines
2357 bytes
Two problems that brian moffett is looking at and the solutions are
pretty general. 

1) VANILLAKEYS are just that, vanilla. No function keys, no help 
keys. I believe they are poorly defined and should be redefined but
that is up to jimm and company. 

The workaround is to use RAWKEYS and DeadKeyConvert() whose source
is around on Fish disks and various other places. Bryce Nesbitt
wrote an article for AmigaMail that had this information in it. 

2) The way he was reaping IntuiMessages was also incorrect, this will
definitely be one of the questions on the Intuition Merit Badge "test."

The key is that signals let you know when to look for messages, you then 
have to look for all messages that exist. Matt's code fragment was excellent, 
it is repeated (paraphrased?) here for completeness :

	WINDOWSIG = 1L << win->UserPort->mp_SigBit;
	SIGNALMASK = WINDOWSIG; /* Add any other signals to this mask */
	for (;;) {	/* for ever and ever */
		signals = Wait(SIGNALMASK);
		if ((signals & WINDOWSIG) != 0) {
			While ((msg = GetMessage(win->UserPort)) != NULL) {
				switch (msg->Class) {
					/* Process messages from Intuition */
				}
			ReplyMsg(msg); /* do this quickly */
			} /* fall through to check for other signals */
		} 
		if (/* check for each type of signal */) {
		}
	}	/* loop forever unless explicitly exit. */
	
The key features are that you wait first, this gives up the processor for
other tasks until something happens that your task should know about. Then
you process *all* of the messages waiting on your message port, and then you
*still* check to see if other signals were set. This allows one loop to 
process things like serial characters, window events, break signals  etc.

--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.
Technical Details
Message-ID: <78687@sun.uucp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!pepper!cmcmanis
References: <1732@scolex>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!pepper!cmcmanis
From: cmcmanis%pepper@Sun.COM (Chuck McManis)
Newsgroups: comp.sys.amiga.tech
Subject: Re: VANILLAKEYS and various other things
Keywords: function keys?
Message-ID: <78687@sun.uucp>
Date: 22 Nov 88 00:00:21 GMT
References: <1732@scolex>
Sender: news@sun.uucp
Reply-To: cmcmanis@sun.UUCP (Chuck McManis)
Organization: Sun Microsystems, Mountain View
Lines: 43