Index: build-common.sh ================================================================== --- build-common.sh +++ build-common.sh @@ -14,6 +14,6 @@ version) echo "${tuapi_version}" ;; esac -./stringify.tcl tuapi.tcl > tuapi.tcl.h +sed 's@[\\"]@\\&@g;s@^@ "@;s@$@\\n"@' tuapi.tcl > tuapi.tcl.h DELETED stringify.tcl Index: stringify.tcl ================================================================== --- stringify.tcl +++ stringify.tcl @@ -1,27 +0,0 @@ -#! /usr/bin/env tclsh - -proc stringifyfile {filename {key 0}} { - catch { - set fd [open $filename r] - } - - if {![info exists fd]} { - return "" - } - - set data [read -nonewline $fd] - close $fd - - foreach line [split $data \n] { - set line [string map [list "\\" "\\\\" "\"" "\\\""] $line] - append ret " \"$line\\n\"\n" - } - - return $ret -} - -foreach file $argv { - puts -nonewline [stringifyfile $file] -} - -exit 0