summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-03-21 02:36:47 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-03-21 02:36:47 (GMT)
commitf27a277c1e1c06a9ddd1c93606a9d884c8d844d7 (patch)
tree0615f0245eef81e02aabac90943d71c5a3a1c645
parent32fea5e38c09de7b9f9f19c93074ccdb8a6520d7 (diff)
downloadtcl-f27a277c1e1c06a9ddd1c93606a9d884c8d844d7.zip
tcl-f27a277c1e1c06a9ddd1c93606a9d884c8d844d7.tar.gz
tcl-f27a277c1e1c06a9ddd1c93606a9d884c8d844d7.tar.bz2
Documentation header for ChanRead()
-rw-r--r--generic/tclIO.c25
1 files 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,