1
2
3
4
5
6
7
8
9
|
#! /usr/bin/env tclsh
set sourceDirectory [file dirname [file normalize [info script]]]
lappend auto_path [file join $sourceDirectory lib]
set template [file join xvfs.c.rvt]
package require minirivet
minirivet::parse $template
|
>
>
|
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
|
#! /usr/bin/env tclsh
set sourceDirectory [file dirname [file normalize [info script]]]
lappend auto_path [file join $sourceDirectory lib]
set template [file join $sourceDirectory xvfs.c.rvt]
package require minirivet
set mode "run"
if {[lindex $argv 0] == "--dump-tcl"} {
set mode "dump-tcl"
}
switch -- $mode {
"run" {
::minirivet::parse $template
}
"dump-tcl" {
set xvfs_tcl [file join $sourceDirectory lib xvfs xvfs.tcl]
puts "#! /usr/bin/env tclsh"
puts ""
puts [read [open $xvfs_tcl]]
puts ""
puts [::minirivet::parseStringToCode [read [open $template]]]
}
default {
puts stderr "error: Invalid mode: $mode"
exit 1
}
}
|