[Openmcl-devel] external-format and line-termination?

Andreas Thiele andreas at atp-media.de
Tue Nov 1 04:21:05 PDT 2016


Hi,

 

did I understand something wrong or is this a bug?

 

(defun test ()

  (with-open-file (o "test" :direction :output

                                    :if-exists :supersede

                                    :external-format '(:line-termination
:cr))

    (write-line "test" o)

    (format o "test~%")))

 

base at gips:~$ hexdump -C test

00000000  74 65 73 74 0a 74 65 73  74 0a                    |test.test.|

 

The terminating character is 0x0A which is <LF> or here same as using
:line-termination :unix.

 

The only other line-termination which seems to make a difference is :crlf

 

(defun test ()

  (with-open-file (o "test" :direction :output

                                    :if-exists :supersede

                                    :external-format '(:line-termination
:crlf))

    (write-line "test" o)

    (format o "test~%")))

 

base at gips:~$ hexdump -C test

00000000  74 65 73 74 0d 0a 74 65  73 74 0d 0a              |test..test..|

 

This is what I'd expect 0x0D 0x0A or <CR><LF>.

 

Can somebody shed some light on the issue?

 

Any help appreciated.

 

I can't find a bug in CCL code.

 

 

Andreas

 

P.S. Seen in CCL 1.10 and 1.11

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20161101/7dc3614f/attachment.htm>


More information about the Openmcl-devel mailing list