Files
MaxScale/query_classifier/qc_sqlite/sqlite-src-3110100.old/tool/tostr.tcl
Johan Wikman 81e78726eb MXS-2732 Rename sqlite-src-3110100 to sqlite-src-3110100.old
Originally, the sqlite installation was imported into the MaxScale
repository in the one gigantic MaxScale 1.4 -> 2.0 commit.

Consequently, there is no import commit to compare to if you want
to extract all MaxScale specific changes. To make it simpler in the
future, sqlite will now be imported in a commit of its own.
2019-10-30 10:58:24 +02:00

13 lines
243 B
Tcl

#!/usr/bin/tcl
#
# Convert input text into a C string
#
set in [open [lindex $argv 0] rb]
while {![eof $in]} {
set line [gets $in]
if {[eof $in]} break;
set x [string map "\\\\ \\\\\\\\ \\\" \\\\\"" $line]
puts "\"$x\\n\""
}
close $in