[ clocc-Bugs-807859 ] translate-pathname strangeness in f2cl6.l
"SourceForge.net" <[email protected]> Wed, 17 Sep 2003 08:06:15 -0700
| Newsgroups | gmane.lisp.clocc.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #807859, was opened at 2003-09-17 09:06
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=101802&aid=807859&group_id=1802
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Robert Dodier (robert_dodier)
Assigned to: Nobody/Anonymous (nobody)
Summary: translate-pathname strangeness in f2cl6.l
Initial Comment:
I have downloaded f2cl (comprising f2cl[0-8].l and
macros.l) from CLOCC CVS. I am running clisp 2.31 on
Linux (RH 7.1).
I executed (load 'f2cl0.l), etc to load the f2cl functions.
I have a Fortran function /tmp/my.f. Executing
(f2cl:f2cl 'my.f :verbose t) yields an error message,
*** - no file name given: #P"/tmp/.p"
The message is coming from the function preprocess in
f2cl6.l. The problem is that at line 117 there is an
assignment to outfile-name which uses
translate-pathname to construct a file name.
The arguments to translate-pathname are, effectively,
(translate-path #P"/tmp/my.f #P"/tmp/my.f" #".p")
I am guessing the intent is to construct #P"/tmp/my.p"
but what is returned by translate-pathname is just
#P".p", which leads to an error when an attempt is made
to open the file. (Actually since ".p" is a valid
filename, I don't see why it fails, but if we fix the
name construction that's no longer an issue.)
It doesn't seem necessary to use translate-pathname. I
think the outfile-name could be set to
(make-pathname :host (pathname-host compiled-path)
:directory (pathname-directory compiled-path)
:name (pathname-name compiled-path)
:type #P".p")
or something like that.
If I hard code a value for outfile-name (say
"/tmp/tmp.p") then f2cl works as expected.
The Lisp reference manual at CMU (HyperLisp, I believe
it's called) states (Sec 19.4) that translate-pathname
is implementaton dependent. So I can believe that
f2cl6.l was developed using some version of Lisp that
makes it work correctly.
For what it's worth,
Robert Dodier
[email protected]
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=101802&aid=807859&group_id=1802
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf