home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Freeware 31 / FreelogHS31.iso / Texte / scribus / scribus-1.3.3.9-win32-install.exe / tcl / tix8.1 / FileCmpt.tcl < prev    next >
Text File  |  2001-11-03  |  1KB  |  37 lines

  1. # -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
  2. #
  3. #    $Id: FileCmpt.tcl,v 1.1.1.1.2.1 2001/11/03 06:43:50 idiscovery Exp $
  4. #
  5. # FileCmpt.tcl --
  6. #
  7. #    File access portibility routines.
  8. #
  9. # Copyright (c) 1993-1999 Ioi Kim Lam.
  10. # Copyright (c) 2000-2001 Tix Project Group.
  11. #
  12. # See the file "license.terms" for information on usage and redistribution
  13. # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  14. #
  15.  
  16.  
  17. # Internal file names
  18. # (1) Idempotent: [tixFileIntName $intName] == $intName
  19. # (2) Does not contain "~", "..", "."
  20. # (3) All DOS type C:foo will be translated to absoulte path such as
  21. #     /\C:\windows\foo
  22. # (4) Does not contail trailing "/" or "\\" characters
  23. #
  24.  
  25. proc tixFileResolveName {nativeName {defParent ""}} {
  26.     if {$defParent != ""} {
  27.     return [tixNativeName [tixFileIntName $nativeName [tixFileIntName $defParent]]]
  28.     } else {
  29.         return [tixNativeName [tixFileIntName $nativeName]]
  30.     }
  31. }
  32.  
  33. proc tixNSubFolder {parent sub} {
  34.     return [tixNativeName [tixSubFolder \
  35.     [tixFileIntName $parent] [tixFileIntName $sub]]]
  36. }
  37.