[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening files so that no cr/lf translation is done.



Hello Michael,

> This had me stumped for some time - particularly because the 'od' in
> the shu194st.zoo archive on atari.archive has the same problem : so I
> have two files, of different size, that 'od' to the same file.

The default behaviour of the MiNT library is to open files in `text'
mode. This is definitely not what you want for `od', but this is
reasonable for the other textutils. A quick fix is to set the UNIXMODE
environment variable (at least locally).

Another simple solution, if you have the source and are willing to
recompile it, is to add the following line

	int __default_mode__ = _IOBIN;

to one of the source files. (I think _IOBIN is defined in stdio.h).

Thierry.