Check-in [5989d7a323]
Overview
Comment:Replaced stringify with a simpler "sed" script
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5989d7a3233920d359edd2da602ca91beebfce38
User & Date: rkeene on 2014-10-28 19:43:43
Other Links: manifest | tags
Context
2014-10-28
19:44
tuapi 0.4 check-in: cc158325f1 user: rkeene tags: trunk
19:43
Replaced stringify with a simpler "sed" script check-in: 5989d7a323 user: rkeene tags: trunk
19:39
Updated to allow user to specify some compilation flags as a part of KitCreator build check-in: 8b9755f077 user: rkeene tags: trunk
Changes

Modified build-common.sh from [82f16cfdad] to [bcc9e1cb0b].

    12     12   		exit 0
    13     13   		;;
    14     14   	version)
    15     15   		echo "${tuapi_version}"
    16     16   		;;
    17     17   esac
    18     18   
    19         -./stringify.tcl tuapi.tcl > tuapi.tcl.h
           19  +sed 's@[\\"]@\\&@g;s@^@   "@;s@$@\\n"@' tuapi.tcl > tuapi.tcl.h

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