7cdc9feea1
* binmode.c (cygwin_premain0): Ditto. * textmode.c (cygwin_premain0): Ditto. Patch contributed by Jason Tiller <jtiller@sjm.com> : * auto_load.cc: Add "GetKeyboardLayout" entry in the list of Win32 User32.DLL exports to provide. * fhandler.h (class fhandler_console): Add meta_mask private member to remember which keystroke modifiers should generate META. * fhandler_console.cc (fhandler_console::read): Modify code that tests a keystroke for a META-escaped key to use the 'meta_mask' variable. (fhandler_console::fhandler_console): Add definition for variable "meta_mask" used to determine if a keystroke should be preceded by META in the client console stream. Set meta_mask based on whether or not user's keyboard language is English - non-English keyboards pass AltGr (right <ALT>) unmolested, whereas English keyboards now interpret left- and right-<ALT> as META.
22 lines
430 B
C
22 lines
430 B
C
/* binmode.c
|
|
|
|
Copyright 2000 Red Hat, Inc.
|
|
|
|
This file is part of Cygwin.
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
details. */
|
|
|
|
#include <windows.h>
|
|
#include <sys/fcntl.h>
|
|
#include <sys/cygwin.h>
|
|
|
|
extern int _fmode;
|
|
void
|
|
cygwin_premain0 (int argc, char **argv, struct per_process *myself)
|
|
{
|
|
_fmode &= ~_O_BINARY;
|
|
_fmode |= _O_TEXT;
|
|
}
|