Check-in [09e53d3c38]
Overview
Comment:Allow the user to specify either the path to or the contents of "xvfs-core.h"
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 09e53d3c384583284922bec955b21168aaa1e7d08feb8ceabef2c2eff575e919
User & Date: rkeene on 2019-09-20 15:58:44
Other Links: manifest | tags
Context
2019-09-20
16:06
Fixed bug in producing errors check-in: 30ffb49c05 user: rkeene tags: trunk
15:58
Allow the user to specify either the path to or the contents of "xvfs-core.h" check-in: 09e53d3c38 user: rkeene tags: trunk
15:46
Allow the user to specify a different output command for minirivet check-in: 5dc4de14de user: rkeene tags: trunk
Changes

Modified lib/xvfs/xvfs.c.rvt from [6e02b9cbb2] to [5748d80b1d].





1

2
3
4
5
6
7
8
1
2
3
4

5
6
7
8
9
10
11
12
+
+
+
+
-
+







<?
	if {[info exists ::xvfs::xvfsCoreH]} {
?><?= $::xvfs::xvfsCoreH ?><?
	} else {
#include <xvfs-core.h>
?>#include <xvfs-core.h><? } ?>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <tcl.h>

#define XVFS_NAME_LOOKUP_ERROR (-1)
#define XVFS_FILE_BLOCKSIZE 1024

Modified lib/xvfs/xvfs.tcl from [03c3c7ca3b] to [42bc5b4d63].

218
219
220
221
222
223
224
225

226
227
228
229
230
231
232
218
219
220
221
222
223
224

225
226
227
228
229
230
231
232







-
+







			}
			"--directory" {
				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
			}
		}
265
266
267
268
269
270
271
272










273
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283








+
+
+
+
+
+
+
+
+
+

	tailcall ::minirivet::setOutputChannel $channel
}

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

Modified xvfs-create from [5ca0ed49a5] to [1d3473f00d].

14
15
16
17
18
19
20



21
22
23
24
25
26
27
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30







+
+
+







}

foreach {arg val} $argv {
	switch -exact -- $arg {
		"--output" {
			set outputFile $val
		}
		"--header" {
			set headerFile $val
		}
	}
}

proc remove_debug {input} {
	set output [list]

	set lastLine -
46
47
48
49
50
51
52



53
54
55
56
57
58
59
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65







+
+
+







		package require xvfs

		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
		}
	}
	"dump-tcl" {