Tcl Source Code

View Ticket
Login
Ticket UUID: 6a19dedc2e2ddd6040a480c8cffd0503db734453
Title: Documentation error for chan copy / fcopy
Type: Bug Version: 8.6.5
Submitter: apnadkarni Created on: 2016-07-19 16:55:12
Subsystem: 16. Commands A-H Assigned To: dkf
Priority: 3 Low Severity: Minor
Status: Closed Last Modified: 2016-07-24 13:12:25
Resolution: Fixed Closed By: dkf
    Closed on: 2016-07-24 13:12:25
Description:
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.
User Comments: dkf added on 2016-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.