-C Meld\s-safe\soption\sinto\sCLI
-D 2021-09-02T01:21:14.704
+C Get\sshell.c\smaker\sacceptable\sto\sTCL\sv8.4\sand\sminor\stweaks
+D 2021-09-02T16:29:53.220
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F src/resolve.c 42b94d37a54200707a95566eff4f7e8a380e32d080016b699f23bd79a73a5028
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
F src/select.c 63077c0243ded1432d97c90c1a4c3419b3a574b36634c674599a68bfe4c3bdc2
-F src/shell.c.in 16e84ce4dc4c538fe9b2759b1c1ea7e5923e5f297691a4b97bf1ef9528541b31
+F src/shell.c.in 729b233614ebf5e3a7f7ca1fcbefd0043439192962ae200e41822b2de88dcada
F src/sqlite.h.in 43fcf0fe2af04081f420a906fc020bde1243851ba44b0aa567a27f94bf8c3145
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h e97f4e9b509408fea4c4e9bef5a41608dfac343b4d3c7a990dedde1e19af9510
F tool/mkopcodeh.tcl 130b88697da6ec5b89b41844d955d08fb62c2552e889dec8c7bcecb28d8f50bd
F tool/mkopts.tcl 680f785fdb09729fd9ac50632413da4eadbdf9071535e3f26d03795828ab07fa
F tool/mkpragmatab.tcl 7f6db47d1995bc08247255622524567b2ab8962d98063f8aef97e35c3c54e3b8
-F tool/mkshellc.tcl 16236d081adb274a95ed424fde56cd0d535fb2c659128ecc5b70becd4a9b63b8
+F tool/mkshellc.tcl 03939222e3291b96cf1fffe989ce2425c0964e49ea5975c7dc7d3f8b6deadf6d
F tool/mksourceid.c 36aa8020014aed0836fd13c51d6dc9219b0df1761d6b5f58ff5b616211b079b9
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
F tool/mksqlite3c-noext.tcl 4f7cfef5152b0c91920355cbfc1d608a4ad242cb819f1aea07f6d0274f584a7f
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P dd356ace4ffa57518c16fa7fd9b6bc7bef0bb0ddcbc9bdf60ab0a17c25f8e5c0
-R bde6c7d36d347a265cfb3284dd778d5f
+P c7c84998dbec5dfd71d62e12cfa741edba4b6439cc384ab46b21199f290feedd
+R 6e2e47da720de4d046b66bea83d7e73e
U larrybr
-Z ac16bca9a518d5a67bb303386dbab385
+Z fb4c46974e0f94bf6d79643019372d05
}
fconfigure $in -translation binary
-set ::cmd_help [dict create]
-set ::cmd_dispatch [dict create]
-set ::cmd_condition [dict create]
-set ::inc_type_files [dict create]
+array set ::cmd_help {}
+array set ::cmd_dispatch {}
+array set ::cmd_condition {}
+array set ::inc_type_files {}
set ::iShuffleErrors 0
-regexp {(\{)(\})} "{}" ma ::lb ::rb ; # Ease use of { and }.
+regexp {(\{)(\})} "{}" ma ::lb ::rb ; # Ease use of { and } in literals.
# Setup dispatching function signature and table entry struct .
# The effect of these key/value pairs is as this --parameters output says:
of $cmd and $arg# variables is done by Tcl evaluation (via subst), allowing
a wide range of logic to be employed in the derivation of effective values.
}
-set ::dispCfg [dict create \
+array set ::dispCfg [list \
RETURN_TYPE int \
STORAGE_CLASS static \
ARGS_SIGNATURE "char *\$arg4\\\[\\\], int \$arg5, ShellState *\$arg6" \
# Variables $cmd and $arg# (where # = 0 .. DC_ARG_COUNT-1) have values
# when ARGS_SIGNATURE, DISPATCH_ENTRY, and DISPATCHEE_NAME are evaluated.
-# proc dump_cfg {} {
-# foreach k [dict keys $::dispCfg] {
-# puts stderr "$k=[dict get $::dispCfg $k]"
-# }
-# }
-
proc condition_command {cmd pp_expr} {
if {[regexp {^(!)?defined\(\s*(\w+)\s*\)} $pp_expr ma bang pp_var]} {
if {$bang eq "!"} {
} else {
set pp_expr "#if [string trim $pp_expr]"
}
- dict set ::cmd_condition $cmd $pp_expr
+ set ::cmd_condition($cmd) $pp_expr
}
proc emit_conditionally {cmd lines ostrm {indent ""}} {
- set wrapped [dict exists $::cmd_condition $cmd]
+ set wrapped [info exists ::cmd_condition($cmd)]
if {$wrapped} {
- puts $ostrm [dict get $::cmd_condition $cmd]
+ puts $ostrm $::cmd_condition($cmd)
}
if {[regexp {^\s*(\d+)\s*$} $indent ma inum]} {
set lead [string repeat " " $inum]
}
}
-# Convert list of help text lines into a dict.
+# Convert list of help text lines into a key-value list.
# Keys are the command names. Values are the help for the
# commands as a list of lines, with .* logically first.
# Any #if... #endif structures are maintained and do not
# (The effect of this is to defeat sorting by command if
# help for multiple commands' is within one conditional.)
proc chunkify_help {htin} {
- set rv [dict create]
+ array set rv [list]
set if_depth 0
set cmd_seen ""
set chunk {}
foreach htx $htin {
if {[regexp {^\s*\"\.\w} $htx] && $cmd_seen ne "" && $if_depth == 0} {
# Flush accumulated chunk.
- dict set rv $cmd_seen $chunk
+ set rv($cmd_seen) $chunk
set cmd_seen ""
set chunk {}
}
} else {
if {$cmd_seen ne "" && [llength $chunk] > 0} {
# Flush accumulated chunk.
- dict set rv $cmd_seen $chunk
+ set rv($cmd_seen) $chunk
} elseif {$cmd_seen ne "" || [llength $chunk] > 0} {
puts stderr "Orphaned help: '$cmd_seen' [join $chunk \n]"
incr ::iShuffleErrors
}
}
- return $rv
+ return [array get rv]
}
array set ::macroTailREs [list \
set lx [gets $hFile]
while {![eof $hFile] && ![regexp {^\s*\];} $lx]} {
lappend disp_frag $lx
- set grabCmd [dict get $::dispCfg CMD_CAPTURE_RE]
+ set grabCmd $::dispCfg(CMD_CAPTURE_RE)
if {![regexp $grabCmd $lx ma dcmd]} {
puts stderr "malformed dispatch element:\n $lx"
incr ::iShuffleErrors
puts stderr "misdeclared dispatch element:\n $lx"
incr ::iShuffleErrors
} else {
- dict set ::cmd_dispatch $dcmd [list $lx]
+ set ::cmd_dispatch($dcmd) [list $lx]
}
set lx [gets $hFile]
incr iAte
incr iAte
}
incr iAte
- set ::cmd_help [dict merge $::cmd_help [chunkify_help $help_frag]]
+ array set ::cmd_help [chunkify_help $help_frag]
return $iAte
}
incr iAte
foreach line $def_disp {
if {[regexp {^\s*(\w+)=(.+)$} $line ma k v]} {
- dict set ::dispCfg $k $v
+ set ::dispCfg($k) $v
}
}
return $iAte
incr iAte
set na [llength $args]
set cmd [lindex $args 0]
- set naPass [dict get $::dispCfg DC_ARG_COUNT]
+ set naPass $::dispCfg(DC_ARG_COUNT)
if {$na > $naPass} {
puts stderr "Bad args: $lx"
} else {
while {$na < $naPass} {
- if {![dict exists $::dispCfg "DC_ARG${na}_DEFAULT"]} {
+ set nad "DC_ARG${na}_DEFAULT"
+ if {![info exists ::dispCfg($nad)]} {
puts stderr "Too few args: $lx (need $naPass)"
incr ::iShuffleErrors
break
} else {
- lappend args [subst [dict get $::dispCfg "DC_ARG${na}_DEFAULT"]]
+ lappend args [subst $::dispCfg($nad)]
}
incr na
}
set av [lindex $args $aix]
if {$av eq "?"} {
set ai [expr {$aix + 1}]
- set av [subst [dict get $::dispCfg "DC_ARG${ai}_DEFAULT"]]
+ set aid "DC_ARG${ai}_DEFAULT"
+ set av [subst $::dispCfg($aid)]
}
set "arg$aix" $av
}
if {$cmd ne "?"} {
- set rsct [dict get $::dispCfg STORAGE_CLASS]
- set rsct "$rsct [dict get $::dispCfg RETURN_TYPE]"
- set argexp [subst [dict get $::dispCfg ARGS_SIGNATURE]]
- set fname [subst [dict get $::dispCfg DISPATCHEE_NAME]]
+ set rsct $::dispCfg(STORAGE_CLASS)
+ set rsct "$rsct $::dispCfg(RETURN_TYPE)"
+ set argexp [subst $::dispCfg(ARGS_SIGNATURE)]
+ set fname [subst $::dispCfg(DISPATCHEE_NAME)]
set funcOpen "$rsct $fname\($argexp\)$::lb"
- set dispEntry [subst [dict get $::dispCfg DISPATCH_ENTRY]]
+ set dispEntry [subst $::dispCfg(DISPATCH_ENTRY)]
emit_conditionally $cmd [linsert $body 0 $funcOpen] $ostrm
- dict set ::cmd_dispatch $cmd [list $dispEntry]
+ set ::cmd_dispatch($cmd) [list $dispEntry]
}
}
return $iAte
proc EMIT_DISPATCH {hFile tailCap ostrm} {
# Emit the collected dispatch table entries, in command order, maybe
# wrapped with a conditional construct as set by CONDITION_COMMAND().
- foreach cmd [lsort [dict keys $::cmd_dispatch]] {
- emit_conditionally $cmd [dict get $::cmd_dispatch $cmd] $ostrm $tailCap
+ foreach cmd [lsort [array names ::cmd_dispatch]] {
+ emit_conditionally $cmd $::cmd_dispatch($cmd) $ostrm $tailCap
}
return 0
}
proc EMIT_HELP_TEXT {hFile tailCap ostrm} {
# Emit the collected help text table entries, in command order, maybe
# wrapped with a conditional construct as set by CONDITION_COMMAND().
- foreach htc [lsort [dict keys $::cmd_help]] {
- emit_conditionally $htc [dict get $::cmd_help $htc] $ostrm $tailCap
+ foreach htc [lsort [array names ::cmd_help]] {
+ emit_conditionally $htc $::cmd_help($htc) $ostrm $tailCap
}
return 0
}
} elseif {$nesting == 0} {
return $line
}
- if {[regexp {^#include "sqlite} $line]} {
+ if {[regexp {^#include "sqlite.*"} $line]} {
return "/* $line */"
}
if {[regexp {^# *include "test_windirent.h"} $line]} {
exit 0
} elseif {$customRun == 3} {
set sfd [open $argv0 r]
- set macdos [dict create]
+ array set macdos [list]
while {![eof $sfd]} {
if {[regexp {^proc ([A-Z_]+\M)} [gets $sfd] ma macro]} {
if {[info exists ::macroTailREs($macro)]} {
while {[regexp {^\s+#\s*(.+)$} [gets $sfd] ma effect]} {
lappend effects " $effect"
}
- dict set macdos $macro [join $effects "\n"]
+ set macdos($macro) [join $effects "\n"]
}
}
}
close $sfd
- foreach m [lsort [dict keys $macdos]] {
- puts stderr "\nThe $m macro will:\n [dict get $macdos $m]"
+ foreach m [lsort [array names macdos]] {
+ puts stderr "\nThe $m macro will:\n $macdos($m)"
}
exit 0
} elseif {$customRun == 4} {