Select one of the symbols to view example projects that use it.
 
Outline
#include <jim.h>
Jim_tclcompatInit(Jim_Interp *)
Files
loading...
CodeScopeDevelopment ToolsOpenOCDbuild/Mainstream/Release/jimtcl-cmake/tclcompat.c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* autogenerated - do not edit */ #include <jim.h> int Jim_tclcompatInit(Jim_Interp *interp) { if (Jim_PackageProvide(interp, "tclcompat", "1.0", JIM_ERRMSG)) return JIM_ERR; return Jim_EvalSource(interp, "tclcompat.tcl", 1, "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "set env [env]\n" "\n" "\n" "if {[info commands stdout] ne \"\"} {\n" "\n" " foreach p {gets flush close eof seek tell} {\n" " proc $p {chan args} {p} {\n" " tailcall $chan $p {*}$args\n" " }\n" " }\n" " unset p\n" "\n" "\n" "\n" " proc puts {{-nonewline {}} {chan stdout} msg} {\n" " if {${-nonewline} ni {-nonewline {}}} {\n" " tailcall ${-nonewline} puts $msg\n" " }\n" " tailcall $chan puts {*}${-nonewline} $msg\n" " }\n" "\n" "\n" "\n" "\n" "\n" " proc read {{-nonewline {}} chan} {\n" " if {${-nonewline} ni {-nonewline {}}} {\n" " tailcall ${-nonewline} read {*}${chan}\n" " }\n" " tailcall $chan read {*}${-nonewline}\n" " }\n" "\n" " proc fconfigure {f args} {\n" " foreach {n v} $args {\n" " switch -glob -- $n {\n" " -bl* {\n" " $f ndelay $(!$v)\n" " }\n" " -bu* {\n" " $f buffering $v\n" " }\n" " -tr* {\n" "\n" " }\n" " default {\n" " return -code error \"fconfigure: unknown option $n\"\n" " }\n" " }\n" " }\n" " }\n" "}\n" "\n" "\n" "proc fileevent {args} {\n" " tailcall {*}$args\n" "}\n" "\n" "\n" "\n" "proc parray {arrayname {pattern *} {puts puts}} {\n" " upvar $arrayname a\n" "\n" " set max 0\n" " foreach name [array names a $pattern]] {\n" " if {[string length $name] > $max} {\n" " set max [string length $name]\n" " }\n" " }\n" " incr max [string length $arrayname]\n" " incr max 2\n" " foreach name [lsort [array names a $pattern]] {\n" " $puts [format \"%-${max}s = %s\" $arrayname\\($name\\) $a($name)]\n" " }\n" "}\n" "\n" "\n" "proc {file copy} {{force {}} source target} {\n" " try {\n" " if {$force ni {{} -force}} {\n" " error \"bad option \\\"$force\\\": should be -force\"\n" " }\n" "\n" " set in [open $source rb]\n" "\n" " if {[file exists $target]} {\n" " if {$force eq \"\"} {\n" " error \"error copying \\\"$source\\\" to \\\"$target\\\": file already exists\"\n" " }\n" "\n" " if {$source eq $target} {\n" " return\n" " }\n" "\n" "\n" " file stat $source ss\n" " file stat $target ts\n" " if {$ss(dev) == $ts(dev) && $ss(ino) == $ts(ino) && $ss(ino)} {\n" " return\n" " }\n" " }\n" " set out [open $target wb]\n" " $in copyto $out\n" " $out close\n" " } on error {msg opts} {\n" " incr opts(-level)\n" " return {*}$opts $msg\n" " } finally {\n" " catch {$in close}\n" " }\n" "}\n" "\n" "\n" "\n" "proc popen {cmd {mode r}} {\n" " lassign [pipe] r w\n" " try {\n" " if {[string match \"w*\" $mode]} {\n" " lappend cmd <@$r &\n" " set pids [exec {*}$cmd]\n" " $r close\n" " set f $w\n" " } else {\n" " lappend cmd >@$w &\n" " set pids [exec {*}$cmd]\n" " $w close\n" " set f $r\n" " }\n" " lambda {cmd args} {f pids} {\n" " if {$cmd eq \"pid\"} {\n" " return $pids\n" " }\n" " if {$cmd eq \"getfd\"} {\n" " $f getfd\n" " }\n" " if {$cmd eq \"close\"} {\n" " $f close\n" "\n" " set retopts {}\n" " foreach p $pids {\n" " lassign [wait $p] status - rc\n" " if {$status eq \"CHILDSTATUS\"} {\n" " if {$rc == 0} {\n" " continue\n" " }\n" " set msg \"child process exited abnormally\"\n" " } else {\n" " set msg \"child killed: received signal\"\n" " }\n" " set retopts [list -code error -errorcode [list $status $p $rc] $msg]\n" " }\n" " return {*}$retopts\n" " }\n" " tailcall $f $cmd {*}$args\n" " }\n" " } on error {error opts} {\n" " $r close\n" " $w close\n" " error $error\n" " }\n" "}\n" "\n" "\n" "local proc pid {{channelId {}}} {\n" " if {$channelId eq \"\"} {\n" " tailcall upcall pid\n" " }\n" " if {[catch {$channelId tell}]} {\n" " return -code error \"can not find channel named \\\"$channelId\\\"\"\n" " }\n" " if {[catch {$channelId pid} pids]} {\n" " return \"\"\n" " }\n" " return $pids\n" "}\n" "\n" "\n" "\n" "proc throw {code {msg \"\"}} {\n" " return -code $code $msg\n" "}\n" "\n" "\n" "proc {file delete force} {path} {\n" " foreach e [readdir $path] {\n" " file delete -force $path/$e\n" " }\n" " file delete $path\n" "}\n"); }{ ... }