*BSD News Article 2502


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!uunet!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!eichin
From: eichin@athena.mit.edu (Mark W. Eichin)
Subject: Re: Some questions, some fixes, some suggestions
In-Reply-To: dealwisb@cognos.com's message of 25 Jul 92 18:23:54 GMT
Message-ID: <EICHIN.92Jul25191400@portnoy.mit.edu>
Sender: news@athena.mit.edu (News system)
Nntp-Posting-Host: portnoy.mit.edu
Organization: Massachusetts Institute of Technology
References: <1992Jul25.182354.14203@cognos.com>
Date: Sat, 25 Jul 1992 23:14:05 GMT
Lines: 26

According to dealwisb@cognos.com (Brian de Alwis):
>>	   The tty_ring patch from Mark Eichin (eichin@athena.mit.edu) in
>> <EICHIN.92Jul21092841@tweedledumber.mit.edu> says that the rbp and cpp
>> paramters to nextc() were reversed - not so in my code...
	On closer inspection, it appears that rather than changing
nextc, all of the *uses* of nextc were changed. If you look at
tty_ring.c, all of the ring buffer ops consistently take a struct
ringb* as the "last" argument. In 0.0, all uses of nextc passed the
ringb as the first argument, probably because someone read the order
of the argument declarations in the definition of nextc...
	For clarity, I'd still suggest that line 83 be changed from:
		nextc(cpp, rbp) struct ringb *rbp; char **cpp; {
to
		nextc(cpp, rbp) char **cpp; struct ringb *rbp; {
so that people are less confused by it; there have been C compilers
that got the argument handling wrong if the order didn't match, though
the compiler you'd be using to compile this isn't one of them.
	(Thanks for pointing this out and getting me to look at it
further. I still want to know why line 25 says " * NOT MAKE USE THIS
WORK."  instead of "* NOT MAKE USE OF THIS WORK." as it did in 0.0...
and the reference in 2.12 of terry@npd.Novell.COM (Terry Lambert)'s
unofficial FAQ should probably be elided. The tty problems aluded to
there are from some other source.)

				_Mark_ <eichin@athena.mit.edu>
				MIT Student Information Processing Board