Mail Archives: djgpp/1997/08/27/03:35:09
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/.../*
- Raw text -