318
319
320
321
322
323
324
325
326
327
328
329
330
331
|
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
+
+
+
|
set aliases_file [file join $modules_dir modules.alias]
set fd [open $aliases_file]
::tuapi::helper::foreach_line $fd " " {
set alias [lindex $line 1]
set module [lindex $line 2]
set alias2module($alias) $module
if {[string match {*\**} $alias]} {
set alias2module_wildcards($alias) $module
}
}
close $fd
# Load dependencies
set deps_file [file join $modules_dir modules.dep]
set fd [open $deps_file]
::tuapi::helper::foreach_line $fd ":" {
|
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
|
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
|
close $fd
# Load modules
foreach modules $args {
foreach module $modules {
for {set try 0} {$try < 100} {incr try} {
if {![info exists alias2module($module)]} {
# If no exact match found, process wildcard entries
set found_wildcard_match 0
foreach alias [array name alias2module_wildcards] {
if {[string match $alias $module]} {
set module $alias2module_wildcards($alias)
set found_wildcard_match 1
break
break
}
}
if {!$found_wildcard_match} {
break
}
}
set module $alias2module($module)
}
if {[info exists module2deps($module)]} {
set load $module2deps($module)
|