Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 73c27d860d0d3e689d0bd56ab90d4af6a96aad93
Ticket: 218793ffffffffffffffffffffffffffffffffff
use strtol_magic for optional Octal conversion
User & Date: nobody on 2000-10-26 01:05:25
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2145 RFE
    Version: 8.1
    SubmitDate: '1999-06-03'
    LastModified: '1999-12-09'
    Severity: MED
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    RelatedBugIDs: 1726
    OS: AIX
    Machine: RS6000
    FixedDate: '1999-12-09'
    FixedInVersion: 8.3b1
    ClosedDate: '2000-10-25'
    
    
    Name:
    Phil Dietz
    
    DesiredBehavior:
    Many people would like to see Octal conversion be optional.
        Donal Fellows has posted a strtol_magic function on dejanews.com that
        does just that.
        
        Thanks.
    
    PatchFiles:
    long strtol_magic(const char *str, char **endptr, int base) {
              extern int noOctal;
              if (base!=0 || noOctal!=0 || (str[0]=='0' && str[1]=='x')) {
            return strtol(str, endptr, base);
              } else {
                  return strtol(str, endptr, 10);
              }
          }
    
    
    
    This is being seriously considered for 8.3.  It would be better
    if it came as a drop-in patch to 8.2.0 that supported some sort
    of tcl_useOctal var that maintained the old behavior by default. 
    -- 08/20/1999 hobbs
    Tcl 8.3 has greatly improved error messages for octals (if you
    made an error because of a bad octal, you'll know it without
    question).  The idea of a global switch to perterb behavior was
    not generally popular, so we're going with the better error
    messages, and may consider something else for Tcl9, when we
    can be more lax on backwards compatibility. 
    -- 12/09/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "07. Variables"
  10. title changed to: "use strtol_magic for optional Octal conversion"
  11. type changed to: "Bug"