From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10660 invoked by alias); 10 May 2006 16:27:01 -0000 Received: (qmail 10650 invoked by uid 22791); 10 May 2006 16:27:00 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 10 May 2006 16:25:59 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4AGPvrl013080; Wed, 10 May 2006 12:25:57 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4AGPq7V010686; Wed, 10 May 2006 12:25:52 -0400 Received: from [172.16.14.227] (IDENT:WLUgkTV82uYc5oNZRx+mKyyRovt2jys8@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k4AGPpAc029401; Wed, 10 May 2006 12:25:51 -0400 Message-ID: <4462140F.8000302@redhat.com> Date: Wed, 10 May 2006 16:27:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: ttn@glug.org CC: cgen@sources.redhat.com Subject: Re: [patch][commit] Location of (include file) References: <4460C206.9080103@redhat.com> <4460DDCA.7080001@redhat.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------040306020003070708050609" X-IsSubscribed: yes Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00024.txt.bz2 This is a multi-part message in MIME format. --------------040306020003070708050609 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 572 Thanks! I've commit the attached correction. Dave Thien-Thi Nguyen wrote: > From: Dave Brolley > Date: Tue, 09 May 2006 14:22:02 -0400 > > + ; 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))))) > + ) > + > >guile> (version) >"1.4.1.107" >guile> (dirname "/etc/hosts") >"/etc" >guile> dirname ># > >thi > > --------------040306020003070708050609 Content-Type: text/plain; name="cgen-include3.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cgen-include3.ChangeLog" Content-length: 167 2006-05-10 Dave Brolley * read.scm (-cgen): Add trailing "/" to arch-path. * utils.scm (dirname): Removed. dirname is a primitive function. --------------040306020003070708050609 Content-Type: text/plain; name="cgen-include3.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cgen-include3.patch.txt" Content-length: 1462 ? cgen/string Index: cgen/read.scm =================================================================== RCS file: /cvs/src/src/cgen/read.scm,v retrieving revision 1.12 diff -c -p -r1.12 read.scm *** cgen/read.scm 9 May 2006 16:17:07 -0000 1.12 --- cgen/read.scm 10 May 2006 16:22:08 -0000 *************** Define a preprocessor-style macro. *** 1074,1080 **** (else (cond ((str=? "-a" (car opt)) (set! arch-file arg) ! (set! arch-path (dirname arg)) ) ((str=? "-b" (car opt)) (set! debugging #t) --- 1074,1080 ---- (else (cond ((str=? "-a" (car opt)) (set! arch-file arg) ! (set! arch-path (string-append (dirname arg) "/")) ) ((str=? "-b" (car opt)) (set! debugging #t) Index: cgen/utils.scm =================================================================== RCS file: /cvs/src/src/cgen/utils.scm,v retrieving revision 1.19 diff -c -p -r1.19 utils.scm *** cgen/utils.scm 9 May 2006 18:24:22 -0000 1.19 --- cgen/utils.scm 10 May 2006 16:22:08 -0000 *************** *** 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) --- 155,160 ---- --------------040306020003070708050609--