diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 2904d41f5f1..f53045e2b9c 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -26,8 +26,8 @@ static BOOL DATETIME_SendSimpleNotify (HWND hwnd, UINT code); -extern char *days[]; /* from ole/parsedt.c */ - +static const char * const days[] = {"Sunday", "Monday", "Tuesday", "Wednesday", +"Thursday", "Friday", "Saturday", NULL}; static LRESULT DATETIME_GetSystemTime (HWND hwnd, WPARAM wParam, LPARAM lParam ) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 07cd7392077..2861f71b231 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -34,13 +34,13 @@ DEFAULT_DEBUG_CHANNEL(monthcal) * we want full month-names, and abbreviated weekdays, so these are * defined here */ -extern int mdays[]; +static const int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0}; -char *monthtxt[] = {"January", "February", "March", "April", "May", +const char * const monthtxt[] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; -char *daytxt[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; -int DayOfWeekTable[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; +const char * const daytxt[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; +static const int DayOfWeekTable[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; #define MONTHCAL_GetInfoPtr(hwnd) ((MONTHCAL_INFO *)GetWindowLongA(hwnd, 0)) @@ -337,7 +337,8 @@ static void MONTHCAL_Refresh(HWND hwnd, HDC hdc) HBRUSH hbr; HFONT currentFont; /* LOGFONTA logFont; */ - char buf[20], *thisMonthtxt; + char buf[20]; + const char *thisMonthtxt; COLORREF oldTextColor, oldBkColor; DWORD dwStyle = GetWindowLongA(hwnd, GWL_STYLE); BOOL prssed; diff --git a/dlls/oleaut32/parsedt.c b/dlls/oleaut32/parsedt.c index 82476adc943..8b9697a8711 100644 --- a/dlls/oleaut32/parsedt.c +++ b/dlls/oleaut32/parsedt.c @@ -58,12 +58,12 @@ static int DecodeTimezone(char *str, int *tzp); #define USE_DATE_CACHE 1 #define ROUND_ALL 0 -int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0}; +static const int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0}; -char *months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", +static const char * const months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL}; -char *days[] = {"Sunday", "Monday", "Tuesday", "Wednesday", +static const char * const days[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", NULL}; /* those three vars are useless, and not even initialized, so diff --git a/include/monthcal.h b/include/monthcal.h index 23dbcbfa0a2..794f4cf871b 100644 --- a/include/monthcal.h +++ b/include/monthcal.h @@ -76,8 +76,8 @@ typedef struct tagMONTHCAL_INFO extern void MONTHCAL_CopyTime (const SYSTEMTIME *from, SYSTEMTIME *to); extern int MONTHCAL_CalculateDayOfWeek (DWORD day, DWORD month, DWORD year); -extern char *daytxt[]; -extern char *monthtxt[]; +extern const char * const daytxt[]; +extern const char * const monthtxt[]; extern void MONTHCAL_Register (void); extern void MONTHCAL_Unregister (void);