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

Re: [MiNT] stairs reloaded



On 16/02/2013 20:40, Helmut Karlowski wrote:
   /*
    * "mode" can now be reduced to just T_CRMODE or not
    */
   //mode &= ~T_CRMOD;
   mode = mode & (T_CRMOD|T_ECHOCTL);

Note the usage of mode & T_CRMOD is the opposite to the previous version.

Helmut, you are totally true!
The goal was to remove all the bits expect T_CRMOD (as it was done before), but I did the opposite >:o
So the crmod behaviour was random, depending on the other bits >:o >:o

I don't think that the T_ECHOCTL you added is useful.

Could you please test the attached patch?
Both stairs effects and serial issues should be fixed.
If that's OK, please commit.

I tested with Hatari and /dev/modem1, but it seems that crmod is enabled by default for tty lines, so I didn't see the effect of my new patch with a simple echo.

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

No, as I told you, if you use Thunderbird on Windows do save the attachment, the EOL depdends of the attachment encoding. If it is plain text (like the current one) you will get CR/LF, while if it is base64 (for UTF-8 messages), you will get the exact original file with LF.

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

Proper stty implementation may require additional mappings in the MiNTLib termios, that will be a further task.

--
Vincent Rivière
--- freemint-1.18.orig/sys/tty.c	2013-02-08 00:18:15.718750000 +0100
+++ freemint-1.18/sys/tty.c	2013-02-24 23:32:15.562500000 +0100
@@ -481,7 +481,7 @@
 	/*
 	 * "mode" can now be reduced to just T_CRMODE or not
 	 */
-	mode &= ~T_CRMOD;
+	mode &= T_CRMOD;
 	
 	if (nbytes == 0)
 		return bytes_written;