Check-in [342ace11f6]
Not logged in

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

Overview
Comment:add tcllib upstream changes
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 342ace11f6c3e38386e839bc28dc6d536fd15cec
User & Date: chw 2019-08-16 05:13:28
Context
2019-08-16
05:14
add tk upstream changes check-in: 9338071fae user: chw tags: trunk
05:13
add tcllib upstream changes check-in: 342ace11f6 user: chw tags: trunk
2019-08-15
22:46
add selected tcl upstream changes check-in: 549b9ce2a1 user: chw tags: trunk
Changes

Changes to assets/tcllib1.19/struct/graph.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
...
173
174
175
176
177
178
179
180
# graph.tcl --
#
#	Implementation of a graph data structure for Tcl.
#
# Copyright (c) 2000-2005 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: graph.tcl,v 1.33 2009/09/24 16:23:47 andreas_kupries Exp $

# @mdgen EXCLUDE: graph_c.tcl

package require Tcl 8.4

namespace eval ::struct::graph {}

................................................................................
## Ready

namespace eval ::struct {
    # Export the constructor command.
    namespace export graph
}

package provide struct::graph 2.4.2




|



<
<







 







|
1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
...
171
172
173
174
175
176
177
178
# graph.tcl --
#
#	Implementation of a graph data structure for Tcl.
#
# Copyright (c) 2000-2005,2019 by Andreas Kupries
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



# @mdgen EXCLUDE: graph_c.tcl

package require Tcl 8.4

namespace eval ::struct::graph {}

................................................................................
## Ready

namespace eval ::struct {
    # Export the constructor command.
    namespace export graph
}

package provide struct::graph 2.4.3

Changes to assets/tcllib1.19/struct/graph_c.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# graphc.tcl --
#
#       Implementation of a graph data structure for Tcl.
#       This code based on critcl, API compatible to the PTI [x].
#       [x] Pure Tcl Implementation.
#
# Copyright (c) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: graph_c.tcl,v 1.3 2008/03/25 07:15:34 andreas_kupries Exp $

package require critcl
# @sak notprovided struct_graphc
package provide struct_graphc 2.1
package require Tcl 8.2

namespace eval ::struct {
    # Supporting code for the main command.

