220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# Return the value of a query parameter or environment variable.
#
proc wapp-param {name {dflt {}}} {
global wapp
if {![dict exists $wapp $name]} {return $dflt}
return [dict get $wapp $name]
}
# Return the value of a query parameter or environment variable.
#
proc wapp-param-exists {name} {
global wapp
return [dict exists $wapp $name]
}
# Set the value of a parameter
#
proc wapp-set-param {name value} {
global wapp
dict set wapp $name $value
}
# Return all parameter names that match the GLOB pattern, or all
# names if the GLOB pattern is omitted.
#
proc wapp-param-list {{glob {*}}} {
global wapp
return [dict keys $wapp $glob]
}
# Examine the bodys of all procedures in this program looking for
# unsafe calls to "wapp". Return a text string containing warnings.
# Return an empty string if all is ok.
#
# This routine is advisory only. It misses some constructs that are
# dangerous and flags others that are safe.
|