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

Re: [MiNT] TosWin console



Am 06.08.2009, 23:15 Uhr, schrieb Vincent Rivière <vincent.riviere@freesbee.fr>:

I'm very surprised about that.
On a standard system, \r should never be necessary with printf.
I never use it and it works fine in every case (TosWin 2.7 or plain TOS). However \r\n is required for Cconws(), because there is no

That's funny!

My experience is that identical binaries behave different under MiNT
1.15 and later versions. This has nothing to do with the mintlib for
different versions produce same results.

Did you try the latest aranym/afros-distribution? On cygwin?

Here's a test-program:

-------------------------------
#include <stdio.h>

int main(void)
{
#ifdef __GNUC__
	printf( "__GNUC__=%d __GNUC_MINOR__=%d\n", __GNUC__, __GNUC_MINOR__ );
#endif
printf( "__MINTLIB_MAJOR__=%d __MINTLIB_MINOR__=%d __MINTLIB_REVISION__=%d __MINTLIB_BETATAG__=%s\n", __MINTLIB_MAJOR__, __MINTLIB_MINOR__, __MINTLIB_REVISION__, __MINTLIB_BETATAG__ );

	printf( "line1\n" );
	printf( "line2\n" );
	printf( "line3\n" );
	return 0;
}
/* -- end of t.c -- */

Execute by 'a.out > /dev/console'.

I tried mintlib 0.57 and 0.58.

Here's the output (scrap-copied from toswin-console - watch all the blanks
...) as seen on aranym/afros and toswin 2.6 (2.7 is the same). Maybe some
lines get broken by the newsreader.

-------------
__GNUC__=2 __GNUC_MINOR__=95
__MINTLIB_MAJOR__=0 __MINTLIB_MINOR__=58 __MINTLIB_REVISION__=0 __MINTLIB_BETATAG__=
                      line1
                           line2
                                line3

------------

Maybe the console-device doesnt report itself as being a terminal and
MiNT thinks its a file. But I have no clue whats happening there.

I think it should do no harm to translate \n to \r\n if xconout2 is only
used for console-output and noone runs a full-screen app in the console-window like emacs or vi or moria. Probably one could add a test if the output-device is a tty.

-Helmut