Skip to content
Tcl Source Code History Of Ticket 675356ffffffffff
Login

History Of Ticket 675356ffffffffff

Artifacts Associated With Ticket 675356ffffffffff

  1. Ticket change [5505ad0136] (rid 94056) by nobody on 2003-01-27 11:05:15:

    1. assignee initialized to: "kennykb"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      tclClock.c
      
      88:    switch ((enum command) index) {
      89:     case COMMAND_CLICKS:    {               /* clicks 
      */
      90:         int forceMilli = 0;
      91:
      92:         if (objc == 3) {
      93:             format = Tcl_GetStringFromObj(objv[2], 
      &index);
      94:             if (strncmp(format, "-milliseconds",
      95:                     (unsigned int) index) == 0) {
      96:                 forceMilli = 1;
      97:             } else {
      98:                 Tcl_AppendStringsToObj(resultPtr,
      99:                         "bad switch \"", format,
      100:                        "\": must be -milliseconds", (char *) 
      NULL);
      101:                return TCL_ERROR;
      102:            }
      
      The 'n' argument to strncmp should not be index (which 
      happens to be 0), but presumably strlen("-milliseconds")
      ==13.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "06. Time Measurement"
    10. title initialized to: "clock clicks -milliseconds logic confused"
    11. type initialized to: "Bug"
  2. Ticket change [ee37137e12] (rid 104044) by nobody on 2003-01-27 18:14:01:

    1. icomment:
      Logged In: NO 
      
      Also notice that "clock clicks -milliseconds"
      is giving negative results:
      
      % clock clicks -milli
      -11350295
      
      Is this correct behaviour or is this an int/long casting
      issue?
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  3. Ticket change [7bd6194135] (rid 96972) by kennykb on 2003-02-02 04:37:36:

    1. closedate changed to: "2003-02-01T21:37:36"
    2. closer changed to: "kennykb"
    3. icomment:
      Logged In: YES 
      user_id=99768
      
      No bug here, except for the little bug that [clock clicks {}] 
      and [clock clicks -] were being recognized as
      [clock clicks -milliseconds].
      
      The 'index' variable was being reused, and at the time of the
      'strncmp' call, it's the string length of objv[2].  So the logic
      is correct except for making sure that the string contains
      at least two characters.
      
      The negative value for milliseconds is also correct.  See
      http://www.tcl.tk/cgi-bin/tct/tip/124.html
      for a proposal to eliminate that issue.
      
      
      
    4. login: "kennykb"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "kennykb"