On Jul 27 12:55, Kai Tietz wrote:
> Hallo Corinna,
> [...]
> Changes in cdosys.h are ok.
> 
> In  pdh.h I have the following nits:
> 
> > +#define IsSuccessSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
> > (0xC0000000))==(DWORD)0x00000000) ? TRUE : FALSE)
> Here please replace the 'X == (DWORD) 0x0' by '!(X)'. Additional
> remove the frame around the constant.  It looks ugly IMHO.
> 
> > +#define IsInformationalSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
> > (0xC0000000))==(DWORD)0x40000000) ? TRUE : FALSE)
> > +#define IsWarningSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
> > (0xC0000000))==(DWORD)0x80000000) ? TRUE : FALSE)
> > +#define IsErrorSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
> > (0xC0000000))==(DWORD)0xC0000000) ? TRUE : FALSE)
> 
> As above the frame around inner constant 0xc0000000 should go away IMHO.
> 
> Changes in richole.h are ok.
> 
> Changes in windowsx.h (always again a nightmare):
> 
> > -#define HANDLE_WM_CREATE(hwnd,wParam,lParam,fn) 
> > ((fn)((hwnd),(LPCREATESTRUCT)(lParam)) ? (LRESULT)0 : (LRESULT)-1L)
> > +#define HANDLE_WM_CREATE(hwnd,wParam,lParam,fn) 
> > ((fn)((hwnd),(LPCREATESTRUCT)(lParam)) ? (LRESULT)0 : (LRESULT)-1)
> 
> are ok, but wouldn't be #define
> HANDLE_WM_CREATE(hwnd,wParam,lParam,fn)  (LRESULT)
> ((fn)((hwnd),(LPCREATESTRUCT)(lParam)) ? 0 : -1)' better?
> 
> Changes in winerror.h, lmaccess.h, subsmgr.h, netmon.h, penwin.h,
> lmstats.h, naperror.h, urlmon.h, cdoex.h, and advpub.h are ok.

Fixed versions of pdh.h and windowsx.h below.


Thanks,
Corinna


Index: pdh.h
===================================================================
--- pdh.h       (revision 5270)
+++ pdh.h       (working copy)
@@ -23,10 +23,10 @@
 
 #define PDH_VERSION ((DWORD)((PDH_CVERSION_WIN50) + 0x0003))
 
-#define IsSuccessSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
(0xC0000000L))==0x00000000L) ? TRUE : FALSE)
-#define IsInformationalSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
(0xC0000000L))==0x40000000L) ? TRUE : FALSE)
-#define IsWarningSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
(0xC0000000L))==0x80000000L) ? TRUE : FALSE)
-#define IsErrorSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
(0xC0000000L))==0xC0000000L) ? TRUE : FALSE)
+#define IsSuccessSeverity(ErrorCode) ((!((DWORD)(ErrorCode) & 0xC0000000)) ? 
TRUE : FALSE)
+#define IsInformationalSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
0xC0000000)==(DWORD)0x40000000) ? TRUE : FALSE)
+#define IsWarningSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
0xC0000000)==(DWORD)0x80000000) ? TRUE : FALSE)
+#define IsErrorSeverity(ErrorCode) ((((DWORD)(ErrorCode) & 
0xC0000000)==(DWORD)0xC0000000) ? TRUE : FALSE)
 
 #define MAX_COUNTER_PATH 256
 
Index: windowsx.h
===================================================================
--- windowsx.h  (revision 5270)
+++ windowsx.h  (working copy)
@@ -101,7 +101,7 @@
 #define HANDLE_WM_SYSTEMERROR(hwnd,wParam,lParam,fn) (LRESULT)0
 #define FORWARD_WM_SYSTEMERROR(hwnd,errCode,fn) (LRESULT)0
 
-#define HANDLE_WM_CREATE(hwnd,wParam,lParam,fn) 
((fn)((hwnd),(LPCREATESTRUCT)(lParam)) ? (LRESULT)0 : (LRESULT)-1L)
+#define HANDLE_WM_CREATE(hwnd,wParam,lParam,fn) 
(LRESULT)((fn)((hwnd),(LPCREATESTRUCT)(lParam)) ? 0 : -1)
 #define FORWARD_WM_CREATE(hwnd,lpCreateStruct,fn) 
(WINBOOL)(DWORD)(fn)((hwnd),WM_CREATE,(WPARAM)0,(LPARAM)(LPCREATESTRUCT)(lpCreateStruct))
 
 #define HANDLE_WM_NCCREATE(hwnd,wParam,lParam,fn) 
(LRESULT)(DWORD)(WINBOOL)(fn)((hwnd),(LPCREATESTRUCT)(lParam))

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to