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

Re: [MiNT] stairs reloaded



On 25/02/2013 16:20, Helmut Karlowski wrote:
If you want to enable/disable the crmod handling by using
tcsettattr(), you have to change the ICRNL bit in c_iflag.

Isn't that input-only? Input (i.e. receive) always worked.

You are right.
For output, the right bit is ONLCR.

For output, tcsettattr() should map ONLCR to CRMOD, while ONLCR is currently ignored.
This is exactly what you suggested with your stty examples.

So you want tcsettattr() to honor ONLCR.
That will be a new feature, to allow "stty onlcr", etc.

We see that at termios level, there are 2 different bits:
- ICRNL for input
- ONLCR for output

While at Fcntl() level, there is only one for both input and output: CRMOD (or T_CRMOD in kernel sources).
So stty will not be able to set icrnl and onlcr independently.

BTW: send would of course work with your patch,

This is what I expect.
Fix things without introducing regressions.

but not the asyn-console-output as shown by my script.

I will test that.
I wonder if your script worked fine in 1.17.

--
Vincent Rivière