summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
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)
commit0530d01b6322bcec62e77511414d2f76204c693c (patch)
tree0615f0245eef81e02aabac90943d71c5a3a1c645 /generic/tclIO.c
parente9bb48106af82e24cbd802a9b0b7f1eec6717679 (diff)
downloadtcl-0530d01b6322bcec62e77511414d2f76204c693c.zip
tcl-0530d01b6322bcec62e77511414d2f76204c693c.tar.gz
tcl-0530d01b6322bcec62e77511414d2f76204c693c.tar.bz2
Documentation header for ChanRead()
Diffstat (limited to 'generic/tclIO.c')
-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,