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

Re: [MiNT] lib: ONLCR



Hi,

On Thu, Nov 25, 1999 at 03:53:55PM +0200, Martin-Eric Racine wrote:
> SSH and ZSH need a declaration for this, presumably from error.h,
> but it seems the current library (nor the 0.54 beta) have it.
> 
> Juhani's port of SSH 1.2.26 patches in:
> 
> #define ONLCR OPOST
> 
> ...but should this be a constant?  Where do other Unices have it?

Where OPOST lives.

BTW, I think it is better to "#define ONLCR (0)".

OPOST being set in the terminal output modes causes output data to be
processed in some unspecified fashion so that it is displayed
appropriately on the terminal device.  Under MiNT (and many other systems)
it causes linefeed characters to be converted into pairs of
carriage return and linefeed characters.

ONLCR is a BSD extension that only has an effect if ONLCR is set.  It does
exactly the same as OPOST alone under MiNT, i. e. linefeed is converted to
carriage return and linefeed.

It wouldn't be a good idea to patch the MiNTLib to always #define ONLCR as
0 (or OPOST).  Such a define would not fit in all cases.

Besides it reminds you that you have to look at code that uses these
macros very carefully.  Under MiNT it is not possible to indepently
influence input and output processing with regard of newline conversions.
This is a constant source of trouble.

Ciao

Guido
-- 
http://stud.uni-sb.de/~gufl0000/
mailto:guido@atari.org