comctl32: Constify some variables (2 of 4) (Resend)

Andrew Talbot Andrew.Talbot at talbotville.com
Mon Mar 26 12:57:43 CDT 2007


Changlog:
    comctl32: Constify some variables.

diff -urN a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c
--- a/dlls/comctl32/datetime.c	2007-03-19 17:26:39.000000000 +0000
+++ b/dlls/comctl32/datetime.c	2007-03-23 13:09:25.000000000 +0000
@@ -129,8 +129,8 @@
 #define DTHT_MCPOPUP  0x300     /* & DTHT_DATEFIELD 0 when DATETIME_KeyDown */
 #define DTHT_GOTFOCUS 0x400     /* tests for date-fields */
 
-static BOOL DATETIME_SendSimpleNotify (DATETIME_INFO *infoPtr, UINT code);
-static BOOL DATETIME_SendDateTimeChangeNotify (DATETIME_INFO *infoPtr);
+static BOOL DATETIME_SendSimpleNotify (const DATETIME_INFO *infoPtr, UINT code);
+static BOOL DATETIME_SendDateTimeChangeNotify (const DATETIME_INFO *infoPtr);
 extern void MONTHCAL_CopyTime(const SYSTEMTIME *from, SYSTEMTIME *to);
 static const WCHAR allowedformatchars[] = {'d', 'h', 'H', 'm', 'M', 's', 't', 'y', 'X', '\'', 0};
 static const int maxrepetition [] = {4,2,2,2,4,2,2,4,-1,-1};
@@ -152,7 +152,7 @@
 
 
 static BOOL
-DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, SYSTEMTIME *lprgSysTimeArray)
+DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *lprgSysTimeArray)
 {
     if (!lprgSysTimeArray) return 0;
 
@@ -304,7 +304,7 @@
 
 
 static void
-DATETIME_ReturnTxt (DATETIME_INFO *infoPtr, int count, LPWSTR result, int resultSize)
+DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int resultSize)
 {
     static const WCHAR fmt_dW[] = { '%', 'd', 0 };
     static const WCHAR fmt__2dW[] = { '%', '.', '2', 'd', 0 };
@@ -525,7 +525,7 @@
 
 
 static void
-DATETIME_ReturnFieldWidth (DATETIME_INFO *infoPtr, HDC hdc, int count, SHORT *fieldWidthPtr)
+DATETIME_ReturnFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int count, SHORT *fieldWidthPtr)
 {
     /* fields are a fixed width, determined by the largest possible string */
     /* presumably, these widths should be language dependent */
@@ -677,7 +677,7 @@
 
 
 static INT
-DATETIME_HitTest (DATETIME_INFO *infoPtr, POINT pt)
+DATETIME_HitTest (const DATETIME_INFO *infoPtr, POINT pt)
 {
     int i;
 
@@ -735,7 +735,7 @@
         if(IsWindowVisible(infoPtr->hMonthCal)) {
             ShowWindow(infoPtr->hMonthCal, SW_HIDE);
         } else {
-            SYSTEMTIME *lprgSysTimeArray = &infoPtr->date;
+            const SYSTEMTIME *lprgSysTimeArray = &infoPtr->date;
             TRACE("update calendar %04d/%02d/%02d\n", 
             lprgSysTimeArray->wYear, lprgSysTimeArray->wMonth, lprgSysTimeArray->wDay);
             SendMessageW(infoPtr->hMonthCal, MCM_SETCURSEL, 0, (LPARAM)(&infoPtr->date));
@@ -816,7 +816,7 @@
 
 
 static LRESULT
-DATETIME_EraseBackground (DATETIME_INFO *infoPtr, HDC hdc)
+DATETIME_EraseBackground (const DATETIME_INFO *infoPtr, HDC hdc)
 {
     HBRUSH hBrush, hSolidBrush = NULL;
     RECT   rc;
@@ -1044,7 +1044,7 @@
 
 
 static LRESULT
-DATETIME_NCCreate (HWND hwnd, LPCREATESTRUCTW lpcs)
+DATETIME_NCCreate (HWND hwnd, const CREATESTRUCTW *lpcs)
 {
     DWORD dwExStyle = GetWindowLongW(hwnd, GWL_EXSTYLE);
     /* force control to have client edge */
@@ -1072,7 +1072,7 @@
 
 
 static BOOL
-DATETIME_SendDateTimeChangeNotify (DATETIME_INFO *infoPtr)
+DATETIME_SendDateTimeChangeNotify (const DATETIME_INFO *infoPtr)
 {
     NMDATETIMECHANGE dtdtc;
 
@@ -1089,7 +1089,7 @@
 
 
 static BOOL
-DATETIME_SendSimpleNotify (DATETIME_INFO *infoPtr, UINT code)
+DATETIME_SendSimpleNotify (const DATETIME_INFO *infoPtr, UINT code)
 {
     NMHDR nmhdr;
 
@@ -1142,7 +1142,7 @@
 
 
 static LRESULT 
-DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, LPSTYLESTRUCT lpss)
+DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lpss)
 {
     static const WCHAR buttonW[] = { 'b', 'u', 't', 't', 'o', 'n', 0 };
 
@@ -1187,7 +1187,7 @@
 
 
 static LRESULT
-DATETIME_Create (HWND hwnd, LPCREATESTRUCTW lpcs)
+DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
 {
     static const WCHAR SysMonthCal32W[] = { 'S', 'y', 's', 'M', 'o', 'n', 't', 'h', 'C', 'a', 'l', '3', '2', 0 };
     DATETIME_INFO *infoPtr = (DATETIME_INFO *)Alloc (sizeof(DATETIME_INFO));



More information about the wine-patches mailing list