gcl-devel
[Top][All Lists]
Advanced

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

successive forward slashes in path, was: Compiling pregexp.lisp fails wi


From: Robert Dodier
Subject: successive forward slashes in path, was: Compiling pregexp.lisp fails with GCL?
Date: Sun, 7 Aug 2022 22:48:37 -0700

On Sun, Aug 7, 2022 at 3:18 PM Camm Maguire <camm@maguirefamily.org> wrote:

> > Looks like the problem is that the construct path contains "//"
> > instead of just "/".
>
> This is true, gcl's parse-namestring cannot deal with the '//', which is
> not an ansi namestring to my understanding.  Can you remove before
> concatenation?

Well, I can ensure that constructed paths don't have any double
slashes, not a big deal.

I don't think ANSI CL says anything about the successive slashes. The
glossary says, "valid pathname directory n. a string, a list of
strings, nil, :wild, :unspecific, or some other object defined by the
implementation to be a valid directory component." So if the
implementation thinks // is OK, then it's OK.

POSIX explicitly allows successive slashes. "Multiple successive
slashes are considered to be the same as one slash."
https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266

Other CL implementations I tried (SBCL, Clisp, ECL, maybe others) are
OK with // in a path.

Hope this helps, and all the best.

Robert



reply via email to

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