TABLE OF CONTENTS


::pwtk::fmtUsage_

SYNOPSIS

proc ::pwtk::fmtUsage_ {usage} {

DESCRIPTION

Format the "usage" list for printout in ::pwtk::parseOpt_.

ARGUMENT

SOURCE

    set result {}
    set lastval -1
    foreach optval $usage {
        # skip multiple empty elements
        if { $optval ne {} || ($optval eq {} && $lastval ne {}) } {
            append result "\\\n    $optval "
        }
        set lastval $optval
    }
    return $result
}