Index: cgen/utils.scm =================================================================== RCS file: /cvs/src/src/cgen/utils.scm,v retrieving revision 1.18 diff -c -p -r1.18 utils.scm *** cgen/utils.scm 15 Jun 2005 21:28:19 -0000 1.18 --- cgen/utils.scm 9 May 2006 18:19:54 -0000 *************** *** 1,5 **** ; Generic Utilities. ! ; Copyright (C) 2000-2005 Red Hat, Inc. ; This file is part of CGEN. ; See file COPYING.CGEN for details. --- 1,5 ---- ; Generic Utilities. ! ; Copyright (C) 2000-2005, 2006 Red Hat, Inc. ; This file is part of CGEN. ; See file COPYING.CGEN for details. *************** *** 155,160 **** --- 155,169 ---- (->string str)) ) + ; Return the directory name of the given file name + + (define (dirname s) + (let loop ((i (string-length s))) + (cond ((= i 0) "") + ((char=? #\/ (string-ref s (- i 1))) (substring s 0 i)) + (else (loop (- i 1))))) + ) + ; Turn STR into lowercase. (define (string-downcase str)