<commit_before>#======================================================================
#		tables.tcl
#	Copyright (c) 1997-8 Applied Logic Systems Inc.
#
#		Rectangular display tables
#
#		Uses the Tk Table Widget (Version 1.80+)
#
#	Author: <NAME>, Applied Logic Systems, Inc.
#======================================================================

proc load_table_package {DirsList} {
	if {[string match {} [info commands table]] && \
		[catch {package require Tktable} err]} {
		append TkTFile Tktable [info sharedlibext]
		set NumDirs [llength $DirsList]
		set Flag 0
		set DirNum 0
		set Result 1
#puts "load_table_package: searching $DirsList for $TkTFile"
		while {[expr $DirNum<$NumDirs] && [expr $Flag==0]} {
			set Result [catch {load [file join [lindex $DirsList $DirNum] $TkTFile]}]
			incr DirNum
		}
	}
	return $Result
}

	## Create a table 

proc build_table {BaseName InfoArrayName List} {
	upvar #0 $InfoArrayName IA 

	eval [list global array $InfoArrayName]
	set IA(library) Tktable
	append IA(library) [info sharedlibext]

	append IA(tabletop)   "." $BaseName _toplevel
	append IA(table) $IA(tabletop) ".table"
	append DataArrayName $BaseName _array


	set IA(numrows) 6<commit_msg>Repaired load_table_package to accept separated (un-joined) file paths, and then put them together with file join ...<commit_after>#======================================================================
#		tables.tcl
#	Copyright (c) 1997-8 Applied Logic Systems Inc.
#
#		Rectangular display tables
#
#		Uses the Tk Table Widget (Version 1.80+)
#
#	Author: <NAME>, Applied Logic Systems, Inc.
#======================================================================

proc load_table_package {DirsList} {
	set Result 1
	if {[string match {} [info commands table]] && \
		[catch {package require Tktable} err]} {
		append TkTFile Tktable [info sharedlibext]
		set NumDirs [llength $DirsList]
		set Flag 0
		set DirNum 0
		set Result 1
		while {[expr $DirNum<$NumDirs] && [expr $Flag==0]} {
			set Where [eval file join [concat [lindex $DirsList $DirNum] $TkTFile]]
			set Result [catch {load $Where }]
			incr DirNum
		}
	}
	return $Result
}

#puts "load_table_package: searching $DirsList for $TkTFile"
#set QQ [concat [lindex $DirsList 0]]
#puts "QQ=$QQ"
#set ZZ [concat file join $QQ]
#puts "ND=$NumDirs - ZZ=$ZZ"
#set DD 	[eval $ZZ]
#puts "DD=$DD"

	## Create a table 

proc build_table {BaseName InfoArrayName List} {
	upvar #0 $InfoArrayName IA 

	eval [list global array $InfoArrayName]
	set IA(library) Tktable
	append IA(library) [info sharedlibext]

	append IA(tabletop)   "." $BaseName _toplevel
	append IA(table) $IA(tabletop) ".table"
	append DataArrayName $BaseName _array


	set IA(numrows) 6
{'fraction_non_alphanumeric': 0.20842572062084258, 'fraction_numerical': 0.011086474501108648, 'mean_word_length': 4.923413566739606, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5154689', 'n_tokens_mistral': 997, 'n_tokens_neox': 892, 'n_words': 288}