* fhandler_serial.cc: Fix formatting problems introduced by below changes.
This commit is contained in:
parent
780c42b43a
commit
08e2551c20
winsup/cygwin
|
@ -1,17 +1,22 @@
|
|||
2002-07-22 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* fhandler_serial.cc: Fix formatting problems introduced by below
|
||||
changes.
|
||||
|
||||
2002-07-22 Jacek Trzcinski <jacek@certum.pl>
|
||||
|
||||
* fhandler.h (class fhandler_serial): Add new members of
|
||||
the class - rts,dtr and method ioctl(). Variables rts and dtr
|
||||
important for Win 9x only.
|
||||
* fhandler_serial.cc (fhandler_serial::open): Add initial setting
|
||||
of dtr and rts. Important for Win 9x only.
|
||||
* fhandler.h (class fhandler_serial): Add new members of the class -
|
||||
rts,dtr and method ioctl(). Variables rts and dtr important for Win 9x
|
||||
only.
|
||||
* fhandler_serial.cc (fhandler_serial::open): Add initial setting of
|
||||
dtr and rts. Important for Win 9x only.
|
||||
(fhandler_serial::ioctl): New function. Implements commands TIOCMGET,
|
||||
TIOCMSET and TIOCINQ.
|
||||
(fhandler_serial::tcflush): Fixed found error.
|
||||
(fhandler_serial::tcsetattr): Add settings of rts and dtr. Important
|
||||
for Win 9x only.
|
||||
* termios.h: Add new defines as a support for ioctl() function
|
||||
on serial device.
|
||||
* termios.h: Add new defines as a support for ioctl() function on
|
||||
serial device.
|
||||
|
||||
2002-07-20 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
|
|
|
@ -272,7 +272,7 @@ fhandler_serial::open (path_conv *, int flags, mode_t mode)
|
|||
request TIOCMGET could return correct value of RTS and DTR lines.
|
||||
Important only for Win 9x systems */
|
||||
|
||||
if (wincap.is_winnt() == false)
|
||||
if (!wincap.is_winnt ())
|
||||
{
|
||||
if (EscapeCommFunction (get_handle (), SETDTR) == 0)
|
||||
system_printf ("couldn't set initial state of DTR for %s, %E", get_name ());
|
||||
|
@ -409,10 +409,10 @@ fhandler_serial::ioctl (unsigned int cmd, void *buffer)
|
|||
modemStatus |= TIOCM_RI;
|
||||
if (modemLines & MS_RLSD_ON)
|
||||
modemStatus |= TIOCM_CD;
|
||||
if (wincap.is_winnt() == true)
|
||||
if (!wincap.is_winnt ())
|
||||
modemStatus |= rts | dtr;
|
||||
else
|
||||
{
|
||||
|
||||
/* here is Windows NT or Windows 2000 part */
|
||||
result = DeviceIoControl (get_handle (),
|
||||
0x001B0078,
|
||||
NULL, 0, &mcr, 4, &cbReturned, 0);
|
||||
|
@ -424,14 +424,6 @@ fhandler_serial::ioctl (unsigned int cmd, void *buffer)
|
|||
modemStatus |= TIOCM_RTS;
|
||||
if (mcr & 1)
|
||||
modemStatus |= TIOCM_DTR;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* here is Windows 9x part */
|
||||
modemStatus |= rts | dtr;
|
||||
|
||||
}
|
||||
*(int *) buffer = modemStatus;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue