Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!unido!ecrcvax!diomidis From: diomidis@ecrcvax.UUCP (Diomidis Spinellis) Newsgroups: comp.lang.c Subject: Number of characters buffered by stdio detection. Keywords: stdio, buffering, select Message-ID: <715@ecrcvax.UUCP> Date: 25 Apr 89 20:11:40 GMT Reply-To: diomidis@ecrcvax.UUCP (Diomidis Spinellis) Organization: ECRC, Munich 81, West Germany Lines: 10 I want to use select(2) on an stdio buffered stream. The problem is that before calling select I need to check if there are any characters in the buffer. I have not found any function that returns such a value, so I use _iob(x)->_cnt. This is not part of the documented stdio interfaces and thus non-portable. Is there a better way to do this? -- Diomidis Spinellis European Computer Industry Research Centre