Overview
Comment: | Enhance a bit of logic (expr should be cheaper than regexp) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | origin/devel |
Files: | files | file ages | folders |
SHA1: |
320bbe752cb7e89e8cff286c3d7e2b54 |
User & Date: | quentin@minster.io on 2014-03-17 21:17:49 |
Other Links: | branch diff | manifest | tags |
Context
2014-03-17
| ||
21:47 | Remove seemingly useless file check-in: 9607f1bb70 user: quentin@minster.io tags: trunk, origin/devel | |
21:17 | Enhance a bit of logic (expr should be cheaper than regexp) check-in: 320bbe752c user: quentin@minster.io tags: trunk, origin/devel | |
21:17 | Harmonize style in all Tcl files Brace arguments of if/expr constructs check-in: dc9268f6ad user: quentin@minster.io tags: trunk, origin/devel | |
Changes
Modified tclreadlineSetup.tcl.in from [3c98c4bea3] to [c9b75e0523].
6
7
8
9
10
11
12
13
14
15
16
17
18
19
...
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
|
# Copyright (c) 1998 - 2014, Johannes Zellner <johannes@zellner.org> # This software is copyright under the BSD license. # --- package provide tclreadline @VERSION@ proc unknown args { global auto_noexec auto_noload env unknown_pending tcl_interactive global errorCode errorInfo # Save the values of errorCode and errorInfo variables, since they # may get modified if caught errors occur below. The variables will ................................................................................ } proc Print {args} { variable PRINT if {![info exists PRINT]} { set PRINT yes } if [regexp -nocase \(true\|yes\|1\) $args] { set PRINT yes } elseif [regexp -nocase \(false\|no\|0\) $args] { set PRINT no } return $PRINT } # proc InitCmds {} { # # XXX # return |
>
|
<
<
<
<
|
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
...
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
|
# Copyright (c) 1998 - 2014, Johannes Zellner <johannes@zellner.org> # This software is copyright under the BSD license. # --- package provide tclreadline @VERSION@ rename unknown _unknown proc unknown args { global auto_noexec auto_noload env unknown_pending tcl_interactive global errorCode errorInfo # Save the values of errorCode and errorInfo variables, since they # may get modified if caught errors occur below. The variables will ................................................................................ } proc Print {args} { variable PRINT if {![info exists PRINT]} { set PRINT yes } catch {set PRINT [expr {$args ? "yes" : "no"}]} return $PRINT } # proc InitCmds {} { # # XXX # return |