TABLE OF CONTENTS


::pwtk::prog

SYNOPSIS

proc ::pwtk::prog {prog pathname} {

PURPOSE

Explicitly set the full pathname/filename for $prog executable.

For example:

       ::pwtk::prog pw /full/path/to/pw.x

is equivalent to:

       ::pwtk::pw /full/path/to/pw.x

ARGUMENTS

EXAMPLE

::pwtk::prog pw /full/path/to/pw.x

RETURN VALUE

The value of the $pathname.

SOURCE

    variable QEprog

    # strip .x suffix from the $prog
    set name [string toupper [regsub {\.x$} $prog {}]]
    
    if { ! [file executable $pathname] } {
        ::pwtk::error "specified $prog program $pathname is not executable."
    }
    return [set QEprog($name) $pathname]   
}