small comm patch
Andreas Mohr
andi at rhlx01.fht-esslingen.de
Fri Mar 29 12:01:21 CST 2002
Hi all,
- add verbose messages for "no serial support" issues
- minor fixes
--
Andreas Mohr Stauferstr. 6, D-71272 Renningen, Germany
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
Index: dlls/kernel/comm.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/comm.c,v
retrieving revision 1.53
diff -u -r1.53 comm.c
--- dlls/kernel/comm.c 11 Mar 2002 01:19:29 -0000 1.53
+++ dlls/kernel/comm.c 29 Mar 2002 16:00:00 -0000
@@ -552,32 +552,40 @@
#ifdef TIOCM_DTR
direct=TRUE;
result= COMM_WhackModem(fd, ~TIOCM_DTR, 0);
- break;
+#else
+ ERR("no OS support for CLRDTR !\n");
#endif
+ break;
case CLRRTS:
TRACE("CLRRTS\n");
#ifdef TIOCM_RTS
direct=TRUE;
result= COMM_WhackModem(fd, ~TIOCM_RTS, 0);
- break;
+#else
+ ERR("no OS support for CLRRTS !\n");
#endif
+ break;
case SETDTR:
TRACE("SETDTR\n");
#ifdef TIOCM_DTR
direct=TRUE;
result= COMM_WhackModem(fd, 0, TIOCM_DTR);
- break;
+#else
+ ERR("no OS support for SETDTR !\n");
#endif
+ break;
case SETRTS:
TRACE("SETRTS\n");
#ifdef TIOCM_RTS
direct=TRUE;
result= COMM_WhackModem(fd, 0, TIOCM_RTS);
- break;
+#else
+ ERR("no OS support for SETRTS !\n");
#endif
+ break;
case SETXOFF:
TRACE("SETXOFF\n");
@@ -593,15 +601,19 @@
#ifdef TIOCSBRK
direct=TRUE;
result = ioctl(fd,TIOCSBRK,0);
- break;
+#else
+ ERR("no OS support for setbreak !\n");
#endif
+ break;
case CLRBREAK:
TRACE("clrbreak\n");
#ifdef TIOCSBRK
direct=TRUE;
result = ioctl(fd,TIOCCBRK,0);
- break;
+#else
+ ERR("no OS support for clrbreak !\n");
#endif
+ break;
default:
WARN("(handle=%d,nFunction=%d): Unknown function\n",
handle, nFunction);
@@ -703,12 +715,15 @@
if(ioctl(fd, TIOCOUTQ, &lpStat->cbOutQue))
WARN("ioctl returned error\n");
#else
+ ERR("no OS support for TIOCOUTQ ioctl !\n");
lpStat->cbOutQue = 0; /* FIXME: find a different way to find out */
#endif
#ifdef TIOCINQ
if(ioctl(fd, TIOCINQ, &lpStat->cbInQue))
WARN("ioctl returned error\n");
+#else
+ ERR("no OS support for TIOCINQ ioctl !\n");
#endif
TRACE("handle %d cbInQue = %ld cbOutQue = %ld\n",
@@ -1127,7 +1142,7 @@
else
port.c_iflag &= ~IXOFF;
- if (tcsetattr(fd,TCSANOW,&port)==-1) { /* otherwise it hangs with pending input*/
+ if (tcsetattr(fd,TCSANOW,&port)==-1) { /* otherwise it hangs with pending input */
int save_error=errno;
COMM_SetCommError(handle,CE_IOE);
close( fd );
@@ -1654,7 +1669,7 @@
* FALSE if failure
*
* The set of detected events will be written to *lpdwEventMask
- * ERROR_IO_PENDING will be returned the overlapped structure was passed
+ * ERROR_IO_PENDING will be returned if the OVERLAPPED structure was passed
*
* BUGS:
* Only supports EV_RXCHAR and EV_TXEMPTY
@@ -1667,7 +1682,7 @@
OVERLAPPED ov;
int ret;
- TRACE("(%x %p %p )\n",hFile, lpdwEvents,lpOverlapped);
+ TRACE("(%x %p %p)\n",hFile, lpdwEvents,lpOverlapped);
if(lpOverlapped)
return COMM_WaitCommEvent(hFile, lpdwEvents, lpOverlapped);
More information about the wine-patches
mailing list