File: string2c.tcl

package info (click to toggle)
ns2 2.35%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 78,796 kB
  • sloc: cpp: 172,923; tcl: 107,130; perl: 6,391; sh: 6,143; ansic: 5,846; makefile: 816; awk: 525; csh: 355
file content (6 lines) | stat: -rwxr-xr-x 183 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
# Define a C string variable of the name $name
#  and set its value to what can be read from stdin

set name [lindex $argv 0]
gets stdin version
puts "char $name\[\] = \"$version\";"