Ignore ESC[%dc reports generated by 8bit control codes.

Open console even if we already have one in the process.
This commit is contained in:
Marcus Meissner 1999-05-08 18:32:56 +00:00 committed by Alexandre Julliard
parent acfae0c117
commit 62de4b9867

View File

@ -215,7 +215,9 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) {
j=k+3; j=k+3;
} }
break; break;
case 'c':
j=k;
break;
} }
if (scancode) { if (scancode) {
ir.Event.KeyEvent.wVirtualScanCode = scancode; ir.Event.KeyEvent.wVirtualScanCode = scancode;
@ -545,17 +547,31 @@ BOOL WINAPI AllocConsole(VOID)
struct open_console_request req; struct open_console_request req;
struct open_console_reply reply; struct open_console_reply reply;
HANDLE hIn, hOut, hErr; HANDLE hIn, hOut, hErr;
DWORD ret;
TRACE(console,"()\n");
CLIENT_SendRequest( REQ_ALLOC_CONSOLE, -1, 0 ); CLIENT_SendRequest( REQ_ALLOC_CONSOLE, -1, 0 );
if (CLIENT_WaitReply( NULL, NULL, 0 ) != ERROR_SUCCESS) return FALSE; ret = CLIENT_WaitReply( NULL, NULL, 0 );
if (ret != ERROR_SUCCESS) {
/* Hmm, error returned by server when we already have an
* opened console. however, we might have inherited it(?)
* and our handles are wrong? puzzling -MM 990330
*/
if (ret!=ERROR_ACCESS_DENIED) {
ERR(console," failed to allocate console: %ld\n",ret);
return FALSE;
}
}
req.output = 0; req.output = 0;
req.access = GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE; req.access = GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE;
req.inherit = FALSE; req.inherit = FALSE;
CLIENT_SendRequest( REQ_OPEN_CONSOLE, -1, 1, &req, sizeof(req) ); CLIENT_SendRequest( REQ_OPEN_CONSOLE, -1, 1, &req, sizeof(req) );
if (CLIENT_WaitSimpleReply( &reply, sizeof(reply), NULL ) != ERROR_SUCCESS) ret =CLIENT_WaitSimpleReply( &reply, sizeof(reply), NULL );
if (ret != ERROR_SUCCESS)
{ {
/* FIXME: free console */ /* FIXME: free console */
ERR(console," open console error %ld\n",ret);
return FALSE; return FALSE;
} }
hIn = reply.handle; hIn = reply.handle;