Settable line termination character(s)?

Q&A's, tips, howto's
Locked
HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Settable line termination character(s)?

Post by HPW »

On solaris it is easy to write a windows file.
You only have to append a '\r' to your line-string.
But on windows it is not so easy because the line termination characters are by default '\r\n'.
So how about a option to set the line termination characters to '\n' (like in Unix)?
Hans-Peter

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

use this:

Code: Select all

(define-macro (println-unix) 
    (apply print (map eval (args))) 
    (print "\n"))
Lutz

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Thanks for the workaround.

I had used write-line and have not thought about using print.

write-related commands are quite similar than print-releated commands but differ in such details.
Hans-Peter

Locked