Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2016-07-24
17:58
[6a19dedc2e] "Clarified" what the units are that [chan copy] uses for -size and that synchronous cop... check-in: 9b23417ffa user: dkf tags: trunk
13:12 • Closed ticket [6a19dedc2e]: Documentation error for chan copy / fcopy plus 9... artifact: d2d20247bd user: dkf
13:09
[6a19dedc2e] "Clarified" what the units are that [chan copy] uses for -size and that synchronous cop... check-in: 63410153ac user: dkf tags: core-8-6-branch
2016-07-19
16:55 • New ticket [6a19dedc2e] Documentation error for chan copy / fcopy. artifact: d564646120 user: apnadkarni

Documentation error for chan copy / fcopy

Closed / Fixed6a19dedc2e2ddd6040a480c8cffd0503db734453Created 10 years agoUpdated 10 years ago
Descriptionplain2016-07-19 16:55:12
Manpage for chan copy and fcopy both state 

"returns the number of bytes written to outputChan." 

and then later

"Only the number of bytes written to outputChan is reported, "

dgp on the chat states:
22:15]	dgp	it's the number of chars attempted to read from inchan
[22:17]	dgp	I don't think I changed this in my 2014 work, but check it.
[22:19]	dgp	I think you don't want to copy a partial char

Experimentation indicates dgp is correct. It appears to be number of chars, not bytes, and on input, not output.
Referenced by2
  • 9b23417ffa[6a19dedc2e] "Clarified" what the units are that [chan copy] uses for -size and that synchronous copying returns. check-in2016-07-24 17:58:13
  • 63410153ac[6a19dedc2e] "Clarified" what the units are that [chan copy] uses for -size and that synchronous copying returns. check-in2016-07-24 13:09:40
dkfhtml2016-07-24 13:12:25

Well, that's messy. The units are the same as for the -size option, and it's bytes when it isn't a transforming copy and characters when it is a transforming copy. Well, I've noted that this is the case in the docs; I'm not going to attempt to make this any clearer.

Log in (anonymous is fine) to add a comment.