Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/monthcal.c | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-)
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 1de13dab36..98c682df33 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -142,7 +142,7 @@ typedef struct SIZE dim; /* [cx,cy] - dimensions of calendars matrix, row/column count */ } MONTHCAL_INFO, *LPMONTHCAL_INFO;
-static const WCHAR themeClass[] = { 'S','c','r','o','l','l','b','a','r',0 }; +static const WCHAR themeClass[] = L"Scrollbar";
/* empty SYSTEMTIME const */ static const SYSTEMTIME st_null; @@ -782,7 +782,6 @@ static void MONTHCAL_CircleDay(const MONTHCAL_INFO *infoPtr, HDC hdc, static void MONTHCAL_DrawDay(const MONTHCAL_INFO *infoPtr, HDC hdc, const SYSTEMTIME *st, int bold, const PAINTSTRUCT *ps) { - static const WCHAR fmtW[] = { '%','d',0 }; WCHAR buf[10]; RECT r, r_temp; COLORREF oldCol = 0; @@ -811,7 +810,7 @@ static void MONTHCAL_DrawDay(const MONTHCAL_INFO *infoPtr, HDC hdc, const SYSTEM SelectObject(hdc, bold ? infoPtr->hBoldFont : infoPtr->hFont);
old_bkmode = SetBkMode(hdc, TRANSPARENT); - wsprintfW(buf, fmtW, st->wDay); + wsprintfW(buf, L"%d", st->wDay); DrawTextW(hdc, buf, -1, &r, DT_CENTER | DT_VCENTER | DT_SINGLELINE ); SetBkMode(hdc, old_bkmode);
@@ -862,12 +861,6 @@ static void MONTHCAL_PaintButton(MONTHCAL_INFO *infoPtr, HDC hdc, enum nav_direc /* paint a title with buttons and month/year string */ static void MONTHCAL_PaintTitle(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps, INT calIdx) { - static const WCHAR mmmmW[] = {'M','M','M','M',0}; - static const WCHAR mmmW[] = {'M','M','M',0}; - static const WCHAR mmW[] = {'M','M',0}; - static const WCHAR fmtyearW[] = {'%','l','d',0}; - static const WCHAR fmtmmW[] = {'%','0','2','d',0}; - static const WCHAR fmtmW[] = {'%','d',0}; RECT *title = &infoPtr->calendars[calIdx].title; const SYSTEMTIME *st = &infoPtr->calendars[calIdx].month; WCHAR monthW[80], strW[80], fmtW[80], yearW[6] /* valid year range is 1601-30827 */; @@ -887,18 +880,18 @@ static void MONTHCAL_PaintTitle(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRU DrawTextW(hdc, strW, lstrlenW(strW), title, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SYEARMONTH, fmtW, ARRAY_SIZE(fmtW)); - wsprintfW(yearW, fmtyearW, st->wYear); + wsprintfW(yearW, L"%ld", st->wYear);
/* month is trickier as it's possible to have different format pictures, we'll test for M, MM, MMM, and MMMM */ - if (wcsstr(fmtW, mmmmW)) + if (wcsstr(fmtW, L"MMMM")) GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+st->wMonth-1, monthW, ARRAY_SIZE(monthW)); - else if (wcsstr(fmtW, mmmW)) + else if (wcsstr(fmtW, L"MMM")) GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SABBREVMONTHNAME1+st->wMonth-1, monthW, ARRAY_SIZE(monthW)); - else if (wcsstr(fmtW, mmW)) - wsprintfW(monthW, fmtmmW, st->wMonth); + else if (wcsstr(fmtW, L"MM")) + wsprintfW(monthW, L"%02d", st->wMonth); else - wsprintfW(monthW, fmtmW, st->wMonth); + wsprintfW(monthW, L"%d", st->wMonth);
/* update hit boxes */ yearoffset = 0; @@ -946,7 +939,6 @@ static void MONTHCAL_PaintTitle(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRU static void MONTHCAL_PaintWeeknumbers(const MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps, INT calIdx) { const SYSTEMTIME *date = &infoPtr->calendars[calIdx].month; - static const WCHAR fmt_weekW[] = { '%','d',0 }; INT mindays, weeknum, weeknum1, startofprescal; INT i, prev_month; SYSTEMTIME st; @@ -1032,15 +1024,15 @@ static void MONTHCAL_PaintWeeknumbers(const MONTHCAL_INFO *infoPtr, HDC hdc, con for(i = 0; i < 6; i++) { if((i == 0) && (weeknum > 50)) { - wsprintfW(buf, fmt_weekW, weeknum); + wsprintfW(buf, L"%d", weeknum); weeknum = 0; } else if((i == 5) && (weeknum > 47)) { - wsprintfW(buf, fmt_weekW, 1); + wsprintfW(buf, L"%d", 1); } else - wsprintfW(buf, fmt_weekW, weeknum + i); + wsprintfW(buf, L"%d", weeknum + i);
DrawTextW(hdc, buf, -1, &r, DT_CENTER | DT_VCENTER | DT_SINGLELINE); OffsetRect(&r, 0, infoPtr->height_increment); @@ -1056,7 +1048,6 @@ static void MONTHCAL_PaintWeeknumbers(const MONTHCAL_INFO *infoPtr, HDC hdc, con /* bottom today date */ static void MONTHCAL_PaintTodayTitle(const MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps) { - static const WCHAR fmt_todayW[] = { '%','s',' ','%','s',0 }; WCHAR buf_todayW[30], buf_dateW[20], buf[80]; RECT text_rect, box_rect; HFONT old_font; @@ -1075,7 +1066,7 @@ static void MONTHCAL_PaintTodayTitle(const MONTHCAL_INFO *infoPtr, HDC hdc, cons old_font = SelectObject(hdc, infoPtr->hBoldFont); SetTextColor(hdc, infoPtr->colors[MCSC_TEXT]);
- wsprintfW(buf, fmt_todayW, buf_todayW, buf_dateW); + wsprintfW(buf, L"%s %s", buf_todayW, buf_dateW); DrawTextW(hdc, buf, -1, &text_rect, DT_CALCRECT | DT_LEFT | DT_VCENTER | DT_SINGLELINE); DrawTextW(hdc, buf, -1, &text_rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
@@ -2484,7 +2475,6 @@ MONTHCAL_SetFocus(const MONTHCAL_INFO *infoPtr) /* sets the size information */ static void MONTHCAL_UpdateSize(MONTHCAL_INFO *infoPtr) { - static const WCHAR O0W[] = { '0','0',0 }; RECT *title=&infoPtr->calendars[0].title; RECT *prev=&infoPtr->titlebtnprev; RECT *next=&infoPtr->titlebtnnext; @@ -2526,8 +2516,7 @@ static void MONTHCAL_UpdateSize(MONTHCAL_INFO *infoPtr) } else /* locale independent fallback on failure */ { - static const WCHAR sunW[] = { 'S','u','n' }; - GetTextExtentPoint32W(hdc, sunW, ARRAY_SIZE(sunW), &sz); + GetTextExtentPoint32W(hdc, L"Sun", 3, &sz); day_width = sz.cx; break; } @@ -2537,7 +2526,7 @@ static void MONTHCAL_UpdateSize(MONTHCAL_INFO *infoPtr)
/* recalculate the height and width increments and offsets */ size.cx = 0; - GetTextExtentPoint32W(hdc, O0W, 2, &size); + GetTextExtentPoint32W(hdc, L"00", 2, &size);
/* restore the originally selected font */ SelectObject(hdc, font);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/ipaddress.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index d88cd88f31..c75a108565 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -59,8 +59,7 @@ typedef struct IPPART_INFO Part[4]; } IPADDRESS_INFO;
-static const WCHAR IP_SUBCLASS_PROP[] = - { 'C', 'C', 'I', 'P', '3', '2', 'S', 'u', 'b', 'c', 'l', 'a', 's', 's', 'I', 'n', 'f', 'o', 0 }; +static const WCHAR IP_SUBCLASS_PROP[] = L"CCIP32SubclassInfo";
#define POS_DEFAULT 0 #define POS_LEFT 1 @@ -72,8 +71,6 @@ IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
static void IPADDRESS_UpdateText (const IPADDRESS_INFO *infoPtr) { - static const WCHAR zero[] = {'0', 0}; - static const WCHAR dot[] = {'.', 0}; WCHAR field[4]; WCHAR ip[16]; INT i; @@ -85,9 +82,9 @@ static void IPADDRESS_UpdateText (const IPADDRESS_INFO *infoPtr) lstrcatW(ip, field); else /* empty edit treated as zero */ - lstrcatW(ip, zero); + lstrcatW(ip, L"0"); if (i != 3) - lstrcatW(ip, dot); + lstrcatW(ip, L"."); }
SetWindowTextW(infoPtr->Self, ip); @@ -140,7 +137,6 @@ static int IPADDRESS_GetPartIndex(const IPADDRESS_INFO *infoPtr, HWND hwnd)
static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc) { - static const WCHAR dotW[] = { '.', 0 }; RECT rect, rcPart; COLORREF bgCol, fgCol; HTHEME theme; @@ -193,9 +189,9 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc) rect.right = rcPart.left;
if (theme) - DrawThemeText(theme, hdc, EP_EDITTEXT, state, dotW, 1, DT_SINGLELINE | DT_CENTER | DT_BOTTOM, 0, &rect); + DrawThemeText(theme, hdc, EP_EDITTEXT, state, L".", 1, DT_SINGLELINE | DT_CENTER | DT_BOTTOM, 0, &rect); else - DrawTextW(hdc, dotW, 1, &rect, DT_SINGLELINE | DT_CENTER | DT_BOTTOM); + DrawTextW(hdc, L".", 1, &rect, DT_SINGLELINE | DT_CENTER | DT_BOTTOM); }
if (theme) @@ -360,20 +356,18 @@ static BOOL IPADDRESS_SetRange (IPADDRESS_INFO *infoPtr, int index, WORD range)
static void IPADDRESS_ClearAddress (const IPADDRESS_INFO *infoPtr) { - static const WCHAR nil[] = { 0 }; int i;
TRACE("\n");
for (i = 0; i < 4; i++) - SetWindowTextW (infoPtr->Part[i].EditHwnd, nil); + SetWindowTextW (infoPtr->Part[i].EditHwnd, L""); }
static LRESULT IPADDRESS_SetAddress (const IPADDRESS_INFO *infoPtr, DWORD ip_address) { WCHAR buf[20]; - static const WCHAR fmt[] = { '%', 'd', 0 }; int i;
TRACE("\n"); @@ -382,7 +376,7 @@ static LRESULT IPADDRESS_SetAddress (const IPADDRESS_INFO *infoPtr, DWORD ip_add const IPPART_INFO* part = &infoPtr->Part[i]; int value = ip_address & 0xff; if ( (value >= part->LowerLimit) && (value <= part->UpperLimit) ) { - wsprintfW (buf, fmt, value); + wsprintfW (buf, L"%d", value); SetWindowTextW (part->EditHwnd, buf); IPADDRESS_Notify (infoPtr, EN_CHANGE); } @@ -405,7 +399,6 @@ static void IPADDRESS_SetFocusToField (const IPADDRESS_INFO *infoPtr, INT index)
static BOOL IPADDRESS_ConstrainField (const IPADDRESS_INFO *infoPtr, int currentfield) { - static const WCHAR fmt[] = { '%', 'd', 0 }; const IPPART_INFO *part; int curValue, newValue; WCHAR field[10]; @@ -428,7 +421,7 @@ static BOOL IPADDRESS_ConstrainField (const IPADDRESS_INFO *infoPtr, int current
if (newValue == curValue) return FALSE;
- wsprintfW (field, fmt, newValue); + wsprintfW (field, L"%d", newValue); TRACE(" field=%s\n", debugstr_w(field)); return SetWindowTextW (part->EditHwnd, field); }
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/animate.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c index f8ba159779..f7ac28ae4c 100644 --- a/dlls/comctl32/animate.c +++ b/dlls/comctl32/animate.c @@ -94,12 +94,11 @@ static void ANIMATE_Notify(const ANIMATE_INFO *infoPtr, UINT notif)
static BOOL ANIMATE_LoadResW(ANIMATE_INFO *infoPtr, HINSTANCE hInst, LPCWSTR lpName) { - static const WCHAR aviW[] = { 'A', 'V', 'I', 0 }; HRSRC hrsrc; MMIOINFO mminfo; LPVOID lpAvi;
- hrsrc = FindResourceW(hInst, lpName, aviW); + hrsrc = FindResourceW(hInst, lpName, L"AVI"); if (!hrsrc) return FALSE;
@@ -794,12 +793,11 @@ static BOOL ANIMATE_Stop(ANIMATE_INFO *infoPtr)
static BOOL ANIMATE_Create(HWND hWnd, const CREATESTRUCTW *lpcs) { - static const WCHAR msvfw32W[] = { 'm', 's', 'v', 'f', 'w', '3', '2', '.', 'd', 'l', 'l', 0 }; ANIMATE_INFO *infoPtr;
if (!fnIC.hModule) { - fnIC.hModule = LoadLibraryW(msvfw32W); + fnIC.hModule = LoadLibraryW(L"msvfw32.dll"); if (!fnIC.hModule) return FALSE;
fnIC.fnICOpen = (void*)GetProcAddress(fnIC.hModule, "ICOpen");
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/rebar.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 6bca2f1818..af35008b69 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -302,8 +302,7 @@ static const char * const band_maskname[] = { "RBBIM_CHEVRONSTATE", /* 0x00002000 */ NULL };
- -static const WCHAR themeClass[] = { 'R','e','b','a','r',0 }; +static const WCHAR themeClass[] = L"Rebar";
static CHAR * REBAR_FmtStyle(char *buffer, UINT style) @@ -1010,7 +1009,6 @@ REBAR_ForceResize (REBAR_INFO *infoPtr) static VOID REBAR_MoveChildWindows (const REBAR_INFO *infoPtr, UINT start, UINT endplus) { - static const WCHAR strComboBox[] = { 'C','o','m','b','o','B','o','x',0 }; REBAR_BAND *lpBand; WCHAR szClassName[40]; UINT i; @@ -1047,7 +1045,7 @@ REBAR_MoveChildWindows (const REBAR_INFO *infoPtr, UINT start, UINT endplus) }
GetClassNameW (lpBand->hwndChild, szClassName, ARRAY_SIZE(szClassName)); - if (!lstrcmpW (szClassName, strComboBox) || + if (!lstrcmpW (szClassName, WC_COMBOBOXW) || !lstrcmpW (szClassName, WC_COMBOBOXEXW)) { INT nEditHeight, yPos; RECT rc;
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/datetime.c | 63 ++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 38 deletions(-)
diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 51c20a7063..2ce3da591f 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -361,9 +361,6 @@ DATETIME_SetFormatA (DATETIME_INFO *infoPtr, LPCSTR lpszFormat) static void 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 }; - static const WCHAR fmt__3sW[] = { '%', '.', '3', 's', 0 }; SYSTEMTIME date = infoPtr->date; int spec; WCHAR buffer[80]; @@ -395,10 +392,10 @@ DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int *result = 0; break; case ONEDIGITDAY: - wsprintfW (result, fmt_dW, date.wDay); + wsprintfW (result, L"%d", date.wDay); break; case TWODIGITDAY: - wsprintfW (result, fmt__2dW, date.wDay); + wsprintfW (result, L"%.2d", date.wDay); break; case THREECHARDAY: GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SABBREVDAYNAME1+(date.wDayOfWeek+6)%7, result, 4); @@ -414,7 +411,7 @@ DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int result[2] = 0; } else - wsprintfW (result, fmt_dW, date.wHour - (date.wHour > 12 ? 12 : 0)); + wsprintfW (result, L"%d", date.wHour - (date.wHour > 12 ? 12 : 0)); break; case TWODIGIT12HOUR: if (date.wHour == 0) { @@ -423,35 +420,35 @@ DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int result[2] = 0; } else - wsprintfW (result, fmt__2dW, date.wHour - (date.wHour > 12 ? 12 : 0)); + wsprintfW (result, L"%.2d", date.wHour - (date.wHour > 12 ? 12 : 0)); break; case ONEDIGIT24HOUR: - wsprintfW (result, fmt_dW, date.wHour); + wsprintfW (result, L"%d", date.wHour); break; case TWODIGIT24HOUR: - wsprintfW (result, fmt__2dW, date.wHour); + wsprintfW (result, L"%.2d", date.wHour); break; case ONEDIGITSECOND: - wsprintfW (result, fmt_dW, date.wSecond); + wsprintfW (result, L"%d", date.wSecond); break; case TWODIGITSECOND: - wsprintfW (result, fmt__2dW, date.wSecond); + wsprintfW (result, L"%.2d", date.wSecond); break; case ONEDIGITMINUTE: - wsprintfW (result, fmt_dW, date.wMinute); + wsprintfW (result, L"%d", date.wMinute); break; case TWODIGITMINUTE: - wsprintfW (result, fmt__2dW, date.wMinute); + wsprintfW (result, L"%.2d", date.wMinute); break; case ONEDIGITMONTH: - wsprintfW (result, fmt_dW, date.wMonth); + wsprintfW (result, L"%d", date.wMonth); break; case TWODIGITMONTH: - wsprintfW (result, fmt__2dW, date.wMonth); + wsprintfW (result, L"%.2d", date.wMonth); break; case THREECHARMONTH: GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+date.wMonth -1, buffer, ARRAY_SIZE(buffer)); - wsprintfW (result, fmt__3sW, buffer); + wsprintfW (result, L"%s.3s", buffer); break; case FULLMONTH: GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+date.wMonth -1, @@ -472,14 +469,14 @@ DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int result[1] = 0; break; case ONEDIGITYEAR: - wsprintfW (result, fmt_dW, date.wYear % 10); + wsprintfW (result, L"%d", date.wYear % 10); break; case TWODIGITYEAR: - wsprintfW (result, fmt__2dW, date.wYear % 100); + wsprintfW (result, L"%.2d", date.wYear % 100); break; case INVALIDFULLYEAR: case FULLYEAR: - wsprintfW (result, fmt_dW, date.wYear); + wsprintfW (result, L"%d", date.wYear); break; }
@@ -601,11 +598,6 @@ static int DATETIME_GetFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int co { /* fields are a fixed width, determined by the largest possible string */ /* presumably, these widths should be language dependent */ - static const WCHAR fld_d1W[] = { '2', 0 }; - static const WCHAR fld_d2W[] = { '2', '2', 0 }; - static const WCHAR fld_d4W[] = { '2', '2', '2', '2', 0 }; - static const WCHAR fld_am1[] = { 'A', 0 }; - static const WCHAR fld_am2[] = { 'A', 'M', 0 }; int spec; WCHAR buffer[80]; LPCWSTR bufptr; @@ -640,22 +632,17 @@ static int DATETIME_GetFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int co case TWODIGITMINUTE: case TWODIGITMONTH: case TWODIGITYEAR: - bufptr = fld_d2W; + bufptr = L"22"; break; case INVALIDFULLYEAR: case FULLYEAR: - bufptr = fld_d4W; + bufptr = L"2222"; break; case THREECHARMONTH: case FULLMONTH: case THREECHARDAY: case FULLDAY: { - static const WCHAR fld_day[] = {'W','e','d','n','e','s','d','a','y',0}; - static const WCHAR fld_abbrday[] = {'W','e','d',0}; - static const WCHAR fld_mon[] = {'S','e','p','t','e','m','b','e','r',0}; - static const WCHAR fld_abbrmon[] = {'D','e','c',0}; - const WCHAR *fall; LCTYPE lctype; INT i, max_count; @@ -664,22 +651,22 @@ static int DATETIME_GetFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int co /* choose locale data type and fallback string */ switch (spec) { case THREECHARDAY: - fall = fld_abbrday; + fall = L"Wed"; lctype = LOCALE_SABBREVDAYNAME1; max_count = 7; break; case FULLDAY: - fall = fld_day; + fall = L"Wednesday"; lctype = LOCALE_SDAYNAME1; max_count = 7; break; case THREECHARMONTH: - fall = fld_abbrmon; + fall = L"Dec"; lctype = LOCALE_SABBREVMONTHNAME1; max_count = 12; break; default: /* FULLMONTH */ - fall = fld_mon; + fall = L"September"; lctype = LOCALE_SMONTHNAME1; max_count = 12; break; @@ -704,13 +691,13 @@ static int DATETIME_GetFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int co return cx; } case ONELETTERAMPM: - bufptr = fld_am1; + bufptr = L"A"; break; case TWOLETTERAMPM: - bufptr = fld_am2; + bufptr = L"AM"; break; default: - bufptr = fld_d1W; + bufptr = L"2"; break; } }
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/syslink.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index 78d0fd0986..802a8803e8 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -165,10 +165,6 @@ static VOID SYSLINK_ClearDoc (SYSLINK_INFO *infoPtr) */ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text) { - static const WCHAR SL_LINKOPEN[] = { '<','a' }; - static const WCHAR SL_HREF[] = { 'h','r','e','f','=','"' }; - static const WCHAR SL_ID[] = { 'i','d','=','"' }; - static const WCHAR SL_LINKCLOSE[] = { '<','/','a','>' }; LPCWSTR current, textstart = NULL, linktext = NULL, firsttag = NULL; int taglen = 0, textlen = 0, linklen = 0, docitems = 0; PDOC_ITEM Last = NULL; @@ -182,7 +178,7 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text) { if(*current == '<') { - if(!wcsnicmp(current, SL_LINKOPEN, ARRAY_SIZE(SL_LINKOPEN)) && (CurrentType == slText)) + if(!wcsnicmp(current, L"<a", 2) && (CurrentType == slText)) { BOOL ValidParam = FALSE, ValidLink = FALSE;
@@ -210,14 +206,14 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
CheckParameter: /* compare the current position with all known parameters */ - if(!wcsnicmp(tmp, SL_HREF, ARRAY_SIZE(SL_HREF))) + if(!wcsnicmp(tmp, L"href="", 6)) { taglen += 6; ValidParam = TRUE; CurrentParameter = &lpUrl; CurrentParameterLen = &lenUrl; } - else if(!wcsnicmp(tmp, SL_ID, ARRAY_SIZE(SL_ID))) + else if(!wcsnicmp(tmp, L"id="", 4)) { taglen += 4; ValidParam = TRUE; @@ -291,7 +287,7 @@ CheckParameter: } } } - else if(!wcsnicmp(current, SL_LINKCLOSE, ARRAY_SIZE(SL_LINKCLOSE)) && (CurrentType == slLink) && firsttag) + else if (!wcsnicmp(current, L"</a>", 4) && (CurrentType == slLink) && firsttag) { /* there's a <a...> tag opened, first add the previous text, if present */ if(textstart != NULL && textlen > 0 && firsttag > textstart)
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/datetime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 2ce3da591f..7b7ac8a86a 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -130,8 +130,8 @@ static const WCHAR allowedformatchars[] = {'d', 'h', 'H', 'm', 'M', 's', 't', 'y static const int maxrepetition [] = {4,2,2,2,4,2,2,4,-1};
/* valid date limits */ -static const SYSTEMTIME max_allowed_date = { /* wYear */ 9999, /* wMonth */ 12, /* wDayOfWeek */ 0, /* wDay */ 31 }; -static const SYSTEMTIME min_allowed_date = { /* wYear */ 1752, /* wMonth */ 9, /* wDayOfWeek */ 0, /* wDay */ 14 }; +static const SYSTEMTIME max_allowed_date = { .wYear = 9999, .wMonth = 12, .wDayOfWeek = 0, .wDay = 31 }; +static const SYSTEMTIME min_allowed_date = { .wYear = 1752, .wMonth = 9, .wDayOfWeek = 0, .wDay = 14 };
static DWORD DATETIME_GetSystemTime (const DATETIME_INFO *infoPtr, SYSTEMTIME *systime)