Overview
Comment: | Updated to string-ify Tcl script using "sed" |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | f3c0a33c84fdf79521c8ff529663d242a5bf2ba0 |
User & Date: | rkeene on 2014-09-10 07:29:12 |
Other Links: | manifest | tags |
Context
2014-09-10
| ||
07:33 | Removed extraneous reference to stringify check-in: ce18c8a9b9 user: rkeene tags: trunk | |
07:29 | Updated to string-ify Tcl script using "sed" check-in: f3c0a33c84 user: rkeene tags: trunk | |
07:24 | Finished renames check-in: 6958ab0b94 user: rkeene tags: trunk | |
Changes
Modified Makefile from [66bca1d85f] to [7cb5c594ef].
22 22 appfsd: appfsd.o 23 23 $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o appfsd appfsd.o $(LIBS) 24 24 25 25 appfsd.o: appfsd.c appfsd.tcl.h 26 26 $(CC) $(CPPFLAGS) $(CFLAGS) -o appfsd.o -c appfsd.c 27 27 28 28 appfsd.tcl.h: appfsd.tcl stringify.tcl 29 - ./stringify.tcl appfsd.tcl > appfsd.tcl.h.new 29 + sed 's@[\\"]@\\&@g;s@^@ "@;s@$$@\\n"@' appfsd.tcl > appfsd.tcl.h.new 30 30 mv appfsd.tcl.h.new appfsd.tcl.h 31 31 32 32 install: appfsd 33 33 cp appfsd $(bindir) 34 34 35 35 clean: 36 36 rm -f appfsd appfsd.o 37 37 rm -f appfsd.tcl.h 38 38 39 39 distclean: clean 40 40 41 41 .PHONY: all test clean distclean install
Deleted stringify.tcl version [07e25e6903].
1 -#! /usr/bin/env tclsh 2 - 3 -proc stringifyfile {filename {key 0}} { 4 - catch { 5 - set fd [open $filename r] 6 - } 7 - 8 - if {![info exists fd]} { 9 - return "" 10 - } 11 - 12 - set data [read -nonewline $fd] 13 - close $fd 14 - 15 - foreach line [split $data \n] { 16 - set line [string map [list "\\" "\\\\" "\"" "\\\""] $line] 17 - append ret " \"$line\\n\"\n" 18 - } 19 - 20 - return $ret 21 -} 22 - 23 -foreach file $argv { 24 - puts -nonewline [stringifyfile $file] 25 -} 26 - 27 -exit 0