1#!/usr/bin/tcl
2#
3# Convert input text into a C string
4#
5set in [open [lindex $argv 0] rb]
6while {![eof $in]} {
7  set line [gets $in]
8  if {[eof $in]} break;
9  set x [string map "\\\\ \\\\\\\\ \\\" \\\\\"" $line]
10  puts "\"$x\\n\""
11}
12close $in
13