public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Dave Brolley <brolley@redhat.com>
To: ttn@glug.org
Cc: cgen@sources.redhat.com
Subject: Re: [patch][commit] Location of (include file)
Date: Wed, 10 May 2006 16:27:00 -0000	[thread overview]
Message-ID: <4462140F.8000302@redhat.com> (raw)
In-Reply-To: <E1FdaGN-0002TX-CS@mail.agora-net.com>

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

Thanks! I've commit the attached correction.

Dave

Thien-Thi Nguyen wrote:

>   From: Dave Brolley <brolley@redhat.com>
>   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
>#<primitive-procedure dirname>
>
>thi
>  
>

[-- Attachment #2: cgen-include3.ChangeLog --]
[-- Type: text/plain, Size: 167 bytes --]

2006-05-10  Dave Brolley  <brolley@redhat.com>

	* read.scm (-cgen): Add trailing "/" to arch-path.
	* utils.scm (dirname): Removed. dirname is a primitive function.


[-- Attachment #3: cgen-include3.patch.txt --]
[-- Type: text/plain, Size: 1462 bytes --]

? 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 ----

      reply	other threads:[~2006-05-10 16:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-09 16:23 Dave Brolley
2006-05-09 18:22 ` Dave Brolley
2006-05-09 22:01   ` Thien-Thi Nguyen
2006-05-10 16:27     ` Dave Brolley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4462140F.8000302@redhat.com \
    --to=brolley@redhat.com \
    --cc=cgen@sources.redhat.com \
    --cc=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).