Check-in [702c74c153]
Overview
Comment:Fix help
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 702c74c15384adb47c985d849ae75d96ba55efdb90944f5b6501ba6cd74b2480
User & Date: rkeene on 2019-09-20 15:02:30
Other Links: manifest | tags
Context
2019-09-20
15:18
Improved how the XVFS package finds its source files check-in: 2b7fa3a8fa user: rkeene tags: trunk
15:02
Fix help check-in: 702c74c153 user: rkeene tags: trunk
15:00
Add support for writing output to a file rather than stdout check-in: 0bdbe4333e user: rkeene tags: trunk
Changes

Modified lib/xvfs/xvfs.tcl from [3bcab2cb44] to [09808ef2f1].

1
2
3
4
5
6
7
8
9
10
11
12
13

14
15

16
17

18
19
20
21
22
23
24
1
2
3
4
5
6
7
8
9
10
11
12

13
14

15
16

17
18
19
20
21
22
23
24












-
+

-
+

-
+







#! /usr/bin/env tclsh

namespace eval ::xvfs {}

# Functions
proc ::xvfs::_emitLine {line} {
	::minirivet::_emitOutput "${line}\n"
}

proc ::xvfs::printHelp {channel {errors ""}} {
	if {[llength $errors] != 0} {
		foreach error $errors {
			::xvfs::_emitLine $channel "error: $error"
			puts $channel "error: $error"
		}
		::xvfs::_emitLine $channel ""
		puts $channel ""
	}
	::xvfs::_emitLine $channel "Usage: dir2c \[--help\] --directory <rootDirectory> --name <fsName>"
	puts $channel "Usage: dir2c \[--help\] \[--output <filename>\] --directory <rootDirectory> --name <fsName>"
	flush $channel
}

proc ::xvfs::sanitizeCString {string} {
	set output [join [lmap char [split $string ""] {
		if {![regexp {[A-Za-z0-9./-]} $char]} {
			binary scan $char H* char