* Makefile.in (install): Install textmode.o as well as binmode.o.
This commit is contained in:
parent
d501c6adee
commit
356d1c6ab0
|
@ -1,3 +1,7 @@
|
||||||
|
Mon Jul 10 11:28:57 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* Makefile.in (install): Install textmode.o as well as binmode.o.
|
||||||
|
|
||||||
Sun Jul 9 21:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
Sun Jul 9 21:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* spawn.cc (spawn_guts): Close handle `hToken' only if it's not
|
* spawn.cc (spawn_guts): Close handle `hToken' only if it's not
|
||||||
|
|
|
@ -153,7 +153,7 @@ force:
|
||||||
|
|
||||||
install: all $(install_host) $(install_target)
|
install: all $(install_host) $(install_target)
|
||||||
$(INSTALL_DATA) new-$(DLL_NAME) $(bindir)/$(DLL_NAME); \
|
$(INSTALL_DATA) new-$(DLL_NAME) $(bindir)/$(DLL_NAME); \
|
||||||
for i in $(LIB_NAME) $(GMON_START) $(LIBGMON_A) binmode.o ; do \
|
for i in $(LIB_NAME) $(GMON_START) $(LIBGMON_A) binmode.o textmode.o ; do \
|
||||||
$(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
|
$(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
|
||||||
done ; \
|
done ; \
|
||||||
cd $(srcdir); \
|
cd $(srcdir); \
|
||||||
|
|
|
@ -128,6 +128,7 @@ fhandler_console::read (void *pv, size_t buflen)
|
||||||
|
|
||||||
HANDLE w4[2];
|
HANDLE w4[2];
|
||||||
DWORD nwait;
|
DWORD nwait;
|
||||||
|
char tmp[17];
|
||||||
|
|
||||||
w4[0] = h;
|
w4[0] = h;
|
||||||
if (iscygthread ())
|
if (iscygthread ())
|
||||||
|
@ -155,11 +156,12 @@ fhandler_console::read (void *pv, size_t buflen)
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD nread;
|
DWORD nread;
|
||||||
INPUT_RECORD input_rec;
|
INPUT_RECORD input_rec;
|
||||||
const char *toadd;
|
const char *toadd;
|
||||||
|
|
||||||
if (!ReadConsoleInput (h, &input_rec, 1, &nread))
|
if (!ReadConsoleInputW (h, &input_rec, 1, &nread))
|
||||||
{
|
{
|
||||||
syscall_printf ("ReadConsoleInput failed, %E");
|
syscall_printf ("ReadConsoleInput failed, %E");
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
|
@ -167,6 +169,7 @@ fhandler_console::read (void *pv, size_t buflen)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ich (input_rec.Event.KeyEvent.uChar.AsciiChar)
|
#define ich (input_rec.Event.KeyEvent.uChar.AsciiChar)
|
||||||
|
#define wch (input_rec.Event.KeyEvent.uChar.UnicodeChar)
|
||||||
|
|
||||||
/* check if we're just disposing of this one */
|
/* check if we're just disposing of this one */
|
||||||
|
|
||||||
|
@ -179,7 +182,7 @@ fhandler_console::read (void *pv, size_t buflen)
|
||||||
!input_rec.Event.KeyEvent.bKeyDown)
|
!input_rec.Event.KeyEvent.bKeyDown)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (ich == 0 ||
|
if (wch == 0 ||
|
||||||
/* arrow/function keys */
|
/* arrow/function keys */
|
||||||
(input_rec.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY))
|
(input_rec.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY))
|
||||||
{
|
{
|
||||||
|
@ -188,18 +191,18 @@ fhandler_console::read (void *pv, size_t buflen)
|
||||||
continue;
|
continue;
|
||||||
nread = strlen (toadd);
|
nread = strlen (toadd);
|
||||||
}
|
}
|
||||||
else if (!(input_rec.Event.KeyEvent.dwControlKeyState & LEFT_ALT_PRESSED))
|
|
||||||
{
|
|
||||||
OemToCharBuff (&ich, &ich, 1);
|
|
||||||
toadd = &ich;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static char tmp[2];
|
nread = WideCharToMultiByte (CP_ACP, 0, &wch, 1, tmp + 1, sizeof (tmp) - 1, NULL, NULL);
|
||||||
tmp[0] = '\033';
|
if (!(input_rec.Event.KeyEvent.dwControlKeyState & LEFT_ALT_PRESSED))
|
||||||
tmp[1] = tolower (ich);
|
toadd = tmp + 1;
|
||||||
toadd = tmp;
|
else
|
||||||
nread = 2;
|
{
|
||||||
|
tmp[0] = '\033';
|
||||||
|
tmp[1] = tolower (tmp[1]);
|
||||||
|
toadd = tmp;
|
||||||
|
nread++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line_edit (toadd, nread))
|
if (line_edit (toadd, nread))
|
||||||
|
|
Loading…
Reference in New Issue