From f27a277c1e1c06a9ddd1c93606a9d884c8d844d7 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 21 Mar 2014 02:36:47 +0000 Subject: Documentation header for ChanRead() --- generic/tclIO.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 18dab5a..6e5dc05 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -342,9 +342,30 @@ static Tcl_ObjType chanObjType = { #define MAX_CHANNEL_BUFFER_SIZE (1024*1024) /* - * ChanRead, dropped here by a time traveler, see 8.6 + *--------------------------------------------------------------------------- + * + * ChanRead -- + * + * Read up to bytes using the inputProc of chanPtr, store them at dst, + * and return the number of bytes stored. + * + * Results: + * The return value of the driver inputProc, + * - number of bytes stored at dst, or + * - -1 on error, with a Posix error code available to the + * caller by calling Tcl_GetErrno(). + * + * Side effects: + * The CHANNEL_BLOCKED and CHANNEL_EOF flags of the channel + * state are set as appropriate. + * On EOF, the inputEncodingFlags are set to perform ending + * operations on decoding. + * TODO - Is this really the right place for that? + * + *--------------------------------------------------------------------------- */ -static inline int + +static int ChanRead( Channel *chanPtr, char *dst, -- cgit v0.12