This file is indexed.

/usr/share/xcrysden/Tcl/cygwin.tcl is in xcrysden-data 1.5.60-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#############################################################################
# Author:                                                                   #
# ------                                                                    #
#  Anton Kokalj                                  Email: Tone.Kokalj@ijs.si  #
#  Department of Physical and Organic Chemistry  Phone: x 386 1 477 3523    #
#  Jozef Stefan Institute                          Fax: x 386 1 477 3811    #
#  Jamova 39, SI-1000 Ljubljana                                             #
#  SLOVENIA                                                                 #
#                                                                           #
# Source: $XCRYSDEN_TOPDIR/Tcl/cygwin.tcl
# ------                                                                    #
# Copyright (c) 2004 by Anton Kokalj                                        #
#############################################################################

#
# this file contains a few very dirty hacks needed to run under CYGWIN
#

if { $xcrys(platform) == "windows" } {
    # testing ...
    rename exec _tcl_exec

    proc exec {args} {
	global env

    	# first try a normal exec
	set result {}
    	if { [catch {set result [uplevel 1 [list eval _tcl_exec $args]]}] } {
    	    # try to execute via "launch.sh" wrapper
    	    set result [uplevel 1 [list eval _tcl_exec sh $env(XCRYSDEN_TOPDIR)/scripts/launch.sh] $args]
    	}
	return $result	
    }    
}

if { $xcrys(platform) == "cygwin" }  {
    rename pwd  _tcl_pwd    
    rename exec _tcl_exec
    rename tk_getSaveFile _tk_getSaveFile
    rename tk_getOpenFile _tk_getOpenFile

    proc pwd {} {
	global env

	# Don't use Tcl pwd command, it will return C:\cygwin\...,
	# and CYGWIN can't handle it. Use a pwd.sh wrapper instead.

	return [exec $env(XCRYSDEN_TOPDIR)/scripts/pwd.sh]
    }    

    proc tk_getSaveFile {args} {
	set sfile [eval _tk_getSaveFile $args]
	return [cygwin_unixpath $sfile]
    }

    proc tk_getOpenFile {args} {
	set sfile [eval _tk_getOpenFile $args]
	return [cygwin_unixpath $sfile]
    }

    proc cygwin_unixpath {path} {
	if { [regexp -- {^[A-Z]:/} $path] } {
	    set drive [string tolower [string index $path 0]]
	    regsub {^[A-Z]:} $path /cygdrive/$drive path
	}
	return $path
    }
}