Annotation For xvfs-create

Lines of xvfs-create from check-in 7664854ef9 that are changed by the sequence of edits moving toward check-in b8cca3a6b4:

                         1: #! /usr/bin/env tclsh
                         2: 
                         3: set sourceDirectory [file dirname [file normalize [info script]]]
                         4: 
                         5: lappend auto_path [file join $sourceDirectory lib]
                         6: 
                         7: set template [file join $sourceDirectory xvfs.c.rvt]
                         8: 
                         9: package require minirivet
                        10: 
                        11: set mode "run"
                        12: if {[lindex $argv 0] == "--dump-tcl"} {
                        13: 	set mode "dump-tcl"
                        14: }
                        15: 
                        16: switch -- $mode {
                        17: 	"run" {
                        18: 		::minirivet::parse $template
                        19: 	}
                        20: 	"dump-tcl" {
                        21: 		set xvfs_tcl [file join $sourceDirectory lib xvfs xvfs.tcl]
                        22: 		set xvfs_core_h [file join $sourceDirectory xvfs-core.h]
                        23: 		set xvfs_core_c [file join $sourceDirectory xvfs-core.c]
                        24: 
7664854ef9 2019-05-08   25: 		set cleanup [list "#include <xvfs-core.h>" ""]
                        26: 
                        27: 		set core_header_data ""
                        28: 		append core_header_data [string map $cleanup [read [open $xvfs_core_h]]] "\n"
                        29: 		append core_header_data [string map $cleanup [read [open $xvfs_core_c]]] "\n"
                        30: 
                        31: 		puts "#! /usr/bin/env tclsh"
                        32: 		puts ""
                        33: 		puts [read [open $xvfs_tcl]]
                        34: 		puts ""
                        35: 		puts [list puts -nonewline $core_header_data]
                        36: 		puts ""
                        37: 		puts [string map $cleanup [::minirivet::parseStringToCode [read [open $template]]]]
                        38: 	}
                        39: 	default {
                        40: 		puts stderr "error: Invalid mode: $mode"
                        41: 		exit 1
                        42: 	}
                        43: }