summaryrefslogtreecommitdiffstats
path: root/tools/str2c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/str2c')
-rw-r--r--tools/str2c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/str2c b/tools/str2c
index 15cb8e6..cff7ba2 100644
--- a/tools/str2c
+++ b/tools/str2c
@@ -4,10 +4,8 @@
#
# 1997/10 -- dl
#
-# $Id: str2c,v 1.2 1999/04/16 00:47:40 stanton Exp $
-#
# restart with tclsh \
-exec tclsh8.0 "$0" "$@"
+exec tclsh "$0" ${1+"$@"}
# Max string length
# (some C compiler have a 2048 chars limits (so 2047 real chars with
@@ -38,7 +36,7 @@ static char data\[\]=\"[translate $r]\";"
puts "/*
* Multi parts read only string generated by str2c
*/
-static CONST char * CONST data\[\]= {"
+static const char * const data\[\]= {"
set n 1
for {set i 0} {$i<$lg} {incr i $MAX} {
set part [string range $r $i [expr $i+$MAX-1]]
@@ -50,7 +48,7 @@ static CONST char * CONST data\[\]= {"
}
puts "\tNULL\t/* End of data marker */\n};"
puts "\n/* use for instance with:
- CONST char * CONST *chunk;
+ const char * const *chunk;
for (chunk=data; *chunk; chunk++) {
Tcl_AppendResult(interp, *chunk, (char *) NULL);
}