This file is indexed.

/usr/share/tkgate/scripts/status.tcl is in tkgate-data 2.0~b10-4.

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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#   Copyright (C) 1987-2004 by Jeffery P. Hansen
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Last edit by hansen on Fri Feb 13 20:46:38 2009
#

set runlogo_state -1
set runlogo_speed 50
set runlogo_startstate 27
set runlogo_maxstate 50

proc updateStatus args {
  global tkg_displayFile tkg_currentModule tkg_modifiedFlag tkg_statusMessage
  global tkg_progName tkg_progVer

  if { $tkg_modifiedFlag } {
     set mod "*"
  } else {
     set mod ""
  }
  
  .status.file configure -text "[m ifile]: $tkg_displayFile$mod"
  .status.block configure -text "[m imodule]: $tkg_currentModule"
  .status.msg configure -text "$tkg_statusMessage" -anchor w

   wm title . "$tkg_displayFile$mod - $tkg_progName $tkg_progVer"

}

proc tkg_resetLogo {} {
  global bd runlogo_state runlogo_startstate logo_w

  catch {
    $logo_w configure -image "" -image [gifI [format "run%02d.gif" $runlogo_startstate]]
    set runlogo_state $runlogo_startstate
  }
}

proc tkg_pauseLogo {} {
  global bd runlogo_ev

  catch { after cancel $runlogo_ev }
}

proc tkg_stepLogo {} {
  global bd runlogo_state runlogo_speed runlogo_ev runlogo_maxstate logo_w

  catch {
    set filename [format "run%02d.gif" ${runlogo_state}]
    $logo_w configure -image "" -image [gifI "$filename"]
    set runlogo_state [expr $runlogo_state + 1 ]
    if { $runlogo_state > $runlogo_maxstate } {
      set runlogo_state 1
    }
  }
}

proc tkg_stepRunLogo {} {
  global bd runlogo_state runlogo_speed runlogo_ev runlogo_maxstate logo_w

  catch {
    set filename [format "run%02d.gif" ${runlogo_state}]
    $logo_w configure -image "" -image [gifI "$filename"]
    set runlogo_state [expr $runlogo_state + 1 ]
    if { $runlogo_state > $runlogo_maxstate } {
      set runlogo_state 1
    }
    set runlogo_ev [after $runlogo_speed tkg_stepRunLogo]
  }
}

proc tkg_runLogo {} {
  global bd runlogo_speed runlogo_ev


  catch {
    catch { after cancel $runlogo_ev }
    set runlogo_ev [after $runlogo_speed tkg_stepRunLogo]
  }
}

proc tkg_editLogo {} {
  global bd runlogo_ev logo_w

  catch {
    catch { after cancel $runlogo_ev }
    $logo_w configure -image [gifI "gatelogo.gif"]
  }
}

proc tkg_analysisLogo {} {
  global bd runlogo_ev logo_w

  catch {
    catch { after cancel $runlogo_ev }
    $logo_w configure -image [gifI "anallogo.gif"]
  }
}

proc tkg_checkpointReq {} {
  global tkg_wantCheckpoint tkg_checkpointEnabled tkg_checkpointFreq

  if { $tkg_checkpointEnabled } {
    set tkg_wantCheckpoint 1
  }
    after [expr $tkg_checkpointFreq * 1000] tkg_checkpointReq
}

#############################################################################
#
# Add or remove the simulation time window
#
proc updateSimTimeWin {w args} {
  global simOn

  if {$simOn} {
    pack $w.simtime -side right -padx 3 -pady 3 -ipadx 2 -ipady 2
  } else {
    pack forget $w.simtime
  }
}

proc makeStatus {w} {
  global tkg_displayFile tkg_currentModule tkg_modifiedFlag tkg_statusMessage
  global simOn currentSimTime

  label $w.file  -relief sunken -bg "\#ffbbbb" -width 30 -height 1 -justify left -anchor w
  label $w.block -relief sunken -bg "\#ffbbbb" -width 25 -height 1 -justify left -anchor w
  label $w.msg -relief sunken -bg "\#ffbbbb" -height 1
  label $w.simtime -relief sunken -bg "\#ffbbbb" -height 1 -width 15 -textvariable ::currentSimTime -anchor w

  pack $w.file -side left -padx 3 -pady 3 -ipadx 2  -ipady 2 -anchor w
  pack $w.block -side left -padx 3 -pady 3 -ipadx 2 -ipady 2 -anchor w
  pack $w.msg -side left -padx 3 -pady 3 -ipadx 2 -ipady 2 -fill x -expand 1

  updateStatus

  trace variable tkg_displayFile w updateStatus
  trace variable tkg_currentModule w updateStatus
  trace variable tkg_modifiedFlag w updateStatus
  trace variable tkg_statusMessage w updateStatus
  trace variable simOn w "updateSimTimeWin $w"

  helpon $w.msg [m ho.status.msg]
  helpon $w.block [m ho.status.block]
  helpon $w.file [m ho.status.file]
}

proc tkg_cancel {} {
  global tkg_statusMessage
  set tkg_statusMessage ""
  updateStatus
}