guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.


From: Andy Wingo
Subject: Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.
Date: Sun, 01 May 2011 13:30:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

On Fri 29 Apr 2011 19:30, Noah Lavine <address@hidden> writes:

>> Is anyone interested in implementing a path library?
>
> I might be able to work on it.

Super!

> However, I don't know much about how Windows paths work. Are there any
> special considerations beyond the directory separator?

Yep!  Check that racket web page I linked to.  You don't have to
implement all of it, but it should be possible to implement, given the
path abstraction.

> Also, are there any characters that are valid in filenames on some
> systems but invalid on other systems?

Ah, I see you are under the delusion that paths are composed of
characters :)  This is not the case.  To the OS, paths are
NUL-terminated byte arrays, with some constraints about their
composition, but which are not necessarily representable as strings.  It
is nice to offer the ability to convert to and from strings, when that
is possible, but we must not assume that it is indeed possible.

Basically I think the plan should be to add scm_from_locale_path,
scm_from_raw_path, etc to filesys.[ch], and change any
pathname-accepting procedure in Guile to accept path objects, producing
them from strings when given strings, and pass the bytevector
representation to the raw o/s procedures like `open' et al.

Then for a lot of the utilities, we can add (ice-9 paths) or something,
and implement most of the utility functions in Scheme.

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]