Changeset 35196 in project


Ignore:
Timestamp:
02/24/18 01:12:58 (7 months ago)
Author:
kon
Message:

fix name , add port name backup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/posix-utils/trunk/posix-utils.scm

    r35193 r35196  
    4646    fxnegative? fxzero?)
    4747  (only utils qs read-all)
    48   (only (srfi 13) string-trim-both string-index string-take string-null? string-downcase)
    49   (only (srfi 14) list->char-set)
     48  (only (srfi 13)
     49    string-trim-both string-index string-take
     50    string-null? string-downcase)
     51  (only (srfi 14)
     52    list->char-set)
    5053  (only type-checks
    5154    define-check+error-type
     
    103106    (let (
    104107      (size (receive rect (terminal-size port) rect)) )
    105       `((name . ,(terminal-name port))
     108      `((name . ,(*get-terminal-name port))
    106109        (width . ,(second size))
    107110        (height . ,(first size))) ) ) )
     
    110113;
    111114(define (get-terminal-name #!optional (port (current-output-port)))
    112   (and-let* ((port (check-terminal-port? 'get-terminal-size port)))
    113     (terminal-name port) ) )
     115  (and-let* ((port (check-terminal-port? 'get-terminal-name port)))
     116    (*get-terminal-name port) ) )
    114117
    115118(: get-terminal-size (#!optional output-port --> (or boolean terminal-size)))
     
    378381  (register-shell-value-feature! (get-shell-variable name) filter) )
    379382
     383(: *get-terminal-name (output-port --> string))
     384;
     385(define (*get-terminal-name port)
     386  (if (terminal-port? port)
     387    (terminal-name port)
     388    (port-name port) ) )
     389
    380390;;;
    381391
Note: See TracChangeset for help on using the changeset viewer.