Tcl Library Source Code

Changes On Branch version-cleanup
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch version-cleanup Excluding Merge-Ins

This is equivalent to a diff from 845ab17352 to 70c2e16301

2014-10-20
20:53
Merged version cleanup. check-in: a989287225 user: aku tags: trunk
20:52
Merged trunk changes to cleanup (get aes updates) Closed-Leaf check-in: 70c2e16301 user: aku tags: version-cleanup
20:29
Merged AES perf enhancements to trunk. check-in: 845ab17352 user: aku tags: trunk
20:28
Bumped version number of perf enhanced aes. Closed-Leaf check-in: 3386c55f1b user: aku tags: aes-modernize
2014-10-17
23:46
Extended the sak benchmark controller to handle repeats and collation equivalent to tclbench (min, max, avg). check-in: c3580dd6c6 user: andreask tags: trunk
22:01
Completed. Still to be tested. check-in: 83d8fe88bd user: andreask tags: version-cleanup

Changes to modules/aes/aes.tcl.

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.5

namespace eval ::aes {
    variable version 1.2.1
    variable rcsid {$Id: aes.tcl,v 1.7 2010/07/06 19:39:00 andreas_kupries Exp $}
    variable uid ; if {![info exists uid]} { set uid 0 }

    namespace export aes

    # constants

    # S-box
    variable sbox {







|
<
|







19
20
21
22
23
24
25
26

27
28
29
30
31
32
33
34
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.5

namespace eval ::aes {
    variable uid

    if {![info exists uid]} { set uid 0 }

    namespace export aes

    # constants

    # S-box
    variable sbox {
613
614
615
616
617
618
619
620
621
622
623
624
625
626
        binary scan $r H* r
    }
    return $r
}

# -------------------------------------------------------------------------

package provide aes $::aes::version

# -------------------------------------------------------------------------
# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:







|






612
613
614
615
616
617
618
619
620
621
622
623
624
625
        binary scan $r H* r
    }
    return $r
}

# -------------------------------------------------------------------------

package provide aes 1.2.1

# -------------------------------------------------------------------------
# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:

Changes to modules/base64/uuencode.tcl.

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
# uuencode - Copyright (C) 2002 Pat Thoyts <[email protected]>
#
# Provide a Tcl only implementation of uuencode and uudecode.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# @(#)$Id: uuencode.tcl,v 1.22 2009/05/07 01:10:37 patthoyts Exp $

package require Tcl 8.2;                # tcl minimum version

# Try and get some compiled helper package.
if {[catch {package require tcllibc}]} {
    catch {package require Trf}
}

namespace eval ::uuencode {
    variable version 1.1.5

    namespace export encode decode uuencode uudecode
}

proc ::uuencode::Enc {c} {
    return [format %c [expr {($c != 0) ? (($c & 0x3f) + 0x20) : 0x60}]]
}









<









<
<







1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
16
17


18
19
20
21
22
23
24
# uuencode - Copyright (C) 2002 Pat Thoyts <[email protected]>
#
# Provide a Tcl only implementation of uuencode and uudecode.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


package require Tcl 8.2;                # tcl minimum version

# Try and get some compiled helper package.
if {[catch {package require tcllibc}]} {
    catch {package require Trf}
}

namespace eval ::uuencode {


    namespace export encode decode uuencode uudecode
}

proc ::uuencode::Enc {c} {
    return [format %c [expr {($c != 0) ? (($c & 0x3f) + 0x20) : 0x60}]]
}

323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
    }

    return $result
}

# -------------------------------------------------------------------------

package provide uuencode $::uuencode::version

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:








|








320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
    }

    return $result
}

# -------------------------------------------------------------------------

package provide uuencode 1.1.5

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/base64/yencode.tcl.

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
# yencode.tcl - Copyright (C) 2002 Pat Thoyts <[email protected]>
#
# Provide a Tcl only implementation of yEnc encoding algorithm
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# @(#)$Id: yencode.tcl,v 1.13 2009/05/07 01:10:37 patthoyts Exp $

# FUTURE: Rework to allow switching between the tcl/critcl implementations.

package require Tcl 8.2;                # tcl minimum version
catch {package require crc32};          # tcllib 1.1
catch {package require tcllibc};        # critcl enhancements for tcllib

namespace eval ::yencode {
    variable version 1.1.3
    namespace export encode decode yencode ydecode
}

# -------------------------------------------------------------------------

proc ::yencode::Encode {s} {
    set r {}








<








<







1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
16

17
18
19
20
21
22
23
# yencode.tcl - Copyright (C) 2002 Pat Thoyts <[email protected]>
#
# Provide a Tcl only implementation of yEnc encoding algorithm
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


# FUTURE: Rework to allow switching between the tcl/critcl implementations.

package require Tcl 8.2;                # tcl minimum version
catch {package require crc32};          # tcllib 1.1
catch {package require tcllibc};        # critcl enhancements for tcllib

namespace eval ::yencode {

    namespace export encode decode yencode ydecode
}

# -------------------------------------------------------------------------

proc ::yencode::Encode {s} {
    set r {}
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
    }

    return $result
}

# -------------------------------------------------------------------------

package provide yencode $::yencode::version

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:








|








292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
    }

    return $result
}

# -------------------------------------------------------------------------

package provide yencode 1.1.3

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/blowfish/blowfish.tcl.

16
17
18
19
20
21
22
23
24
25

26
27
28
29
30
31
32
33
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#

package require Tcl 8.2

namespace eval blowfish {
    variable version 1.0.4
    variable rcsid {$Id: blowfish.tcl,v 1.10 2007/09/17 14:19:07 patthoyts Exp $}
    variable uid ; if {![info exists uid]} { set uid 0 }

    variable accel
    array set accel {trf 0}

    namespace export blowfish