    catch {
	#critcl::cheaders -g






|



<
<



|







1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16
17
18
19
20
21
# graphc.tcl --
#
#       Implementation of a graph data structure for Tcl.
#       This code based on critcl, API compatible to the PTI [x].
#       [x] Pure Tcl Implementation.
#
# Copyright (c) 2006,2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require critcl
# @sak notprovided struct_graphc
package provide struct_graphc 2.4.3
package require Tcl 8.2

namespace eval ::struct {
    # Supporting code for the main command.

    catch {
	#critcl::cheaders -g

Changes to assets/tcllib1.19/struct/graph_tcl.tcl.

314
315
316
317
318
319
320






321


322
323
324
325
326
327
328
....
1674
1675
1676
1677
1678
1679
1680






1681


1682
1683
1684
1685
1686
1687
1688
....
1841
1842
1843
1844
1845
1846
1847






1848


1849
1850
1851
1852
1853
1854
1855
#	None.

proc ::struct::graph::__arc_delete {name args} {
    if {![llength $args]} {
	return {wrong # args: should be "::struct::graph::__arc_delete name arc arc..."}
    }







    foreach arc $args {CheckMissingArc $name $arc}



    variable ${name}::inArcs
    variable ${name}::outArcs
    variable ${name}::arcNodes
    variable ${name}::arcAttr
    variable ${name}::arcWeight

................................................................................
# Results:
#	None.

proc ::struct::graph::__node_delete {name args} {
    if {![llength $args]} {
	return {wrong # args: should be "::struct::graph::__node_delete name node node..."}
    }






    foreach node $args {CheckMissingNode $name $node}



    variable ${name}::inArcs
    variable ${name}::outArcs
    variable ${name}::nodeAttr

    foreach node $args {
	# Remove all the arcs connected to this node
................................................................................
#	node		The name of the new node.

proc ::struct::graph::__node_insert {name args} {
    if {[llength $args] == 0} {
	# No node name was given; generate a unique one
	set args [list [__generateUniqueNodeName $name]]
    } else {






	foreach node $args {CheckDuplicateNode $name $node}


    }
    
    variable ${name}::inArcs
    variable ${name}::outArcs

    foreach node $args {
	# Set up the new node







>
>
>
>
>
>
|
>
>







 







>
>
>
>
>
>
|
>
>







 







>
>
>
>
>
>
|
>
>







314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
....
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
....
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
#	None.

proc ::struct::graph::__arc_delete {name args} {
    if {![llength $args]} {
	return {wrong # args: should be "::struct::graph::__arc_delete name arc arc..."}
    }

    # seen is used to catch duplicate arcs in the args
    array set seen {}
    foreach arc $args {
	if {[info exists seen($arc)]} {
	    return -code error "arc \"$arc\" does not exist in graph \"$name\""
	}
	CheckMissingArc $name $arc
	set seen($arc) .
    }

    variable ${name}::inArcs
    variable ${name}::outArcs
    variable ${name}::arcNodes
    variable ${name}::arcAttr
    variable ${name}::arcWeight

................................................................................
# Results:
#	None.

proc ::struct::graph::__node_delete {name args} {
    if {![llength $args]} {
	return {wrong # args: should be "::struct::graph::__node_delete name node node..."}
    }
    # seen is used to catch duplicate nodes in the args
    array set seen {}
    foreach node $args {
	if {[info exists seen($node)]} {
	    return -code error "node \"$node\" does not exist in graph \"$name\""
	}
	CheckMissingNode $name $node
	set seen($node) .
    }

    variable ${name}::inArcs
    variable ${name}::outArcs
    variable ${name}::nodeAttr

    foreach node $args {
	# Remove all the arcs connected to this node
................................................................................
#	node		The name of the new node.

proc ::struct::graph::__node_insert {name args} {
    if {[llength $args] == 0} {
	# No node name was given; generate a unique one
	set args [list [__generateUniqueNodeName $name]]
    } else {
	# seen is used to catch duplicate nodes in the args
	array set seen {}
	foreach node $args {
	    if {[info exists seen($node)]} {
		return -code error "node \"$node\" already exists in graph \"$name\""
	    }
	    CheckDuplicateNode $name $node
	    set seen($node) .
	}
    }
    
    variable ${name}::inArcs
    variable ${name}::outArcs

    foreach node $args {
	# Set up the new node

Changes to assets/tcllib1.19/struct/pkgIndex.tcl.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

package ifneeded struct::graph     1.2.1 [list source [file join $dir graph1.tcl]]
package ifneeded struct::tree      1.2.2 [list source [file join $dir tree1.tcl]]
package ifneeded struct::matrix    1.2.1 [list source [file join $dir matrix1.tcl]]

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded struct::list      1.8.4  [list source [file join $dir list.tcl]]
package ifneeded struct::graph     2.4.2  [list source [file join $dir graph.tcl]]
package ifneeded struct::map       1      [list source [file join $dir map.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}

if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded struct::disjointset 1.1 [list source [file join $dir disjointset.tcl]]
package ifneeded struct::graph::op 0.11.3 [list source [file join $dir graphops.tcl]]







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

package ifneeded struct::graph     1.2.1 [list source [file join $dir graph1.tcl]]
package ifneeded struct::tree      1.2.2 [list source [file join $dir tree1.tcl]]
package ifneeded struct::matrix    1.2.1 [list source [file join $dir matrix1.tcl]]

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded struct::list      1.8.4  [list source [file join $dir list.tcl]]
package ifneeded struct::graph     2.4.3  [list source [file join $dir graph.tcl]]
package ifneeded struct::map       1      [list source [file join $dir map.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}

if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded struct::disjointset 1.1 [list source [file join $dir disjointset.tcl]]
package ifneeded struct::graph::op 0.11.3 [list source [file join $dir graphops.tcl]]