Fossil SCM

Update autosetup to 0.6.3 Some mingw32 improvements. Bootstrap jimsh0.c can now be built for embedding in addition to as jimsh.

steveb 2011-10-28 14:42 trunk
Commit cdd4c6a580c5a06f92dd8313590732dc9f555696
--- a/autosetup/README.autosetup
+++ b/autosetup/README.autosetup
@@ -1 +1 @@
1
-This is autosetup v0.6.2. S
1
+This is autosetup v0.6.3. S
--- a/autosetup/README.autosetup
+++ b/autosetup/README.autosetup
@@ -1 +1 @@
1 This is autosetup v0.6.2. S
--- a/autosetup/README.autosetup
+++ b/autosetup/README.autosetup
@@ -1 +1 @@
1 This is autosetup v0.6.3. S
--- a/autosetup/autosetup
+++ b/autosetup/autosetup
@@ -5,11 +5,62 @@
55
return $alias
66
}[error-location $msg]use cc cc-shareduplevel #0#!/bin/sh
77
${m}.tcl
8
-uplevel #0 [list source $source]put2put3 "Looking for $source"![string m 2>/dev/null} {
9
- set create_configure 1Use --initset cre#!/bin/sh
10
-4 => "creat # Jim uses system() for exec under mingw, so
11
- # we need to fetch the output ourselves
12
- set tmpfile auto[format %04x [rand 10000]].tmp
13
- set rc [catch [list exec {*}$readfile $tmpfile]
14
- file delete $tmpfile
15
- return -code $rc $result
8
+uplevel #0 [list source $source]put3 "Looking for $source"![string m 2>/dev/null} {
9
+ set create_configure 1Use --initset create_configure 0if {$create_configureinstalled)} {
10
+ user-notice "Warning: Initialising from the development version of autosetup"
11
+
12
+ "#!/bin/sh\nWRAPPER=\"\$0\h
13
+autosetup \"\$@\"\n"
14
+ } else {
15
+ }
16
+ }#!/bin/sh
17
+.def {# Initial auto.def created by 'autosetup --init'
18
+
19
+use cc
20
+
21
+# Add any user options here
22
+options {
23
+}
24
+
25
+make-config-header config.h
26
+make-template Makefile.in
27
+}
28
+ }#!/bin/sh
29
+ I don't see Makefile.in. You will probably need to create one."
30
+ }
31
+
32
+ exitN@6Yl,7:installM@A70,4O@800,2:{}LM@84u,8: catch {T@6rS,K@83h,P:--init >@stdout 2>@stderrG@1GW,mo@8bK,6:} elseH@9Jk,8:win)} {
33
+x@9Po,b@9Ql,S@9Ki,d@9Rp,B:}
34
+} else {
35
+Q@9Sf,G:alias getenv envJQ@9Vb,1P:Similar to error-location, but called when user code generates an error
36
+# In this case weI@9cU,1H:stack trace in user code, but not in autosetup code
37
+# (unless --debug is enabled)o@9tT,1J:istcl)} {
38
+ if {[regexp {file "([^ ]*)" line ([0-9]*)} $::errorInfo dummy file lineW@9lr,3U:file]:$line $msg\n$::errorInfo"
39
+ }
40
+ return $::errorInfo
41
+ } else {
42
+ # Prepend a live stacktrace to the error stacktrace, omitting the current level
43
+ set stacktrace [concat [info stacktrace] [lrange [stacktrace] 3 end]]
44
+L@7w0,1r:debug)} {
45
+ # Omit any levels from autosetup or with no file
46
+ set newstacktrace {}
47
+ foreach {p f l} $stacktrace {P@8BT,X:autosetup" $f] || $f eq ""} {
48
+ J@9n0,8:p $f:$l"P@8Cl,5S:lappend newstacktrace $p $f $l
49
+ }
50
+ set stacktrace $newstacktrace
51
+ }
52
+
53
+ # Convert filenames to relative paths
54
+ set newstacktrace {}
55
+ foreach {p f l} $stacktrace {
56
+ lappend newstacktrace $p [relative-path $f] $l
57
+ }
58
+ lassign $newstacktrace p f l
59
+ if {$f ne ""} {
60
+ set prefix "$f:$l: "
61
+ } else {
62
+ set prefix ""
63
+ }
64
+
65
+ return "${prefix}P@A5j,H:newstacktrace]"
66
+ M@7c0,5:text-W@5nD,4:text2G@8jU,M@5Xi,qk@AA0,1Lhwf4;
--- a/autosetup/autosetup
+++ b/autosetup/autosetup
@@ -5,11 +5,62 @@
5 return $alias
6 }[error-location $msg]use cc cc-shareduplevel #0#!/bin/sh
7 ${m}.tcl
8 uplevel #0 [list source $source]put2put3 "Looking for $source"![string m 2>/dev/null} {
9 set create_configure 1Use --initset cre#!/bin/sh
10 4 => "creat # Jim uses system() for exec under mingw, so
11 # we need to fetch the output ourselves
12 set tmpfile auto[format %04x [rand 10000]].tmp
13 set rc [catch [list exec {*}$readfile $tmpfile]
14 file delete $tmpfile
15 return -code $rc $result
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/autosetup/autosetup
+++ b/autosetup/autosetup
@@ -5,11 +5,62 @@
5 return $alias
6 }[error-location $msg]use cc cc-shareduplevel #0#!/bin/sh
7 ${m}.tcl
8 uplevel #0 [list source $source]put3 "Looking for $source"![string m 2>/dev/null} {
9 set create_configure 1Use --initset create_configure 0if {$create_configureinstalled)} {
10 user-notice "Warning: Initialising from the development version of autosetup"
11
12 "#!/bin/sh\nWRAPPER=\"\$0\h
13 autosetup \"\$@\"\n"
14 } else {
15 }
16 }#!/bin/sh
17 .def {# Initial auto.def created by 'autosetup --init'
18
19 use cc
20
21 # Add any user options here
22 options {
23 }
24
25 make-config-header config.h
26 make-template Makefile.in
27 }
28 }#!/bin/sh
29 I don't see Makefile.in. You will probably need to create one."
30 }
31
32 exitN@6Yl,7:installM@A70,4O@800,2:{}LM@84u,8: catch {T@6rS,K@83h,P:--init >@stdout 2>@stderrG@1GW,mo@8bK,6:} elseH@9Jk,8:win)} {
33 x@9Po,b@9Ql,S@9Ki,d@9Rp,B:}
34 } else {
35 Q@9Sf,G:alias getenv envJQ@9Vb,1P:Similar to error-location, but called when user code generates an error
36 # In this case weI@9cU,1H:stack trace in user code, but not in autosetup code
37 # (unless --debug is enabled)o@9tT,1J:istcl)} {
38 if {[regexp {file "([^ ]*)" line ([0-9]*)} $::errorInfo dummy file lineW@9lr,3U:file]:$line $msg\n$::errorInfo"
39 }
40 return $::errorInfo
41 } else {
42 # Prepend a live stacktrace to the error stacktrace, omitting the current level
43 set stacktrace [concat [info stacktrace] [lrange [stacktrace] 3 end]]
44 L@7w0,1r:debug)} {
45 # Omit any levels from autosetup or with no file
46 set newstacktrace {}
47 foreach {p f l} $stacktrace {P@8BT,X:autosetup" $f] || $f eq ""} {
48 J@9n0,8:p $f:$l"P@8Cl,5S:lappend newstacktrace $p $f $l
49 }
50 set stacktrace $newstacktrace
51 }
52
53 # Convert filenames to relative paths
54 set newstacktrace {}
55 foreach {p f l} $stacktrace {
56 lappend newstacktrace $p [relative-path $f] $l
57 }
58 lassign $newstacktrace p f l
59 if {$f ne ""} {
60 set prefix "$f:$l: "
61 } else {
62 set prefix ""
63 }
64
65 return "${prefix}P@A5j,H:newstacktrace]"
66 M@7c0,5:text-W@5nD,4:text2G@8jU,M@5Xi,qk@AA0,1Lhwf4;
--- a/autosetup/cc-shared.tcl
+++ b/autosetup/cc-shared.tcl
@@ -30,6 +30,4 @@
3030
# Generic Unix settingsstems http://www.workwa# Copyrigference for identifying the toolchain
3131
# http://sourceforge.net/apps/mediawiki/predef/ define SHOBJ_LDFLAGS_R -bobject
3232
## SHOBJ_LDFLAGS Flags to us-fpshared Flags to us-fpicf/ define SHOBJ_LDFLAGS_R -bobject
33
-## SHOBJ_LDFLAGS Flags to us"-shared -nostartfiles"
34
- }
35
-}
33
+## SHOBJ_LDFLAGS Flags to us
--- a/autosetup/cc-shared.tcl
+++ b/autosetup/cc-shared.tcl
@@ -30,6 +30,4 @@
30 # Generic Unix settingsstems http://www.workwa# Copyrigference for identifying the toolchain
31 # http://sourceforge.net/apps/mediawiki/predef/ define SHOBJ_LDFLAGS_R -bobject
32 ## SHOBJ_LDFLAGS Flags to us-fpshared Flags to us-fpicf/ define SHOBJ_LDFLAGS_R -bobject
33 ## SHOBJ_LDFLAGS Flags to us"-shared -nostartfiles"
34 }
35 }
--- a/autosetup/cc-shared.tcl
+++ b/autosetup/cc-shared.tcl
@@ -30,6 +30,4 @@
30 # Generic Unix settingsstems http://www.workwa# Copyrigference for identifying the toolchain
31 # http://sourceforge.net/apps/mediawiki/predef/ define SHOBJ_LDFLAGS_R -bobject
32 ## SHOBJ_LDFLAGS Flags to us-fpshared Flags to us-fpicf/ define SHOBJ_LDFLAGS_R -bobject
33 ## SHOBJ_LDFLAGS Flags to us
 
 
--- a/autosetup/find-tclsh
+++ b/autosetup/find-tclsh
@@ -1,9 +1,10 @@
11
#!/bin/sh
22
# Looks for a suitable tclsh or jimsh in the PATH
33
# If not foundstrap jimsh d=`dirname "$0"`
4
-{ "$d/jimshd/${1-ac"; } 2>&imsh0"
4
+{ "$d/jimshd/${1-ac"; } 2>&1done
5
+echo 1>&2 bootstrap jimsh0"
56
for cc in tclsh8.7; do
6
- jimsh0-tclsh}"; } 2>/devexit 0
7
+ { $tclsh " >/dev "$d/${1-autosetup--tclsh}"; } 2>/devexit 0
78
done
89
echo 1>&2 "No installed jimsh or tclsh, building local bootstrap jimsh0"
910
for cc in ${CC_FOR_BUILD:-PATH="$PATH:$d2>/dev/null
--- a/autosetup/find-tclsh
+++ b/autosetup/find-tclsh
@@ -1,9 +1,10 @@
1 #!/bin/sh
2 # Looks for a suitable tclsh or jimsh in the PATH
3 # If not foundstrap jimsh d=`dirname "$0"`
4 { "$d/jimshd/${1-ac"; } 2>&imsh0"
 
5 for cc in tclsh8.7; do
6 jimsh0-tclsh}"; } 2>/devexit 0
7 done
8 echo 1>&2 "No installed jimsh or tclsh, building local bootstrap jimsh0"
9 for cc in ${CC_FOR_BUILD:-PATH="$PATH:$d2>/dev/null
--- a/autosetup/find-tclsh
+++ b/autosetup/find-tclsh
@@ -1,9 +1,10 @@
1 #!/bin/sh
2 # Looks for a suitable tclsh or jimsh in the PATH
3 # If not foundstrap jimsh d=`dirname "$0"`
4 { "$d/jimshd/${1-ac"; } 2>&1done
5 echo 1>&2 bootstrap jimsh0"
6 for cc in tclsh8.7; do
7 { $tclsh " >/dev "$d/${1-autosetup--tclsh}"; } 2>/devexit 0
8 done
9 echo 1>&2 "No installed jimsh or tclsh, building local bootstrap jimsh0"
10 for cc in ${CC_FOR_BUILD:-PATH="$PATH:$d2>/dev/null
+122 -107
--- a/autosetup/jimsh0.c
+++ b/autosetup/jimsh0.c
@@ -18,127 +18,142 @@
1818
#define HAVE_UMASK
1919
#include elseSEPARATOR ":"
2020
#ifdef _ATFORM_PLATFORM "unix"
21
-#define TCL_PLATFORM_PATH_SEPARMKSTEMP
21
+#define TCL_PLATFORM_PATH_SEPARATOR ":#elseVE_MKSTEMP
22
+#define HAVY
23
+#define HAVE_MKSTEMP
2224
#define HAVE_LINK
2325
#define HAVE_SYS_TIME_H
2426
#define HAVE_DITFORM "unix"
2527
#define TCL_PLATFndif
2628
#define JIM_VERS3cl. See http://jim.berlios.de/ */
27
-#define _GNU_SOURCEREFERENCES single source file,/* /**
28
- * UTF-8 utility functions
29
- *
30
- * (c) 2010 Steve Bennett <[email protected]>
31
- *
32
- * See LICENCE for licence details.
33
- */
34
-
35
-/**
36
- * Converts the given unicode codepoint (0 - 0xffff) to utf-8
37
- * and stores the result at 'p'.
38
- *
39
- * Returns the number of utf-8 characters (1-3).
40
- */
41
-intJim Tcl. See http://jim.tcl.tk/ */
29
+#define _GNU_SOURCEREFERENCES single source file,/* This is single source file, bootstrap version of Jim Tcl. See http://jim.tcl.tk/ */
4230
#define JIM_TCL_COMPAT_H
43
-#define/* No utf-8 support. 1 byte = 1 char */
44
-#define utf8_strlen(S, B) TCL_LIBRARY "."
45
-#define j
46
-#defineS, CP) (*(CP) = #define jim_eexecxec
31
+#define TCL_LIBRARY "."
32
+#define jim_ext_stdlib
33
+#define jimregexpxec
34
+#define jim_efilexec
35
+#define jim_eexecxec
4736
#define jim_eclockxec
4837
#define jim_ee TCL_PLATFORM_OS "windows"
4938
#define TCL_PLATFORM_PLATFORM "windows"
50
-#define TCL_PLAT/**
51
- * Returns the length of the utf-8 sequence starting with 'c'.
52
- *
53
- * Returns 1-4, or -1 if this is not a valid start byte.
54
- *
55
- * Note that charlen=4 is not supported by the rest of the API.
56
- */
57
-int utf8_charlen(int c);
39
+#define TCL_PLATFORM_PATH_SEPARATOR ";"
40
+#define HAVE_MKDIR_ONE_ARG
41
+#define HAVE_SYSTEM
42
+#elif defined(__MINGW32__)
43
+#define TCL_PLATFORM_OS "mingw"
44
+#define TCL_PLATFORM_PLATFORM "windows"
45
+#define TCL_PLATFORM_PATH_SEPARATOR ";"
46
+#define HAVE_MKDIR_ONE_ARG
47
+#define HAVE_SYSTEM
48
+#define HAVE_SYS_TIME_H
49
+#define HAVE_DIRENT_H
50
+#define HAVE_UNISTD_H
51
+#define HAVE_UMASK
52
+#include elseSEPARATOR ":"
53
+#ifdef _ATFORM_PLATFORM "unix"
54
+#define TCL_PLATFORM_PATH_SEPARATOR ":"
55
+#ifdef _MINIX
56
+#define vfork VE_WAITPID
57
+#Vndif
58
+#define HAVE_WAITPID
59
+#define HAVE_ISATE_WAITPID
60
+#define HAVE_ISATTY
61
+#define HAVE_MKSTEMP
62
+#define HAVE_LINK
63
+#define HAVE_SYS_TIME_H
64
+#define HAVE_DITFORM "unix"
65
+#define TCL_PLATFndif
66
+#define JIM_VERSION 75if
5867
59
-/**
60
- * Returns the number of characters in the utf-8
61
- * string of the given byte length.
62
- *
63
- * Any bytes which are not part of an valid utf-8
64
- * sequence are treated as individual characters.
65
- *
66
- * The string *must* be null terminated.
67
- *
68
- * Does not support unicode code points > \uffff
69
- */
70
-int utf8_strlen(bytelen);
7168
72
-/**
73
- * Returns the byte index of the given character in the utf-8 string.
74
- *
75
- * The string *must* be null terminated.
76
- *
77
- * This will return the byte length of a utf-8 string
78
- * if given the char charindex);
69
+#5if
7970
80
-/**
81
- * Returns the unicode codepoint corresponding to the
82
- * utf-8 sequence 'str'.
83
- *
84
- * Stores the result in *uc and returns the number of bytes
85
- * consumed.
86
- *
87
- * If 'str' is null terminated, then an invalid utf-8 sequence
88
- * at the end of the string will be returned as individual bytes.
89
- *
90
- * If it is not null terminated, the length *must* be checked first.
91
- *
92
- * Does not support unicode c*uc);
9371
94
-/**
95
- * Returns the number of bytes before 'str' that the previous
96
- * utf-8 character sequence starts (which may be the middle of a sequence).
97
- *
98
- * Looks back at most 'len' bytes backwards, which must be > 0.
99
- * If no start char is found, returns -len
100
- */
101
-int utf8_prev_len(
102
-/**
103
- * Returns the upper-case variant of the given unicode codepoint.
104
- *
105
- * Does not support unicode code points > \uffff
106
- */
107
-int utf8_upper(int uc);
72
+#if defined(_WIN32) || defined(WIN32)
10873
109
-/**
110
- * Returns the lower-case variant of the given unicode codepoint.
111
- *
112
- * NOTE: Use utf8_upper() in preference for case-insensitive matching.
113
- *
114
- * Does not support unicode code points > \uffff
115
- */
116
-int utf8_lower(int uc);
74
+#define HAVE_DLOPEN
75
+void *dlopen(const rror(void);
11776
77
+
78
+#if defined(__MINGW3l lmap part [split $braced ,] {\n"
79
+" set pat $before$part$after\n"
80
+" proc glob.glob if {$dir eq $pattern} {\n"
81
+\n"
82
+" set dir foreach dir $dirlismatch \"*/\" $dir]}ep \"\"\n"
83
+" } elseif {$dir eq \".\"} {\n"
84
+" set globdir \"\"\n"
85
+" set sep \"\"set sep /foreach pat [glob.expandbracesreaddir_pattern $dir $pat] {\n"
86
+" globdir$sep$name http://jim.berl3cl. See http://jimset nocomplain 0-nocomplain\"} {\n"
87
+"lappend result {*}[glob.globnocomplain == 0flush/
88
+#define _GNU_SOURCEREFERENCES erlios.de/ *long offsetfseekfilenflush."3short
89
+#define HAVE_UNISTD_H
90
+#define HAVE_UMASK
91
+#include elseSEPARATOR ":"
92
+#ifdef _ATFORM_PLATFORM "unix"
93
+#define TCL_PLATFORM_PATH_SEPARATOR ":"
94
+#ifdef _MINIX
95
+#define vfork VE_WAITPID
96
+#Vndif
97
+#define HAVE_WAITPID
98
+# HAVE_ISATTY
99
+#define HAVE_MKSTEMP
100
+#define HAVE_LINK
101
+#define HAVE_SYS_TIME_H
102
+#define HAVE_DITFORM "unix"
103
+#define TCL_PLATFndif
104
+#define JIM_VERSION 75if
105
+
106
+
107
+#5if
108
+
109
+
110
+#if defined(_WIN32) || defined(WIN32)
111
+
112
+#define HAVE_DLOPEN
113
+void *dlopen(const rror(void);
114
+
115
+
116
+#if defined(__MINGW32__)
117
+ #(disable:4146)
118118
#endif
119119
120
-#endif
121
-/* Jim - A small embeddable Tcl interpreter
122
- *
123
- * Copyright 2005 Salvatore Sanfilippo <[email protected]>
124
- * Copyright 2005 Clemens Hintze <[email protected]>
125
- * Copyright 2005 patthoyts - Pat Thoyts <[email protected]>
126
- * Copyright 2008 oharboe - �yvind Harboe - [email protected]
127
- * Copyright 2008 Andrew Lunn <[email protected]>
128
- * Copyright 2008 Duane Ellis <[email protected]>
129
- * Copyright 2008 Uwe Klein <[email protected]>
130
- *
131
- * Redistribution and use in source and binary forms, with or without
132
- * modification, are permitted provided that the following conditions
133
- * are met:
134
- *
135
- * 1. Redistributions of source code must retain the above copyright
136
- * notice, this list of conditions and the following disclaimer.
137
- * 2. Redistributions in binary form must reproduce the above
138
- * copyright notice, this list of conditions and the following
139
- * disclaimer in the documentation and/or other materials
140
- * provided with the distribution.
141
- *
142
- * THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY
143
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
144
- * THE IMPLIED WARRANTIES OF MERCHANTABILI
120
+#include <limits.h>
121
+#define jim_wide _iint refCount;
122
+ charemptyObjhttp://jim.berlios.de/ 3cl. See htHAVE_MKDIR_ONE_AR3cl. See http://jim.berlios.de/ */
123
+et result { if {$pattern in {. ..}$pattern{*[[*?]*}\n"
124
+" set files[file isdir set files [list} else {\n"
125
+" set files \" continue\n"
126
+"
127
+#define HAVE_SYSTEM3cl. See htglob.expandbraces {pattern} {\n"
128
+"\n"
129
+"\n"
130
+" if {[set fb [string first \"\\{\" $pattern]] < 0list}\n"
131
+" if {[set nb [string firstlist}\n"
132
+" set beforeine HAVE_SYSTEM
133
+#elif defin3cl. See http://jim.b$fb+1 $nb-1]\n"
134
+" set afterine HAVE_SYSTEM
135
+#elif de3cl. lmap part [split $braced ,] {\n"
136
+" set pat $before$part$after\n"
137
+" proc glob.glob if {$dir eq $pattern} {\n"
138
+\n"
139
+" set dir foreach dir $dirlismatch \"*/\" $dir]}ep \"\"\n"
140
+" } elseif {$dir eq \".\"} {\n"
141
+" set globdir \"\NESTING_DEPTH 1xpandbracesreaddir_pattern $dir $pat] {\n"
142
+" globdir$sep$name http://jim.berl3c3cl. See http://jim.berlios.de/ */
143
+#define _GNU_SOURCEREFERENCES single source file,/* This is single source file, bootstrap version of Jim Tcl. See http://jim.tcl.tk/ */
144
+#define JIM_TCL_COMPAT_H
145
+#define TCL_LIBRARY "."
146
+#define jim_ext_stdlib
147
+#define jimregexpxec
148
+#define jim_efilexec
149
+#define jim_eexecxec
150
+#define jim_eclockxec
151
+#define jim_ee TCL_PLATFORM_OS "windows"
152
+#define TCL_PLATFORM_PLATFORM "windows"
153
+#define TCL_PLATFORM_PATH_SEPARATOR ";"
154
+#define HAVE_MKDIR_ONE_ARG
155
+#define HAVE_SYSTEM
156
+#elif defined(__MINGW32__)
157
+#define TCL_PLATFOR3cl. consthashint indexjim_wide callFrameId3cl. See http://jim.berlios.d} vajim_wide jim_wide id3clchar *data;
158
+ size_t flags;
159
+ c
--- a/autosetup/jimsh0.c
+++ b/autosetup/jimsh0.c
@@ -18,127 +18,142 @@
18 #define HAVE_UMASK
19 #include elseSEPARATOR ":"
20 #ifdef _ATFORM_PLATFORM "unix"
21 #define TCL_PLATFORM_PATH_SEPARMKSTEMP
 
 
22 #define HAVE_LINK
23 #define HAVE_SYS_TIME_H
24 #define HAVE_DITFORM "unix"
25 #define TCL_PLATFndif
26 #define JIM_VERS3cl. See http://jim.berlios.de/ */
27 #define _GNU_SOURCEREFERENCES single source file,/* /**
28 * UTF-8 utility functions
29 *
30 * (c) 2010 Steve Bennett <[email protected]>
31 *
32 * See LICENCE for licence details.
33 */
34
35 /**
36 * Converts the given unicode codepoint (0 - 0xffff) to utf-8
37 * and stores the result at 'p'.
38 *
39 * Returns the number of utf-8 characters (1-3).
40 */
41 intJim Tcl. See http://jim.tcl.tk/ */
42 #define JIM_TCL_COMPAT_H
43 #define/* No utf-8 support. 1 byte = 1 char */
44 #define utf8_strlen(S, B) TCL_LIBRARY "."
45 #define j
46 #defineS, CP) (*(CP) = #define jim_eexecxec
 
47 #define jim_eclockxec
48 #define jim_ee TCL_PLATFORM_OS "windows"
49 #define TCL_PLATFORM_PLATFORM "windows"
50 #define TCL_PLAT/**
51 * Returns the length of the utf-8 sequence starting with 'c'.
52 *
53 * Returns 1-4, or -1 if this is not a valid start byte.
54 *
55 * Note that charlen=4 is not supported by the rest of the API.
56 */
57 int utf8_charlen(int c);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
59 /**
60 * Returns the number of characters in the utf-8
61 * string of the given byte length.
62 *
63 * Any bytes which are not part of an valid utf-8
64 * sequence are treated as individual characters.
65 *
66 * The string *must* be null terminated.
67 *
68 * Does not support unicode code points > \uffff
69 */
70 int utf8_strlen(bytelen);
71
72 /**
73 * Returns the byte index of the given character in the utf-8 string.
74 *
75 * The string *must* be null terminated.
76 *
77 * This will return the byte length of a utf-8 string
78 * if given the char charindex);
79
80 /**
81 * Returns the unicode codepoint corresponding to the
82 * utf-8 sequence 'str'.
83 *
84 * Stores the result in *uc and returns the number of bytes
85 * consumed.
86 *
87 * If 'str' is null terminated, then an invalid utf-8 sequence
88 * at the end of the string will be returned as individual bytes.
89 *
90 * If it is not null terminated, the length *must* be checked first.
91 *
92 * Does not support unicode c*uc);
93
94 /**
95 * Returns the number of bytes before 'str' that the previous
96 * utf-8 character sequence starts (which may be the middle of a sequence).
97 *
98 * Looks back at most 'len' bytes backwards, which must be > 0.
99 * If no start char is found, returns -len
100 */
101 int utf8_prev_len(
102 /**
103 * Returns the upper-case variant of the given unicode codepoint.
104 *
105 * Does not support unicode code points > \uffff
106 */
107 int utf8_upper(int uc);
108
109 /**
110 * Returns the lower-case variant of the given unicode codepoint.
111 *
112 * NOTE: Use utf8_upper() in preference for case-insensitive matching.
113 *
114 * Does not support unicode code points > \uffff
115 */
116 int utf8_lower(int uc);
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118 #endif
119
120 #endif
121 /* Jim - A small embeddable Tcl interpreter
122 *
123 * Copyright 2005 Salvatore Sanfilippo <[email protected]>
124 * Copyright 2005 Clemens Hintze <[email protected]>
125 * Copyright 2005 patthoyts - Pat Thoyts <[email protected]>
126 * Copyright 2008 oharboe - �yvind Harboe - [email protected]
127 * Copyright 2008 Andrew Lunn <[email protected]>
128 * Copyright 2008 Duane Ellis <[email protected]>
129 * Copyright 2008 Uwe Klein <[email protected]>
130 *
131 * Redistribution and use in source and binary forms, with or without
132 * modification, are permitted provided that the following conditions
133 * are met:
134 *
135 * 1. Redistributions of source code must retain the above copyright
136 * notice, this list of conditions and the following disclaimer.
137 * 2. Redistributions in binary form must reproduce the above
138 * copyright notice, this list of conditions and the following
139 * disclaimer in the documentation and/or other materials
140 * provided with the distribution.
141 *
142 * THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY
143 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
144 * THE IMPLIED WARRANTIES OF MERCHANTABILI
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/autosetup/jimsh0.c
+++ b/autosetup/jimsh0.c
@@ -18,127 +18,142 @@
18 #define HAVE_UMASK
19 #include elseSEPARATOR ":"
20 #ifdef _ATFORM_PLATFORM "unix"
21 #define TCL_PLATFORM_PATH_SEPARATOR ":#elseVE_MKSTEMP
22 #define HAVY
23 #define HAVE_MKSTEMP
24 #define HAVE_LINK
25 #define HAVE_SYS_TIME_H
26 #define HAVE_DITFORM "unix"
27 #define TCL_PLATFndif
28 #define JIM_VERS3cl. See http://jim.berlios.de/ */
29 #define _GNU_SOURCEREFERENCES single source file,/* This is single source file, bootstrap version of Jim Tcl. See http://jim.tcl.tk/ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30 #define JIM_TCL_COMPAT_H
31 #define TCL_LIBRARY "."
32 #define jim_ext_stdlib
33 #define jimregexpxec
34 #define jim_efilexec
35 #define jim_eexecxec
36 #define jim_eclockxec
37 #define jim_ee TCL_PLATFORM_OS "windows"
38 #define TCL_PLATFORM_PLATFORM "windows"
39 #define TCL_PLATFORM_PATH_SEPARATOR ";"
40 #define HAVE_MKDIR_ONE_ARG
41 #define HAVE_SYSTEM
42 #elif defined(__MINGW32__)
43 #define TCL_PLATFORM_OS "mingw"
44 #define TCL_PLATFORM_PLATFORM "windows"
45 #define TCL_PLATFORM_PATH_SEPARATOR ";"
46 #define HAVE_MKDIR_ONE_ARG
47 #define HAVE_SYSTEM
48 #define HAVE_SYS_TIME_H
49 #define HAVE_DIRENT_H
50 #define HAVE_UNISTD_H
51 #define HAVE_UMASK
52 #include elseSEPARATOR ":"
53 #ifdef _ATFORM_PLATFORM "unix"
54 #define TCL_PLATFORM_PATH_SEPARATOR ":"
55 #ifdef _MINIX
56 #define vfork VE_WAITPID
57 #Vndif
58 #define HAVE_WAITPID
59 #define HAVE_ISATE_WAITPID
60 #define HAVE_ISATTY
61 #define HAVE_MKSTEMP
62 #define HAVE_LINK
63 #define HAVE_SYS_TIME_H
64 #define HAVE_DITFORM "unix"
65 #define TCL_PLATFndif
66 #define JIM_VERSION 75if
67
 
 
 
 
 
 
 
 
 
 
 
 
68
69 #5if
 
 
 
 
 
 
70
 
 
 
 
 
 
 
 
 
 
 
 
 
71
72 #if defined(_WIN32) || defined(WIN32)
 
 
 
 
 
 
 
 
 
 
 
 
 
73
74 #define HAVE_DLOPEN
75 void *dlopen(const rror(void);
 
 
 
 
 
 
76
77
78 #if defined(__MINGW3l lmap part [split $braced ,] {\n"
79 " set pat $before$part$after\n"
80 " proc glob.glob if {$dir eq $pattern} {\n"
81 \n"
82 " set dir foreach dir $dirlismatch \"*/\" $dir]}ep \"\"\n"
83 " } elseif {$dir eq \".\"} {\n"
84 " set globdir \"\"\n"
85 " set sep \"\"set sep /foreach pat [glob.expandbracesreaddir_pattern $dir $pat] {\n"
86 " globdir$sep$name http://jim.berl3cl. See http://jimset nocomplain 0-nocomplain\"} {\n"
87 "lappend result {*}[glob.globnocomplain == 0flush/
88 #define _GNU_SOURCEREFERENCES erlios.de/ *long offsetfseekfilenflush."3short
89 #define HAVE_UNISTD_H
90 #define HAVE_UMASK
91 #include elseSEPARATOR ":"
92 #ifdef _ATFORM_PLATFORM "unix"
93 #define TCL_PLATFORM_PATH_SEPARATOR ":"
94 #ifdef _MINIX
95 #define vfork VE_WAITPID
96 #Vndif
97 #define HAVE_WAITPID
98 # HAVE_ISATTY
99 #define HAVE_MKSTEMP
100 #define HAVE_LINK
101 #define HAVE_SYS_TIME_H
102 #define HAVE_DITFORM "unix"
103 #define TCL_PLATFndif
104 #define JIM_VERSION 75if
105
106
107 #5if
108
109
110 #if defined(_WIN32) || defined(WIN32)
111
112 #define HAVE_DLOPEN
113 void *dlopen(const rror(void);
114
115
116 #if defined(__MINGW32__)
117 #(disable:4146)
118 #endif
119
120 #include <limits.h>
121 #define jim_wide _iint refCount;
122 charemptyObjhttp://jim.berlios.de/ 3cl. See htHAVE_MKDIR_ONE_AR3cl. See http://jim.berlios.de/ */
123 et result { if {$pattern in {. ..}$pattern{*[[*?]*}\n"
124 " set files[file isdir set files [list} else {\n"
125 " set files \" continue\n"
126 "
127 #define HAVE_SYSTEM3cl. See htglob.expandbraces {pattern} {\n"
128 "\n"
129 "\n"
130 " if {[set fb [string first \"\\{\" $pattern]] < 0list}\n"
131 " if {[set nb [string firstlist}\n"
132 " set beforeine HAVE_SYSTEM
133 #elif defin3cl. See http://jim.b$fb+1 $nb-1]\n"
134 " set afterine HAVE_SYSTEM
135 #elif de3cl. lmap part [split $braced ,] {\n"
136 " set pat $before$part$after\n"
137 " proc glob.glob if {$dir eq $pattern} {\n"
138 \n"
139 " set dir foreach dir $dirlismatch \"*/\" $dir]}ep \"\"\n"
140 " } elseif {$dir eq \".\"} {\n"
141 " set globdir \"\NESTING_DEPTH 1xpandbracesreaddir_pattern $dir $pat] {\n"
142 " globdir$sep$name http://jim.berl3c3cl. See http://jim.berlios.de/ */
143 #define _GNU_SOURCEREFERENCES single source file,/* This is single source file, bootstrap version of Jim Tcl. See http://jim.tcl.tk/ */
144 #define JIM_TCL_COMPAT_H
145 #define TCL_LIBRARY "."
146 #define jim_ext_stdlib
147 #define jimregexpxec
148 #define jim_efilexec
149 #define jim_eexecxec
150 #define jim_eclockxec
151 #define jim_ee TCL_PLATFORM_OS "windows"
152 #define TCL_PLATFORM_PLATFORM "windows"
153 #define TCL_PLATFORM_PATH_SEPARATOR ";"
154 #define HAVE_MKDIR_ONE_ARG
155 #define HAVE_SYSTEM
156 #elif defined(__MINGW32__)
157 #define TCL_PLATFOR3cl. consthashint indexjim_wide callFrameId3cl. See http://jim.berlios.d} vajim_wide jim_wide id3clchar *data;
158 size_t flags;
159 c
--- a/autosetup/system.tcl
+++ b/autosetup/system.tcl
@@ -70,11 +70,4 @@
7070
program-transform-name:
7171
}
7272
73
-# @check-feature set prefixdefine[get-env exec-prefix \${prefix}]]\${exec_prefix}/bin
74
- sbindir \${exec_prefix}/sbin
75
- libexecdir \${exec_prefix}/libexec
76
- libdir \${exec_prefix}/lib
77
- datadir \${prefix}/share
78
- sysconfdir \${prefix}/etc
79
- sharedstatedir \${prefix}\${prefix}/var
80
- infodir \${prefix}\${prefix}/share Copyright (c) ht (c) 2010 WorkWare Sys
73
+# @check-feature set prefix
--- a/autosetup/system.tcl
+++ b/autosetup/system.tcl
@@ -70,11 +70,4 @@
70 program-transform-name:
71 }
72
73 # @check-feature set prefixdefine[get-env exec-prefix \${prefix}]]\${exec_prefix}/bin
74 sbindir \${exec_prefix}/sbin
75 libexecdir \${exec_prefix}/libexec
76 libdir \${exec_prefix}/lib
77 datadir \${prefix}/share
78 sysconfdir \${prefix}/etc
79 sharedstatedir \${prefix}\${prefix}/var
80 infodir \${prefix}\${prefix}/share Copyright (c) ht (c) 2010 WorkWare Sys
--- a/autosetup/system.tcl
+++ b/autosetup/system.tcl
@@ -70,11 +70,4 @@
70 program-transform-name:
71 }
72
73 # @check-feature set prefix
 
 
 
 
 
 
 
--- a/autosetup/test-tclsh
+++ b/autosetup/test-tclsh
@@ -5,17 +5,16 @@
55
66
if {[catch {info version} version] == 0} {
77
# This is Jim Tcl
8
- if {$version >= 0.70} {
9
- # Ensure that rege
10
- # Older versions of jimsh mayinfo patchlevel]]} {
8
+ if {$version >= 0.72} {
9
+ # Ensure that regexp works
10
+ regexp (a.*?) a
11
+ puts [info nameofexecutable]
12
+ exit 0
13
+ }
14
+} elseif {[catch {info tclversion} version] == 0} {
15
+ if {$version >= 8.5 && ![string match 8.5a* [info patchlevel]]} {
1116
puts [info nameofexecutable]
1217
exit 0
1318
}
1419
}
1520
exit 1
16
-puts [file join [p]
17
- exit 0
18
- }
19
-} elseif {[catch {info tclversion} version] == 0} {
20
- if {$version >= 8.5 && ![string match 8.5a* [info patchlevel]]} {
21
- puts [info nameofexecut
--- a/autosetup/test-tclsh
+++ b/autosetup/test-tclsh
@@ -5,17 +5,16 @@
5
6 if {[catch {info version} version] == 0} {
7 # This is Jim Tcl
8 if {$version >= 0.70} {
9 # Ensure that rege
10 # Older versions of jimsh mayinfo patchlevel]]} {
 
 
 
 
 
11 puts [info nameofexecutable]
12 exit 0
13 }
14 }
15 exit 1
16 puts [file join [p]
17 exit 0
18 }
19 } elseif {[catch {info tclversion} version] == 0} {
20 if {$version >= 8.5 && ![string match 8.5a* [info patchlevel]]} {
21 puts [info nameofexecut
--- a/autosetup/test-tclsh
+++ b/autosetup/test-tclsh
@@ -5,17 +5,16 @@
5
6 if {[catch {info version} version] == 0} {
7 # This is Jim Tcl
8 if {$version >= 0.72} {
9 # Ensure that regexp works
10 regexp (a.*?) a
11 puts [info nameofexecutable]
12 exit 0
13 }
14 } elseif {[catch {info tclversion} version] == 0} {
15 if {$version >= 8.5 && ![string match 8.5a* [info patchlevel]]} {
16 puts [info nameofexecutable]
17 exit 0
18 }
19 }
20 exit 1
 
 
 
 
 
 

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button