Skip to content
Tcl Source Code History Of Ticket 1438236fffffffff
Login

History Of Ticket 1438236fffffffff

Artifacts Associated With Ticket 1438236fffffffff

  1. Ticket change [5b842051d7] (rid 118340) by nobody on 2006-02-24 17:38:22:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      In the Windows runtime environment, most environment 
      variables are defined with what I'll call dos-like 
      slashes "\". But the TCLLIBPATH environment variable 
      is actually used inside the init.tcl script, and 
      requires unix-like slashes "/".
      
      Would it be possible to add this one line:
      
      if { [string equal $tcl_platform
      (platform) "windows"] } { set env(TCLLIBPATH) [string 
      map {\\ \/} $env(TCLLIBPATH)] }
      
      And Change ($TCL_ROOT/lib/init.tcl):
      
      if {![info exists auto_path]} {
          if {[info exists env(TCLLIBPATH)]} {
      set auto_path $env(TCLLIBPATH)
          } else {
      set auto_path ""
          }
      }
      
      
      To:
      
      if {![info exists auto_path]} {
          if {[info exists env(TCLLIBPATH)]} {
      if { [string equal $tcl_platform
      (platform) "windows"] } { set env(TCLLIBPATH) [string 
      map {\\ \/} $env(TCLLIBPATH)] }
      set auto_path $env(TCLLIBPATH)
          } else {
      set auto_path ""
          }
      }
      
      The will allow "package requires" to succeed no 
      matter how and where the TCLLIBPATH was defined.
      
      FYI. My TCLLIBPATH is set within a .bat script and 
      I'm finding it painfully difficult to reverse the 
      direction of the slashes.
      
      
      
    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: "38. Init - Library - Autoload"
    10. title initialized to: "UNIX vs DOS Slashes"
    11. type initialized to: "RFE"
  2. Ticket change [9cb659cd53] (rid 96188) by speedboat on 2006-02-25 00:43:07:

    1. icomment:
      Logged In: YES 
      user_id=243036
      
      Sorry, did not mean to submit as "nobody".
      
      If you think it's a silly idea, I'll still claim it. ;)
      
      Al
      
      
      
    2. login: "speedboat"
    3. mimetype: "text/plain"
    4. username: "speedboat"
  3. Ticket change [a60be07123] (rid 98529) by dgp on 2006-02-25 12:03:21:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Please give an example of a
      value of TCLLIBPATH that this
      would help.  I suspect any such
      example would simply be an
      invalid value of TCLLIBPATH, which
      must be a Tcl list.
      
      If there's a valid use case, I think
      a pass with [file normalize] ought
      to take care of things.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [cdf61b1368] (rid 95976) by speedboat on 2006-02-27 21:00:01:

    1. icomment:
      Logged In: YES 
      user_id=243036
      
      I have a .bat script which determines it's own location, 
      for example C:\MyDir. The .bat script then sets the 
      TCLLIBPATH accordingly, for example: 
      
          set TCLLIBPATH=%MYDIR%/path/to/my/packages %
      MYDIR%/another/path
      
      Which results in:
      
         C:\MyDir/path/to/my/packages C:\MyDir/another/path
      
      which will not work.
      
      [file normalize] would be great, I didn't realize it would 
      work on a list of file paths, but it would still need to 
      be include in init.tcl probably as:
      
         set auto_path [file normalize $env(TCLLIBPATH)]
      
      I agree the .bat script is providing tcl an illegal list 
      of directory paths, but it's far easier to correct within 
      tcl than it is in the batch script. It's also a fairly 
      easy problem to generate when most of the other 
      environment variables (Ex. TCL_ROOT, TCL_LIBRARY) in 
      the .bat script require DOS-like slashes.
       
      
      
      
    2. login: "speedboat"
    3. mimetype: "text/plain"
    4. username: "speedboat"
  5. Ticket change [4af1e41d52] (rid 126621) by speedboat on 2006-02-27 21:00:17:

    1. icomment:
      Logged In: YES 
      user_id=243036
      
      I have a .bat script which determines it's own location, 
      for example C:\MyDir. The .bat script then sets the 
      TCLLIBPATH accordingly, for example: 
      
          set TCLLIBPATH=%MYDIR%/path/to/my/packages %
      MYDIR%/another/path
      
      Which results in:
      
         C:\MyDir/path/to/my/packages C:\MyDir/another/path
      
      which will not work.
      
      [file normalize] would be great, I didn't realize it would 
      work on a list of file paths, but it would still need to 
      be include in init.tcl probably as:
      
         set auto_path [file normalize $env(TCLLIBPATH)]
      
      I agree the .bat script is providing tcl an illegal list 
      of directory paths, but it's far easier to correct within 
      tcl than it is in the batch script. It's also a fairly 
      easy problem to generate when most of the other 
      environment variables (Ex. TCL_ROOT, TCL_LIBRARY) in 
      the .bat script require DOS-like slashes.
       
      
      
      
    2. login: "speedboat"
    3. mimetype: "text/plain"
    4. username: "speedboat"
  6. Ticket change [4bad70019e] (rid 126755) by dgp on 2006-02-27 22:38:07:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      If you are going to put a literal 
      backslash character in the value
      of TCLLIBPATH, you will need to
      enclose the list element containing
      that character with braces.  Try:
      
      set TCLLIBPATH={%MYDIR%/path/to/my/packages}
      {%MYDIR%/another/path}
      
      Contrary to your claim, this is not easier
      to correct within Tcl than outside, because
      the "correction" you are asking for, is really
      to make a "guess" as to what the input "means".
      Somehow you want Tcl to guess when the backslashes
      are supposed to be literal, and when they are supposed
      to have Tcl's normal substitution rules.
      
      This kind of Do What I Mean interface always
      eventually leads to trouble when a different
      context makes the guesses wrong.
      
      Follow the rules and Say What You Mean.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. resolution changed to: "Rejected"
    5. status changed to: "Closed"
    6. username: "dgp"
  7. Ticket change [afed316f92] (rid 97900) by dgp on 2006-02-27 22:38:08:

    1. closedate changed to: "2006-02-27T15:38:08"
    2. closer changed to: "dgp"
  8. Ticket change [ed2a9b0499] (rid 103834) by speedboat on 2006-02-27 23:11:46:

    1. icomment:
      Logged In: YES 
      user_id=243036
      
      And I thought I tried every combination of quotes and 
      braces. Sorry, guess not.
      
      Thanks, I withdraw my request. It's of course much better 
      to fix the problem at the source, I just couldn't figure 
      out how.
      
      
      
      
      
    2. login: "speedboat"
    3. mimetype: "text/plain"
    4. username: "speedboat"