#
# $Source: /home/nlfm/Working/Zircon/Released/lib/RCS/Unix.tcl,v $
# $Date: 1997/02/28 13:36:28 $
# $Revision: 1.18.1.4 $
#
# ----------------------------------------------------------------------
#   AUTHOR:  Lindsay Marshall <lindsay.marshall@newcastle.ac.uk>
# ----------------------------------------------------------------------
# Copyright 1996 The University of Newcastle upon Tyne (see COPYRIGHT)
# ======================================================================
#
#
package provide unix 1.18
#
proc tmpdir {} {
    global zircon
    if [info exists zircon(tmp)] { return $zircon(tmp) }
    return /tmp
}
#
proc prefdir {} { return [file join [glob ~] .zircon] }
#
proc username {} {
    global env
    if [info exists env(USER)] { return $env(USER) }
    if [catch {set w [exec whoami]}] {
	set w [lindex [exec who am i] 0]
    }
    return $w
}
#
