Changeset 38941 for trunk/base/src
- Timestamp:
- 08/03/08 01:10:26 (4 months ago)
- Files:
-
- 1 modified
-
trunk/base/src/port/port.tcl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port/port.tcl
r38255 r38941 42 42 [file join "@TCL_PACKAGE_DIR@" macports1.0 macports_fastload.tcl]} 43 43 package require macports 44 package require Pextlib 1.0 44 45 45 46 … … 401 402 ## 402 403 # Makes sure we get the current terminal size 403 proc set_term_size {} {404 proc term_init_size {} { 404 405 global env 405 406 406 407 if {![info exists env(COLUMNS)] || ![info exists env(LINES)]} { 407 if {![catch {exec stty size} err]} { 408 regexp {(\d+) (\d+)} $err -> rows cols 409 set env(COLUMNS) $cols 410 set env(LINES) $rows 408 if {[isatty stdout]} { 409 set size [term_get_size stdout] 410 411 if {![info exists env(LINES)]} { 412 set env(LINES) [lindex $size 0] 413 } 414 415 if {![info exists env(COLUMNS)]} { 416 set env(COLUMNS) [lindex $size 1] 417 } 411 418 } 412 419 } … … 3144 3151 # Make sure we get the size of the terminal 3145 3152 # We do this here to save it in the boot_env, in case we determined it manually 3146 set_term_size3153 term_init_size 3147 3154 3148 3155 # Save off a copy of the environment before mportinit monkeys with it

