Date: Wed, 27 Aug 1997 10:34:42 +0300 (IDT) From: Eli Zaretskii To: Colin Walsh cc: djgpp AT delorie DOT com Subject: Re: Writing a struct to disk In-Reply-To: <34033702.0@204.101.95.15> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 26 Aug 1997, Colin Walsh wrote: > > So, if you want a text file to be portable to Unix, you should write > > it in binary mode on MS-DOS, so it doesn't have those CRs. > > Last night I did up a program to do exactly this (It was to convert a > Unix mail file into DOS CR/LF text so Eudora could read it). You should look into your bin subdirectory more often. DJGPP comes with such a program already: it is called UTOD (Unix TO Dos) and should be sitting right there in your bin subdirectory. There's also an associated program DTOU for the reverse job. These two have a nice feature whereby they preserve the timestamps of the converted files, so programs like Make don't even know the file has been changed. They also don't require the second argument (the output file), since they rewrite the original file, and thus can be used to convert many files or even whole directory trees with a single command like this: utod dir/.../*