Subject:
|
Re: ldlister 0.1
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Tue, 20 Oct 2009 06:42:53 GMT
|
Viewed:
|
10840 times
|
| |
| |
In lugnet.cad, Don Heyse wrote:
> Maybe you need the extra \r to get DOS file endings when running the linux
> version of ldlister?
Heh, that was it. Thanks for reminding me :-)
In lugnet.cad, Travis Cobbs wrote:
> If there's a Linux version, the best thing to do is to open the file as a binary
> file and continue using \r\n as the line ending in the source code. In other
> words, leave your text output code alone, but change the file open call to use
> binary mode (in C, this is fopen(filename, "wb").)
>
> --Travis
Maybe, but this is Tcl in which case the right answer is to use [fconfigure $fp
-translation auto crlf] and remove the \r from the output string (it makes Tcl
use \r\n as output newline char in all cases and not use \n on Linux).
|
|
Message is in Reply To:
| | Re: ldlister 0.1
|
| (...) If there's a Linux version, the best thing to do is to open the file as a binary file and continue using \r\n as the line ending in the source code. In other words, leave your text output code alone, but change the file open call to use binary (...) (15 years ago, 19-Oct-09, to lugnet.cad)
|
8 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|