# Procedure dumps all the cells in the library
proc printAllCellsInLib { libId } {
foreach cTuple [edbGetLibCellIndex $libId -split]
{
set cName [lindex $cTuple
0]
set vName [lindex $cTuple
1]
set ver [lindex
$cTuple 2]
set cellId [edbFindCellId
$libId $cName $vName $ver ]
set didOpen 0
if { $cellId == 0 } {
set cellId [edbOpenCell $libId $cName $vName $ver -mode read]
set didOpen 1
}
if { $cellId != 0 } {
puts "\n\nDump information about $cName $vName $ver"
printCellInfo $cellId
if { $didOpen == 1 } { edbAbortAndCloseCell $cellId }
}
}
}
# Procedure creates [if it doesn't exist] a library,
# streams it in and dumps using the two procedures above
proc simpleStreamAndDump { streamFileName libName } {
set didOpen 0
if { [edbIsNameLibrary $libName] == 0 } {
set libId [edbCreateLibrary
$libName ssoft.cfg]
set didOpen 1
} else {
set libId [edbFindLibraryId
$libName]
if { $libId == 0 } {
set libId [edbOpenLibrary $libName w]
set didOpen 1
}
}
if { $libId != 0 } {
readStream $libId $streamFileName
printAllCellsInLib $libId
if { $didOpen == 1 } { edbCloseLibrary
$libId }
}
}