    variable ORIG_P {
        0x243F6A88 0x85A308D3 0x13198A2E 0x03707344
        0xA4093822 0x299F31D0 0x082EFA98 0xEC4E6C89







|
<
|
>
|







16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
31
32
33
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#

package require Tcl 8.2

namespace eval blowfish {
    variable uid

    if {![info exists uid]} { set uid 0 }

    variable  accel
    array set accel {trf 0}

    namespace export blowfish

    variable ORIG_P {
        0x243F6A88 0x85A308D3 0x13198A2E 0x03707344
        0xA4093822 0x299F31D0 0x082EFA98 0xEC4E6C89
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
    variable e {}
    foreach e {trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide blowfish $::blowfish::version

# -------------------------------------------------------------------------
#
# Local Variables:
# mode: tcl
# indent-tabs-mode: nil
# End:







|







710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
    variable e {}
    foreach e {trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide blowfish 1.0.4

# -------------------------------------------------------------------------
#
# Local Variables:
# mode: tcl
# indent-tabs-mode: nil
# End:

Changes to modules/calendar/calendar.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#----------------------------------------------------------------------
#
# calendar.tcl --
#
#	This file is the main 'package provide' script for the
#   	'calendar' package.  The package provides various commands for
#	manipulating dates and times.
#
# RCS:$(@) $Id: calendar.tcl,v 1.5 2004/01/15 06:36:12 andreas_kupries Exp $

package require Tcl 8.2

namespace eval ::calendar {

    variable version 0.2

    variable home [file join [pwd] [file dirname [info script]]]
    if { [lsearch -exact $::auto_path $home] == -1 } {
	lappend ::auto_path $home
    }

    package provide [namespace tail [namespace current]] $version
}







<
<




<
<
<





|

1
2
3
4
5
6
7


8
9
10
11



12
13
14
15
16
17
18
#----------------------------------------------------------------------
#
# calendar.tcl --
#
#	This file is the main 'package provide' script for the
#   	'calendar' package.  The package provides various commands for
#	manipulating dates and times.



package require Tcl 8.2

namespace eval ::calendar {



    variable home [file join [pwd] [file dirname [info script]]]
    if { [lsearch -exact $::auto_path $home] == -1 } {
	lappend ::auto_path $home
    }

    package provide [namespace tail [namespace current]] 0.2
}

Changes to modules/control/control.tcl.

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
# control.tcl --
#
#	This is the main package provide script for the package
#	"control".  It provides commands that govern the flow of
#	control of a program.
#
# RCS: @(#) $Id: control.tcl,v 1.15 2005/09/30 05:36:38 andreas_kupries Exp $

package require Tcl 8.2

namespace eval ::control {
    variable version 0.1.3
    namespace export assert control do no-op rswitch

    proc control {command args} {
	# Need to add error handling here
	namespace eval [list $command] $args
    }

    # Set up for auto-loading the commands
    variable home [file join [pwd] [file dirname [info script]]]
    if {[lsearch -exact $::auto_path $home] == -1} {
	lappend ::auto_path $home
    }

    package provide [namespace tail [namespace current]] $version
}





<
<




|













|

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
# control.tcl --
#
#	This is the main package provide script for the package
#	"control".  It provides commands that govern the flow of
#	control of a program.



package require Tcl 8.2

namespace eval ::control {
    variable version
    namespace export assert control do no-op rswitch

    proc control {command args} {
	# Need to add error handling here
	namespace eval [list $command] $args
    }

    # Set up for auto-loading the commands
    variable home [file join [pwd] [file dirname [info script]]]
    if {[lsearch -exact $::auto_path $home] == -1} {
	lappend ::auto_path $home
    }

    package provide [namespace tail [namespace current]] 0.1.3
}

Changes to modules/crc/cksum.tcl.

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
# cksum.tcl - Copyright (C) 2002 Pat Thoyts <[email protected]>
#
# Provides a Tcl only implementation of the unix cksum(1) command. This is
# similar to the sum(1) command but the algorithm is better defined and
# standardized across multiple platforms by POSIX 1003.2/D11.2
#
# This command has been verified against the cksum command from the GNU
# textutils package version 2.0
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# $Id: cksum.tcl,v 1.11 2009/04/21 20:06:19 andreas_kupries Exp $

package require Tcl 8.2;                # tcl minimum version

namespace eval ::crc {
    variable cksum_version 1.1.4

    namespace export cksum

    variable cksum_tbl [list 0x0 \
           0x04C11DB7 0x09823B6E 0x0D4326D9 0x130476DC 0x17C56B6B \
           0x1A864DB2 0x1E475005 0x2608EDB8 0x22C9F00F 0x2F8AD6D6 \
           0x2B4BCB61 0x350C9B64 0x31CD86D3 0x3C8EA00A 0x384FBDBD \
           0x4C11DB70 0x48D0C6C7 0x4593E01E 0x4152FDA9 0x5F15ADAC \













<




<
<







1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17


18
19
20
21
22
23
24
# cksum.tcl - Copyright (C) 2002 Pat Thoyts <[email protected]>
#
# Provides a Tcl only implementation of the unix cksum(1) command. This is
# similar to the sum(1) command but the algorithm is better defined and
# standardized across multiple platforms by POSIX 1003.2/D11.2
#
# This command has been verified against the cksum command from the GNU
# textutils package version 2.0
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


package require Tcl 8.2;                # tcl minimum version

namespace eval ::crc {


    namespace export cksum

    variable cksum_tbl [list 0x0 \
           0x04C11DB7 0x09823B6E 0x0D4326D9 0x130476DC 0x17C56B6B \
           0x1A864DB2 0x1E475005 0x2608EDB8 0x22C9F00F 0x2F8AD6D6 \
           0x2B4BCB61 0x350C9B64 0x31CD86D3 0x3C8EA00A 0x384FBDBD \
           0x4C11DB70 0x48D0C6C7 0x4593E01E 0x4152FDA9 0x5F15ADAC \
190
191
192
193
194
195
196
197
198
199
200
201
202
203
    }

    return [format $opts(-format) $r]
}

# -------------------------------------------------------------------------

package provide cksum $::crc::cksum_version

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






187
188
189
190
191
192
193
194
195
196
197
198
199
200
    }

    return [format $opts(-format) $r]
}

# -------------------------------------------------------------------------

package provide cksum 1.1.4

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/crc/crc16.tcl.

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
#   % crc::crc16 $msg[binary format s [crc::crc16 $msg]]
#   0
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# $Id: crc16.tcl,v 1.16 2012/01/23 20:28:11 patthoyts Exp $

# @mdgen EXCLUDE: crcc.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ::crc {

    namespace export crc16 crc-ccitt crc-32

    variable crc16_version 1.1.2

    # Standard CRC generator polynomials.
    variable polynomial
    set polynomial(crc16) [expr {(1<<16) | (1<<15) | (1<<2) | 1}]
    set polynomial(ccitt) [expr {(1<<16) | (1<<12) | (1<<5) | 1}]
    set polynomial(crc32) [expr {(1<<32) | (1<<26) | (1<<23) | (1<<22)
                                 | (1<<16) | (1<<12) | (1<<11) | (1<<10)
                                 | (1<<8) | (1<<7) | (1<<5) | (1<<4)







<






<


<
<







35
36
37
38
39
40
41

42
43
44
45
46
47

48
49


50
51
52
53
54
55
56
#   % crc::crc16 $msg[binary format s [crc::crc16 $msg]]
#   0
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


# @mdgen EXCLUDE: crcc.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ::crc {

    namespace export crc16 crc-ccitt crc-32



    # Standard CRC generator polynomials.
    variable polynomial
    set polynomial(crc16) [expr {(1<<16) | (1<<15) | (1<<2) | 1}]
    set polynomial(ccitt) [expr {(1<<16) | (1<<12) | (1<<5) | 1}]
    set polynomial(crc32) [expr {(1<<32) | (1<<26) | (1<<23) | (1<<22)
                                 | (1<<16) | (1<<12) | (1<<11) | (1<<10)
                                 | (1<<8) | (1<<7) | (1<<5) | (1<<4)
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
proc ::crc::crc-32 {args} {
    return [eval [list crc -impl [namespace origin CRC-32] -seed 0xFFFFFFFF]\
                $args]
}

# -------------------------------------------------------------------------

package provide crc16 $crc::crc16_version

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|







288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
proc ::crc::crc-32 {args} {
    return [eval [list crc -impl [namespace origin CRC-32] -seed 0xFFFFFFFF]\
                $args]
}

# -------------------------------------------------------------------------

package provide crc16 1.1.2

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/crc/crc32.tcl.

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
# crc32.tcl -- Copyright (C) 2002 Pat Thoyts <[email protected]>
#
# CRC32 Cyclic Redundancy Check. 
# (for algorithm see http://www.rad.com/networks/1994/err_con/crc.htm)
#
# From http://mini.net/tcl/2259.tcl
# Written by Wayland Augur and Pat Thoyts.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# $Id: crc32.tcl,v 1.22 2009/05/06 22:41:08 patthoyts Exp $

package require Tcl 8.2

namespace eval ::crc {
    variable crc32_version 1.3.2
    variable accel
    array set accel {critcl 0 trf 0}

    namespace export crc32

    variable crc32_tbl [list 0x00000000 0x77073096 0xEE0E612C 0x990951BA \
                           0x076DC419 0x706AF48F 0xE963A535 0x9E6495A3 \
                           0x0EDB8832 0x79DCB8A4 0xE0D5E91E 0x97D2D988 \












<




<
|







1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16

17
18
19
20
21
22
23
24
# crc32.tcl -- Copyright (C) 2002 Pat Thoyts <[email protected]>
#
# CRC32 Cyclic Redundancy Check. 
# (for algorithm see http://www.rad.com/networks/1994/err_con/crc.htm)
#
# From http://mini.net/tcl/2259.tcl
# Written by Wayland Augur and Pat Thoyts.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


package require Tcl 8.2

namespace eval ::crc {

    variable  accel
    array set accel {critcl 0 trf 0}

    namespace export crc32

    variable crc32_tbl [list 0x00000000 0x77073096 0xEE0E612C 0x990951BA \
                           0x076DC419 0x706AF48F 0xE963A535 0x9E6495A3 \
                           0x0EDB8832 0x79DCB8A4 0xE0D5E91E 0x97D2D988 \
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
    variable e {}
    foreach e {trf critcl} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide crc32 $::crc::crc32_version

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|







363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
    variable e {}
    foreach e {trf critcl} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide crc32 1.3.2

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/crc/sum.tcl.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# These commands have been checked against the GNU sum program from the GNU
# textutils package version 2.0 to ensure the same results.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# $Id: sum.tcl,v 1.8 2009/05/07 00:39:49 patthoyts Exp $

package require Tcl 8.2;                # tcl minimum version

catch {package require tcllibc};        # critcl enhancements to tcllib
#catch {package require crcc};           # critcl enhanced crc module

namespace eval ::crc {
    variable sum_version 1.1.1
    namespace export sum

    variable uid
    if {![info exists uid]} {
        set uid 0
    }
}







<







<







9
10
11
12
13
14
15

16
17
18
19
20
21
22

23
24
25
26
27
28
29
# These commands have been checked against the GNU sum program from the GNU
# textutils package version 2.0 to ensure the same results.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


package require Tcl 8.2;                # tcl minimum version

catch {package require tcllibc};        # critcl enhancements to tcllib
#catch {package require crcc};           # critcl enhanced crc module

namespace eval ::crc {

    namespace export sum

    variable uid
    if {![info exists uid]} {
        set uid 0
    }
}
265
266
267
268
269
270
271
272
273
274
275
276
277
278
    }

    return [format $opts(-format) $r]
}

# -------------------------------------------------------------------------

package provide sum $::crc::sum_version

# -------------------------------------------------------------------------    
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






263
264
265
266
267
268
269
270
271
272
273
274
275
276
    }

    return [format $opts(-format) $r]
}

# -------------------------------------------------------------------------

package provide sum 1.1.1

# -------------------------------------------------------------------------    
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/des/des.tcl.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package require Tcl 8.2

if {[catch {package require tclDES 1.0.0}]} {
    package require tclDESjr 1.0.0
}

namespace eval DES {
    variable version 1.1.0
    variable rcsid {$Id: des.tcl,v 1.14 2007/08/20 19:58:54 andreas_kupries Exp $}
    variable uid ; if {![info exists uid]} { set uid 0 }
}

proc ::DES::Init {mode key iv {weak 0}} {
    variable uid
    set Key [namespace current]::[incr uid]
    upvar #0 $Key state
    if {[string length $key] % 8 != 0} {







|
<
|







13
14
15
16
17
18
19
20

21
22
23
24
25
26
27
28
package require Tcl 8.2

if {[catch {package require tclDES 1.0.0}]} {
    package require tclDESjr 1.0.0
}

namespace eval DES {
    variable uid

    if {![info exists uid]} { set uid 0 }
}

proc ::DES::Init {mode key iv {weak 0}} {
    variable uid
    set Key [namespace current]::[incr uid]
    upvar #0 $Key state
    if {[string length $key] % 8 != 0} {
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
        set r [Hex $r]
    }
    return $r
}

# -------------------------------------------------------------------------

package provide des $DES::version

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|







258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
        set r [Hex $r]
    }
    return $r
}

# -------------------------------------------------------------------------

package provide des 1.1.0

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/devtools/testutilities.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
# Testsuite utilities / boilerplate
# Copyright (c) 2006, Andreas Kupries <[email protected]>

namespace eval ::tcllib::testutils {
    variable version 1.2
    variable self    [file dirname [file join [pwd] [info script]]]
    variable tcllib  [file dirname $self]
    variable tag     ""
    variable theEnv  ; # Saved environment.
}

# ### ### ### ######### ######### #########





<







1
2
3
4
5

6
7
8
9
10
11
12
# -*- tcl -*-
# Testsuite utilities / boilerplate
# Copyright (c) 2006, Andreas Kupries <[email protected]>

namespace eval ::tcllib::testutils {

    variable self    [file dirname [file join [pwd] [info script]]]
    variable tcllib  [file dirname $self]
    variable tag     ""
    variable theEnv  ; # Saved environment.
}

# ### ### ### ######### ######### #########
714
715
716
717
718
719
720
721
722
723

# ### ### ### ######### ######### #########
##

::tcllib::testutils::SaveEnvironment

# ### ### ### ######### ######### #########
package provide tcllib::testutils $::tcllib::testutils::version
puts "- tcllib::testutils [package present tcllib::testutils]"
return







|


713
714
715
716
717
718
719
720
721
722

# ### ### ### ######### ######### #########
##

::tcllib::testutils::SaveEnvironment

# ### ### ### ######### ######### #########
package provide tcllib::testutils 1.2
puts "- tcllib::testutils [package present tcllib::testutils]"
return

Changes to modules/dns/dns.tcl.

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
#
#  - Read RFC 2136 - dynamic updating of DNS
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: dns.tcl,v 1.36 2008/11/22 12:28:54 mic42 Exp $

package require Tcl 8.2;                # tcl minimum version
package require logger;                 # tcllib 1.3
package require uri;                    # tcllib 1.1
package require uri::urn;               # tcllib 1.2
package require ip;                     # tcllib 1.7

namespace eval ::dns {
    variable version 1.3.4
    variable rcsid {$Id: dns.tcl,v 1.36 2008/11/22 12:28:54 mic42 Exp $}

    namespace export configure resolve name address cname \
        status reset wait cleanup errorcode

    variable options
    if {![info exists options]} {
        array set options {
            port       53







<
<








<
<
<







24
25
26
27
28
29
30


31
32
33
34
35
36
37
38



39
40
41
42
43
44
45
#
#  - Read RFC 2136 - dynamic updating of DNS
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



package require Tcl 8.2;                # tcl minimum version
package require logger;                 # tcllib 1.3
package require uri;                    # tcllib 1.1
package require uri::urn;               # tcllib 1.2
package require ip;                     # tcllib 1.7

namespace eval ::dns {



    namespace export configure resolve name address cname \
        status reset wait cleanup errorcode

    variable options
    if {![info exists options]} {
        array set options {
            port       53
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
    return "dns:$query"
}

# -------------------------------------------------------------------------

catch {dns::configure -nameserver [lindex [dns::nameservers] 0]}

package provide dns $dns::version

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:







|





1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
    return "dns:$query"
}

# -------------------------------------------------------------------------

catch {dns::configure -nameserver [lindex [dns::nameservers] 0]}

package provide dns 1.3.4

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:

Changes to modules/dns/ip.tcl.

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
# ip.tcl - Copyright (C) 2004 Pat Thoyts <[email protected]>
#
# Internet address manipulation.
#
# RFC 3513: IPv6 addressing.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: ip.tcl,v 1.14 2010/08/16 17:35:18 andreas_kupries Exp $

# @mdgen EXCLUDE: ipMoreC.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ip {
    variable version 1.2.2
    variable rcsid {$Id: ip.tcl,v 1.14 2010/08/16 17:35:18 andreas_kupries Exp $}

    namespace export is version normalize equal type contract mask collapse subtract
    #catch {namespace ensemble create}

    variable IPv4Ranges
    if {![info exists IPv4Ranges]} {
        array set IPv4Ranges {
            0/8        private










<
<






<
<
<







1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16



17
18
19
20
21
22
23
# ip.tcl - Copyright (C) 2004 Pat Thoyts <[email protected]>
#
# Internet address manipulation.
#
# RFC 3513: IPv6 addressing.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



# @mdgen EXCLUDE: ipMoreC.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ip {



    namespace export is version normalize equal type contract mask collapse subtract
    #catch {namespace ensemble create}

    variable IPv4Ranges
    if {![info exists IPv4Ranges]} {
        array set IPv4Ranges {
            0/8        private
546
547
548
549
550
551
552
553
554
555
556
557
558
# -------------------------------------------------------------------------
# Load extended command set.

source [file join [file dirname [info script]] ipMore.tcl]

# -------------------------------------------------------------------------

package provide ip $::ip::version

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:







|





541
542
543
544
545
546
547
548
549
550
551
552
553
# -------------------------------------------------------------------------
# Load extended command set.

source [file join [file dirname [info script]] ipMore.tcl]

# -------------------------------------------------------------------------

package provide ip 1.2.2

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:

Changes to modules/dns/resolv.tcl.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#  has no expiration on host name resolutions, but this is probably
#  enough for short lived applications.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: resolv.tcl,v 1.9 2004/01/25 07:29:39 andreas_kupries Exp $

package require dns 1.0;                # tcllib 1.3

namespace eval ::resolv {
    variable version 1.0.3
    variable rcsid {$Id: resolv.tcl,v 1.9 2004/01/25 07:29:39 andreas_kupries Exp $}

    namespace export resolve init ignore hostname

    variable R
    if {![info exists R]} {
        array set R {
            initdone   0
            dns        ""







<
<




<
<
<







12
13
14
15
16
17
18


19
20
21
22



23
24
25
26
27
28
29
#  has no expiration on host name resolutions, but this is probably
#  enough for short lived applications.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



package require dns 1.0;                # tcllib 1.3

namespace eval ::resolv {



    namespace export resolve init ignore hostname

    variable R
    if {![info exists R]} {
        array set R {
            initdone   0
            dns        ""
242
243
244
245
246
247
248
249
250
251
252
253
254
        return -code error "dns error: $err"
    }
    return $ip
}

# -------------------------------------------------------------------------

package provide resolv $::resolv::version

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:







|





237
238
239
240
241
242
243
244
245
246
247
248
249
        return -code error "dns error: $err"
    }
    return $ip
}

# -------------------------------------------------------------------------

package provide resolv 1.0.3

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:

Changes to modules/dns/spf.tcl.

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
#   oreilly.com     - mx, ptr, include
#   motleyfool.com  - include (looping includes)
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: spf.tcl,v 1.5 2008/03/14 21:21:12 andreas_kupries Exp $

package require Tcl 8.2;                # tcl minimum version
package require dns;                    # tcllib 1.3
package require logger;                 # tcllib 1.3
package require ip;                     # tcllib 1.7
package require struct::list;           # tcllib 1.7
package require uri::urn;               # tcllib 1.3

namespace eval spf {
    variable version 1.1.1
    variable rcsid {$Id: spf.tcl,v 1.5 2008/03/14 21:21:12 andreas_kupries Exp $}

    namespace export spf

    variable uid
    if {![info exists uid]} {set uid 0}

    variable log
    if {![info exists log]} { 







<
<









<
<
<







15
16
17
18
19
20
21


22
23
24
25
26
27
28
29
30



31
32
33
34
35
36
37
#   oreilly.com     - mx, ptr, include
#   motleyfool.com  - include (looping includes)
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



package require Tcl 8.2;                # tcl minimum version
package require dns;                    # tcllib 1.3
package require logger;                 # tcllib 1.3
package require ip;                     # tcllib 1.7
package require struct::list;           # tcllib 1.7
package require uri::urn;               # tcllib 1.3

namespace eval spf {



    namespace export spf

    variable uid
    if {![info exists uid]} {set uid 0}

    variable log
    if {![info exists log]} { 
521
522
523
524
525
526
527
528
529
530
531
532
533
    set r [Resolve $domain MX ::dns::name]
    return [lsort -index 0 $r]
}

    
# -------------------------------------------------------------------------

package provide spf $::spf::version

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:







|





516
517
518
519
520
521
522
523
524
525
526
527
528
    set r [Resolve $domain MX ::dns::name]
    return [lsort -index 0 $r]
}

    
# -------------------------------------------------------------------------

package provide spf 1.1.1

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:

Changes to modules/http/autoproxy.tcl.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#   autoproxy::init
#   set tok [http::geturl http://wiki.tcl.tk/]
#   http::data $tok
#
# To support https add:
#   package require tls
#   http::register https 443 ::autoproxy::tls_socket
#
# @(#)$Id: autoproxy.tcl,v 1.15 2012/05/28 20:30:32 andreas_kupries Exp $

package require http;                   # tcl
package require uri;                    # tcllib
package require base64;                 # tcllib

namespace eval ::autoproxy {
    variable rcsid {$Id: autoproxy.tcl,v 1.15 2012/05/28 20:30:32 andreas_kupries Exp $}
    variable version 1.5.3
    variable options

    if {! [info exists options]} {
        array set options {
            proxy_host ""
            proxy_port 80
            no_proxy   {}







<
<






<
<







15
16
17
18
19
20
21


22
23
24
25
26
27


28
29
30
31
32
33
34
#   autoproxy::init
#   set tok [http::geturl http://wiki.tcl.tk/]
#   http::data $tok
#
# To support https add:
#   package require tls
#   http::register https 443 ::autoproxy::tls_socket



package require http;                   # tcl
package require uri;                    # tcllib
package require base64;                 # tcllib

namespace eval ::autoproxy {


    variable options

    if {! [info exists options]} {
        array set options {
            proxy_host ""
            proxy_port 80
            no_proxy   {}
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
    set state(tls_status) [tls::status $s]

    return $s
}

# -------------------------------------------------------------------------

package provide autoproxy $::autoproxy::version

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|







525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
    set state(tls_status) [tls::status $s]

    return $s
}

# -------------------------------------------------------------------------

package provide autoproxy 1.5.3

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/irc/irc.tcl.

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
# irc.tcl --
#
#	irc implementation for Tcl.
#
# Copyright (c) 2001-2003 by David N. Welton <[email protected]>.
# This code may be distributed under the same terms as Tcl.
#
# $Id: irc.tcl,v 1.27 2008/08/05 20:40:04 andreas_kupries Exp $

package require Tcl 8.3

namespace eval ::irc {
    variable version 0.6.1

    # counter used to differentiate connections
    variable conn 0
    variable config
    variable irctclfile [info script]
    array set config {
        debug 0
        logger 0
    }
}

# ::irc::config --
#
# Set global configuration options.






<
<




<
<





|







1
2
3
4
5
6


7
8
9
10


11
12
13
14
15
16
17
18
19
20
21
22
23
# irc.tcl --
#
#	irc implementation for Tcl.
#
# Copyright (c) 2001-2003 by David N. Welton <[email protected]>.
# This code may be distributed under the same terms as Tcl.



package require Tcl 8.3

namespace eval ::irc {


    # counter used to differentiate connections
    variable conn 0
    variable config
    variable irctclfile [info script]
    array set config {
        debug  0
        logger 0
    }
}

# ::irc::config --
#
# Set global configuration options.
518
519
520
521
522
523
524
525
526
527
    set returncommand [format "%s::irc%s::network" [namespace current] $conn]
    incr conn
    return $returncommand
}

# -------------------------------------------------------------------------

package provide irc $::irc::version

# -------------------------------------------------------------------------







|


514
515
516
517
518
519
520
521
522
523
    set returncommand [format "%s::irc%s::network" [namespace current] $conn]
    incr conn
    return $returncommand
}

# -------------------------------------------------------------------------

package provide irc 0.6.1

# -------------------------------------------------------------------------

Changes to modules/irc/picoirc.tcl.

9
10
11
12
13
14
15
16
17
18
19
20
21

22
23
24
25
26
27
28
# Copyright (c) 2004 Richard Suchenwirth
# Copyright (c) 2007 Patrick Thoyts
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: picoirc.tcl,v 1.4 2008/06/24 22:06:56 patthoyts Exp $

namespace eval ::picoirc {
    variable version 0.5.1
    variable uid; if {![info exists uid]} { set uid 0 }

    variable defaults {
        server   "irc.freenode.net"
        port     6667
        channel  ""
        callback ""
        motd     {}
        users    {}







|
<
<

|
|
>







9
10
11
12
13
14
15
16


17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) 2004 Richard Suchenwirth
# Copyright (c) 2007 Patrick Thoyts
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



namespace eval ::picoirc {
    variable uid
    if {![info exists uid]} { set uid 0 }

    variable defaults {
        server   "irc.freenode.net"
        port     6667
        channel  ""
        callback ""
        motd     {}
        users    {}
263
264
265
266
267
268
269
270
271
272
    if {[catch {Callback $context debug write $line}] != 3} {
        puts $irc(socket) $line
    }
}

# -------------------------------------------------------------------------

package provide picoirc $::picoirc::version

# -------------------------------------------------------------------------







|


262
263
264
265
266
267
268
269
270
271
    if {[catch {Callback $context debug write $line}] != 3} {
        puts $irc(socket) $line
    }
}

# -------------------------------------------------------------------------

package provide picoirc 0.5.1

# -------------------------------------------------------------------------

Changes to modules/math/math.tcl.

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
# math.tcl --
#
#	Main 'package provide' script for the package 'math'.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2002 by Kevin B. Kenny.  All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: math.tcl,v 1.23 2009/12/04 17:37:47 andreas_kupries Exp $

package require Tcl 8.2		;# uses [lindex $l end-$integer]

# @mdgen OWNER: tclIndex
# @mdgen OWNER: misc.tcl
# @mdgen OWNER: combinatorics.tcl

namespace eval ::math {

    variable version 1.2.5

    # misc.tcl

    namespace export	cov		fibonacci	integrate
    namespace export	max		mean		min
    namespace export	product		random		sigma
    namespace export	stats		sum
    namespace export	expectDouble    expectInteger









<
<








<
<
<







1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16
17



18
19
20
21
22
23
24
# math.tcl --
#
#	Main 'package provide' script for the package 'math'.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2002 by Kevin B. Kenny.  All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require Tcl 8.2		;# uses [lindex $l end-$integer]

# @mdgen OWNER: tclIndex
# @mdgen OWNER: misc.tcl
# @mdgen OWNER: combinatorics.tcl

namespace eval ::math {



    # misc.tcl

    namespace export	cov		fibonacci	integrate
    namespace export	max		mean		min
    namespace export	product		random		sigma
    namespace export	stats		sum
    namespace export	expectDouble    expectInteger
41
42
43
44
45
46
47
48
49
	    lappend ::auto_path $home
	}
    } else {
	source [file join [file dirname [info script]] misc.tcl]
	source [file join [file dirname [info script]] combinatorics.tcl]
    }

    package provide [namespace tail [namespace current]] $version
}







|

36
37
38
39
40
41
42
43
44
	    lappend ::auto_path $home
	}
    } else {
	source [file join [file dirname [info script]] misc.tcl]
	source [file join [file dirname [info script]] combinatorics.tcl]
    }

    package provide [namespace tail [namespace current]] 1.2.5
}

Changes to modules/md4/md4.tcl.

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
# md4.tcl - Copyright (C) 2003 Pat Thoyts <[email protected]>
#
# This is a Tcl-only implementation of the MD4 hash algorithm as described in 
# RFC 1320 ( http://www.ietf.org/rfc/rfc1320.txt )
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: md4.tcl,v 1.20 2008/04/29 10:07:45 patthoyts Exp $

package require Tcl 8.2;                # tcl minimum version
catch {package require md4c 1.0};       # tcllib critcl alternative

# @mdgen EXCLUDE: md4c.tcl

namespace eval ::md4 {
    variable version 1.0.6
    variable rcsid {$Id: md4.tcl,v 1.20 2008/04/29 10:07:45 patthoyts Exp $}
    variable accel
    array set accel {critcl 0 cryptkit 0}

    namespace export md4 hmac MD4Init MD4Update MD4Final

    variable uid
    if {![info exists uid]} {
        set uid 0









<
<







<
<
|







1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16


17
18
19
20
21
22
23
24
# md4.tcl - Copyright (C) 2003 Pat Thoyts <[email protected]>
#
# This is a Tcl-only implementation of the MD4 hash algorithm as described in 
# RFC 1320 ( http://www.ietf.org/rfc/rfc1320.txt )
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



package require Tcl 8.2;                # tcl minimum version
catch {package require md4c 1.0};       # tcllib critcl alternative

# @mdgen EXCLUDE: md4c.tcl

namespace eval ::md4 {


    variable  accel
    array set accel {critcl 0 cryptkit 0}

    namespace export md4 hmac MD4Init MD4Update MD4Final

    variable uid
    if {![info exists uid]} {
        set uid 0
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
# Try and load a compiled extension to help.
namespace eval ::md4 {
    variable e {}
    foreach e {critcl cryptkit} { if {[LoadAccelerator $e]} { break } }
    unset e
}

package provide md4 $::md4::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:









|








556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
# Try and load a compiled extension to help.
namespace eval ::md4 {
    variable e {}
    foreach e {critcl cryptkit} { if {[LoadAccelerator $e]} { break } }
    unset e
}

package provide md4 1.0.6

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:


Changes to modules/md5/md5x.tcl.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# provides support for external compiled implementations either using
# critcl (md5c) or Trf.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: md5x.tcl,v 1.19 2008/07/04 18:27:00 andreas_kupries Exp $

package require Tcl 8.2;                # tcl minimum version

namespace eval ::md5 {
    variable version 2.0.7
    variable rcsid {$Id: md5x.tcl,v 1.19 2008/07/04 18:27:00 andreas_kupries Exp $}
    variable accel
    array set accel {critcl 0 cryptkit 0 trf 0}

    namespace export md5 hmac MD5Init MD5Update MD5Final

    variable uid
    if {![info exists uid]} {
        set uid 0







<
<




<
<
|







11
12
13
14
15
16
17


18
19
20
21


22
23
24
25
26
27
28
29
# provides support for external compiled implementations either using
# critcl (md5c) or Trf.
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



package require Tcl 8.2;                # tcl minimum version

namespace eval ::md5 {


    variable  accel
    array set accel {critcl 0 cryptkit 0 trf 0}

    namespace export md5 hmac MD5Init MD5Update MD5Final

    variable uid
    if {![info exists uid]} {
        set uid 0
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
# Try and load a compiled extension to help.
namespace eval ::md5 {
    variable e
    foreach  e {critcl cryptkit trf} { if {[LoadAccelerator $e]} { break } }
    unset    e
}

package provide md5 $::md5::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:









|








698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
# Try and load a compiled extension to help.
namespace eval ::md5 {
    variable e
    foreach  e {critcl cryptkit trf} { if {[LoadAccelerator $e]} { break } }
    unset    e
}

package provide md5 2.0.7

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:


Changes to modules/md5crypt/md5crypt.tcl.

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
# md5crypt.tcl - Copyright (C) 2003 Pat Thoyts <[email protected]>
#
# This file provides a pure tcl implementation of the BSD MD5 crypt algorithm.
# The implementation is based upon the OpenBSD code which is in turn based upon
# the original code by Poul-Henning Kamp. 
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

# @mdgen EXCLUDE: md5cryptc.tcl

package require Tcl 8.2;                # tcl minimum version
package require md5 2;                  # tcllib 1.5

# Try and load a compiled extension to help.
if {[catch {package require tcllibc}]} {
    catch {package require md5cryptc}
}

namespace eval md5crypt {
    variable version 1.1.0
    variable rcsid {$Id: md5crypt.tcl,v 1.5 2008/01/26 23:56:26 patthoyts Exp $}
    variable itoa64 \
        {./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}

    namespace import -force ::md5::MD5Init ::md5::MD5Update ::md5::MD5Final
    namespace export md5crypt
}











<











<
<







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
# md5crypt.tcl - Copyright (C) 2003 Pat Thoyts <[email protected]>
#
# This file provides a pure tcl implementation of the BSD MD5 crypt algorithm.
# The implementation is based upon the OpenBSD code which is in turn based upon
# the original code by Poul-Henning Kamp. 
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

# @mdgen EXCLUDE: md5cryptc.tcl

package require Tcl 8.2;                # tcl minimum version
package require md5 2;                  # tcllib 1.5

# Try and load a compiled extension to help.
if {[catch {package require tcllibc}]} {
    catch {package require md5cryptc}
}

namespace eval md5crypt {


    variable itoa64 \
        {./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}

    namespace import -force ::md5::MD5Init ::md5::MD5Update ::md5::MD5Final
    namespace export md5crypt
}

142
143
144
145
146
147
148
149
150
151
152
153
154
155
} else {
    interp alias {} ::md5crypt::md5crypt {} ::md5crypt::md5crypt_c {$1$}
    interp alias {} ::md5crypt::aprcrypt {} ::md5crypt::md5crypt_c {$apr1$}
}

# -------------------------------------------------------------------------

package provide md5crypt $::md5crypt::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






139
140
141
142
143
144
145
146
147
148
149
150
151
152
} else {
    interp alias {} ::md5crypt::md5crypt {} ::md5crypt::md5crypt_c {$1$}
    interp alias {} ::md5crypt::aprcrypt {} ::md5crypt::md5crypt_c {$apr1$}
}

# -------------------------------------------------------------------------

package provide md5crypt 1.1.0

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/mime/smtp.tcl.

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#    error: error during read
#    line: response read from server
#    crP: just put a \r in the data
#    nlP: just put a \n in the data
#    size: number of octets sent in DATA
#


namespace eval ::smtp {
    variable version 1.4.5
    variable trf 1
    variable smtp
    array set smtp { uid 0 }

    namespace export sendmessage
}

if {[catch {package require Trf  2.0}]} {
    # Trf is not available, but we can live without it as long as the







<

<
|
|







26
27
28
29
30
31
32

33

34
35
36
37
38
39
40
41
42
#    error: error during read
#    line: response read from server
#    crP: just put a \r in the data
#    nlP: just put a \n in the data
#    size: number of octets sent in DATA
#


namespace eval ::smtp {

    variable  trf 1
    variable  smtp
    array set smtp { uid 0 }

    namespace export sendmessage
}

if {[catch {package require Trf  2.0}]} {
    # Trf is not available, but we can live without it as long as the
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
            error "unknown boolean value: $value"
        }
    }
}

# -------------------------------------------------------------------------

package provide smtp $::smtp::version

# -------------------------------------------------------------------------
# Local variables:
# indent-tabs-mode: nil
# End:







|





1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
            error "unknown boolean value: $value"
        }
    }
}

# -------------------------------------------------------------------------

package provide smtp 1.4.5

# -------------------------------------------------------------------------
# Local variables:
# indent-tabs-mode: nil
# End:

Changes to modules/ntp/time.tcl.

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
# time.tcl - Copyright (C) 2003 Pat Thoyts <[email protected]>
#
# Client for the Time protocol. See RFC 868
# Client for Simple Network Time Protocol - RFC 2030
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: time.tcl,v 1.19 2006/09/19 23:36:17 andreas_kupries Exp $

package require Tcl 8.0;                # tcl minimum version
package require log;                    # tcllib 1.3

namespace eval ::time {
    variable version 1.2.1
    variable rcsid {$Id: time.tcl,v 1.19 2006/09/19 23:36:17 andreas_kupries Exp $}

    namespace export configure gettime server cleanup

    variable options
    if {![info exists options]} {
        array set options {
            -timeserver {}
            -port       37









<
<





<
<
<







1
2
3
4
5
6
7
8
9


10
11
12
13
14



15
16
17
18
19
20
21
# time.tcl - Copyright (C) 2003 Pat Thoyts <[email protected]>
#
# Client for the Time protocol. See RFC 868
# Client for Simple Network Time Protocol - RFC 2030
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



package require Tcl 8.0;                # tcl minimum version
package require log;                    # tcllib 1.3

namespace eval ::time {



    namespace export configure gettime server cleanup

    variable options
    if {![info exists options]} {
        array set options {
            -timeserver {}
            -port       37
374
375
376
377
378
379
380
381
382
383
384
385
386
387
    set r [lindex $args $nth]
    set args [lreplace $args $nth $nth]
    return $r
}

# -------------------------------------------------------------------------

package provide time $::time::version

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






369
370
371
372
373
374
375
376
377
378
379
380
381
382
    set r [lindex $args $nth]
    set args [lreplace $args $nth $nth]
    return $r
}

# -------------------------------------------------------------------------

package provide time 1.2.1

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/otp/otp.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# otp.tcl - Copyright (C) 2006 Pat Thoyts <[email protected]>
#
# Tcl implementation of RFC 2289: A One-Time Password System
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


package require Tcl 8.2;                # tcl minimum version

namespace eval ::otp {
    variable version 1.0.0
    variable rcsid {$Id: otp.tcl,v 1.2 2006/09/02 22:30:17 patthoyts Exp $}

    namespace export otp-md4 otp-md5 otp-sha1 otp-rmd160

    variable Words {
        "A"     "ABE"   "ACE"   "ACT"   "AD"    "ADA"   "ADD"
        "AGO"   "AID"   "AIM"   "AIR"   "ALL"   "ALP"   "AM"    "AMY"
        "AN"    "ANA"   "AND"   "ANN"   "ANT"   "ANY"   "APE"   "APS"
        "APT"   "ARC"   "ARE"   "ARK"   "ARM"   "ART"   "AS"    "ASH"













<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13



14
15
16
17
18
19
20
# otp.tcl - Copyright (C) 2006 Pat Thoyts <[email protected]>
#
# Tcl implementation of RFC 2289: A One-Time Password System
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


package require Tcl 8.2;                # tcl minimum version

namespace eval ::otp {



    namespace export otp-md4 otp-md5 otp-sha1 otp-rmd160

    variable Words {
        "A"     "ABE"   "ACE"   "ACT"   "AD"    "ADA"   "ADD"
        "AGO"   "AID"   "AIM"   "AIR"   "ALL"   "ALP"   "AM"    "AMY"
        "AN"    "ANA"   "AND"   "ANN"   "ANT"   "ANY"   "APE"   "APS"
        "APT"   "ARC"   "ARE"   "ARK"   "ARM"   "ART"   "AS"    "ASH"
420
421
422
423
424
425
426
427
428
429
430
431
432
433
proc ::otp::otp-rmd160 {args} {
    package require ripemd160
    return [eval [linsert $args 0 [namespace current]::otp -hash rmd160]]
}

# -------------------------------------------------------------------------

package provide otp $::otp::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






417
418
419
420
421
422
423
424
425
426
427
428
429
430
proc ::otp::otp-rmd160 {args} {
    package require ripemd160
    return [eval [linsert $args 0 [namespace current]::otp -hash rmd160]]
}

# -------------------------------------------------------------------------

package provide otp 1.0.0

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/pop3d/pop3d.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15


16
17
18
19
20
21
22
# pop3d.tcl --
#
#	Implementation of a pop3 server for Tcl.
#
# Copyright (c) 2002-2009 by Andreas Kupries
# Copyright (c) 2005      by Reinhard Max (-socket option)
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: pop3d.tcl,v 1.23 2009/04/14 20:35:43 andreas_kupries Exp $

package require md5  ; # tcllib | APOP
package require mime ; # tcllib | storage callback
package require log  ; # tcllib | tracing



namespace eval ::pop3d {
    # Data storage in the pop3d module
    # -------------------------------
    #
    # There's a number of bits to keep track of for each server and
    # connection managed by it.









<
<




>
>







1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16
17
18
19
20
21
22
# pop3d.tcl --
#
#	Implementation of a pop3 server for Tcl.
#
# Copyright (c) 2002-2009 by Andreas Kupries
# Copyright (c) 2005      by Reinhard Max (-socket option)
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require md5  ; # tcllib | APOP
package require mime ; # tcllib | storage callback
package require log  ; # tcllib | tracing

package provide pop3d 1.1.0

namespace eval ::pop3d {
    # Data storage in the pop3d module
    # -------------------------------
    #
    # There's a number of bits to keep track of for each server and
    # connection managed by it.
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
	    "cget"		\
	    "configure"		\
	    "destroy"		\
	    "down"		\
	    "up"		\
	    ]

    variable version ; set version 1.1.0
    variable server  "tcllib/pop3d-$version"

    variable cmdMap ; array set cmdMap {
	CAPA H_capa
	USER H_user
	PASS H_pass
	APOP H_apop







|







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
	    "cget"		\
	    "configure"		\
	    "destroy"		\
	    "down"		\
	    "up"		\
	    ]

    variable version [package present pop3d]
    variable server  "tcllib/pop3d-$version"

    variable cmdMap ; array set cmdMap {
	CAPA H_capa
	USER H_user
	PASS H_pass
	APOP H_apop
1140
1141
1142
1143
1144
1145
1146
1147
1148
} else {
    proc ::pop3d::Md5 {text} {string tolower [md5::md5 -hex $text]}
}
unset major

##########################
# Module initialization

package provide pop3d $::pop3d::version







|
<
1140
1141
1142
1143
1144
1145
1146
1147

} else {
    proc ::pop3d::Md5 {text} {string tolower [md5::md5 -hex $text]}
}
unset major

##########################
# Module initialization
return

Changes to modules/pop3d/pop3d_dbox.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- tcl -*-
# pop3d_dbox.tcl --
#
#	Implementation of a simple mailbox database for the pop3 server
#       Each mailbox is a a directory in a base directory, with each mail
#	a file in that directory. The mail file contains both headers and
#	body of the mail.
#
# Copyright (c) 2002 by Andreas Kupries
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: pop3d_dbox.tcl,v 1.12 2005/09/28 04:51:23 andreas_kupries Exp $

package require mime ; # tcllib | mime token is result of "get".
package require log  ; # tcllib | Logging package

namespace eval ::pop3d::dbox {
    # Data storage in the pop3d::dbox module
    # -------------------------------------












<
<







1
2
3
4
5
6
7
8
9
10
11
12


13
14
15
16
17
18
19
# -*- tcl -*-
# pop3d_dbox.tcl --
#
#	Implementation of a simple mailbox database for the pop3 server
#       Each mailbox is a a directory in a base directory, with each mail
#	a file in that directory. The mail file contains both headers and
#	body of the mail.
#
# Copyright (c) 2002 by Andreas Kupries
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require mime ; # tcllib | mime token is result of "get".
package require log  ; # tcllib | Logging package

namespace eval ::pop3d::dbox {
    # Data storage in the pop3d::dbox module
    # -------------------------------------
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
	    "locked"	\
	    "move"	\
	    "remove"	\
	    "size"	\
	    "stat"	\
	    "unlock"	\
	    ]

    variable version ; set version 1.0.2
}


# ::pop3d::dbox::new --
#
#	Create a new mailbox database with a given name;
#	if no name is given, use







<
<







36
37
38
39
40
41
42


43
44
45
46
47
48
49
	    "locked"	\
	    "move"	\
	    "remove"	\
	    "size"	\
	    "stat"	\
	    "unlock"	\
	    ]


}


# ::pop3d::dbox::new --
#
#	Create a new mailbox database with a given name;
#	if no name is given, use
482
483
484
485
486
487
488
489
    }
    return $dir
}

##########################
# Module initialization

package provide pop3d::dbox $::pop3d::dbox::version







|
478
479
480
481
482
483
484
485
    }
    return $dir
}

##########################
# Module initialization

package provide pop3d::dbox 1.0.2

Changes to modules/pop3d/pop3d_udb.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- tcl -*-
# pop3d_udb.tcl --
#
#	Implementation of a simple user database for the pop3 server
#
# Copyright (c) 2002 by Andreas Kupries
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: pop3d_udb.tcl,v 1.6 2004/01/15 06:36:13 andreas_kupries Exp $

namespace eval ::pop3d::udb {
    # Data storage in the pop3d::udb module
    # -------------------------------------
    # One array per object containing the db contents. Keyed by user name.
    # And the information about the last file data was read from.










<
<







1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16
# -*- tcl -*-
# pop3d_udb.tcl --
#
#	Implementation of a simple user database for the pop3 server
#
# Copyright (c) 2002 by Andreas Kupries
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



namespace eval ::pop3d::udb {
    # Data storage in the pop3d::udb module
    # -------------------------------------
    # One array per object containing the db contents. Keyed by user name.
    # And the information about the last file data was read from.

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
	    "lookup"		\
	    "read"		\
	    "remove"		\
	    "rename"		\
	    "save"		\
	    "who"		\
	    ]

    variable version ; set version 1.1
}


# ::pop3d::udb::new --
#
#	Create a new user database with a given name; if no name is given, use
#	p3udbX, where X is a number.







<
<







25
26
27
28
29
30
31


32
33
34
35
36
37
38
	    "lookup"		\
	    "read"		\
	    "remove"		\
	    "rename"		\
	    "save"		\
	    "who"		\
	    ]


}


# ::pop3d::udb::new --
#
#	Create a new user database with a given name; if no name is given, use
#	p3udbX, where X is a number.
297
298
299
300
301
302
303
304

    return
}

##########################
# Module initialization

package provide pop3d::udb $::pop3d::udb::version







|
293
294
295
296
297
298
299
300

    return
}

##########################
# Module initialization

package provide pop3d::udb 1.1

Changes to modules/rc4/rc4.tcl.

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
# rc4.tcl - Copyright (C) 2004 Pat Thoyts <[email protected]>
#
# RC4 is a symmetric stream cipher developed by Ron Rivest of RSA Data
# Security Inc. The algorithm was a trade secret of RSA but was reverse
# engineered and published to the internet in 1994. This pure Tcl
# implementation is based on the description of the algorithm.
#
# The algorithm is a pseudo-random number generator with the output of
# the PRNG being xored with the plaintext stream. Decryption is done
# by feeding the ciphertext as input with the same key.
#
# $Id: rc4.tcl,v 1.7 2005/12/20 16:19:38 patthoyts Exp $

package require Tcl 8.2

# @mdgen EXCLUDE: rc4c.tcl

namespace eval ::rc4 {
    variable version 1.1.0
    variable rcsid {$Id: rc4.tcl,v 1.7 2005/12/20 16:19:38 patthoyts Exp $}

    namespace export rc4

    variable uid
    if {![info exists uid]} {
        set uid 0
    }
}










<
<






<
<
<







1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16



17
18
19
20
21
22
23
# rc4.tcl - Copyright (C) 2004 Pat Thoyts <[email protected]>
#
# RC4 is a symmetric stream cipher developed by Ron Rivest of RSA Data
# Security Inc. The algorithm was a trade secret of RSA but was reverse
# engineered and published to the internet in 1994. This pure Tcl
# implementation is based on the description of the algorithm.
#
# The algorithm is a pseudo-random number generator with the output of
# the PRNG being xored with the plaintext stream. Decryption is done
# by feeding the ciphertext as input with the same key.



package require Tcl 8.2

# @mdgen EXCLUDE: rc4c.tcl

namespace eval ::rc4 {



    namespace export rc4

    variable uid
    if {![info exists uid]} {
        set uid 0
    }
}
414
415
416
417
418
419
420
421
422
423
424
425
426
427
    } elseif {[package vcompare [package provide Tcl] 8.4] < 0} {
        SelectImplementation array
    } else {
        SelectImplementation list
    }
}

package provide rc4 $::rc4::version

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






409
410
411
412
413
414
415
416
417
418
419
420
421
422
    } elseif {[package vcompare [package provide Tcl] 8.4] < 0} {
        SelectImplementation array
    } else {
        SelectImplementation list
    }
}

package provide rc4 1.1.0

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/ripemd/ripemd128.tcl.

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# RFC 2286, ``Test cases for HMAC-RIPEMD160 and HMAC-RIPEMD128,''
# Internet Request for Comments 2286, J. Kapp, 
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: ripemd128.tcl,v 1.10 2009/05/07 01:12:59 patthoyts Exp $

package require Tcl 8.2;                # tcl minimum version

namespace eval ::ripemd {
    namespace eval ripemd128 {
        variable version 1.0.5
        variable rcsid {$Id: ripemd128.tcl,v 1.10 2009/05/07 01:12:59 patthoyts Exp $}
        variable accel
        array set accel {trf 0}

        variable uid
        if {![info exists uid]} {
            set uid 0
        }








<
<





<
<
|







18
19
20
21
22
23
24


25
26
27
28
29


30
31
32
33
34
35
36
37
# RFC 2286, ``Test cases for HMAC-RIPEMD160 and HMAC-RIPEMD128,''
# Internet Request for Comments 2286, J. Kapp, 
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



package require Tcl 8.2;                # tcl minimum version

namespace eval ::ripemd {
    namespace eval ripemd128 {


        variable  accel
        array set accel {trf 0}

        variable uid
        if {![info exists uid]} {
            set uid 0
        }

722
723
724
725
726
727
728
729
730
731
732
733
734
735
    variable e {}
    foreach e {trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide ripemd128 $::ripemd::ripemd128::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






718
719
720
721
722
723
724
725
726
727
728
729
730
731
    variable e {}
    foreach e {trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide ripemd128 1.0.5

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/ripemd/ripemd160.tcl.

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
# RFC 2286, ``Test cases for HMAC-RIPEMD160 and HMAC-RIPEMD128,''
# Internet Request for Comments 2286, J. Kapp, 
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: ripemd160.tcl,v 1.8 2009/05/07 01:12:59 patthoyts Exp $

package require Tcl 8.2;                # tcl minimum version
#catch {package require ripemdc 1.0};   # tcllib critcl alternative

namespace eval ::ripemd {
    namespace eval ripemd160 {
        variable version 1.0.5
        variable rcsid {$Id: ripemd160.tcl,v 1.8 2009/05/07 01:12:59 patthoyts Exp $}
        variable accel
        array set accel {cryptkit 0 trf 0}

        variable uid
        if {![info exists uid]} {
            set uid 0
        }








<
<






<
<
|







18
19
20
21
22
23
24


25
26
27
28
29
30


31
32
33
34
35
36
37
38
# RFC 2286, ``Test cases for HMAC-RIPEMD160 and HMAC-RIPEMD128,''
# Internet Request for Comments 2286, J. Kapp, 
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



package require Tcl 8.2;                # tcl minimum version
#catch {package require ripemdc 1.0};   # tcllib critcl alternative

namespace eval ::ripemd {
    namespace eval ripemd160 {


        variable  accel
        array set accel {cryptkit 0 trf 0}

        variable uid
        if {![info exists uid]} {
            set uid 0
        }

855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
    variable e {}
    foreach e {cryptkit trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide ripemd160 $::ripemd::ripemd160::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:









|








851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
    variable e {}
    foreach e {cryptkit trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide ripemd160 1.0.5

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:


Changes to modules/sasl/gtoken.tcl.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package require Tcl 8.2
package require SASL
package require http
package require tls

namespace eval ::SASL {
    namespace eval XGoogleToken {
        variable version 1.0.1
        variable rcsid {$Id: gtoken.tcl,v 1.4 2007/08/26 00:36:45 patthoyts Exp $}
        variable URLa https://www.google.com/accounts/ClientAuth
        variable URLb https://www.google.com/accounts/IssueAuthToken

        # Should use autoproxy and register autoproxy::tls_socket
        # Leave to application author?
        if {![info exists ::http::urlTypes(https)]} {
            http::register https 443 tls::socket







<
<







13
14
15
16
17
18
19


20
21
22
23
24
25
26
package require Tcl 8.2
package require SASL
package require http
package require tls

namespace eval ::SASL {
    namespace eval XGoogleToken {


        variable URLa https://www.google.com/accounts/ClientAuth
        variable URLb https://www.google.com/accounts/IssueAuthToken

        # Should use autoproxy and register autoproxy::tls_socket
        # Leave to application author?
        if {![info exists ::http::urlTypes(https)]} {
            http::register https 443 tls::socket
81
82
83
84
85
86
87
88
89
90
91
92
93
94

# Register this SASL mechanism with the Tcllib SASL package.
#
if {[llength [package provide SASL]] != 0} {
    ::SASL::register X-GOOGLE-TOKEN 40 ::SASL::XGoogleToken::client
}

package provide SASL::XGoogleToken $::SASL::XGoogleToken::version

# -------------------------------------------------------------------------
#
# Local variables:
# indent-tabs-mode: nil
# End:







|






79
80
81
82
83
84
85
86
87
88
89
90
91
92

# Register this SASL mechanism with the Tcllib SASL package.
#
if {[llength [package provide SASL]] != 0} {
    ::SASL::register X-GOOGLE-TOKEN 40 ::SASL::XGoogleToken::client
}

package provide SASL::XGoogleToken 1.0.1

# -------------------------------------------------------------------------
#
# Local variables:
# indent-tabs-mode: nil
# End:

Changes to modules/sasl/ntlm.tcl.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package require Tcl 8.2;                # tcl minimum version
package require SASL 1.0;               # tcllib 1.7
package require des 1.0;                # tcllib 1.8
package require md4;                    # tcllib 1.4

namespace eval ::SASL {
    namespace eval NTLM {
        variable version 1.1.2
        variable rcsid {$Id: ntlm.tcl,v 1.8 2007/08/26 00:36:45 patthoyts Exp $}
        array set NTLMFlags {
            unicode        0x00000001
            oem            0x00000002
            req_target     0x00000004
            unknown        0x00000008
            sign           0x00000010
            seal           0x00000020







<
<







14
15
16
17
18
19
20


21
22
23
24
25
26
27
package require Tcl 8.2;                # tcl minimum version
package require SASL 1.0;               # tcllib 1.7
package require des 1.0;                # tcllib 1.8
package require md4;                    # tcllib 1.4

namespace eval ::SASL {
    namespace eval NTLM {


        array set NTLMFlags {
            unicode        0x00000001
            oem            0x00000002
            req_target     0x00000004
            unknown        0x00000008
            sign           0x00000010
            seal           0x00000020
364
365
366
367
368
369
370
371
372
373
374
375
376
377

# Register this SASL mechanism with the Tcllib SASL package.
#
if {[llength [package provide SASL]] != 0} {
    ::SASL::register NTLM 50 ::SASL::NTLM::NTLM
}

package provide SASL::NTLM $::SASL::NTLM::version

# -------------------------------------------------------------------------
#
# Local variables:
# indent-tabs-mode: nil
# End:







|






362
363
364
365
366
367
368
369
370
371
372
373
374
375

# Register this SASL mechanism with the Tcllib SASL package.
#
if {[llength [package provide SASL]] != 0} {
    ::SASL::register NTLM 50 ::SASL::NTLM::NTLM
}

package provide SASL::NTLM 1.1.2

# -------------------------------------------------------------------------
#
# Local variables:
# indent-tabs-mode: nil
# End:

Changes to modules/sasl/sasl.tcl.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.2

namespace eval ::SASL {
    variable version 1.3.3
    variable rcsid {$Id: sasl.tcl,v 1.12 2008/01/29 00:51:39 patthoyts Exp $}

    variable uid
    if {![info exists uid]} { set uid 0 }

    variable mechanisms
    if {![info exists mechanisms]} {
        set mechanisms [list]
    }







<
<
<







12
13
14
15
16
17
18



19
20
21
22
23
24
25
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.2

namespace eval ::SASL {



    variable uid
    if {![info exists uid]} { set uid 0 }

    variable mechanisms
    if {![info exists mechanisms]} {
        set mechanisms [list]
    }
672
673
674
675
676
677
678
679
680
681
682
683
684
685
    return $cont
}

::SASL::register OTP 45 ::SASL::OTP:client

# -------------------------------------------------------------------------

package provide SASL $::SASL::version

# -------------------------------------------------------------------------
#
# Local variables:
#   indent-tabs-mode: nil
# End:







|






669
670
671
672
673
674
675
676
677
678
679
680
681
682
    return $cont
}

::SASL::register OTP 45 ::SASL::OTP:client

# -------------------------------------------------------------------------

package provide SASL 1.3.3

# -------------------------------------------------------------------------
#
# Local variables:
#   indent-tabs-mode: nil
# End:

Changes to modules/sasl/scram.tcl.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# -------------------------------------------------------------------------

package require Tcl 8.2
package require SASL
package require sha1
package require base64

namespace eval ::SASL::SCRAM {
    set version 0.1
}

# ::SASL::SCRAM::Map --
#
#       Map comma and equal sign to their codes in authzid and username
#       (section 5.1, a and n attributes)
#
# Arguments:







|
<
<







9
10
11
12
13
14
15
16


17
18
19
20
21
22
23
# -------------------------------------------------------------------------

package require Tcl 8.2
package require SASL
package require sha1
package require base64

namespace eval ::SASL::SCRAM {}



# ::SASL::SCRAM::Map --
#
#       Map comma and equal sign to their codes in authzid and username
#       (section 5.1, a and n attributes)
#
# Arguments:
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505

# Register the SCRAM-SHA-1 SASL mechanism with the Tcllib SASL package

::SASL::register SCRAM-SHA-1 50 ::SASL::SCRAM::SHA-1:client ::SASL::SCRAM::SHA-1:server

# -------------------------------------------------------------------------

package provide SASL::SCRAM $::SASL::SCRAM::version

# -------------------------------------------------------------------------
#
# Local variables:
# indent-tabs-mode: nil
# End:
# vim:ts=8:sw=4:sts=4:et







|







489
490
491
492
493
494
495
496
497
498
499
500
501
502
503

# Register the SCRAM-SHA-1 SASL mechanism with the Tcllib SASL package

::SASL::register SCRAM-SHA-1 50 ::SASL::SCRAM::SHA-1:client ::SASL::SCRAM::SHA-1:server

# -------------------------------------------------------------------------

package provide SASL::SCRAM 0.1

# -------------------------------------------------------------------------
#
# Local variables:
# indent-tabs-mode: nil
# End:
# vim:ts=8:sw=4:sts=4:et

Changes to modules/sha1/sha1.tcl.

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
#
# ref: http://www.itl.nist.gov/fipspubs/fip180-1.htm
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: sha1.tcl,v 1.22 2009/05/07 00:35:10 patthoyts Exp $

# @mdgen EXCLUDE: sha1c.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ::sha1 {
    variable  version 2.0.3
    variable  rcsid {$Id: sha1.tcl,v 1.22 2009/05/07 00:35:10 patthoyts Exp $}

    variable  accel
    array set accel {tcl 0 critcl 0 cryptkit 0 trf 0}

    variable  loaded {}
    variable  active
    array set active {tcl 0 critcl 0 cryptkit 0 trf 0}

    namespace export sha1 hmac SHA1Init SHA1Update SHA1Final

    variable uid







<
<
<





<
<
<


>







16
17
18
19
20
21
22



23
24
25
26
27



28
29
30
31
32
33
34
35
36
37
#
# ref: http://www.itl.nist.gov/fipspubs/fip180-1.htm
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



# @mdgen EXCLUDE: sha1c.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ::sha1 {



    variable  accel
    array set accel {tcl 0 critcl 0 cryptkit 0 trf 0}

    variable  loaded {}
    variable  active
    array set active {tcl 0 critcl 0 cryptkit 0 trf 0}

    namespace export sha1 hmac SHA1Init SHA1Update SHA1Final

    variable uid
805
806
807
808
809
810
811
812
813
814
815
816
817
818
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha1 $::sha1::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






800
801
802
803
804
805
806
807
808
809
810
811
812
813
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha1 2.0.3

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/sha1/sha1v1.tcl.

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
#
# ref: http://www.itl.nist.gov/fipspubs/fip180-1.htm
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#
# $Id: sha1v1.tcl,v 1.1 2006/03/12 22:46:13 andreas_kupries Exp $

# @mdgen EXCLUDE: sha1c.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ::sha1 {
    variable version 1.1.1
    variable rcsid {$Id: sha1v1.tcl,v 1.1 2006/03/12 22:46:13 andreas_kupries Exp $}
    variable accel
    array set accel {critcl 0 cryptkit 0 trf 0}

    namespace export sha1 hmac SHA1Init SHA1Update SHA1Final

    variable uid
    if {![info exists uid]} {
        set uid 0







<
<
<





<
<
|







16
17
18
19
20
21
22



23
24
25
26
27


28
29
30
31
32
33
34
35
#
# ref: http://www.itl.nist.gov/fipspubs/fip180-1.htm
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------



# @mdgen EXCLUDE: sha1c.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ::sha1 {


    variable  accel
    array set accel {critcl 0 cryptkit 0 trf 0}

    namespace export sha1 hmac SHA1Init SHA1Update SHA1Final

    variable uid
    if {![info exists uid]} {
        set uid 0
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
# Try and load a compiled extension to help.
namespace eval ::sha1 {
    variable e {}
    foreach e {critcl cryptkit trf} { if {[LoadAccelerator $e]} { break } }
    unset e
}

package provide sha1 $::sha1::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:









|








695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
# Try and load a compiled extension to help.
namespace eval ::sha1 {
    variable e {}
    foreach e {critcl cryptkit trf} { if {[LoadAccelerator $e]} { break } }
    unset e
}

package provide sha1 1.1.1

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:


Changes to modules/sha1/sha256.tcl.

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Ref: http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
#      http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
#

# @mdgen EXCLUDE: sha256c.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ::sha2 {
    variable version 1.0.3
    variable rcsid {$Id: sha256.tcl,v 1.7 2010/07/06 20:16:39 andreas_kupries Exp $}

    variable  accel
    array set accel {tcl 0 critcl 0}
    variable  loaded {}

    namespace export sha256 hmac \
            SHA256Init SHA256Update SHA256Final








<
<





<
<
<







16
17
18
19
20
21
22


23
24
25
26
27



28
29
30
31
32
33
34
# Ref: http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
#      http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


# @mdgen EXCLUDE: sha256c.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ::sha2 {



    variable  accel
    array set accel {tcl 0 critcl 0}
    variable  loaded {}

    namespace export sha256 hmac \
            SHA256Init SHA256Update SHA256Final

824
825
826
827
828
829
830
831
832
833
834
835
836
837
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha256 $::sha2::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






819
820
821
822
823
824
825
826
827
828
829
830
831
832
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha256 1.0.3

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/smtpd/smtpd.tcl.

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
# smtpd.tcl - Copyright (C) 2001 Pat Thoyts <[email protected]>
#
# This provides a minimal implementation of the Simple Mail Tranfer Protocol
# as per RFC821 and RFC2821 (http://www.normos.org/ietf/rfc/rfc821.txt) and
# is designed for use during local testing of SMTP client software.
#
# -------------------------------------------------------------------------
# This software is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the file 'license.terms' for
# more details.
# -------------------------------------------------------------------------


package require Tcl 8.3;                # tcl minimum version
package require logger;                 # tcllib 1.3
package require mime;                   # tcllib

# @mdgen EXCLUDE: clients/mail-test.tcl

namespace eval ::smtpd {
    variable rcsid {$Id: smtpd.tcl,v 1.22 2011/11/17 08:00:45 andreas_kupries Exp $}
    variable version 1.5
    variable stopped

    namespace export start stop configure

    variable commands
    if {![info exists commands]} {
        set commands {EHLO HELO MAIL RCPT DATA RSET NOOP QUIT HELP}












>





|


<
|







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
# smtpd.tcl - Copyright (C) 2001 Pat Thoyts <[email protected]>
#
# This provides a minimal implementation of the Simple Mail Tranfer Protocol
# as per RFC821 and RFC2821 (http://www.normos.org/ietf/rfc/rfc821.txt) and
# is designed for use during local testing of SMTP client software.
#
# -------------------------------------------------------------------------
# This software is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the file 'license.terms' for
# more details.
# -------------------------------------------------------------------------
# @mdgen EXCLUDE: clients/mail-test.tcl

package require Tcl 8.3;                # tcl minimum version
package require logger;                 # tcllib 1.3
package require mime;                   # tcllib

package provide smtpd 1.5

namespace eval ::smtpd {

    variable version [package present smtpd]
    variable stopped

    namespace export start stop configure

    variable commands
    if {![info exists commands]} {
        set commands {EHLO HELO MAIL RCPT DATA RSET NOOP QUIT HELP}
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
        default  {
            Log warn "bad option \"$option\" in smtpd::callback"
        }
    }
}

# -------------------------------------------------------------------------

package provide smtpd $smtpd::version

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







<
<
<





913
914
915
916
917
918
919



920
921
922
923
924
        default  {
            Log warn "bad option \"$option\" in smtpd::callback"
        }
    }
}

# -------------------------------------------------------------------------



# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/tepam/tepam.tcl.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
##########################################################################

package require Tcl 8.3

namespace eval tepam {

   # This is the following TEPAM version:
   variable version 0.5.0
   
   # Exports the major commands from this package:
   namespace export procedure argument_dialogbox

##########################################################################
#                            procedure                                   #
##########################################################################








<
<
<
<







14
15
16
17
18
19
20




21
22
23
24
25
26
27
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
##########################################################################

package require Tcl 8.3

namespace eval tepam {




   # Exports the major commands from this package:
   namespace export procedure argument_dialogbox

##########################################################################
#                            procedure                                   #
##########################################################################

2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
         }
      }
   }

}; # End namespace tepam

# Specify the TEPAM version that is provided by this file:
package provide tepam $::tepam::version

##########################################################################
# Id: tepam.tcl
# Modifications:
#
# TEPAM version 0.5 - 2013/10/14 droll
# * procedure command







|







2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
         }
      }
   }

}; # End namespace tepam

# Specify the TEPAM version that is provided by this file:
package provide tepam 0.5

##########################################################################
# Id: tepam.tcl
# Modifications:
#
# TEPAM version 0.5 - 2013/10/14 droll
# * procedure command

Changes to modules/tepam/tepam_doc_gen.tcl.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
##########################################################################

package require Tcl 8.3
package require tepam 0.5

namespace eval tepam::doc_gen {

   # This is the following TEPAM doc generation version:
   variable version 0.1.1
   
   # Exports the major commands from this package:
   namespace export doc_gen

   # Format validation command (checks if a format is defined)
   proc ::tepam::Validate(tepam_doc_format) {v} {expr {[info proc ::tepam::doc_gen::gen($v,Begin)]!=""}}
   
   # get_full_proc_name returns the full qualified procedure name. It takes also into acocunt







<
<
<
<







11
12
13
14
15
16
17




18
19
20
21
22
23
24
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
##########################################################################

package require Tcl 8.3
package require tepam 0.5

namespace eval tepam::doc_gen {




   # Exports the major commands from this package:
   namespace export doc_gen

   # Format validation command (checks if a format is defined)
   proc ::tepam::Validate(tepam_doc_format) {v} {expr {[info proc ::tepam::doc_gen::gen($v,Begin)]!=""}}
   
   # get_full_proc_name returns the full qualified procedure name. It takes also into acocunt
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
   proc gen(DT,ExampleResultLine) {Text}       {return "[Dtformat $Text]\n"}
   proc gen(DT,ExampleEnd) {}                  {return "\}\]\n"}
   proc gen(DT,Footer) {Text}                  {return "\[manpage_end\]"}

}; # End namespace tepam::doc

# Specify the TEPAM version that is provided by this file:
package provide tepam::doc_gen $::tepam::doc_gen::version

##########################################################################
# Id: tepam_doc.tcl
# Modifications:
#
# Revision 0.1.1  2013/10/18 droll
# * Correction of bug [66d0effebc]: POD format incorrectly formatted
#
# Revision 0.1.0  2013/10/14 droll
# * First TEPAM doc_gen revision
##########################################################################







|











729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
   proc gen(DT,ExampleResultLine) {Text}       {return "[Dtformat $Text]\n"}
   proc gen(DT,ExampleEnd) {}                  {return "\}\]\n"}
   proc gen(DT,Footer) {Text}                  {return "\[manpage_end\]"}

}; # End namespace tepam::doc

# Specify the TEPAM version that is provided by this file:
package provide tepam::doc_gen 0.1.1

##########################################################################
# Id: tepam_doc.tcl
# Modifications:
#
# Revision 0.1.1  2013/10/18 droll
# * Correction of bug [66d0effebc]: POD format incorrectly formatted
#
# Revision 0.1.0  2013/10/14 droll
# * First TEPAM doc_gen revision
##########################################################################

Changes to modules/uri/urn-scheme.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# urn-scheme.tcl - Copyright (C) 2001 Pat Thoyts <[email protected]>
#
# extend the uri package to deal with URN (RFC 2141)
# see http://www.normos.org/ietf/rfc/rfc2141.txt
#
# Released under the tcllib license.
#
# $Id: urn-scheme.tcl,v 1.11 2005/09/28 04:51:24 andreas_kupries Exp $
# -------------------------------------------------------------------------

package require uri      1.1.2

namespace eval ::uri {}
namespace eval ::uri::urn {
    variable version 1.0.3
}

# -------------------------------------------------------------------------

# Description:
#   Called by uri::split with a url to split into its parts.
#
proc ::uri::SplitUrn {uri} {













|
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14


15
16
17
18
19
20
21
# urn-scheme.tcl - Copyright (C) 2001 Pat Thoyts <[email protected]>
#
# extend the uri package to deal with URN (RFC 2141)
# see http://www.normos.org/ietf/rfc/rfc2141.txt
#
# Released under the tcllib license.
#
# $Id: urn-scheme.tcl,v 1.11 2005/09/28 04:51:24 andreas_kupries Exp $
# -------------------------------------------------------------------------

package require uri      1.1.2

namespace eval ::uri {}
namespace eval ::uri::urn {}



# -------------------------------------------------------------------------

# Description:
#   Called by uri::split with a url to split into its parts.
#
proc ::uri::SplitUrn {uri} {
133
134
135
136
137
138
139
140
141
142
143
144
145
        variable URNpart "($NIDpart):($NSSpart)"
        variable schemepart $URNpart
	variable url "urn:$NIDpart:$NSSpart"
}

# -------------------------------------------------------------------------

package provide uri::urn $::uri::urn::version

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:







|





131
132
133
134
135
136
137
138
139
140
141
142
143
        variable URNpart "($NIDpart):($NSSpart)"
        variable schemepart $URNpart
	variable url "urn:$NIDpart:$NSSpart"
}

# -------------------------------------------------------------------------

package provide uri::urn 1.0.3

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:

Changes to modules/uuid/uuid.tcl.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# uuid: scheme:
# http://www.globecom.net/ietf/draft/draft-kindel-uuid-uri-00.html
#
# Usage: uuid::uuid generate
#        uuid::uuid equal $idA $idB

namespace eval uuid {
    variable version 1.0.4
    variable accel
    array set accel {critcl 0}

    namespace export uuid

    variable uid
    if {![info exists uid]} {







<







8
9
10
11
12
13
14

15
16
17
18
19
20
21
# uuid: scheme:
# http://www.globecom.net/ietf/draft/draft-kindel-uuid-uri-00.html
#
# Usage: uuid::uuid generate
#        uuid::uuid equal $idA $idB

namespace eval uuid {

    variable accel
    array set accel {critcl 0}

    namespace export uuid

    variable uid
    if {![info exists uid]} {
222
223
224
225
226
227
228
229
230
231
232
233
234
235
    variable e {}
    foreach e {critcl} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide uuid $::uuid::version

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






221
222
223
224
225
226
227
228
229
230
231
232
233
234
    variable e {}
    foreach e {critcl} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide uuid 1.0.4

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End: