From: "Mark E." To: djgpp-workers AT delorie DOT com, eli Zaretskii Date: Mon, 30 Jul 2001 13:32:35 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: termios flag to control ecma-48 Message-ID: <3B6561F3.995.D7F7BD@localhost> X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com > > If you send me a test program, I can try it on DJ's machine. (Sorry, > > don't have time to throw together a program myself.) > > One program I've been using is below. On second thought, for Unix raw output, I clearing OPOST should do be the equivalent. #include #include #include int main() { struct termios term; unsigned char c; int n; const char out_str[]="abcdef\e[3D\e[4 AT BghijTkl"; size_t out_len = sizeof(out_str) - 1; size_t first_len = 7; tcgetattr(0, &term); term.c_oflag &= ~OPOST; tcsetattr(0, TCSANOW, &term); // setmode(0, O_BINARY); #if 0 while (1) { n = read(fileno(stdin), &c, 1); if (n == 0) break; putc(c, stdout); } #else write(fileno(stdout), out_str, out_len); #endif return 0; }