[cmucl-imp] Compiling files with traditional Mac EOL in CMUCL

Raymond Toy toy.raymond at gmail.com
Wed Oct 11 03:37:09 UTC 2017


>>>>> "Raymond" == Raymond Toy <toy.raymond at gmail.com> writes:

>>>>> "Chun" == Chun Tian <(binghe)" <binghe.lisp at gmail.com>> writes:
    Chun> OK, sorry, I carefully checked again. SBCL also doesn't support compiling
    Chun> files with Mac EOLs.  Clozure CL, which I confirmed now, indeed support Mac
    Chun> EOLs.

    Chun> For the reason I can't convert the source files to UNIX line endings,
    Chun> there's a Lisp function for parsing (multi-line) literal strings defined in
    Chun> source files with MAC line endings.  It seems that, #\Newline was mapped to
    Chun> "\r" in MCL, thus Lisp forms like (position #\Newline string) doesn't work
    Chun> in MCL for other line endings, especially the UNIX endings, because in this
    Chun> case there would be no #\Newline in the string at all!

    Raymond> I haven't tried this out in a long time, but maybe something like this
    Raymond> will work:

    Raymond> (compile-file "foo.lisp" :external-format '(:utf8 :cr))

Did you get a chance to try this out?

--
Ray



More information about the cmucl-imp mailing list