🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Port vs. MsgPort and other RKM oddities

#1815
From: Dale Larson
Date: Wed, 25 Oct 1989 00:59
70 lines
2986 bytes
/* sometimes I forget to feed the line-eater, but please don't quote that */

Here are the replies I've recieved so far in regards to Port vs. MsgPort:

-=-=-=-=-=-=-=-=-=-=-=--
From dillon@postgres.Berkeley.EDU Mon Oct 23 23:32:53 1989

	I've never heard of a 'Port' and suspect it is probably a
    typedef to a MsgPort.  I usually typedef MsgPort to PORT.

				-Matt
-=-=-=-=-=-=-=-=-=-=-=-=-

From rosenber@ra.abo.fi Tue Oct 24 00:07:28 1989

	Many C compilers allow you to use structures names that are not 
	defined so struct MsgPtr *port; will do or: struct Port *port; even if 
	the structure tags doesn't exist.

	Ofcourse if you try to reference fields in these structures you'll get
	an error message.

	So the use of struct Port may come from sloppy code. 

	Lattice has an option that gives errors for undefined structure tags.

--------
Robin Rosenberg

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

me:

Not only is Port and MsgPort confused, but so is CreateStdIO() and 
CreateExtIO().  Again, I can find no reference to CreateExtIO() in
the AutoDocs.  I guess this is one of the problems people are refering
to when they say the RKM's suck.  The check is in the mail to Rob Peck
for _Programmer's Guide_, so I will hopefully have some more useful
documentation.  I am sure that the problems with the RKM's are a result
of very early software and too too little time, but it would be nice
if C/A would have put a little bit of that $15 mil from ads into new docs
so that more programmers can understand better so that we can all see
fewer Guru's!!!  (And I wish they would send extra copies of all docs
to the programmers at WP :-)

Has any one compiled a list of errata to the RKM's???  I would very much
like to have such a list!!!

If no such list has been made, here is a start:

In the pages below, all references to "struct Port" should apparently be
changed to "struct MsgPort" and all references to "CreateStdIO()" should
become "CreateExtIO()"

_RKM: Libraries and Devices_ page 277:

struct IOStdReq *consoleWriteMsg;/* I/O request block pointer */
struct Port *consoleWritePort;   /* a port at which to recieve replies */
...
consoleWriteMsg = CreateStdIO(consoleWritePort);

(same on page 288, but for consoleReadPort)

Other pages with the Port instead of MsgPort:
264, 384, 402, others I've missed :-) 
-- 
	    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: <4186@blake.acs.washington.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!caesar!ogccse!blake!dlarson

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!caesar!ogccse!blake!dlarson
From: dlarson@blake.acs.washington.edu (Dale Larson)
Newsgroups: comp.sys.amiga.tech
Subject: Port vs. MsgPort and other RKM oddities
Keywords: RKM, Port, CreateStdIO()
Message-ID: <4186@blake.acs.washington.edu>
Date: 25 Oct 89 00:59:14 GMT
Organization: The Evergreen State College,  WA
Lines: 69