*BSD News Article 14874


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!uunet!emba-news.uvm.edu!sadye.emba.uvm.edu!wollman
From: wollman@sadye.emba.uvm.edu (Garrett Wollman)
Subject: Re: porting question (_cnt, _flsbuf, _ptr)
Message-ID: <1993Apr21.213237.6488@uvm.edu>
Sender: news@uvm.edu
Organization: University of Vermont, EMBA Computer Facility
References: <2BD59287.11259@ics.uci.edu>
Date: Wed, 21 Apr 1993 21:32:37 GMT
Lines: 16

In article <2BD59287.11259@ics.uci.edu> rmyers@ics.uci.edu (Richard E. Myers) writes:
>#define putc(x, p)      (--(p)->_cnt < 0 ? \
>                        _flsbuf((unsigned char) (x), (p)) : \
>                        (int) (*(p)->_ptr++ = (unsigned char) (x)))

You should use Chris Torek's perfectly good putc() implementation
which comes built in, and a big raspberry to application writers
fooling with the innards of stdio.

-GAWollman

-- 
Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman@emba.uvm.edu | Shashish is the bonding of hearts in spite of distance.
uvm-gen!wollman      | It is a bond more powerful than absence.  We like people
UVM disagrees.       | who like Shashish.  - Claude McKenzie + Florent Vollant