Changeset 39992 in project


Ignore:
Timestamp:
04/13/21 04:47:19 (5 weeks ago)
Author:
Kon Lovett
Message:

include-relative, reflow

Location:
release/5/slib-arraymap/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • release/5/slib-arraymap/trunk/slib-arraymap.egg

    r39919 r39992  
    33
    44((synopsis "The SLIB applicative routines for the arrays library")
    5  (version "1.1.2")
     5 (version "1.1.3")
    66 (author "Aubrey Jaffer")
    7  (maintainer "[[kon lovett]]")
     7 (maintainer "Kon Lovett")
    88 (license "BSD")
    99 (license "Artistic")
  • release/5/slib-arraymap/trunk/slib-arraymap.scm

    r38872 r39992  
    1818(import scheme)
    1919(import (chicken module))
    20 (import (only (chicken base) include cut))
     20(import (only (chicken base) include-relative cut))
    2121(import (rename (chicken base) (sub1 1-) (add1 1+)))
    2222(import (chicken type))
     
    2626;;;
    2727
    28 (include "slib-compat")
     28(include-relative "slib-compat")
    2929
    3030;; Types
     
    4545(: array-fold (('r #!rest -> 'r) 'r #!rest array -> 'r))
    4646
    47 (include "arraymap")
     47(include-relative "arraymap")
    4848
    4949(define array-copy! array:copy!)
     
    5757  (let rafo ((rdims (array-dimensions (car ras))) (inds '()))
    5858    (if (null? (cdr rdims))
    59       (let* (
    60         (sdni (reverse! (cons #f inds)))
    61         (lastpair (last-pair sdni)) )
     59      (let* ((sdni (reverse! (cons #f inds)))
     60             (lastpair (last-pair sdni)) )
    6261        (do ((i 0 (1+ i)))
    6362            ((> i (1- (car rdims))))
    6463          (set-car! lastpair i)
    6564          (set! seed (apply proc seed (map (cut apply array-ref <> sdni) ras))) ) )
    66       (let (
    67         (crdims (cdr rdims))
    68         (ll (1- (car rdims))) )
     65      (let ((crdims (cdr rdims))
     66            (ll (1- (car rdims))) )
    6967        (do ((i 0 (1+ i)))
    7068            ((> i ll))
  • release/5/slib-arraymap/trunk/slib-compat.scm

    r39971 r39992  
    4141(define output-port-height)
    4242(let ()
    43   (import (only (chicken port) terminal-size))
     43  (cond-expand
     44    ;terminal-size: "On Windows, this procedure always raises an exception."
     45    (windows
     46      (define (port-size port)
     47        (values 0 0) ) )
     48    (else
     49      (define (port-size port)
     50        (import (only (chicken port) terminal-size terminal-port?))
     51        (if (terminal-port? port) (terminal-size port) (values 0 0)) ) ) )
    4452  (set! output-port-width (lambda (port)
    45     (let-values (((h w) (terminal-size port)))
     53    (let-values (((h w) (port-size port)))
    4654      (if (zero? w) 80 w))))
    4755  (set! output-port-height (lambda (port)
    48     (let-values (((h w) (terminal-size port)))
     56    (let-values (((h w) (port-size port)))
    4957      (if (zero? h) 25 h)))) )
    5058
     
    5967        (kwd (string->keyword (symbol->string x)))
    6068        (fs (features)) )
    61         (and
    62           (cond
    63             ((memq kwd fs))
    64             ((and (memq x +numeric+) (memq #:full-numeric-tower fs)))
    65             ((memq x +builtins+))
    66             (else #f) )
    67             #t ) ) ) ) )
     69        (cond
     70          ((memq kwd fs))
     71          ((and (memq x +numeric+) (memq #:full-numeric-tower fs)))
     72          ((memq x +builtins+))
     73          (else #f) ) ) ) ) )
    6874
    6975(define (require x)
  • release/5/slib-arraymap/trunk/tests/slib-arraymap-test.scm

    r38872 r39992  
    2222(test-assert "TBD array-copy!" array-copy!)
    2323
    24 (let* (
    25   (src (list->array 2 #() '((1 2) (3 4))))
    26   (cpy (array-copy src)) )
     24(let* ((src (list->array 2 #() '((1 2) (3 4))))
     25       (cpy (array-copy src)) )
    2726  (test-assert "array-copy a copy" (not (eq? src cpy)))
    2827  (test "array-copy equals" src cpy) )
Note: See TracChangeset for help on using the changeset viewer.