Tcl Library Source Code

Changes On Branch rfc1422
Login

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

Changes In Branch rfc1422 Excluding Merge-Ins

This is equivalent to a diff from 06bdef76a4 to ed5422bb08

2014-05-14
22:50
Merge uuid fixes into main-line. check-in: 4c42872bc6 user: andreask tags: trunk
22:49
uuid - Bugfix in previous, bumped package version to 1.0.3. Closed-Leaf check-in: ed5422bb08 user: andreask tags: rfc1422
2014-05-08
18:23
Ticket [c77cc35b1a]. crc::cksum - Fixed math operations letting values grow out of the 32bit limits into bigints under Tcl 8.5+. Added the necessary masking operations to prevent use of bigints. Report and patch by [email protected], with thanks. check-in: 15c6984635 user: andreask tags: trunk
2014-05-06
13:28
Fix to make the UUID package conform to RFC1422 check-in: 404b955311 user: hypnotoad tags: rfc1422
2014-04-22
19:40
Ticket [06eef112da]. yaml - Fixed tokenizer. A missing legal character (closing bracket) caused inline arrays without whitespace to fail to tokenize. Testsuite extended. Version bumped to 0.3.7. Report and patch by Norm Zhou. Thank you. check-in: 06bdef76a4 user: andreask tags: trunk
2014-04-11
21:39
Ticket [ce17795a78]. tar, json - Moved support files around into places where they will not be picked up by the installer. check-in: 74f79b33f7 user: andreask tags: trunk

Changes to modules/uuid/pkgIndex.tcl.

1
2
3
4
5
6
7
8
# pkgIndex.tcl - 
#
# uuid package index file
#
# $Id: pkgIndex.tcl,v 1.3 2012/11/19 19:28:24 andreas_kupries Exp $

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded uuid 1.0.2 [list source [file join $dir uuid.tcl]]







|
1
2
3
4
5
6
7
8
# pkgIndex.tcl - 
#
# uuid package index file
#
# $Id: pkgIndex.tcl,v 1.3 2012/11/19 19:28:24 andreas_kupries Exp $

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded uuid 1.0.3 [list source [file join $dir uuid.tcl]]

Changes to modules/uuid/uuid.man.


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

[manpage_begin uuid n 1.0.2]
[keywords GUID]
[keywords UUID]
[moddesc {uuid}]
[copyright {2004, Pat Thoyts <[email protected]>}]
[titledesc {UUID generation and comparison}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require uuid [opt 1.0.2]]
[description]
[para]

This package provides a generator of universally unique identifiers
(UUID) also known as globally unique identifiers (GUID). This
implementation follows the draft specification from (1) although this
is actually an expired draft document.
>
|







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[vset UUID_VERSION 1.0.3]
[manpage_begin uuid n [vset UUID_VERSION]]
[keywords GUID]
[keywords UUID]
[moddesc {uuid}]
[copyright {2004, Pat Thoyts <[email protected]>}]
[titledesc {UUID generation and comparison}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require uuid [opt [vset UUID_VERSION]]]
[description]
[para]

This package provides a generator of universally unique identifiers
(UUID) also known as globally unique identifiers (GUID). This
implementation follows the draft specification from (1) although this
is actually an expired draft document.

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.2
    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
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.3
    variable accel
    array set accel {critcl 0}

    namespace export uuid

    variable uid
    if {![info exists uid]} {
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
    foreach string [generate_tcl_machinfo] {
      md5::MD5Update $tok $string
    }
    set r [md5::MD5Final $tok]
    binary scan $r c* r
    
    # 3.4: set uuid versioning fields
    lset r 8 [expr {([lindex $r 8] & 0x7F) | 0x40}]
    lset r 6 [expr {([lindex $r 6] & 0x0F) | 0x40}]
    
    return [binary format c* $r]
}

if {[string equal $tcl_platform(platform) "windows"] 
        && [package provide critcl] != {}} {







|







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
    foreach string [generate_tcl_machinfo] {
      md5::MD5Update $tok $string
    }
    set r [md5::MD5Final $tok]
    binary scan $r c* r
    
    # 3.4: set uuid versioning fields
    lset r 8 [expr {([lindex $r 8] & 0x3F) | 0x80}]
    lset r 6 [expr {([lindex $r 6] & 0x0F) | 0x40}]
    
    return [binary format c* $r]
}

if {[string equal $tcl_platform(platform) "windows"] 
        && [package provide critcl] != {}} {