small comm fix

Andreas Mohr a.mohr at mailto.de
Thu May 24 13:08:14 CDT 2001


[resent for the 4th time since mails bounce at WineHQ]

Hi all,

- BuildCommDCB16() uses int instead of BOOL
- OpenComm16() should return IE_BADID for *all* invalid strings, not only
 strlen < 4

Andreas Mohr
-------------- 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.19
diff -u -r1.19 comm.c
--- dlls/kernel/comm.c	2001/05/22 19:18:28	1.19
+++ dlls/kernel/comm.c	2001/05/24 15:37:35
@@ -379,7 +379,7 @@
  * IF THIS IS NOT CORRECT THE RETURNVALUE CHECK IN BuildCommDCBAndTimeoutsA
  * NEEDS TO BE FIXED
  */
-BOOL16 WINAPI BuildCommDCB16(LPCSTR device, LPDCB16 lpdcb)
+INT16 WINAPI BuildCommDCB16(LPCSTR device, LPDCB16 lpdcb)
 {
 	/* "COM1:96,n,8,1"	*/
 	/*  012345		*/
@@ -600,7 +600,7 @@
 			return port|FLAG_LPT;
 		}
 	}
-	return 0;
+	return IE_BADID;
 }
 
 /*****************************************************************************
Index: include/wine/winuser16.h
===================================================================
RCS file: /home/wine/wine/include/wine/winuser16.h,v
retrieving revision 1.32
diff -u -r1.32 winuser16.h
--- include/wine/winuser16.h	2000/12/13 20:20:16	1.32
+++ include/wine/winuser16.h	2001/05/24 15:37:35
@@ -920,7 +920,7 @@
 BOOL16      WINAPI DrawState16A(HDC16,HBRUSH16,DRAWSTATEPROC16,LPARAM,WPARAM16,INT16,INT16,INT16,INT16,UINT16);
 BOOL16      WINAPI IsDialogMessage16(HWND16,SEGPTR);
 INT16       WINAPI GetCommError16(INT16,LPCOMSTAT16);
-BOOL16      WINAPI BuildCommDCB16(LPCSTR,LPDCB16);
+INT16       WINAPI BuildCommDCB16(LPCSTR,LPDCB16);
 INT16       WINAPI GetCommState16(INT16,LPDCB16);
 INT16       WINAPI SetCommState16(LPDCB16);
 INT16       WINAPI lstrcmp16(LPCSTR,LPCSTR);


More information about the wine-patches mailing list