Skip to content
Tcl Source Code History Of Ticket e778e3f804
Login

History Of Ticket e778e3f804

Artifacts Associated With Ticket e778e3f804

  1. Ticket change [7e739b04f1] (rid 209367) by jan.nijtmans on 2023-02-28 16:06:40:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Some examples:
      <pre>
          % fconfigure stdin -encodingprofile xx
          bad profile "xx". Must be "tcl8" or "strict".
          % fconfigure stdin -translation xx
          bad value for -translation: must be one of auto, binary, cr, lf, crlf, or platform
      </pre>
      Looking at consistancy, I would expect "bad value for -encodingprofile: must be one of replace, strict, or tcl8". "replace" was missing, and options should be alphabetical.
      
      Same for "encoding convertfrom/convertto"
      <pre>
          % encoding convertfrom -profile xx ascii é
          bad profile "xx". Must be "tcl8" or "strict".
      </pre>
      
      Looking at the implementation, there's a special function `TclEncodingProfileNameToId()` which does the parsing. Suggestion, use the standard Tcl function `Tcl_GetIndexFromObjStruct()` in stead, wherever possible. This function handles all those minor details.
      
    5. foundin initialized to: "tip-656"
    6. is_private initialized to: "0"
    7. login: "jan.nijtmans"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0c50e5320704d174412e57b873d8932de15303e0"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "jan.nijtmans"
    14. subsystem initialized to: "16. Commands A-H"
    15. title initialized to: "Parsing of "profile" for TIP #656"
    16. type initialized to: "Bug"
  2. Ticket change [dea4ef226d] (rid 209372) by jan.nijtmans on 2023-02-28 16:11:20:

    1. icomment:
      Another advantage of using `Tcl_GetIndexFromObjStruct()`: The Tcl_Obj is converted to an "index" objType, which cashes the internal id.
      
      Proposed fix: [82377ce539f52131|here]
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [649791577d] (rid 209373) by jan.nijtmans on 2023-02-28 16:14:59:

    1. assignee changed to: "apnadkarni"
    2. login: "jan.nijtmans"
    3. mimetype: "text/plain"
  4. Ticket change [e0f953f179] (rid 209374) by apnadkarni on 2023-02-28 16:57:09:

    1. icomment:
      I'll fix the missing "replace" and alphabetical order.
      
      I didn't use Tcl_GetIndexFromObjStruct specifically because it cannot be used from the configure which only has a string and not a Tcl_Obj. Allocating a Tcl_Obj just to call Tcl_GetIndexFromObjStruct did not seem like a good trade-off. I was not in favour of using Tcl_GetIndexFromObjStruct in one place and then using an inline loop (much less readable imo) in the configure code as you have done for essentially the same function. I much prefer code for a specific purpose to be encapsulated into a single function.
      
      Thanks for the feedback.
      
      /Ashok
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  5. Ticket change [a6ba5598e2] (rid 209451) by apnadkarni on 2023-03-02 06:56:26:

    1. closedate changed to: "2460005.78919906"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Fixed in [f9e3e55bb8] and [80abdf9c7d] respectively for tip-656 and tip-656-tcl9
      
    4. login: "apnadkarni"
    5. mimetype: "text/x-fossil-plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"