drh | 48cc9a3 | 2015-10-07 12:36:42 +0000 | [diff] [blame] | 1 | #!/usr/bin/tcl |
2 | # | ||||
3 | # Convert input text into a C string | ||||
4 | # | ||||
5 | set in [open [lindex $argv 0] rb] | ||||
6 | while {![eof $in]} { | ||||
7 | set line [gets $in] | ||||
8 | if {[eof $in]} break; | ||||
9 | set x [string map "\\\\ \\\\\\\\ \\\" \\\\\"" $line] | ||||
10 | puts "\"$x\\n\"" | ||||
11 | } | ||||
12 | close $in |