This file is indexed.

/usr/share/doc/libplplot12/examples/tk/runExtendedDemos.tcl is in plplot-tcl-dev 5.10.0+dfsg2-0.1ubuntu2.

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
#----------------------------------------------------------------------------
# Source this file into a working Tk interpreter to run all the Tcl demos
# in a nice window with buttons for each demo you'd like to run.
# 
# This requires the 'Plplotwin' extended widget.  If you don't have that
# widget set up (from the 'tk-x-plat' bindings), then use the
# 'runAllDemos.tcl' script instead.
# 
# Vince Darley
# vince@santafe.edu
# 
#----------------------------------------------------------------------------

if {[catch {file readlink [info script]} path]} {
    set path [info script]
}
cd [file join [file dirname $path] .. tcl]
lappend auto_path [pwd]
catch {package require Plplotter}
Plplotwin .p
grid .p -columnspan 5 -sticky news
grid rowconfigure . 0 -weight 1
for {set i 0} {$i < 5} {incr i} {
    grid columnconfigure . $i -weight 1
}

# turn on pauses
.p cmd plspause 1

button .cexit -text "Quit" -command exit
button .cshell -text "Shell" -command "console show"
button .creload -text "Reload" -command reload
button .ctoggle -text "Toggle Menu" -command toggleMenu

set buttons [list .cexit .cshell .creload .ctoggle]

proc toggleMenu {} {
    if {[.p cget -menulocation] == "menubar"} {
	.p configure -menulocation local
    } else {
	.p configure -menulocation menubar
    }
}

proc reload {} {
    global demos
    foreach demo $demos {
	catch {rename $demo {}}
    }
    auto_reset
}

proc run {demo} {
    setButtonState disabled
    .p bop
    update idletasks
    if {[catch {$demo .p} err]} {
	puts stderr $err
    }
    .p bop
    setButtonState normal
}

proc setButtonState {state} {
    foreach b [info commands .b*] {
	$b configure -state $state
    }
}

for {set i 1} {$i <= [llength [glob x*.tcl]]} {incr i} {
    set demo x[format "%02d" $i]
    button .b$i -text "Demo $i" -command [list run $demo]
    lappend demos $demo
    lappend buttons .b$i
    if {[llength $buttons] == 5} {
	eval grid $buttons -sticky ew
	set buttons {}
    }
}

if {[llength $buttons]} {
    eval grid $buttons -sticky ew
}