Hi,
Using the simple program:
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
const unsigned char back[] = {0x1b, '[', 'D', '\0'};
printf("12%s34", back);
return 0;
}
It do not give the same result when executed from cygwin bash depending if
built using mingw or not.
$ gcc main.c
Results in printing 134 when run and this is expected since the escape
sequence should result in a cursor left.
$ gcc -mno-cygwin main.c
Results in 12←[D34 being printed when run but I would like it to have the
same result as above.
Is there anyway around this since I need to use MinGW with this behavior?
I have tried out output methods like write and putc but it is still the same result.
Best Regards,
Bengt Werstén
---------------------------------
Bengt Werstén
Enea Services
Teknikringen
8
583
30 Linköping, Sweden
Direct: +46(0)13 465 5898
Mobile: +46(0)70
971 5898
http://www.enea.com/
---------------------------------
Enea - Embedded
for Leaders
---------------------------------
This message, including attachments, is
CONFIDENTIAL. It may also be privileged or otherwise protected by law. If you
received this email by mistake please let us know by reply and then delete it
from your system; you should not copy it or disclose its contents to anyone.
All messages sent to and from Enea may be monitored to ensure compliance with
internal policies and to protect our business. Emails are not secure and cannot
be guaranteed to be error free as they can be intercepted, amended, lost or
destroyed, or contain viruses. The sender therefore does not accept liability
for any errors or omissions in the contents of this message, which arise as a
result of e-mail transmission. Anyone who communicates with us by email accepts
these risks.