# ~/.onyxrc # # The ONYXRC environment variable must be set to point to this file for it to # be automatically executed during initialization of interactive onyx sessions. # Prettily print ostack using a specified recursion depth for each element. # #depth npstack - $npstack { dup type $integertype ne {$typecheck throw} if !ostack dup spop pop #depth #ostack 0 1 2 idup scount dec { #depth #ostack #i dup <$w $log where {pop 4 idup scount log ceiling}{2} ifelse> output `| ' print under under sidup spop #depth #ostack #elm 2 idup sprint } for #depth #ostack 2 npop flush } bind def # - promptstring #str $promptstring { count 0 gt { `=== ostack ===\n' print 0 npstack } if ~promptstring } bind def # - datestring #str $datestring { realtime localtime [`Sunday' `Monday' `Tuesday' `Wednesday' `Thursday' `Friday' `Saturday'] over $wday get get ` ' cat over $year get cvs `/' 3 ncat over $mon get inc <$w 2 $p `0'> outputs `/' 3 ncat over $mday get <$w 2 $p `0'> outputs ` ' 3 ncat over $hour get <$w 2 $p `0'> outputs `:' 3 ncat over $min get <$w 2 $p `0'> outputs `:' 3 ncat over $sec get <$w 2 $p `0'> outputs ` (' 3 ncat exch $zone get `)' 3 ncat } bind def # - date - $date { datestring print `\n' print flush } bind def # - gcstats - $gcstats { gcdict $stats get eval 2 sprint } bind def # Print the product and version info. product print `, version ' print version print `.\n' print flush # Print the date. date