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

Re: [MiNT] stairs reloaded



Vincent Rivière, 23.02.2013 17:23:24:

On 17/02/2013 20:32, Helmut Karlowski wrote:
In this case a simple

cat <file> > /dev/ttys<n>

where <n> is the serial device-number should show the crnl-translation.

I quickly tried with ARAnyM. Since it does not support the serial port, I used the parallel one instead: /dev/centr

No surprise, very likey /dev/centr is not a tty-device, and tty_write not used.

The problem is that ARAnyM does not open the output file in binary mode, so it defaults to text mode. And ARAnyM on Windows use Cygwin. Depending on the output directory, Cywin enables or not its own LF->CR/LF conversion. You can check with the mount command on Cygwin.

This may be the cause why I sometimes have patch-files with crnl, sometimes not when saving attachments ..

Anyway, this problem can't affect ARAnyM on Linux, or other Atari machines.

I will have to make a FreeMiNT setup for Hatari in order to test the serial port.

BTW, Helmut, on which machine did you encounter the bug? Falcon?

TT. But if you look at the code in tty_write it is quite obvious that in almost all cases where a mint-domain-process uses tty_write crnl-translation will be done. This cannot work.

There's also always been the problem setting crnl-translation via stty:

129|/home/root}stty -a
speed 0 baud; rows 96; columns 102; line = 1;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = ^M; start = ^Q; stop = ^S; susp = ^Z; dsusp = ^Y; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -ixany
opost -onlcr
isig icanon iexten echo echoe echok -echonl -noflsh -tostop echoctl
130|/home/root}stty onlcr
stty: standard input: unable to perform all requested operations
131|/home/root}stty -onlcr
132|/home/root}

The last gives no error.

If this issue is fixed, I'd suggest to do the whole thing and implement that onlcr-thing.

On cygwin/mintty I get:

373/usr/src/ksh/pdksh#stty -a
speed 38400 baud; rows 71; columns 150; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = ^Z; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -tostop echoctl echoke
374/usr/src/ksh/pdksh#stty onlcr
375/usr/src/ksh/pdksh#stty -onlcr
376/usr/src/ksh/pdksh#stty onlcr


--
Helmut Karlowski