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

History Of Ticket 823329ffffffffff

Artifacts Associated With Ticket 823329ffffffffff

  1. Ticket change [506f8a60d5] (rid 125966) by vincentdarley on 2003-10-14 10:09:58:

    1. assignee initialized to: "das"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Commands like:
      
      glob -type TEXT *
      
      are not implemented on OS X.  Since it is a version of
      MacOS, it is capable of supporting these things.
      
      Vince.
      
      Various comments below:
      
      On Tuesday, Oct 14, 2003, at 19:40 Australia/Sydney,
      Vince Darley wrote:
      
      > Should this just be #ifdef'd into NativeMatchType so
      it compiles on the
      > relevant platform, or...?  I don't really understand
      all the vagaries
      > of
      > different unix systems so am probably not the person
      to implement
      > this...
      
      the creator/type code is #ifdef MAC_OSX_TCL so the same
      would be
      appropriate, c.f tclMacOSXFCmd.c
      
      [glob -types hidden] should be properly supported as
      well, that's also
      handled by TclMacOSXGetFileAttribute() and controlled
      by same #ifdef
      
      also [glob -types readonly] should be handled on unices
      that support
      CHFLAGS, c.f GetReadOnlyAttribute() in tclUnixFCmd.c,
      this is
      controlled by #if defined(HAVE_CHFLAGS) &&
      defined(UF_IMMUTABLE)
      
      > Also, by the time we're in NativeMatchType we
      actually only have a
      > native
      > path description (no Tcl_Obj) so we really want
      access to the innards
      > of
      > TclMacOSXGetFileAttribute.
      
      that's a bit of a pain, it kills code modularization
      for these
      functions...
      
      it wouldn't be hard to copy the guts out of
      TclMacOSXGetFileAttribute()
      and GetReadOnlyAttribute() into the unix
      NativeMatchType() but it
      doesn't seem to be very clean. maybe we need a native
      path aware
      versions of
      TclMacOSXGetFileAttribute/GetReadOnlyAttribute ?
      
      don't have much time to spend on this at the moment,
      maybe best to add
      a bug report on SF so that this doesn't get lost?
      we really should have thought about this when I did TIP
      118...
      
      
    4. foundin initialized to: "obsolete: 8.4.5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "vincentdarley"
    9. subsystem initialized to: "37. File System"
    10. title initialized to:
      glob -types type/creator/hidden not implemented on OSX
      
    11. type initialized to: "Bug"
  2. Ticket change [60cc76fc03] (rid 92132) by das on 2003-10-14 19:07:50:

    1. icomment:
      Logged In: YES 
      user_id=90580
      
      On Tuesday, Oct 14, 2003, at 19:56 Australia/Sydney, Daniel A. 
      Steffen 
      wrote:
      > On Tuesday, Oct 14, 2003, at 19:40 Australia/Sydney, Vince 
      Darley 
      > wrote:
      >> On Tue, 14 Oct 2003, Daniel A. Steffen wrote:
      >>> On Monday, Oct 13, 2003, at 21:38 Australia/Sydney, 
      Vince Darley 
      >>> wrote:
      >>>
      >>>> The 'NativeMatchType' in tcl/unix/tclUnixFile.c needs to 
      be updated 
      >>>> to
      >>>> (somehow) access the file type/creator when running on 
      a compatible
      >>>> version of Unix (i.e. Darwin).
      >>>
      >>> it should  be very easy to use the new 
      TclMacOSXGetFileAttribute() 
      >>> from
      >>> TIP118 for this.
      >>
      >> Should this just be #ifdef'd into NativeMatchType so it 
      compiles on 
      >> the
      >> relevant platform, or...?
      >
      > the creator/type code is #ifdef MAC_OSX_TCL so the same 
      would be 
      > appropriate, c.f tclMacOSXFCmd.c
      >
      > [glob -types hidden] should be properly supported as well, 
      that's also 
      > handled by TclMacOSXGetFileAttribute() and controlled by 
      same #ifdef
      >
      > also [glob -types readonly] should be handled on unices that 
      support 
      > CHFLAGS, c.f GetReadOnlyAttribute() in tclUnixFCmd.c, this 
      is 
      > controlled by #if defined(HAVE_CHFLAGS) && 
      defined(UF_IMMUTABLE)
      
      as far as support for readonly goes, the 4 line patch below 
      should do 
      the trick, what do you think? this'll work on OSX and any BSD 
      that has 
      chflags
      
      this way [glob -type readonly] will find any files that have [file 
      attribute -readonly] but also files that don't have any write 
      perms (to 
      preserve existing behaviour)
      
      >> Also, by the time we're in NativeMatchType we actually only 
      have a 
      >> native
      >> path description (no Tcl_Obj) so we really want access to the 
      innards 
      >> of
      >> TclMacOSXGetFileAttribute.
      >
      > that's a bit of a pain, it kills code modularization for these 
      > functions...
      >
      > it wouldn't be hard to copy the guts out of 
      > TclMacOSXGetFileAttribute() and GetReadOnlyAttribute() into 
      the unix 
      > NativeMatchType() but it doesn't seem to be very clean. 
      maybe we need 
      > a native path aware versions of 
      > TclMacOSXGetFileAttribute/GetReadOnlyAttribute ?
      
      maybe better to make a TclMacOSXNativeMatchType() that 
      checks for OSX 
      specific possibilities like creator/type/hidden and put that into 
      tclMacOSXFCmd.c and call it from the unix NativeMatchType()? 
      That way 
      platform specific FS code stays in tclMacOSXFCmd.c  (and can 
      potentially be shared via static functions).
      
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. username: "das"
  3. Add attachment "tclUnixFile.diff" [61dac15ad9] (rid 92319) by das on 2003-10-14 19:10:41.

  4. Ticket change [f673cf6394] (rid 130305) by das on 2003-10-14 19:10:41:

    1. icomment:
      
      
      File Added - 64313: tclUnixFile.diff
      
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. username: "das"
  5. Ticket change [603d5ad09d] (rid 115956) by vincentdarley on 2006-03-20 06:10:33:

    1. foundin changed to: "obsolete: 8.5a4"
    2. icomment:
      Logged In: YES 
      user_id=32170
      
      Has this been implemented at any point?
      
      Vince.
      
      
      
    3. login: "vincentdarley"
    4. mimetype: "text/plain"
    5. username: "vincentdarley"
  6. Add attachment "823329.diff" [1037789d52] (rid 94933) by das on 2006-03-20 21:38:53.

  7. Ticket change [84914b3e92] (rid 117573) by das on 2006-03-20 21:38:53:

    1. icomment:
      Logged In: YES 
      user_id=90580
      
      patch attached that implements this on HEAD.
      
      also fixes minor issue with pattern==NULL case of 'glob -types hidden' on 
      unix ([glob -types hidden someFile] incorrectly returned 'someFile').
      
      the only thing not implemented is exclusion of files hidden via HFS invisible 
      flag from ordinary glob results (i.e. without -types hidden), to implement this 
      it would be necessary to do always do a costly stat & getattrlist for every file 
      traversed (as well as a major rewrite of unix TclpMatchInDirectory/
      NativeMatchType), I don't think it's worth the slowdown of the most common 
      glob cases to add this minor feature.
      [glob -types hidden] does however return the files with HFS invisible flag in 
      addition to files starting with '.'
      
      will commit this tomorrow if I don't hear any objections.
      
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. username: "das"
  8. Ticket change [370b56d238] (rid 107208) by das on 2006-03-20 21:38:54:

    1. icomment:
      
      
      File Added - 171573: 823329.diff
      
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. username: "das"
  9. Ticket change [5b3896c676] (rid 118282) by das on 2006-03-20 21:40:47:

    1. priority changed to: "9 Immediate"
  10. Ticket change [44355e4ced] (rid 116684) by nobody on 2006-03-21 00:31:47:

    1. icomment:
      Logged In: NO 
      
      Sounds v. good to me, including the 'invisible' trade-off.
      
      Vince.
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  11. Ticket change [acf9206c28] (rid 101386) by das on 2006-03-21 18:10:43:

    1. icomment:
      Logged In: YES 
      user_id=90580
      
      patch committed to HEAD:
      * generic/tclInt.decls:   implement globbing for HFS creator & type
      * macosx/tclMacOSXFCmd.c: codes and 'hidden' flag, as documented in 
      * tests/macOSXFCmd.test:  glob.n; objectified OSType handling in [glob]
      * unix/tclUnixFile.c:     and [file attributes]; fix globbing for hidden
                                files with pattern==NULL arg. [Bug 823329]
      * generic/tclIntPlatDecls.h:
      * generic/tclStubInit.c:  make genstubs
      
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
    6. username: "das"
  12. Ticket change [77d398a011] (rid 89839) by das on 2006-03-21 18:10:44:

    1. closedate changed to: "2006-03-21T11:10:44"
    2. closer changed to: "das"