From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Getting source location information Date: Wed, 30 Nov 2005 15:44:40 +0100 Organization: LAAS-CNRS Message-ID: <878xv62o13.fsf_-_@laas.fr> References: <200511272025.32395.bruce.korb@gmail.com> <200511300430.08897.bruce.korb@gmail.com> <8764qa6yft.fsf@laas.fr> <200511300600.54799.bruce.korb@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133372633 7641 80.91.229.2 (30 Nov 2005 17:43:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2005 17:43:53 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Nov 30 18:43:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EhVEg-0002BP-6A for guile-devel@m.gmane.org; Wed, 30 Nov 2005 17:55:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhVEf-00026A-8n for guile-devel@m.gmane.org; Wed, 30 Nov 2005 11:55:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EhTCt-0004XE-7M for guile-devel@gnu.org; Wed, 30 Nov 2005 09:45:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EhTCo-0004WG-M3 for guile-devel@gnu.org; Wed, 30 Nov 2005 09:45:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhTCl-0004Vz-BP for guile-devel@gnu.org; Wed, 30 Nov 2005 09:45:09 -0500 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EhTCl-0002vI-79 for guile-devel@gnu.org; Wed, 30 Nov 2005 09:45:07 -0500 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id jAUEj10C021568; Wed, 30 Nov 2005 15:45:02 +0100 (CET) Original-To: Bruce Korb X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 10 Frimaire an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: Bruce Korb , guile-devel@gnu.org In-Reply-To: <200511300600.54799.bruce.korb@gmail.com> (Bruce Korb's message of "Wed, 30 Nov 2005 06:00:54 -0800") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5431 Archived-At: Bruce Korb writes: > Because the file is mostly *NOT* scheme. I did say that you could use "Scheme constructs", "be it from Scheme o[r] C code". In other words, you can either write `(read)' in a piece of Scheme code, or call `scm_read ()' from your C code: both are strictly equivalent (well, almost). The point is: do not rewrite what already exists because *this* is hard to maintain. Actually, what you want is `primitive-load' + `read' (which handles piggy-backing of source location information as I said). It is true, however, that `primitive-load' (or, rather, `open-input-file') is not guaranteed to use `mmap ()' the way you do it currently[*]. So if you do want to make sure that the input file is `mmap'd the way you like, then you may want to write your own variant of `primitive-load' (see `libguile/load.c'). In any case, I can hardly imagine how Guile itself could be more helpful than this. ;-) Thanks, Ludovic. [*] Actually, Guile currently does not use `mmap ()' at all. Perhaps file ports should be revised to take advantage of this where available. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel