From b8ddec939b6f01dc32a0d2ccb130c43e3223c9b4 Mon Sep 17 00:00:00 2001 From: michel-schinz Date: Sun, 30 Nov 2003 20:50:50 +0000 Subject: [PATCH] - use "cond" instead of "case" in "canonical-machine", - downcase OS name in "canonical-os-name". --- scheme/configure.scm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scheme/configure.scm b/scheme/configure.scm index ecac456..ccbf1a6 100644 --- a/scheme/configure.scm +++ b/scheme/configure.scm @@ -1,24 +1,24 @@ (define-structure configure (export host) - (open scheme-with-scsh) + (open scheme-with-scsh + srfi-13) (begin (define (canonical-machine uname-record) (let* ((machine (uname:machine uname-record)) (os (uname:os-name uname-record))) - (case machine - (("i386" "i486" "i586" "i686") "i386") - (("Power Machintosh") "powerpc") - (else (cond ((and (string=? os "AIX") - (regexp-search? (rx (: "00" (= 6 digit) any any "00")) machine)) - "powerpc") - (else machine)))))) + (cond + ((member machine '("i386" "i486" "i586" "i686")) "i386") + ((or (string=? machine "Power Macintosh") + (and (string=? os "AIX") + (regexp-search? (rx (: "00" (= 6 digit) any any "00")) + machine))) + "powerpc") + (else machine)))) (define (canonical-os-name uname-record) - (uname:os-name uname-record)) - + (string-downcase (uname:os-name uname-record))) + (define (host) (let ((uname-record (uname))) (string-append (canonical-machine uname-record) "-" (canonical-os-name uname-record)))))) - - \ No newline at end of file