mirror of
https://github.com/reactos/reactos.git
synced 2025-04-19 20:19:26 +00:00
[INPUT]
- Fix misspelling "Dublicate" -> "Duplicate". - Use ZeroMemory instead of memset(..., 0, ...). - Don't hardcode most of the variable types for sizeof. svn path=/trunk/; revision=72185
This commit is contained in:
parent
079e405958
commit
57888376d9
7 changed files with 27 additions and 27 deletions
|
@ -29,9 +29,9 @@ static APPLET Applets[NUM_APPLETS] =
|
|||
static VOID
|
||||
InitPropSheetPage(PROPSHEETPAGEW *page, WORD idDlg, DLGPROC DlgProc)
|
||||
{
|
||||
memset(page, 0, sizeof(PROPSHEETPAGEW));
|
||||
ZeroMemory(page, sizeof(*page));
|
||||
|
||||
page->dwSize = sizeof(PROPSHEETPAGEW);
|
||||
page->dwSize = sizeof(*page);
|
||||
page->dwFlags = PSP_DEFAULT;
|
||||
page->hInstance = hApplet;
|
||||
page->pszTemplate = MAKEINTRESOURCEW(idDlg);
|
||||
|
@ -49,13 +49,13 @@ SystemApplet(VOID)
|
|||
|
||||
LoadStringW(hApplet, IDS_CPLSYSTEMNAME, szCaption, ARRAYSIZE(szCaption));
|
||||
|
||||
memset(&header, 0, sizeof(PROPSHEETHEADER));
|
||||
ZeroMemory(&header, sizeof(header));
|
||||
|
||||
header.dwSize = sizeof(PROPSHEETHEADER);
|
||||
header.dwSize = sizeof(header);
|
||||
header.dwFlags = PSH_PROPSHEETPAGE;
|
||||
header.hwndParent = hCPLWindow;
|
||||
header.hInstance = hApplet;
|
||||
header.hIcon = LoadIconW(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM));
|
||||
header.hIcon = LoadIconW(hApplet, MAKEINTRESOURCEW(IDI_CPLSYSTEM));
|
||||
header.pszCaption = szCaption;
|
||||
header.nPages = ARRAYSIZE(page);
|
||||
header.nStartPage = 0;
|
||||
|
|
|
@ -73,20 +73,20 @@ ChangeKeySeqDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|||
|
||||
|
||||
static inline WCHAR*
|
||||
DublicateString(const WCHAR *pszString)
|
||||
DuplicateString(const WCHAR *pszString)
|
||||
{
|
||||
WCHAR *pszDublicate;
|
||||
WCHAR *pszDuplicate;
|
||||
size_t size;
|
||||
|
||||
size = (wcslen(pszString) + 1) * sizeof(WCHAR);
|
||||
|
||||
pszDublicate = (WCHAR*) malloc(size);
|
||||
if (pszDublicate != NULL)
|
||||
pszDuplicate = (WCHAR*) malloc(size);
|
||||
if (pszDuplicate != NULL)
|
||||
{
|
||||
StringCbCopyW(pszDublicate, size, pszString);
|
||||
StringCbCopyW(pszDuplicate, size, pszString);
|
||||
}
|
||||
|
||||
return pszDublicate;
|
||||
return pszDuplicate;
|
||||
}
|
||||
|
||||
static inline DWORD
|
||||
|
|
|
@ -23,7 +23,7 @@ InputList_AppendNode(VOID)
|
|||
if (pNew == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(pNew, 0, sizeof(INPUT_LIST_NODE));
|
||||
ZeroMemory(pNew, sizeof(INPUT_LIST_NODE));
|
||||
|
||||
if (pCurrent == NULL)
|
||||
{
|
||||
|
@ -318,7 +318,7 @@ InputList_Add(LOCALE_LIST_NODE *pLocale, LAYOUT_LIST_NODE *pLayout)
|
|||
if (len > 0)
|
||||
{
|
||||
szIndicator[len - 1] = 0;
|
||||
pInput->pszIndicator = DublicateString(szIndicator);
|
||||
pInput->pszIndicator = DuplicateString(szIndicator);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -447,7 +447,7 @@ InputList_Create(VOID)
|
|||
if (len > 0)
|
||||
{
|
||||
szIndicator[len - 1] = 0;
|
||||
pInput->pszIndicator = DublicateString(szIndicator);
|
||||
pInput->pszIndicator = DuplicateString(szIndicator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ ReadKeysSettings(VOID)
|
|||
{
|
||||
DWORD dwSize;
|
||||
|
||||
dwSize = sizeof(DWORD);
|
||||
dwSize = sizeof(dwSize);
|
||||
|
||||
if (RegQueryValueExW(hKey,
|
||||
L"Attributes",
|
||||
|
@ -142,7 +142,7 @@ UpdateKeySettingsListView(HWND hwndList)
|
|||
|
||||
ListView_DeleteAllItems(hwndList);
|
||||
|
||||
memset(&item, 0, sizeof(LV_ITEM));
|
||||
ZeroMemory(&item, sizeof(item));
|
||||
|
||||
LoadStringW(hApplet, IDS_SWITCH_BET_INLANG, szBuffer, ARRAYSIZE(szBuffer));
|
||||
item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE;
|
||||
|
@ -191,7 +191,7 @@ OnInitKeySettingsDialog(HWND hwndDlg)
|
|||
|
||||
ListView_SetExtendedListViewStyle(hwndList, LVS_EX_FULLROWSELECT);
|
||||
|
||||
memset(&column, 0, sizeof(LV_COLUMN));
|
||||
ZeroMemory(&column, sizeof(column));
|
||||
|
||||
column.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@ LayoutList_AppendNode(DWORD dwId, DWORD dwSpecialId, const WCHAR *pszName)
|
|||
if (pNew == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(pNew, 0, sizeof(LAYOUT_LIST_NODE));
|
||||
ZeroMemory(pNew, sizeof(LAYOUT_LIST_NODE));
|
||||
|
||||
pNew->pszName = DublicateString(pszName);
|
||||
pNew->pszName = DuplicateString(pszName);
|
||||
if (pNew->pszName == NULL)
|
||||
{
|
||||
free(pNew);
|
||||
|
|
|
@ -26,9 +26,9 @@ LocaleList_Append(DWORD dwId, const WCHAR *pszName)
|
|||
if (pNew == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(pNew, 0, sizeof(LOCALE_LIST_NODE));
|
||||
ZeroMemory(pNew, sizeof(LOCALE_LIST_NODE));
|
||||
|
||||
pNew->pszName = DublicateString(pszName);
|
||||
pNew->pszName = DuplicateString(pszName);
|
||||
if (pNew->pszName == NULL)
|
||||
{
|
||||
free(pNew);
|
||||
|
|
|
@ -34,9 +34,9 @@ CreateLayoutIcon(LPWSTR szLayout, BOOL bIsDefault)
|
|||
hBmpNew = CreateBitmap(width, height, 1, 1, NULL);
|
||||
if (hBmpNew)
|
||||
{
|
||||
LOGFONT lf;
|
||||
LOGFONTW lf;
|
||||
|
||||
if (SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(LOGFONT), &lf, 0))
|
||||
if (SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, 0))
|
||||
{
|
||||
ICONINFO IconInfo;
|
||||
HFONT hFont;
|
||||
|
@ -143,7 +143,7 @@ AddToInputListView(HWND hwndList, INPUT_LIST_NODE *pInputNode)
|
|||
}
|
||||
}
|
||||
|
||||
memset(&item, 0, sizeof(LV_ITEM));
|
||||
ZeroMemory(&item, sizeof(item));
|
||||
|
||||
item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
|
||||
item.pszText = pInputNode->pLocale->pszName;
|
||||
|
@ -202,7 +202,7 @@ OnInitSettingsPage(HWND hwndDlg)
|
|||
|
||||
ListView_SetExtendedListViewStyle(hwndInputList, LVS_EX_FULLROWSELECT);
|
||||
|
||||
memset(&column, 0, sizeof(LV_COLUMN));
|
||||
ZeroMemory(&column, sizeof(column));
|
||||
|
||||
column.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
|
||||
|
||||
|
|
Loading…
Reference in a new issue