*BSD News Article 14861


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!news.claremont.edu!ucivax!rmyers
From: rmyers@ics.uci.edu (Richard E. Myers)
Subject: porting question (_cnt, _flsbuf, _ptr)
Message-ID: <2BD59287.11259@ics.uci.edu>
Followup-To: comp.os.386bsd.questions
Reply-To: rmyers@ics.uci.edu (Richard E. Myers)
Organization: Univ. of Calif., Irvine, Info. & Computer Sci. Dept.
Date: Wed, 21 Apr 1993 18:29:26 GMT
Lines: 29

I'm trying to port Analog 5.1 (Caltech analog circuit simulator) to
386bsd and gcc doesn't understand the following line:

#define putc(x, p)      (--(p)->_cnt < 0 ? \
                        _flsbuf((unsigned char) (x), (p)) : \
                        (int) (*(p)->_ptr++ = (unsigned char) (x)))
    putc(c, outfile);


It seems the _cnt, and _ptr structure members are unrecognized and
likewise the function _flsbuf() can not be found.

Looking in /usr/include/stdio.h I came up with the idea that maybe I
should change _cnt --> _w and _ptr --> _p.  But I'm not a C guru and
mostly just guessing.  I have no clue what the equivalent to _flsbuf()
is.

If anyone has suggestions I would greatly appreciate it.  Other than
the above and needing to install srand48, the port has progressed with
out a major hitch.

  -- Richard

-------------------------------------------------------------------------------
Richard Myers						| (714) 856-7473
The Center for the Neurobiology of Learning and Memory  | 
University of California, Irvine                        | rmyers@ics.uci.edu 
Irvine, CA 92717-3800 USA                               | 
-------------------------------------------------------------------------------