#793 Escapesequences don't work correctly in msdos window

Feature_requests
closed-invalid
MinGW (57)
2005-06-27
2005-06-27
No

Hello,
the escapesequences, where you can control the cursor
in a terminal don't work correctly in mingw.

A description of escapesequences can be found on:
http://www.tfh-berlin.de/~kempfer/skript_c/Kap06.html
(Sorry it's in german)

Example:
#include <stdio.h>
main()
{
for (int i=0;i<100;i++)
{
printf("%3i%%",i);
printf("\033[4D"); // Move cursor four characters left
// ...
}
}

If this code is compiled with cygwin it works correctly,
independent of running shell (dos,bash)

If the code is compiled with mingw it depends on the
used shell; running in a msys shell it works correctly,
running in a dos shell it produces strange output.

It is not important for me, that it works or not, I use it to
display the percentage time of simulation and I can run
it on a msys shell.

Best Regards
Stefan Mueller

P.S.
My System configuration:

OS (Windows XP professional)
gcc version 3.4.2 (mingw-special)
GNU ld version 2.15.91 20040904
mingw-runtime version (include/_mingw.h)
#define __MINGW32_VERSION 3.7

w32api versoin (include/w32api.h)
#define __W32API_VERSION 3.2

MSYS version
MINGW32_NT-5.1 VILLD1629 1.0.10(0.46/3/2) 2004-03-
15 07:17 i686 unknow

Discussion

  • Max TenEyck Woodbury

    Logged In: YES
    user_id=735003

    Escape sequence handling is not built into the basic MS
    Windows terminal emulator. On many MS Windows systems you
    need to load a special escape sequence handling like
    'ansi.sys'.

     
  • Earnie Boyd

    Earnie Boyd - 2005-06-27
    • status: open --> closed-invalid
     
  • Earnie Boyd

    Earnie Boyd - 2005-06-27

    Logged In: YES
    user_id=15438

    So therefore you'll have to ask Microsoft to fix their
    console display to work correctly. Or perhaps you need to
    do some configuration for the console to do it correcty.
    The reason it works in the Cygwin using the windows console
    is that Cygwin opens and controls its own console.

    Not a feature I can implement. You'll need to implement the
    feature in your code with a wrapper printf.

     
  • Mueller Stefan

    Mueller Stefan - 2005-06-28

    Logged In: YES
    user_id=1303466

    Thank you for fast respond.
    The only thing what I can say is sh.t windows.
    Normally I work on my SUNBlade100, but it seems that
    simulation goes faster on the PC.
    By the way, I really like MinGW and I'm going on to use it.

    Best Regards
    Stefan Mueller

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks