Article View: comp.sys.amiga.tech
Article #1871char causes guru
From: Dale Larson
Date: Fri, 27 Oct 1989 13:20
Date: Fri, 27 Oct 1989 13:20
30 lines
1395 bytes
1395 bytes
The following 10-line code fragment gives me Guru #3 when c is a char, but
works just fine with c as an int. I've had the same result with 32-bit ints
and 16-bit ints under Manx3.6a and under Manx4.9a BETA.
Can anyone explain this GURU? I would be eternally greatful!!!
(Almost forgot -- according to SDB and the messages printed around it,
the guru is on the while statement, and I can isolate it to just the
Message = GetMsg part)
BOOL BSGet(char *buffer, int len)
{
register struct IntuiMessage *Message;
register int index = 0;
char c; /* If this is changed to int, it works!!! */
while (index < len-1)
{
puts("about to GetMsg(W->UserPort)");
while( (Message = (struct IntuiMessage *)
GetMsg(W->UserPort))==NULL)
WaitPort(W->UserPort);
puts("did GetMsg ok...");
...
--
A lack of prior planning on the part of any programmer
always constitutes an emergency.
Digital Teddy Bear dlarson@blake.acs.washington.edu
Technical Details
Message-ID:
<4224@blake.acs.washington.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!swrinde!ucsd!ogccse!blake!dlarsonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!swrinde!ucsd!ogccse!blake!dlarson From: dlarson@blake.acs.washington.edu (Dale Larson) Newsgroups: comp.sys.amiga.tech Subject: char causes guru Message-ID: <4224@blake.acs.washington.edu> Date: 27 Oct 89 13:20:33 GMT Organization: The Evergreen State College, WA Lines: 29