Index: lib/xvfs/xvfs.c.rvt ================================================================== --- lib/xvfs/xvfs.c.rvt +++ lib/xvfs/xvfs.c.rvt @@ -1,6 +1,10 @@ -#include +#include #include #include #include #include Index: lib/xvfs/xvfs.tcl ================================================================== --- lib/xvfs/xvfs.tcl +++ lib/xvfs/xvfs.tcl @@ -220,11 +220,11 @@ set rootDirectory $val } "--name" { set fsName $val } - "--output" { + "--output" - "--header" { # Ignored, handled as part of some other process } default { printHelp stderr [list "Invalid option: $arg $val"] exit 1 @@ -267,7 +267,17 @@ proc ::xvfs::setOutputVariable {variable} { uplevel #0 { package require minirivet } tailcall ::minirivet::setOutputVariable $variable } + +proc ::xvfs::staticIncludeHeaderData {headerData} { + set ::xvfs::xvfsCoreH $headerData +} + +proc ::xvfs::staticIncludeHeader {pathToHeaderFile} { + set fd [open $pathToHeaderFile] + ::xvfs::staticIncludeHeaderData [read $fd] + close $fd +} package provide xvfs 1 Index: xvfs-create ================================================================== --- xvfs-create +++ xvfs-create @@ -16,10 +16,13 @@ foreach {arg val} $argv { switch -exact -- $arg { "--output" { set outputFile $val } + "--header" { + set headerFile $val + } } } proc remove_debug {input} { set output [list] @@ -48,10 +51,13 @@ if {[info exists outputFile]} { set fd [open $outputFile w] ::xvfs::setOutputChannel $fd } + if {[info exists headerFile]} { + ::xvfs::staticIncludeHeader $headerFile + } ::xvfs::run $argv if {[info exists fd]} { close $fd }