https://git.reactos.org/?p=reactos.git;a=commitdiff;h=36a7f0dc7c10a9cf7c137…
commit 36a7f0dc7c10a9cf7c137ed617a0d419999a02f9
Author: Robert Naumann <gonzomdx(a)gmail.com>
AuthorDate: Wed Nov 2 19:02:14 2022 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Nov 2 19:02:14 2022 +0100
[REGEDIT] Partially sync Regedit to Wine-7.17 (#4717)
* [REGEDIT] Partially Sync to Wine 7.17
- regproc.c and regedit.c are now in sync.
- some other mostly depending fixes for the remaining files
* [REGEDIT_WINETEST] Sync to Wine-7.0
---
base/applications/regedit/CMakeLists.txt | 2 +-
base/applications/regedit/about.c | 2 +-
base/applications/regedit/childwnd.c | 22 +-
base/applications/regedit/edit.c | 74 +-
base/applications/regedit/find.c | 10 +-
base/applications/regedit/framewnd.c | 65 +-
base/applications/regedit/lang/bg-BG.rc | 52 +
base/applications/regedit/lang/cs-CZ.rc | 52 +
base/applications/regedit/lang/de-DE.rc | 52 +
base/applications/regedit/lang/el-GR.rc | 52 +
base/applications/regedit/lang/en-US.rc | 52 +
base/applications/regedit/lang/es-ES.rc | 52 +
base/applications/regedit/lang/fr-FR.rc | 52 +
base/applications/regedit/lang/he-IL.rc | 52 +
base/applications/regedit/lang/hu-HU.rc | 52 +
base/applications/regedit/lang/id-ID.rc | 52 +
base/applications/regedit/lang/it-IT.rc | 52 +
base/applications/regedit/lang/ja-JP.rc | 52 +
base/applications/regedit/lang/ko-KR.rc | 52 +
base/applications/regedit/lang/nl-NL.rc | 52 +
base/applications/regedit/lang/no-NO.rc | 52 +
base/applications/regedit/lang/pl-PL.rc | 52 +
base/applications/regedit/lang/pt-BR.rc | 52 +
base/applications/regedit/lang/pt-PT.rc | 52 +
base/applications/regedit/lang/ro-RO.rc | 52 +
base/applications/regedit/lang/ru-RU.rc | 52 +
base/applications/regedit/lang/sk-SK.rc | 52 +
base/applications/regedit/lang/sl-SI.rc | 52 +
base/applications/regedit/lang/sq-AL.rc | 52 +
base/applications/regedit/lang/sv-SE.rc | 52 +
base/applications/regedit/lang/th-TH.rc | 52 +
base/applications/regedit/lang/tr-TR.rc | 52 +
base/applications/regedit/lang/uk-UA.rc | 52 +
base/applications/regedit/lang/zh-CN.rc | 52 +
base/applications/regedit/lang/zh-HK.rc | 54 +-
base/applications/regedit/lang/zh-TW.rc | 52 +
base/applications/regedit/listview.c | 19 +-
base/applications/regedit/main.c | 17 +-
base/applications/regedit/main.h | 108 +-
base/applications/regedit/regedit.c | 493 ++----
base/applications/regedit/regedit.h | 3 +-
base/applications/regedit/regproc.c | 2266 ++++++++++++++------------
base/applications/regedit/regproc.h | 31 -
base/applications/regedit/resource.h | 26 +
base/applications/regedit/security.c | 4 +-
base/applications/regedit/settings.c | 4 +-
base/applications/regedit/treeview.c | 24 +-
media/doc/WINESYNC.txt | 5 +-
modules/rostests/winetests/regedit/regedit.c | 355 ++--
49 files changed, 3348 insertions(+), 1744 deletions(-)
diff --git a/base/applications/regedit/CMakeLists.txt
b/base/applications/regedit/CMakeLists.txt
index 802acfe549b..c26f2f42ec2 100644
--- a/base/applications/regedit/CMakeLists.txt
+++ b/base/applications/regedit/CMakeLists.txt
@@ -22,7 +22,7 @@ file(GLOB regedit_rc_deps res/*.*)
add_rc_deps(regedit.rc ${regedit_rc_deps})
add_executable(regedit ${SOURCE} regedit.rc)
set_module_type(regedit win32gui UNICODE)
-target_link_libraries(regedit uuid)
+target_link_libraries(regedit uuid wine)
add_importlibs(regedit user32 gdi32 advapi32 ole32 shell32 comctl32 comdlg32 shlwapi
msvcrt kernel32 ntdll)
add_pch(regedit regedit.h SOURCE)
add_cd_file(TARGET regedit DESTINATION reactos FOR all)
diff --git a/base/applications/regedit/about.c b/base/applications/regedit/about.c
index 6d4d23f75cc..9925b36e53a 100644
--- a/base/applications/regedit/about.c
+++ b/base/applications/regedit/about.c
@@ -25,7 +25,7 @@
void ShowAboutBox(HWND hWnd)
{
WCHAR AppStr[255];
- LoadStringW(hInst, IDS_APP_TITLE, AppStr, COUNT_OF(AppStr));
+ LoadStringW(hInst, IDS_APP_TITLE, AppStr, ARRAY_SIZE(AppStr));
ShellAboutW(hWnd, AppStr, NULL, LoadIconW(hInst, MAKEINTRESOURCEW(IDI_REGEDIT)));
}
diff --git a/base/applications/regedit/childwnd.c b/base/applications/regedit/childwnd.c
index 977d8cea9d7..96b313e7416 100644
--- a/base/applications/regedit/childwnd.c
+++ b/base/applications/regedit/childwnd.c
@@ -157,7 +157,7 @@ static void SuggestKeys(HKEY hRootKey, LPCWSTR pszKeyPath, LPWSTR
pszSuggestions
/* Check default key */
if (QueryStringValue(hRootKey, pszKeyPath, NULL,
- szBuffer, COUNT_OF(szBuffer)) == ERROR_SUCCESS)
+ szBuffer, ARRAY_SIZE(szBuffer)) == ERROR_SUCCESS)
{
/* Sanity check this key; it cannot be empty, nor can it be a
* loop back */
@@ -189,7 +189,7 @@ static void SuggestKeys(HKEY hRootKey, LPCWSTR pszKeyPath, LPWSTR
pszSuggestions
if (RegOpenKeyW(hRootKey, pszKeyPath, &hSubKey) == ERROR_SUCCESS)
{
if (QueryStringValue(hSubKey, L"CLSID", NULL, szBuffer,
- COUNT_OF(szBuffer)) == ERROR_SUCCESS)
+ ARRAY_SIZE(szBuffer)) == ERROR_SUCCESS)
{
lstrcpynW(pszSuggestions, L"HKCR\\CLSID\\",
(int)iSuggestionsLength);
i = wcslen(pszSuggestions);
@@ -218,7 +218,7 @@ LRESULT CALLBACK AddressBarProc(HWND hwnd, UINT uMsg, WPARAM wParam,
LPARAM lPar
case WM_KEYUP:
if (wParam == VK_RETURN)
{
- GetWindowTextW(hwnd, s_szNode, COUNT_OF(s_szNode));
+ GetWindowTextW(hwnd, s_szNode, ARRAY_SIZE(s_szNode));
SelectNode(g_pChildWnd->hTreeWnd, s_szNode);
}
break;
@@ -254,7 +254,7 @@ UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath)
RefreshListView(g_pChildWnd->hListWnd, hRootKey, keyPath);
rootName = get_root_key_name(hRootKey);
cbFullPath = (wcslen(rootName) + 1 + wcslen(keyPath) + 1) * sizeof(WCHAR);
- fullPath = HeapAlloc(GetProcessHeap(), 0, cbFullPath);
+ fullPath = malloc(cbFullPath);
if (fullPath)
{
/* set (correct) the address bar text */
@@ -265,7 +265,7 @@ UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath)
SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)fullPath);
SendMessageW(g_pChildWnd->hAddressBarWnd, WM_SETTEXT, 0,
(LPARAM)fullPath);
- HeapFree(GetProcessHeap(), 0, fullPath);
+ free(fullPath);
/* disable hive manipulation items temporarily (enable only if necessary) */
EnableMenuItem(hMenuFrame, ID_REGISTRY_LOADHIVE, MF_BYCOMMAND | MF_GRAYED);
@@ -313,7 +313,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lPa
DWORD style;
/* Load "My Computer" string */
- LoadStringW(hInst, IDS_MY_COMPUTER, buffer, COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_MY_COMPUTER, buffer, ARRAY_SIZE(buffer));
g_pChildWnd = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ChildWnd));
if (!g_pChildWnd) return 0;
@@ -384,7 +384,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lPa
DestroyTreeView(g_pChildWnd->hTreeWnd);
DestroyMainMenu();
DestroyIcon(g_pChildWnd->hArrowIcon);
- HeapFree(GetProcessHeap(), 0, g_pChildWnd);
+ free(g_pChildWnd);
g_pChildWnd = NULL;
PostQuitMessage(0);
break;
@@ -603,7 +603,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lPa
TreeView_GetItem(g_pChildWnd->hTreeWnd, &item);
/* Set the Expand/Collapse menu item appropriately */
- LoadStringW(hInst, (item.state & TVIS_EXPANDED) ? IDS_COLLAPSE :
IDS_EXPAND, buffer, COUNT_OF(buffer));
+ LoadStringW(hInst, (item.state & TVIS_EXPANDED) ? IDS_COLLAPSE :
IDS_EXPAND, buffer, ARRAY_SIZE(buffer));
memset(&mii, 0, sizeof(mii));
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_STRING | MIIM_STATE | MIIM_ID;
@@ -632,18 +632,18 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM
wParam, LPARAM lPa
/* Come up with suggestions */
keyPath = GetItemPath(g_pChildWnd->hTreeWnd, NULL,
&hRootKey);
- SuggestKeys(hRootKey, keyPath, Suggestions, COUNT_OF(Suggestions));
+ SuggestKeys(hRootKey, keyPath, Suggestions,
ARRAY_SIZE(Suggestions));
if (Suggestions[0])
{
AppendMenu(hContextMenu, MF_SEPARATOR, 0, NULL);
- LoadStringW(hInst, IDS_GOTO_SUGGESTED_KEY, resource,
COUNT_OF(resource));
+ LoadStringW(hInst, IDS_GOTO_SUGGESTED_KEY, resource,
ARRAY_SIZE(resource));
s = Suggestions;
wID = ID_TREE_SUGGESTION_MIN;
while(*s && (wID <= ID_TREE_SUGGESTION_MAX))
{
- _snwprintf(buffer, COUNT_OF(buffer), resource, s);
+ _snwprintf(buffer, ARRAY_SIZE(buffer), resource, s);
memset(&mii, 0, sizeof(mii));
mii.cbSize = sizeof(mii);
diff --git a/base/applications/regedit/edit.c b/base/applications/regedit/edit.c
index dcc82520ba0..d84361c7a0a 100644
--- a/base/applications/regedit/edit.c
+++ b/base/applications/regedit/edit.c
@@ -49,14 +49,14 @@ void error(HWND hwnd, INT resId, ...)
hInstance = GetModuleHandle(0);
- if (!LoadStringW(hInstance, IDS_ERROR, title, COUNT_OF(title)))
+ if (!LoadStringW(hInstance, IDS_ERROR, title, ARRAY_SIZE(title)))
wcscpy(title, L"Error");
- if (!LoadStringW(hInstance, resId, errfmt, COUNT_OF(errfmt)))
+ if (!LoadStringW(hInstance, resId, errfmt, ARRAY_SIZE(errfmt)))
wcscpy(errfmt, L"Unknown error string!");
va_start(ap, resId);
- _vsnwprintf(errstr, COUNT_OF(errstr), errfmt, ap);
+ _vsnwprintf(errstr, ARRAY_SIZE(errstr), errfmt, ap);
va_end(ap);
MessageBoxW(hwnd, errstr, title, MB_OK | MB_ICONERROR);
@@ -65,7 +65,7 @@ void error(HWND hwnd, INT resId, ...)
static void error_code_messagebox(HWND hwnd, DWORD error_code)
{
WCHAR title[256];
- if (!LoadStringW(hInst, IDS_ERROR, title, COUNT_OF(title)))
+ if (!LoadStringW(hInst, IDS_ERROR, title, ARRAY_SIZE(title)))
wcscpy(title, L"Error");
ErrorMessageBox(hwnd, title, error_code);
}
@@ -80,14 +80,14 @@ void warning(HWND hwnd, INT resId, ...)
hInstance = GetModuleHandle(0);
- if (!LoadStringW(hInstance, IDS_WARNING, title, COUNT_OF(title)))
+ if (!LoadStringW(hInstance, IDS_WARNING, title, ARRAY_SIZE(title)))
wcscpy(title, L"Warning");
- if (!LoadStringW(hInstance, resId, errfmt, COUNT_OF(errfmt)))
+ if (!LoadStringW(hInstance, resId, errfmt, ARRAY_SIZE(errfmt)))
wcscpy(errfmt, L"Unknown error string!");
va_start(ap, resId);
- _vsnwprintf(errstr, COUNT_OF(errstr), errfmt, ap);
+ _vsnwprintf(errstr, ARRAY_SIZE(errstr), errfmt, ap);
va_end(ap);
MessageBoxW(hwnd, errstr, title, MB_OK | MB_ICONSTOP);
@@ -111,7 +111,7 @@ INT_PTR CALLBACK modify_string_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM
wParam, L
else
{
WCHAR buffer[255];
- LoadStringW(hInst, IDS_DEFAULT_VALUE_NAME, buffer, COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_DEFAULT_VALUE_NAME, buffer, ARRAY_SIZE(buffer));
SetDlgItemTextW(hwndDlg, IDC_VALUE_NAME, buffer);
}
SetDlgItemTextW(hwndDlg, IDC_VALUE_DATA, stringValueData);
@@ -180,7 +180,7 @@ INT_PTR CALLBACK modify_multi_string_dlgproc(HWND hwndDlg, UINT uMsg,
WPARAM wPa
else
{
WCHAR buffer[255];
- LoadStringW(hInst, IDS_DEFAULT_VALUE_NAME, buffer, COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_DEFAULT_VALUE_NAME, buffer, ARRAY_SIZE(buffer));
SetDlgItemTextW(hwndDlg, IDC_VALUE_NAME, buffer);
}
SetDlgItemTextW(hwndDlg, IDC_VALUE_DATA, stringValueData);
@@ -300,7 +300,7 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM
wParam, LP
else
{
WCHAR buffer[255];
- LoadStringW(hInst, IDS_DEFAULT_VALUE_NAME, buffer, COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_DEFAULT_VALUE_NAME, buffer, ARRAY_SIZE(buffer));
SetDlgItemTextW(hwndDlg, IDC_VALUE_NAME, buffer);
}
CheckRadioButton (hwndDlg, IDC_FORMAT_HEX, IDC_FORMAT_DEC, IDC_FORMAT_HEX);
@@ -402,7 +402,7 @@ INT_PTR CALLBACK modify_binary_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM
wParam, L
else
{
WCHAR buffer[255];
- LoadStringW(hInst, IDS_DEFAULT_VALUE_NAME, buffer, COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_DEFAULT_VALUE_NAME, buffer, ARRAY_SIZE(buffer));
SetDlgItemTextW(hwndDlg, IDC_VALUE_NAME, buffer);
}
hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA);
@@ -456,13 +456,13 @@ static BOOL CreateResourceColumns(HWND hwnd)
/* Load the column labels from the resource file. */
lvC.iSubItem = 0;
lvC.cx = (rc.right - rc.left) / 2;
- LoadStringW(hInst, IDS_DMA_CHANNEL, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_DMA_CHANNEL, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 0, &lvC) == -1)
return FALSE;
lvC.iSubItem = 1;
lvC.cx = (rc.right - rc.left) - lvC.cx;
- LoadStringW(hInst, IDS_DMA_PORT, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_DMA_PORT, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 1, &lvC) == -1)
return FALSE;
@@ -476,23 +476,23 @@ static BOOL CreateResourceColumns(HWND hwnd)
/* Load the column labels from the resource file. */
lvC.iSubItem = 0;
lvC.cx = width;
- LoadStringW(hInst, IDS_INTERRUPT_VECTOR, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_INTERRUPT_VECTOR, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 0, &lvC) == -1)
return FALSE;
lvC.iSubItem = 1;
- LoadStringW(hInst, IDS_INTERRUPT_LEVEL, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_INTERRUPT_LEVEL, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 1, &lvC) == -1)
return FALSE;
lvC.iSubItem = 2;
- LoadStringW(hInst, IDS_INTERRUPT_AFFINITY, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_INTERRUPT_AFFINITY, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 2, &lvC) == -1)
return FALSE;
lvC.iSubItem = 3;
lvC.cx = (rc.right - rc.left) - 3 * width;
- LoadStringW(hInst, IDS_INTERRUPT_TYPE, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_INTERRUPT_TYPE, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 3, &lvC) == -1)
return FALSE;
@@ -506,18 +506,18 @@ static BOOL CreateResourceColumns(HWND hwnd)
/* Load the column labels from the resource file. */
lvC.iSubItem = 0;
lvC.cx = width;
- LoadStringW(hInst, IDS_MEMORY_ADDRESS, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_MEMORY_ADDRESS, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 0, &lvC) == -1)
return FALSE;
lvC.iSubItem = 1;
- LoadStringW(hInst, IDS_MEMORY_LENGTH, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_MEMORY_LENGTH, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 1, &lvC) == -1)
return FALSE;
lvC.iSubItem = 2;
lvC.cx = (rc.right - rc.left) - 2 * width;
- LoadStringW(hInst, IDS_MEMORY_ACCESS, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_MEMORY_ACCESS, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 2, &lvC) == -1)
return FALSE;
@@ -531,18 +531,18 @@ static BOOL CreateResourceColumns(HWND hwnd)
/* Load the column labels from the resource file. */
lvC.iSubItem = 0;
lvC.cx = width;
- LoadStringW(hInst, IDS_PORT_ADDRESS, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_PORT_ADDRESS, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 0, &lvC) == -1)
return FALSE;
lvC.iSubItem = 1;
- LoadStringW(hInst, IDS_PORT_LENGTH, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_PORT_LENGTH, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 1, &lvC) == -1)
return FALSE;
lvC.iSubItem = 2;
lvC.cx = (rc.right - rc.left) - 2 * width;
- LoadStringW(hInst, IDS_PORT_ACCESS, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_PORT_ACCESS, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 2, &lvC) == -1)
return FALSE;
@@ -555,18 +555,18 @@ static BOOL CreateResourceColumns(HWND hwnd)
/* Load the column labels from the resource file. */
lvC.iSubItem = 0;
lvC.cx = width;
- LoadStringW(hInst, IDS_SPECIFIC_RESERVED1, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_SPECIFIC_RESERVED1, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 0, &lvC) == -1)
return FALSE;
lvC.iSubItem = 1;
- LoadStringW(hInst, IDS_SPECIFIC_RESERVED2, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_SPECIFIC_RESERVED2, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 1, &lvC) == -1)
return FALSE;
lvC.iSubItem = 2;
lvC.cx = (rc.right - rc.left) - 2 * width;
- LoadStringW(hInst, IDS_SPECIFIC_DATASIZE, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_SPECIFIC_DATASIZE, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hwndLV, 2, &lvC) == -1)
return FALSE;
@@ -725,9 +725,9 @@ ParseResources(HWND hwnd)
ListView_SetItemText(hwndLV, iItem, 1, buffer);
if (pDescriptor->Flags & CM_RESOURCE_PORT_IO)
- LoadStringW(hInst, IDS_PORT_PORT_IO, buffer, COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_PORT_PORT_IO, buffer,
ARRAY_SIZE(buffer));
else
- LoadStringW(hInst, IDS_PORT_MEMORY_IO, buffer,
COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_PORT_MEMORY_IO, buffer,
ARRAY_SIZE(buffer));
ListView_SetItemText(hwndLV, iItem, 2, buffer);
}
break;
@@ -756,9 +756,9 @@ ParseResources(HWND hwnd)
ListView_SetItemText(hwndLV, iItem, 2, buffer);
if (pDescriptor->Flags & CM_RESOURCE_INTERRUPT_LATCHED)
- LoadStringW(hInst, IDS_INTERRUPT_EDGE_SENSITIVE, buffer,
COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_INTERRUPT_EDGE_SENSITIVE, buffer,
ARRAY_SIZE(buffer));
else
- LoadStringW(hInst, IDS_INTERRUPT_LEVEL_SENSITIVE, buffer,
COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_INTERRUPT_LEVEL_SENSITIVE, buffer,
ARRAY_SIZE(buffer));
ListView_SetItemText(hwndLV, iItem, 3, buffer);
}
@@ -791,15 +791,15 @@ ParseResources(HWND hwnd)
switch (pDescriptor->Flags & (CM_RESOURCE_MEMORY_READ_ONLY |
CM_RESOURCE_MEMORY_WRITE_ONLY))
{
case CM_RESOURCE_MEMORY_READ_ONLY:
- LoadStringW(hInst, IDS_MEMORY_READ_ONLY, buffer,
COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_MEMORY_READ_ONLY, buffer,
ARRAY_SIZE(buffer));
break;
case CM_RESOURCE_MEMORY_WRITE_ONLY:
- LoadStringW(hInst, IDS_MEMORY_WRITE_ONLY, buffer,
COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_MEMORY_WRITE_ONLY, buffer,
ARRAY_SIZE(buffer));
break;
default:
- LoadStringW(hInst, IDS_MEMORY_READ_WRITE, buffer,
COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_MEMORY_READ_WRITE, buffer,
ARRAY_SIZE(buffer));
break;
}
@@ -961,13 +961,13 @@ static BOOL CreateResourceListColumns(HWND hWndListView)
/* Load the column labels from the resource file. */
lvC.iSubItem = 0;
lvC.cx = (rc.right - rc.left) / 2;
- LoadStringW(hInst, IDS_BUSNUMBER, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_BUSNUMBER, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hWndListView, 0, &lvC) == -1)
return FALSE;
lvC.iSubItem = 1;
lvC.cx = (rc.right - rc.left) - lvC.cx;
- LoadStringW(hInst, IDS_INTERFACE, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_INTERFACE, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hWndListView, 1, &lvC) == -1)
return FALSE;
@@ -1467,8 +1467,8 @@ BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
return FALSE;
}
- LoadStringW(hInst, IDS_QUERY_DELETE_KEY_CONFIRM, caption, COUNT_OF(caption));
- LoadStringW(hInst, IDS_QUERY_DELETE_KEY_ONE, msg, COUNT_OF(msg));
+ LoadStringW(hInst, IDS_QUERY_DELETE_KEY_CONFIRM, caption, ARRAY_SIZE(caption));
+ LoadStringW(hInst, IDS_QUERY_DELETE_KEY_ONE, msg, ARRAY_SIZE(msg));
if (MessageBoxW(g_pChildWnd->hWnd, msg, caption, MB_ICONQUESTION | MB_YESNO) !=
IDYES)
goto done;
diff --git a/base/applications/regedit/find.c b/base/applications/regedit/find.c
index 7dfe62f996c..df5c0959347 100644
--- a/base/applications/regedit/find.c
+++ b/base/applications/regedit/find.c
@@ -686,7 +686,7 @@ BOOL FindNext(HWND hWnd)
if (fSuccess)
{
- GetKeyName(szFullKey, COUNT_OF(szFullKey), hKeyRoot, pszFoundSubKey);
+ GetKeyName(szFullKey, ARRAY_SIZE(szFullKey), hKeyRoot, pszFoundSubKey);
SelectNode(g_pChildWnd->hTreeWnd, szFullKey);
free(pszFoundSubKey);
@@ -785,7 +785,7 @@ static INT_PTR CALLBACK FindDialogProc(HWND hDlg, UINT uMsg, WPARAM
wParam, LPAR
hControl = GetDlgItem(hDlg, IDC_FINDWHAT);
if (hControl)
- GetWindowTextW(hControl, s_szFindWhat, COUNT_OF(s_szFindWhat));
+ GetWindowTextW(hControl, s_szFindWhat, ARRAY_SIZE(s_szFindWhat));
EndDialog(hDlg, 1);
break;
@@ -799,7 +799,7 @@ static INT_PTR CALLBACK FindDialogProc(HWND hDlg, UINT uMsg, WPARAM
wParam, LPAR
switch(LOWORD(wParam))
{
case IDC_FINDWHAT:
- GetWindowTextW((HWND) lParam, s_szSavedFindValue,
COUNT_OF(s_szSavedFindValue));
+ GetWindowTextW((HWND) lParam, s_szSavedFindValue,
ARRAY_SIZE(s_szSavedFindValue));
hControl = GetDlgItem(hDlg, IDOK);
if (hControl)
{
@@ -825,8 +825,8 @@ void FindNextMessageBox(HWND hWnd)
{
WCHAR msg[128], caption[128];
- LoadStringW(hInst, IDS_FINISHEDFIND, msg, COUNT_OF(msg));
- LoadStringW(hInst, IDS_APP_TITLE, caption, COUNT_OF(caption));
+ LoadStringW(hInst, IDS_FINISHEDFIND, msg, ARRAY_SIZE(msg));
+ LoadStringW(hInst, IDS_APP_TITLE, caption, ARRAY_SIZE(caption));
MessageBoxW(hWnd, msg, caption, MB_ICONINFORMATION);
}
}
diff --git a/base/applications/regedit/framewnd.c b/base/applications/regedit/framewnd.c
index 1e6a8b20d84..f608ab57149 100644
--- a/base/applications/regedit/framewnd.c
+++ b/base/applications/regedit/framewnd.c
@@ -41,17 +41,10 @@ extern WCHAR Suggestions[256];
static void resize_frame_rect(HWND hWnd, PRECT prect)
{
- RECT rt;
- /*
- if (IsWindowVisible(hToolBar)) {
- SendMessageW(hToolBar, WM_SIZE, 0, 0);
- GetClientRect(hToolBar, &rt);
- prect->top = rt.bottom+3;
- prect->bottom -= rt.bottom+3;
- }
- */
if (IsWindowVisible(hStatusBar))
{
+ RECT rt;
+
SetupStatusBar(hWnd, TRUE);
GetWindowRect(hStatusBar, &rt);
prect->bottom -= rt.bottom - rt.top;
@@ -100,7 +93,7 @@ static void OnInitMenu(HWND hWnd)
dwIndex = 0;
do
{
- cbValueName = COUNT_OF(szValueName);
+ cbValueName = ARRAY_SIZE(szValueName);
cbValueData = sizeof(abValueData);
lResult = RegEnumValueW(hKey, dwIndex, szValueName, &cbValueName, NULL,
&dwType, abValueData, &cbValueData);
if ((lResult == ERROR_SUCCESS) && (dwType == REG_SZ))
@@ -281,7 +274,7 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME* pofn)
FilterPairs[2].FilterID = IDS_FLT_REGEDIT4_FLT;
FilterPairs[3].DisplayID = IDS_FLT_ALLFILES;
FilterPairs[3].FilterID = IDS_FLT_ALLFILES_FLT;
- BuildFilterStrings(Filter, FilterPairs, COUNT_OF(FilterPairs));
+ BuildFilterStrings(Filter, FilterPairs, ARRAY_SIZE(FilterPairs));
pofn->lpstrFilter = Filter;
pofn->lpstrFile = FileNameBuffer;
@@ -368,7 +361,7 @@ static BOOL LoadHive(HWND hWnd)
BuildFilterStrings(Filter, &filter, 1);
ofn.lpstrFilter = Filter;
/* load and set the caption and flags for dialog */
- LoadStringW(hInst, IDS_LOAD_HIVE, Caption, COUNT_OF(Caption));
+ LoadStringW(hInst, IDS_LOAD_HIVE, Caption, ARRAY_SIZE(Caption));
ofn.lpstrTitle = Caption;
ofn.Flags |= OFN_ENABLESIZING;
/* ofn.lCustData = ;*/
@@ -416,7 +409,7 @@ static BOOL UnloadHive(HWND hWnd)
/* get the item key to unload */
pszKeyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hRootKey);
/* load and set the caption and flags for dialog */
- LoadStringW(hInst, IDS_UNLOAD_HIVE, Caption, COUNT_OF(Caption));
+ LoadStringW(hInst, IDS_UNLOAD_HIVE, Caption, ARRAY_SIZE(Caption));
/* Enable the 'restore' privilege, unload the hive, disable the privilege */
EnablePrivilege(SE_RESTORE_NAME, NULL, TRUE);
@@ -450,7 +443,7 @@ static BOOL ImportRegistryFile(HWND hWnd)
pszKeyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
InitOpenFileName(hWnd, &ofn);
- LoadStringW(hInst, IDS_IMPORT_REG_FILE, Caption, COUNT_OF(Caption));
+ LoadStringW(hInst, IDS_IMPORT_REG_FILE, Caption, ARRAY_SIZE(Caption));
ofn.lpstrTitle = Caption;
ofn.Flags |= OFN_ENABLESIZING;
/* ofn.lCustData = ;*/
@@ -461,22 +454,22 @@ static BOOL ImportRegistryFile(HWND hWnd)
_wcsicmp(ofn.lpstrFile + ofn.nFileExtension, L"reg") == 0) /*
REGEDIT4 or Windows Registry Editor Version 5.00 */
{
/* Open the file */
- FILE* fp = _wfopen(ofn.lpstrFile, L"r");
+ FILE* fp = _wfopen(ofn.lpstrFile, L"rb");
/* Import it */
if (fp == NULL || !import_registry_file(fp))
{
/* Error opening the file */
- LoadStringW(hInst, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
- LoadStringW(hInst, IDS_IMPORT_ERROR, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_APP_TITLE, szTitle, ARRAY_SIZE(szTitle));
+ LoadStringW(hInst, IDS_IMPORT_ERROR, szText, ARRAY_SIZE(szText));
InfoMessageBox(hWnd, MB_OK | MB_ICONERROR, szTitle, szText,
ofn.lpstrFile);
bRet = FALSE;
}
else
{
/* Show successful import */
- LoadStringW(hInst, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
- LoadStringW(hInst, IDS_IMPORT_OK, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_APP_TITLE, szTitle, ARRAY_SIZE(szTitle));
+ LoadStringW(hInst, IDS_IMPORT_OK, szText, ARRAY_SIZE(szText));
InfoMessageBox(hWnd, MB_OK | MB_ICONINFORMATION, szTitle, szText,
ofn.lpstrFile);
bRet = TRUE;
}
@@ -486,8 +479,8 @@ static BOOL ImportRegistryFile(HWND hWnd)
}
else /* Registry Hive Files */
{
- LoadStringW(hInst, IDS_QUERY_IMPORT_HIVE_CAPTION, szTitle,
COUNT_OF(szTitle));
- LoadStringW(hInst, IDS_QUERY_IMPORT_HIVE_MSG, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_QUERY_IMPORT_HIVE_CAPTION, szTitle,
ARRAY_SIZE(szTitle));
+ LoadStringW(hInst, IDS_QUERY_IMPORT_HIVE_MSG, szText, ARRAY_SIZE(szText));
/* Display a confirmation message */
if (MessageBoxW(g_pChildWnd->hWnd, szText, szTitle, MB_ICONWARNING |
MB_YESNO) == IDYES)
@@ -595,10 +588,10 @@ BOOL ExportRegistryFile(HWND hWnd)
/* Figure out which key path we are exporting */
pszKeyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
- GetKeyName(ExportKeyPath, COUNT_OF(ExportKeyPath), hKeyRoot, pszKeyPath);
+ GetKeyName(ExportKeyPath, ARRAY_SIZE(ExportKeyPath), hKeyRoot, pszKeyPath);
InitOpenFileName(hWnd, &ofn);
- LoadStringW(hInst, IDS_EXPORT_REG_FILE, Caption, COUNT_OF(Caption));
+ LoadStringW(hInst, IDS_EXPORT_REG_FILE, Caption, ARRAY_SIZE(Caption));
ofn.lpstrTitle = Caption;
/* Only set the path if a key (not the root node) is selected */
@@ -672,8 +665,8 @@ BOOL ExportRegistryFile(HWND hWnd)
: REG_FORMAT_5)))
{
/* Error creating the file */
- LoadStringW(hInst, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
- LoadStringW(hInst, IDS_EXPORT_ERROR, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_APP_TITLE, szTitle, ARRAY_SIZE(szTitle));
+ LoadStringW(hInst, IDS_EXPORT_ERROR, szText, ARRAY_SIZE(szText));
InfoMessageBox(hWnd, MB_OK | MB_ICONERROR, szTitle, szText,
ofn.lpstrFile);
bRet = FALSE;
}
@@ -803,7 +796,7 @@ BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName)
if (!EmptyClipboard())
goto done;
- if (!GetKeyName(szBuffer, COUNT_OF(szBuffer), hRootKey, keyName))
+ if (!GetKeyName(szBuffer, ARRAY_SIZE(szBuffer), hRootKey, keyName))
goto done;
hGlobal = GlobalAlloc(GMEM_MOVEABLE, (wcslen(szBuffer) + 1) * sizeof(WCHAR));
@@ -838,7 +831,7 @@ static BOOL CreateNewValue(HKEY hRootKey, LPCWSTR pszKeyPath, DWORD
dwType)
&hKey) != ERROR_SUCCESS)
return FALSE;
- LoadStringW(hInst, IDS_NEW_VALUE, szNewValueFormat, COUNT_OF(szNewValueFormat));
+ LoadStringW(hInst, IDS_NEW_VALUE, szNewValueFormat, ARRAY_SIZE(szNewValueFormat));
do
{
@@ -937,7 +930,7 @@ InitializeRemoteRegistryPicker(OUT IDsObjectPicker **pDsObjectPicker)
InitInfo.cbSize = sizeof(InitInfo);
InitInfo.pwzTargetComputer = NULL;
- InitInfo.cDsScopeInfos = COUNT_OF(Scopes);
+ InitInfo.cDsScopeInfos = ARRAY_SIZE(Scopes);
InitInfo.aDsScopeInfos = Scopes;
InitInfo.flOptions = 0;
InitInfo.cAttributesToFetch = 0;
@@ -1068,7 +1061,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam)
hRet = InvokeRemoteRegistryPickerDialog(ObjectPicker,
hWnd,
szComputerName,
- COUNT_OF(szComputerName));
+ ARRAY_SIZE(szComputerName));
if (hRet == S_OK)
{
/* FIXME - connect to the registry */
@@ -1094,7 +1087,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam)
toggle_child(hWnd, LOWORD(wParam), hStatusBar);
return TRUE;
case ID_HELP_HELPTOPICS:
- WinHelpW(hWnd, getAppName(), HELP_FINDER, 0);
+ WinHelpW(hWnd, L"regedit", HELP_FINDER, 0);
return TRUE;
case ID_HELP_ABOUT:
ShowAboutBox(hWnd);
@@ -1169,8 +1162,8 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam)
if(nSelected >= 1)
{
WCHAR msg[128], caption[128];
- LoadStringW(hInst, IDS_QUERY_DELETE_CONFIRM, caption,
COUNT_OF(caption));
- LoadStringW(hInst, (nSelected == 1 ? IDS_QUERY_DELETE_ONE :
IDS_QUERY_DELETE_MORE), msg, COUNT_OF(msg));
+ LoadStringW(hInst, IDS_QUERY_DELETE_CONFIRM, caption,
ARRAY_SIZE(caption));
+ LoadStringW(hInst, (nSelected == 1 ? IDS_QUERY_DELETE_ONE :
IDS_QUERY_DELETE_MORE), msg, ARRAY_SIZE(msg));
if(MessageBoxW(g_pChildWnd->hWnd, msg, caption, MB_ICONQUESTION |
MB_YESNO) == IDYES)
{
int ni, errs;
@@ -1190,8 +1183,8 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam)
RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath);
if(errs > 0)
{
- LoadStringW(hInst, IDS_ERR_DELVAL_CAPTION, caption,
COUNT_OF(caption));
- LoadStringW(hInst, IDS_ERR_DELETEVALUE, msg, COUNT_OF(msg));
+ LoadStringW(hInst, IDS_ERR_DELVAL_CAPTION, caption,
ARRAY_SIZE(caption));
+ LoadStringW(hInst, IDS_ERR_DELETEVALUE, msg, ARRAY_SIZE(msg));
MessageBoxW(g_pChildWnd->hWnd, msg, caption, MB_ICONSTOP);
}
}
@@ -1304,7 +1297,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam)
mii.fMask = MIIM_TYPE;
mii.fType = MFT_STRING;
mii.dwTypeData = szFavorite;
- mii.cch = COUNT_OF(szFavorite);
+ mii.cch = ARRAY_SIZE(szFavorite);
if (GetMenuItemInfo(hMenu, LOWORD(wParam) - ID_FAVORITES_MIN, TRUE,
&mii))
{
@@ -1390,7 +1383,7 @@ LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM
wParam, LPARAM lPa
SendMessageW(g_pChildWnd->hTreeWnd, WM_SYSCOLORCHANGE, 0, 0);
break;
case WM_DESTROY:
- WinHelpW(hWnd, getAppName(), HELP_QUIT, 0);
+ WinHelpW(hWnd, L"regedit", HELP_QUIT, 0);
SaveSettings();
PostQuitMessage(0);
default:
diff --git a/base/applications/regedit/lang/bg-BG.rc
b/base/applications/regedit/lang/bg-BG.rc
index fc2b3f3e1b5..47ae89dcc90 100644
--- a/base/applications/regedit/lang/bg-BG.rc
+++ b/base/applications/regedit/lang/bg-BG.rc
@@ -15,6 +15,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/cs-CZ.rc
b/base/applications/regedit/lang/cs-CZ.rc
index 71f0c8c2beb..4a45a4762d7 100644
--- a/base/applications/regedit/lang/cs-CZ.rc
+++ b/base/applications/regedit/lang/cs-CZ.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/de-DE.rc
b/base/applications/regedit/lang/de-DE.rc
index ad065c0ad62..052d952c2ed 100644
--- a/base/applications/regedit/lang/de-DE.rc
+++ b/base/applications/regedit/lang/de-DE.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/el-GR.rc
b/base/applications/regedit/lang/el-GR.rc
index 96ee88543d9..618cf5180e1 100644
--- a/base/applications/regedit/lang/el-GR.rc
+++ b/base/applications/regedit/lang/el-GR.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/en-US.rc
b/base/applications/regedit/lang/en-US.rc
index 0d1e55b426b..e6d28237a92 100644
--- a/base/applications/regedit/lang/en-US.rc
+++ b/base/applications/regedit/lang/en-US.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/es-ES.rc
b/base/applications/regedit/lang/es-ES.rc
index 865985598c3..d774fa5304f 100644
--- a/base/applications/regedit/lang/es-ES.rc
+++ b/base/applications/regedit/lang/es-ES.rc
@@ -13,6 +13,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/fr-FR.rc
b/base/applications/regedit/lang/fr-FR.rc
index e507fc29c12..80a5ee55008 100644
--- a/base/applications/regedit/lang/fr-FR.rc
+++ b/base/applications/regedit/lang/fr-FR.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/he-IL.rc
b/base/applications/regedit/lang/he-IL.rc
index de43566c720..910954e4729 100644
--- a/base/applications/regedit/lang/he-IL.rc
+++ b/base/applications/regedit/lang/he-IL.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/hu-HU.rc
b/base/applications/regedit/lang/hu-HU.rc
index 8994d0c3df5..385cfa04023 100644
--- a/base/applications/regedit/lang/hu-HU.rc
+++ b/base/applications/regedit/lang/hu-HU.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/id-ID.rc
b/base/applications/regedit/lang/id-ID.rc
index b7a4627196a..72cd30c1912 100644
--- a/base/applications/regedit/lang/id-ID.rc
+++ b/base/applications/regedit/lang/id-ID.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/it-IT.rc
b/base/applications/regedit/lang/it-IT.rc
index 729bfcea216..041dd1390f9 100644
--- a/base/applications/regedit/lang/it-IT.rc
+++ b/base/applications/regedit/lang/it-IT.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/ja-JP.rc
b/base/applications/regedit/lang/ja-JP.rc
index 98024b3adb4..a525fffa46a 100644
--- a/base/applications/regedit/lang/ja-JP.rc
+++ b/base/applications/regedit/lang/ja-JP.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/ko-KR.rc
b/base/applications/regedit/lang/ko-KR.rc
index 6532d409f21..1d9f49aa14e 100644
--- a/base/applications/regedit/lang/ko-KR.rc
+++ b/base/applications/regedit/lang/ko-KR.rc
@@ -12,6 +12,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/nl-NL.rc
b/base/applications/regedit/lang/nl-NL.rc
index b5e7a4aef01..5063bb270e9 100644
--- a/base/applications/regedit/lang/nl-NL.rc
+++ b/base/applications/regedit/lang/nl-NL.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/no-NO.rc
b/base/applications/regedit/lang/no-NO.rc
index 66172ed2e7b..86d803983ce 100644
--- a/base/applications/regedit/lang/no-NO.rc
+++ b/base/applications/regedit/lang/no-NO.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/pl-PL.rc
b/base/applications/regedit/lang/pl-PL.rc
index 803dfb13d79..8887f936757 100644
--- a/base/applications/regedit/lang/pl-PL.rc
+++ b/base/applications/regedit/lang/pl-PL.rc
@@ -20,6 +20,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/pt-BR.rc
b/base/applications/regedit/lang/pt-BR.rc
index c30b784aecc..62aacc40cfa 100644
--- a/base/applications/regedit/lang/pt-BR.rc
+++ b/base/applications/regedit/lang/pt-BR.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/pt-PT.rc
b/base/applications/regedit/lang/pt-PT.rc
index 8b65e6cde89..5c3a28fb6dd 100644
--- a/base/applications/regedit/lang/pt-PT.rc
+++ b/base/applications/regedit/lang/pt-PT.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/ro-RO.rc
b/base/applications/regedit/lang/ro-RO.rc
index f5043f9bfab..26c80368317 100644
--- a/base/applications/regedit/lang/ro-RO.rc
+++ b/base/applications/regedit/lang/ro-RO.rc
@@ -12,6 +12,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/ru-RU.rc
b/base/applications/regedit/lang/ru-RU.rc
index 8a773e025a1..f93be6f0bc8 100644
--- a/base/applications/regedit/lang/ru-RU.rc
+++ b/base/applications/regedit/lang/ru-RU.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/sk-SK.rc
b/base/applications/regedit/lang/sk-SK.rc
index b1320dcbf5f..b9be14f8f64 100644
--- a/base/applications/regedit/lang/sk-SK.rc
+++ b/base/applications/regedit/lang/sk-SK.rc
@@ -15,6 +15,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/sl-SI.rc
b/base/applications/regedit/lang/sl-SI.rc
index 45ec925868b..bea070d2363 100644
--- a/base/applications/regedit/lang/sl-SI.rc
+++ b/base/applications/regedit/lang/sl-SI.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/sq-AL.rc
b/base/applications/regedit/lang/sq-AL.rc
index 3c4088696bf..1595547cb8c 100644
--- a/base/applications/regedit/lang/sq-AL.rc
+++ b/base/applications/regedit/lang/sq-AL.rc
@@ -14,6 +14,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/sv-SE.rc
b/base/applications/regedit/lang/sv-SE.rc
index 228879556b0..33a26b7966a 100644
--- a/base/applications/regedit/lang/sv-SE.rc
+++ b/base/applications/regedit/lang/sv-SE.rc
@@ -10,6 +10,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/th-TH.rc
b/base/applications/regedit/lang/th-TH.rc
index d343823fe6b..f46ae623359 100644
--- a/base/applications/regedit/lang/th-TH.rc
+++ b/base/applications/regedit/lang/th-TH.rc
@@ -12,6 +12,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/tr-TR.rc
b/base/applications/regedit/lang/tr-TR.rc
index d417553f5c6..d0eeb3bba27 100644
--- a/base/applications/regedit/lang/tr-TR.rc
+++ b/base/applications/regedit/lang/tr-TR.rc
@@ -12,6 +12,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/uk-UA.rc
b/base/applications/regedit/lang/uk-UA.rc
index 116a5eeb72d..d42e2b3dc33 100644
--- a/base/applications/regedit/lang/uk-UA.rc
+++ b/base/applications/regedit/lang/uk-UA.rc
@@ -12,6 +12,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/zh-CN.rc
b/base/applications/regedit/lang/zh-CN.rc
index b0aefc17c1b..56b46151044 100644
--- a/base/applications/regedit/lang/zh-CN.rc
+++ b/base/applications/regedit/lang/zh-CN.rc
@@ -20,6 +20,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/zh-HK.rc
b/base/applications/regedit/lang/zh-HK.rc
index 9b1bee49dba..cc73b0721a7 100644
--- a/base/applications/regedit/lang/zh-HK.rc
+++ b/base/applications/regedit/lang/zh-HK.rc
@@ -2,7 +2,7 @@
* PROJECT: ReactOS Registry Editor
* LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Chinese (Hong Kong) resource file
- * TRANSLATORS: Copyright 2021 Chan Chilung <eason066(a)gmail.com>
+ * TRANSLATORS: Copyright 2021 Chan Chilung <eason066(a)gmail.com>
* REFERENCES: Chinese (Traditional) resource file
*/
@@ -18,6 +18,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/lang/zh-TW.rc
b/base/applications/regedit/lang/zh-TW.rc
index 3dad8165605..2fa19df56bc 100644
--- a/base/applications/regedit/lang/zh-TW.rc
+++ b/base/applications/regedit/lang/zh-TW.rc
@@ -19,6 +19,58 @@ BEGIN
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
END
+/* Command-line strings */
+STRINGTABLE
+BEGIN
+ STRING_USAGE "Usage:\n\
+ regedit [options] [filename] [reg_key]\n\n\
+Options:\n\
+ [no option] Launch the graphical version of this program.\n\
+ /L:system.dat The location of the system.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /R:user.dat The location of the user.dat file to be modified.\n\
+ Compatible with any other switch. Ignored.\n\
+ /C Import the contents of a registry file.\n\
+ /D Delete a specified registry key.\n\
+ /E Export the contents of a specified registry key to a file.\n\
+ If no key is specified, the entire registry is exported.\n\
+ /S Silent mode. No messages will be displayed.\n\
+ /V Launch the GUI in advanced mode. Ignored.\n\
+ /? Display this information and exit.\n\
+ [filename] The location of the file containing registry information to\n\
+ be imported. When used with [/E], this option specifies the\n\
+ file location where registry information will be exported.\n\
+ [reg_key] The registry key to be modified.\n\
+n\
+Usage examples:\n\
+ regedit ""import.reg""\n\
+ regedit /E ""export.reg""
""HKEY_CURRENT_USER\\Console""\n\
+ regedit /D ""HKEY_LOCAL_MACHINE\\Error\\Path""\n"
+ STRING_INVALID_SWITCH "regedit: Invalid or unrecognized switch [%1]\n"
+ STRING_HELP "Type ""regedit /?"" for help.\n"
+ STRING_NO_FILENAME "regedit: No filename was specified.\n"
+ STRING_NO_REG_KEY "regedit: No registry key was specified for removal.\n"
+ STRING_FILE_NOT_FOUND "regedit: The file '%1' was not found.\n"
+ STRING_CANNOT_OPEN_FILE "regedit: Unable to open the file '%1'.\n"
+ STRING_UNHANDLED_ACTION "regedit: Unhandled action.\n"
+ STRING_OUT_OF_MEMORY "regedit: Out of memory! (%1!S!, line %2!u!)\n"
+ STRING_INVALID_HEX "regedit: Invalid hexadecimal value.\n"
+ STRING_CSV_HEX_ERROR "regedit: Unable to convert hexadecimal data. An invalid
value was encountered at '%1'.\n"
+ STRING_ESCAPE_SEQUENCE "regedit: Unrecognized escape sequence [\\%1!c!]\n"
+ STRING_UNKNOWN_DATA_FORMAT "regedit: Unsupported registry data type
[0x%1!x!]\n"
+ STRING_UNEXPECTED_EOL "regedit: Unexpected end of line in '%1'.\n"
+ STRING_UNRECOGNIZED_LINE "regedit: The line '%1' was not
recognized.\n"
+ STRING_SETVALUE_FAILED "regedit: Unable to add the registry value '%1'
to '%2'.\n"
+ STRING_OPEN_KEY_FAILED "regedit: Unable to open the registry key
'%1'.\n"
+ STRING_UNSUPPORTED_TYPE "regedit: Unsupported registry data type [0x%1!x!]
encountered in '%2'.\n"
+ STRING_EXPORT_AS_BINARY "regedit: The registry value '%1' will be
exported as binary data.\n"
+ STRING_INVALID_SYSTEM_KEY "regedit: Invalid system key [%1]\n"
+ STRING_REG_KEY_NOT_FOUND "regedit: Unable to export '%1'. The specified
registry key was not found.\n"
+ STRING_DELETE_FAILED "regedit: Unable to delete the registry key
'%1'.\n"
+ STRING_UNKNOWN_TYPE "Unknown Type"
+ STRING_INVALID_LINE_SYNTAX, "regedit: The line contains invalid syntax.\n"
+END
+
/* Menus */
IDC_REGEDIT MENU
diff --git a/base/applications/regedit/listview.c b/base/applications/regedit/listview.c
index d7fa0a14f7f..ce0d5408794 100644
--- a/base/applications/regedit/listview.c
+++ b/base/applications/regedit/listview.c
@@ -52,7 +52,7 @@ static INT g_iSortedColumn = 0;
static const int default_column_widths[MAX_LIST_COLUMNS] = { 35, 25, 40 }; /* in
percents */
static const int column_alignment[MAX_LIST_COLUMNS] = { LVCFMT_LEFT, LVCFMT_LEFT,
LVCFMT_LEFT };
-LPCWSTR GetValueName(HWND hwndLV, int iStartAt)
+WCHAR *GetValueName(HWND hwndLV, int iStartAt)
{
int item;
LVITEMW LVItem;
@@ -181,7 +181,7 @@ static void AddEntryToList(HWND hwndLV, LPWSTR Name, DWORD dwValType,
void* ValB
{
WCHAR buffer[255];
/* load (value not set) string */
- LoadStringW(hInst, IDS_VALUE_NOT_SET, buffer, COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_VALUE_NOT_SET, buffer, ARRAY_SIZE(buffer));
ListView_SetItemText(hwndLV, index, 2, buffer);
}
break;
@@ -213,6 +213,7 @@ static void AddEntryToList(HWND hwndLV, LPWSTR Name, DWORD dwValType,
void* ValB
}
break;
case REG_DWORD:
+ case REG_NONE:
{
WCHAR buf[200];
if(dwCount == sizeof(DWORD))
@@ -221,7 +222,7 @@ static void AddEntryToList(HWND hwndLV, LPWSTR Name, DWORD dwValType,
void* ValB
}
else
{
- LoadStringW(hInst, IDS_INVALID_DWORD, buf, COUNT_OF(buf));
+ LoadStringW(hInst, IDS_INVALID_DWORD, buf, ARRAY_SIZE(buf));
}
ListView_SetItemText(hwndLV, index, 2, buf);
}
@@ -246,7 +247,7 @@ static void AddEntryToList(HWND hwndLV, LPWSTR Name, DWORD dwValType,
void* ValB
else
{
WCHAR szText[128];
- LoadStringW(hInst, IDS_BINARY_EMPTY, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_BINARY_EMPTY, szText, ARRAY_SIZE(szText));
ListView_SetItemText(hwndLV, index, 2, szText);
}
}
@@ -271,7 +272,7 @@ static BOOL CreateListColumns(HWND hWndListView, INT cxTotal)
lvC.iSubItem = index;
lvC.cx = (cxTotal * default_column_widths[index]) / 100;
lvC.fmt = column_alignment[index];
- LoadStringW(hInst, IDS_LIST_COLUMN_FIRST + index, szText, COUNT_OF(szText));
+ LoadStringW(hInst, IDS_LIST_COLUMN_FIRST + index, szText, ARRAY_SIZE(szText));
if (ListView_InsertColumn(hWndListView, index, &lvC) == -1) return FALSE;
}
return TRUE;
@@ -319,7 +320,7 @@ static void OnGetDispInfo(NMLVDISPINFO* plvdi)
switch (plvdi->item.iSubItem)
{
case 0:
- LoadStringW(hInst, IDS_DEFAULT_VALUE_NAME, buffer, COUNT_OF(buffer));
+ LoadStringW(hInst, IDS_DEFAULT_VALUE_NAME, buffer, ARRAY_SIZE(buffer));
plvdi->item.pszText = buffer;
break;
case 1:
@@ -364,7 +365,7 @@ static void OnGetDispInfo(NMLVDISPINFO* plvdi)
default:
{
WCHAR buf2[200];
- LoadStringW(hInst, IDS_UNKNOWN_TYPE, buf2, COUNT_OF(buf2));
+ LoadStringW(hInst, IDS_UNKNOWN_TYPE, buf2, ARRAY_SIZE(buf2));
wsprintf(buffer, buf2,
((LINE_INFO*)plvdi->item.lParam)->dwValType);
plvdi->item.pszText = buffer;
break;
@@ -597,8 +598,8 @@ BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL
*Result)
{
WCHAR msg[128], caption[128];
- LoadStringW(hInst, IDS_ERR_RENVAL_TOEMPTY, msg, COUNT_OF(msg));
- LoadStringW(hInst, IDS_ERR_RENVAL_CAPTION, caption,
COUNT_OF(caption));
+ LoadStringW(hInst, IDS_ERR_RENVAL_TOEMPTY, msg, ARRAY_SIZE(msg));
+ LoadStringW(hInst, IDS_ERR_RENVAL_CAPTION, caption,
ARRAY_SIZE(caption));
MessageBoxW(0, msg, caption, 0);
*Result = TRUE;
}
diff --git a/base/applications/regedit/main.c b/base/applications/regedit/main.c
index 05f0e475f62..2d2a3fa1fdf 100644
--- a/base/applications/regedit/main.c
+++ b/base/applications/regedit/main.c
@@ -20,7 +20,12 @@
#include "regedit.h"
-BOOL ProcessCmdLine(LPWSTR lpCmdLine);
+BOOL ProcessCmdLine(WCHAR *cmdline);
+
+const WCHAR *reg_class_namesW[] = {L"HKEY_LOCAL_MACHINE",
L"HKEY_USERS",
+ L"HKEY_CLASSES_ROOT",
L"HKEY_CURRENT_CONFIG",
+ L"HKEY_CURRENT_USER",
L"HKEY_DYN_DATA"
+ };
/*******************************************************************************
* Global Variables:
@@ -190,7 +195,7 @@ BOOL TranslateChildTabMessage(PMSG msg)
return TRUE;
}
-int APIENTRY wWinMain(HINSTANCE hInstance,
+int WINAPI wWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPWSTR lpCmdLine,
int nCmdShow)
@@ -201,11 +206,11 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
UNREFERENCED_PARAMETER(hPrevInstance);
/* Initialize global strings */
- LoadStringW(hInstance, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
- LoadStringW(hInstance, IDC_REGEDIT_FRAME, szFrameClass, COUNT_OF(szFrameClass));
- LoadStringW(hInstance, IDC_REGEDIT, szChildClass, COUNT_OF(szChildClass));
+ LoadStringW(hInstance, IDS_APP_TITLE, szTitle, ARRAY_SIZE(szTitle));
+ LoadStringW(hInstance, IDC_REGEDIT_FRAME, szFrameClass, ARRAY_SIZE(szFrameClass));
+ LoadStringW(hInstance, IDC_REGEDIT, szChildClass, ARRAY_SIZE(szChildClass));
- if (ProcessCmdLine(lpCmdLine))
+ if (ProcessCmdLine(GetCommandLineW()))
{
return 0;
}
diff --git a/base/applications/regedit/main.h b/base/applications/regedit/main.h
index c9de998e3ee..7c8b864626b 100644
--- a/base/applications/regedit/main.h
+++ b/base/applications/regedit/main.h
@@ -30,7 +30,7 @@
#define SPLIT_WIDTH 5
#define SPLIT_MIN 30
-#define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
+#define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A))
#define PM_MODIFYVALUE 0
#define PM_NEW 1
@@ -38,9 +38,11 @@
#define PM_ROOTITEM 3
#define PM_HEXEDIT 4
-#define MAX_NEW_KEY_LEN 128
+#define MAX_NEW_KEY_LEN 128
+#define KEY_MAX_LEN 1024
-extern HINSTANCE hInst;
+#define REG_FORMAT_5 1
+#define REG_FORMAT_4 2
/******************************************************************************/
@@ -86,71 +88,79 @@ extern WCHAR szFrameClass[];
extern WCHAR szChildClass[];
extern const WCHAR g_szGeneralRegKey[];
+extern const WCHAR* reg_class_namesW[];
/* about.c */
-extern void ShowAboutBox(HWND hWnd);
+void ShowAboutBox(HWND hWnd);
/* childwnd.c */
-extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
-extern void ResizeWnd(int cx, int cy);
-extern LPCWSTR get_root_key_name(HKEY hRootKey);
+LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
+void ResizeWnd(int cx, int cy);
+LPCWSTR get_root_key_name(HKEY hRootKey);
VOID UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath);
+/* edit.c */
+BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin);
+BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
+LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName);
+LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR lpSrcValue);
+LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR pszBuffer,
DWORD dwBufferLen);
+BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey);
+
/* error.c */
-extern int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode, ...);
-extern int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage,
...);
+int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode, ...);
+int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage, ...);
/* find.c */
-extern void FindDialog(HWND hWnd);
-extern BOOL FindNext(HWND hWnd);
-extern void FindNextMessageBox(HWND hWnd);
+void FindDialog(HWND hWnd);
+BOOL FindNext(HWND hWnd);
+void FindNextMessageBox(HWND hWnd);
/* framewnd.c */
-extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
-extern void SetupStatusBar(HWND hWnd, BOOL bResize);
-extern void UpdateStatusBar(void);
-extern BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName);
-extern BOOL ExportRegistryFile(HWND hWnd);
+LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
+void SetupStatusBar(HWND hWnd, BOOL bResize);
+void UpdateStatusBar(void);
+BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName);
+BOOL ExportRegistryFile(HWND hWnd);
/* listview.c */
-extern HWND CreateListView(HWND hwndParent, HMENU id, INT cx);
-extern BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath);
-extern LPCWSTR GetValueName(HWND hwndLV, int iStartAt);
-extern BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
-extern BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
-extern BOOL IsDefaultValue(HWND hwndLV, int i);
+HWND CreateListView(HWND hwndParent, HMENU id, INT cx);
+BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath);
+WCHAR *GetValueName(HWND hwndLV, int iStartAt);
+BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
+BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
+BOOL IsDefaultValue(HWND hwndLV, int i);
/* regedit.c */
-LPCWSTR getAppName(void);
-
-/* treeview.c */
-extern HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id);
-extern BOOL RefreshTreeView(HWND hWndTV);
-extern BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem);
-extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
-extern LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
-extern BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
-extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
-extern HWND StartKeyRename(HWND hwndTV);
-extern BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem);
-extern BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath);
-extern void DestroyTreeView(HWND hwndTV);
-extern void DestroyListView(HWND hwndLV);
-extern void DestroyMainMenu(void);
+void WINAPIV output_message(unsigned int id, ...);
+void WINAPIV error_exit(unsigned int id, ...);
-/* edit.c */
-extern BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin);
-extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
-extern LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName);
-extern LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR
lpSrcValue);
-extern LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR
pszBuffer, DWORD dwBufferLen);
-extern BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR
lpSubKey);
+/* regproc.c */
+char *GetMultiByteString(const WCHAR *strW);
+BOOL import_registry_file(FILE *reg_file);
+void delete_registry_key(WCHAR *reg_key_name);
+BOOL export_registry_key(WCHAR *file_name, WCHAR *path, DWORD format);
/* security.c */
-extern BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR
lpKeyName);
+BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR
lpKeyName);
/* settings.c */
-extern void LoadSettings(void);
-extern void SaveSettings(void);
+void LoadSettings(void);
+void SaveSettings(void);
+
+/* treeview.c */
+HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id);
+BOOL RefreshTreeView(HWND hWndTV);
+BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem);
+BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
+LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
+BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
+HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
+HWND StartKeyRename(HWND hwndTV);
+BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem);
+BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath);
+void DestroyTreeView(HWND hwndTV);
+void DestroyListView(HWND hwndLV);
+void DestroyMainMenu(void);
/* EOF */
diff --git a/base/applications/regedit/regedit.c b/base/applications/regedit/regedit.c
index e26b0e564f0..44243c4e219 100644
--- a/base/applications/regedit/regedit.c
+++ b/base/applications/regedit/regedit.c
@@ -1,7 +1,7 @@
/*
* Windows regedit.exe registry editor implementation.
*
- * Copyright (C) 2002 Andriy Palamarchuk
+ * Copyright 2002 Andriy Palamarchuk
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -15,373 +15,242 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#ifndef __REACTOS__
+#include <stdlib.h>
+#include <windows.h>
+#include <commctrl.h>
+#include <shellapi.h>
+
+#include "wine/debug.h"
+#include "main.h"
+#else
#include "regedit.h"
+#endif
-static const LPCWSTR usage =
- L"Usage:\n"
- L" regedit filenames\n"
- L" regedit /E filename [regpath]\n"
- L" regedit /D regpath\n"
- L"\n"
- L"filenames - List of registry files names\n"
- L"filename - Registry file name\n"
- L"regpath - Name of the registry key\n"
- L"\n"
- L"When is called without any switches adds contents of the specified\n"
- L"registry files to the registry.\n"
- L"\n"
- L"Switches:\n"
- L" /E - Exports contents of the specified registry key to the
specified\n"
- L" file. Exports the whole registry if no key is specified.\n"
- L" /D - Deletes specified registry key\n"
- L" /S - Silent execution, can be used with any other switch.\n"
- L" The only existing mode, exists for compatibility with Windows
regedit.\n"
- L" /V - Advanced mode, can be used with any other switch.\n"
- L" Ignored, exists for compatibility with Windows regedit.\n"
- L" /L - Location of system.dat file. Can be used with any other
switch.\n"
- L" Ignored. Exists for compatibility with Windows regedit.\n"
- L" /R - Location of user.dat file. Can be used with any other
switch.\n"
- L" Ignored. Exists for compatibility with Windows regedit.\n"
- L" /? - Print this help. Any other switches are ignored.\n"
- L" /C - Create registry from. Not implemented.\n"
- L"\n"
- L"The switches are case-insensitive, can be prefixed either by '-' or
'/'.\n"
- L"This program is command-line compatible with Microsoft Windows\n"
- L"regedit.\n";
+WINE_DEFAULT_DEBUG_CHANNEL(regedit);
-typedef enum
+static void output_writeconsole(const WCHAR *str, DWORD wlen)
{
- ACTION_UNDEF, ACTION_ADD, ACTION_EXPORT, ACTION_DELETE
-} REGEDIT_ACTION;
+ DWORD count;
-
-LPCWSTR getAppName(void)
-{
- return L"regedit";
+ if (!WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), str, wlen, &count, NULL))
+ {
+ DWORD len;
+ char *msgA;
+
+ /* WriteConsole() fails on Windows if its output is redirected. If this occurs,
+ * we should call WriteFile() with OEM code page.
+ */
+ len = WideCharToMultiByte(GetOEMCP(), 0, str, wlen, NULL, 0, NULL, NULL);
+ msgA = malloc(len);
+ if (!msgA) return;
+
+ WideCharToMultiByte(GetOEMCP(), 0, str, wlen, msgA, len, NULL, NULL);
+ WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE);
+ free(msgA);
+ }
}
-/******************************************************************************
- * Copies file name from command line string to the buffer.
- * Rewinds the command line string pointer to the next non-space character
- * after the file name.
- * Buffer contains an empty string if no filename was found;
- *
- * params:
- * command_line - command line current position pointer
- * where *s[0] is the first symbol of the file name.
- * file_name - buffer to write the file name to.
- */
-void get_file_name(LPWSTR *command_line, LPWSTR file_name)
+static void output_formatstring(const WCHAR *fmt, va_list va_args)
{
- WCHAR *s = *command_line;
- size_t pos = 0; /* position of pointer "s" in *command_line */
- file_name[0] = 0;
-
- if (!s[0])
+ WCHAR *str;
+ DWORD len;
+
+#ifdef __REACTOS__
+ SetLastError(NO_ERROR);
+#endif
+ len = FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ALLOCATE_BUFFER,
+ fmt, 0, 0, (WCHAR *)&str, 0, &va_args);
+#ifdef __REACTOS__
+ if (len == 0 && GetLastError() != NO_ERROR)
+#else
+ if (len == 0 && GetLastError() != ERROR_NO_WORK_DONE)
+#endif
{
+ WINE_FIXME("Could not format string: le=%lu, fmt=%s\n", GetLastError(),
wine_dbgstr_w(fmt));
return;
}
+ output_writeconsole(str, len);
+ LocalFree(str);
+}
- if (s[0] == L'"')
- {
- s++;
- (*command_line)++;
- while(s[0] != L'"')
- {
- if (!s[0])
- {
- fwprintf(stderr, L"%s: Unexpected end of file name!\n",
getAppName());
- exit(1);
- }
- s++;
- pos++;
- }
- }
- else
- {
- while(s[0] && !iswspace(s[0]))
- {
- s++;
- pos++;
- }
- }
- memcpy(file_name, *command_line, pos * sizeof(WCHAR));
- /* remove the last backslash */
- if (file_name[pos - 1] == L'\\')
- {
- file_name[pos - 1] = L'\0';
- }
- else
- {
- file_name[pos] = L'\0';
- }
+void WINAPIV output_message(unsigned int id, ...)
+{
+ WCHAR fmt[1536];
+ va_list va_args;
- if (s[0])
- {
- s++;
- pos++;
- }
- while(s[0] && iswspace(s[0]))
+ if (!LoadStringW(GetModuleHandleW(NULL), id, fmt, ARRAY_SIZE(fmt)))
{
- s++;
- pos++;
+ WINE_FIXME("LoadString failed with %ld\n", GetLastError());
+ return;
}
- (*command_line) += pos;
+ va_start(va_args, id);
+ output_formatstring(fmt, va_args);
+ va_end(va_args);
}
-BOOL PerformRegAction(REGEDIT_ACTION action, LPWSTR s, BOOL silent)
+void WINAPIV error_exit(unsigned int id, ...)
{
- switch (action)
+ WCHAR fmt[1536];
+ va_list va_args;
+
+ if (!LoadStringW(GetModuleHandleW(NULL), id, fmt, ARRAY_SIZE(fmt)))
{
- case ACTION_ADD:
- {
- WCHAR szText[512];
- WCHAR filename[MAX_PATH];
- LPWSTR command_line = s;
- UINT count = 0, mbType = MB_YESNO;
- FILE *fp;
+#ifndef __REACTOS__
+ WINE_FIXME("LoadString failed with %lu\n", GetLastError());
+#endif
+ return;
+ }
+ va_start(va_args, id);
+ output_formatstring(fmt, va_args);
+ va_end(va_args);
- get_file_name(&command_line, filename);
- while (filename[0])
- {
- count++;
- get_file_name(&command_line, filename);
- }
+ exit(0); /* regedit.exe always terminates with error code zero */
+}
- if (count == 0)
- {
- InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, L"No file
name is specified.");
- InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, szTitle, usage);
- exit(4);
- }
+typedef enum {
+ ACTION_ADD, ACTION_EXPORT, ACTION_DELETE
+} REGEDIT_ACTION;
- if (count > 1)
+static void PerformRegAction(REGEDIT_ACTION action, WCHAR **argv, int *i)
+{
+ switch (action) {
+ case ACTION_ADD: {
+ WCHAR *filename = argv[*i];
+ WCHAR *realname = NULL;
+ FILE *reg_file;
+
+ if (!lstrcmpW(filename, L"-"))
+ reg_file = stdin;
+ else
{
- /* Enable three buttons if we have more than one file */
- mbType = MB_YESNOCANCEL;
- }
+ int size;
- get_file_name(&s, filename);
- while (filename[0])
- {
- /* Request import confirmation */
- if (!silent)
+ size = SearchPathW(NULL, filename, NULL, 0, NULL, NULL);
+ if (size > 0)
{
- int choice;
-
- LoadStringW(hInst, IDS_IMPORT_PROMPT, szText, COUNT_OF(szText));
-
- choice = InfoMessageBox(NULL, mbType | MB_ICONQUESTION, szTitle,
szText, filename);
-
- switch (choice)
- {
- case IDNO:
- goto cont;
- case IDCANCEL:
- /* The cancel case is useful if the user is importing more
than one registry file
- at a time, and wants to back out anytime during the import
process. This way, the
- user doesn't have to resort to ending the regedit process
abruptly just to cancel
- the operation. */
- return TRUE;
- default:
- break;
- }
+ realname = malloc(size * sizeof(WCHAR));
+ size = SearchPathW(NULL, filename, NULL, size, realname, NULL);
}
-
- /* Open the file */
- fp = _wfopen(filename, L"r");
-
- /* Import it */
- if (fp == NULL || !import_registry_file(fp))
+ if (size == 0)
{
- /* Error opening the file */
- if (!silent)
- {
- LoadStringW(hInst, IDS_IMPORT_ERROR, szText, COUNT_OF(szText));
- InfoMessageBox(NULL, MB_OK | MB_ICONERROR, szTitle, szText,
filename);
- }
+ output_message(STRING_FILE_NOT_FOUND, filename);
+ free(realname);
+ return;
}
- else
+ reg_file = _wfopen(realname, L"rb");
+ if (reg_file == NULL)
{
- /* Show successful import */
- if (!silent)
- {
- LoadStringW(hInst, IDS_IMPORT_OK, szText, COUNT_OF(szText));
- InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, szTitle, szText,
filename);
- }
+ _wperror(L"regedit");
+ output_message(STRING_CANNOT_OPEN_FILE, filename);
+ free(realname);
+ return;
}
-
- /* Close the file */
- if (fp) fclose(fp);
-
-cont:
- get_file_name(&s, filename);
}
- break;
- }
-
- case ACTION_DELETE:
- {
- WCHAR reg_key_name[KEY_MAX_LEN];
- get_file_name(&s, reg_key_name);
- if (!reg_key_name[0])
+ import_registry_file(reg_file);
+ if (realname)
{
- InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, L"No registry
key is specified for removal.");
- InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, szTitle, usage);
- exit(6);
+ free(realname);
+ fclose(reg_file);
}
- delete_registry_key(reg_key_name);
break;
}
+ case ACTION_DELETE:
+ delete_registry_key(argv[*i]);
+ break;
+ case ACTION_EXPORT: {
+ WCHAR *filename = argv[*i];
+ WCHAR *key_name = argv[++(*i)];
- case ACTION_EXPORT:
- {
- WCHAR filename[MAX_PATH];
-
- filename[0] = L'\0';
- get_file_name(&s, filename);
- if (!filename[0])
- {
- InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, L"No file
name is specified.");
- InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, szTitle, usage);
- exit(7);
- }
-
- if (s[0])
- {
- WCHAR reg_key_name[KEY_MAX_LEN];
- get_file_name(&s, reg_key_name);
- export_registry_key(filename, reg_key_name, REG_FORMAT_4);
- }
+ if (key_name && *key_name)
+ export_registry_key(filename, key_name, REG_FORMAT_5);
else
- {
- export_registry_key(filename, NULL, REG_FORMAT_4);
- }
+ export_registry_key(filename, NULL, REG_FORMAT_5);
break;
}
-
- default:
- fwprintf(stderr, L"%s: Unhandled action!\n", getAppName());
- exit(8);
- break;
+ default:
+ error_exit(STRING_UNHANDLED_ACTION);
+ break;
}
-
- return TRUE;
}
-/**
- * Process unknown switch.
- *
- * Params:
- * chu - the switch character in upper-case.
- * s - the command line string where s points to the switch character.
- */
-static void error_unknown_switch(WCHAR chu, LPWSTR s)
+BOOL ProcessCmdLine(WCHAR *cmdline)
{
- if (iswalpha(chu))
+ WCHAR **argv;
+ int argc, i;
+ REGEDIT_ACTION action = ACTION_ADD;
+
+ argv = CommandLineToArgvW(cmdline, &argc);
+
+ if (!argv)
+ return FALSE;
+
+ if (argc == 1)
{
- fwprintf(stderr, L"%s: Undefined switch /%c!\n", getAppName(), chu);
+ LocalFree(argv);
+ return FALSE;
}
- else
+
+ for (i = 1; i < argc; i++)
{
- fwprintf(stderr, L"%s: Alphabetic character is expected after '%c'
"
- L"in switch specification\n", getAppName(), *(s -
1));
- }
- exit(1);
-}
+ if (argv[i][0] != '/' && argv[i][0] != '-')
+ break; /* No flags specified. */
-BOOL ProcessCmdLine(LPWSTR lpCmdLine)
-{
- BOOL silent = FALSE;
- REGEDIT_ACTION action = ACTION_UNDEF;
- LPWSTR s = lpCmdLine; /* command line pointer */
- WCHAR ch = *s; /* current character */
+ if (!argv[i][1] && argv[i][0] == '-')
+ break; /* '-' is a filename. It indicates we should use stdin. */
- while (ch && ((ch == L'-') || (ch == L'/')))
- {
- WCHAR chu;
- WCHAR ch2;
+ if (argv[i][1] && argv[i][2] && argv[i][2] != ':')
+ break; /* This is a file path beginning with '/'. */
- s++;
- ch = *s;
- ch2 = *(s + 1);
- chu = towupper(ch);
- if (!ch2 || iswspace(ch2))
+ switch (towupper(argv[i][1]))
{
- if (chu == L'S')
- {
- /* Silence dialogs */
- silent = TRUE;
- }
- else if (chu == L'V')
- {
- /* Ignore this switch */
- }
- else
- {
- switch (chu)
- {
- case L'D':
- action = ACTION_DELETE;
- break;
- case L'E':
- action = ACTION_EXPORT;
- break;
- case L'?':
- InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, szTitle,
usage);
- exit(3);
- break;
- default:
- error_unknown_switch(chu, s);
- break;
- }
- }
- s++;
- }
- else
- {
- if (ch2 == L':')
- {
- switch (chu)
- {
- case L'L':
- /* fall through */
- case L'R':
- s += 2;
- while (*s && !iswspace(*s))
- {
- s++;
- }
- break;
- default:
- error_unknown_switch(chu, s);
- break;
- }
- }
- else
- {
- /* this is a file name, starting from '/' */
- s--;
- break;
- }
+ case '?':
+ error_exit(STRING_USAGE);
+ break;
+ case 'D':
+ action = ACTION_DELETE;
+ break;
+ case 'E':
+ action = ACTION_EXPORT;
+ break;
+ case 'C':
+ case 'L':
+ case 'M':
+ case 'R':
+ /* unhandled */;
+ break;
+ case 'S':
+ case 'V':
+ /* ignored */;
+ break;
+ default:
+ output_message(STRING_INVALID_SWITCH, argv[i]);
+ error_exit(STRING_HELP);
}
- /* skip spaces to the next parameter */
- ch = *s;
- while (ch && iswspace(ch))
+ }
+
+ if (i == argc)
+ {
+ switch (action)
{
- s++;
- ch = *s;
+ case ACTION_ADD:
+ case ACTION_EXPORT:
+ output_message(STRING_NO_FILENAME);
+ break;
+ case ACTION_DELETE:
+ output_message(STRING_NO_REG_KEY);
+ break;
}
+ error_exit(STRING_HELP);
}
- if (*s && action == ACTION_UNDEF)
- action = ACTION_ADD;
+ for (; i < argc; i++)
+ PerformRegAction(action, argv, &i);
- if (action != ACTION_UNDEF)
- return PerformRegAction(action, s, silent);
- else
- return FALSE;
+ LocalFree(argv);
+
+ return TRUE;
}
diff --git a/base/applications/regedit/regedit.h b/base/applications/regedit/regedit.h
index 929f205809a..2549aee7b73 100644
--- a/base/applications/regedit/regedit.h
+++ b/base/applications/regedit/regedit.h
@@ -8,10 +8,11 @@
#include <shlwapi.h>
#include <stdio.h>
#include <aclapi.h>
+#include <shellapi.h>
#include "main.h"
-#include "regproc.h"
#include "hexedit.h"
#include "security.h"
+#include "wine/debug.h"
#endif /* _REGEDIT_H */
diff --git a/base/applications/regedit/regproc.c b/base/applications/regedit/regproc.c
index 41ac7c6be8b..0fdbbc257f5 100644
--- a/base/applications/regedit/regproc.c
+++ b/base/applications/regedit/regproc.c
@@ -21,61 +21,39 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#ifdef __REACTOS__
+#include <fcntl.h>
+#include <io.h>
#include "regedit.h"
-
-#include <assert.h>
+#else
+#include <errno.h>
#include <fcntl.h>
#include <io.h>
-#include <wine/unicode.h>
-
-#define REG_VAL_BUF_SIZE 4096
+#include <windows.h>
+#include <commctrl.h>
-/* maximal number of characters in hexadecimal data line,
- * including the indentation, but not including the '\' character
- */
-#define REG_FILE_HEX_LINE_LEN (2 + 25 * 3)
+#include "main.h"
+#endif
-const WCHAR* reg_class_namesW[] =
-{
- L"HKEY_LOCAL_MACHINE", L"HKEY_USERS",
L"HKEY_CLASSES_ROOT",
- L"HKEY_CURRENT_CONFIG", L"HKEY_CURRENT_USER",
L"HKEY_DYN_DATA"
-};
+#define REG_VAL_BUF_SIZE 4096
static HKEY reg_class_keys[] = {
HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT,
HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_DYN_DATA
};
-#define REG_CLASS_NUMBER (sizeof(reg_class_keys) / sizeof(reg_class_keys[0]))
-
-/* return values */
-#define NOT_ENOUGH_MEMORY 1
-#define IO_ERROR 2
-
-/* processing macros */
-
-/* common check of memory allocation results */
-#define CHECK_ENOUGH_MEMORY(p) \
-if (!(p)) \
-{ \
- fprintf(stderr,"%S: file %s, line %d: Not enough memory\n", \
- getAppName(), __FILE__, __LINE__); \
- exit(NOT_ENOUGH_MEMORY); \
-}
-
/******************************************************************************
* Allocates memory and converts input from multibyte to wide chars
* Returned string must be freed by the caller
*/
-WCHAR* GetWideString(const char* strA)
+static WCHAR* GetWideString(const char* strA)
{
if(strA)
{
WCHAR* strW;
int len = MultiByteToWideChar(CP_ACP, 0, strA, -1, NULL, 0);
- strW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- CHECK_ENOUGH_MEMORY(strW);
+ strW = malloc(len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, strA, -1, strW, len);
return strW;
}
@@ -93,8 +71,7 @@ static WCHAR* GetWideStringN(const char* strA, int chars, DWORD *len)
WCHAR* strW;
*len = MultiByteToWideChar(CP_ACP, 0, strA, chars, NULL, 0);
- strW = HeapAlloc(GetProcessHeap(), 0, *len * sizeof(WCHAR));
- CHECK_ENOUGH_MEMORY(strW);
+ strW = malloc(*len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, strA, chars, strW, *len);
return strW;
}
@@ -113,8 +90,7 @@ char* GetMultiByteString(const WCHAR* strW)
char* strA;
int len = WideCharToMultiByte(CP_ACP, 0, strW, -1, NULL, 0, NULL, NULL);
- strA = HeapAlloc(GetProcessHeap(), 0, len);
- CHECK_ENOUGH_MEMORY(strA);
+ strA = malloc(len);
WideCharToMultiByte(CP_ACP, 0, strW, -1, strA, len, NULL, NULL);
return strA;
}
@@ -132,8 +108,7 @@ static char* GetMultiByteStringN(const WCHAR* strW, int chars, DWORD*
len)
char* strA;
*len = WideCharToMultiByte(CP_ACP, 0, strW, chars, NULL, 0, NULL, NULL);
- strA = HeapAlloc(GetProcessHeap(), 0, *len);
- CHECK_ENOUGH_MEMORY(strA);
+ strA = malloc(*len);
WideCharToMultiByte(CP_ACP, 0, strW, chars, strA, *len, NULL, NULL);
return strA;
}
@@ -141,124 +116,254 @@ static char* GetMultiByteStringN(const WCHAR* strW, int chars,
DWORD* len)
return NULL;
}
+static WCHAR *(*get_line)(FILE *);
+
+/* parser definitions */
+enum parser_state
+{
+ HEADER, /* parsing the registry file version header */
+ PARSE_WIN31_LINE, /* parsing a Windows 3.1 registry line */
+ LINE_START, /* at the beginning of a registry line */
+ KEY_NAME, /* parsing a key name */
+ DELETE_KEY, /* deleting a registry key */
+ DEFAULT_VALUE_NAME, /* parsing a default value name */
+ QUOTED_VALUE_NAME, /* parsing a double-quoted value name */
+ DATA_START, /* preparing for data parsing operations */
+ DELETE_VALUE, /* deleting a registry value */
+ DATA_TYPE, /* parsing the registry data type */
+ STRING_DATA, /* parsing REG_SZ data */
+ DWORD_DATA, /* parsing DWORD data */
+ HEX_DATA, /* parsing REG_BINARY, REG_NONE, REG_EXPAND_SZ or REG_MULTI_SZ
data */
+ EOL_BACKSLASH, /* preparing to parse multiple lines of hex data */
+ HEX_MULTILINE, /* parsing multiple lines of hex data */
+ UNKNOWN_DATA, /* parsing an unhandled or invalid data type */
+ SET_VALUE, /* adding a value to the registry */
+ NB_PARSER_STATES
+};
+
+struct parser
+{
+ FILE *file; /* pointer to a registry file */
+ WCHAR two_wchars[2]; /* first two characters from the encoding check
*/
+ BOOL is_unicode; /* parsing Unicode or ASCII data */
+ short int reg_version; /* registry file version */
+ HKEY hkey; /* current registry key */
+ WCHAR *key_name; /* current key name */
+ WCHAR *value_name; /* value name */
+ DWORD parse_type; /* generic data type for parsing */
+ DWORD data_type; /* data type */
+ void *data; /* value data */
+ DWORD data_size; /* size of the data (in bytes) */
+ BOOL backslash; /* TRUE if the current line contains a backslash
*/
+ enum parser_state state; /* current parser state */
+};
+
+typedef WCHAR *(*parser_state_func)(struct parser *parser, WCHAR *pos);
+
+/* parser state machine functions */
+static WCHAR *header_state(struct parser *parser, WCHAR *pos);
+static WCHAR *parse_win31_line_state(struct parser *parser, WCHAR *pos);
+static WCHAR *line_start_state(struct parser *parser, WCHAR *pos);
+static WCHAR *key_name_state(struct parser *parser, WCHAR *pos);
+static WCHAR *delete_key_state(struct parser *parser, WCHAR *pos);
+static WCHAR *default_value_name_state(struct parser *parser, WCHAR *pos);
+static WCHAR *quoted_value_name_state(struct parser *parser, WCHAR *pos);
+static WCHAR *data_start_state(struct parser *parser, WCHAR *pos);
+static WCHAR *delete_value_state(struct parser *parser, WCHAR *pos);
+static WCHAR *data_type_state(struct parser *parser, WCHAR *pos);
+static WCHAR *string_data_state(struct parser *parser, WCHAR *pos);
+static WCHAR *dword_data_state(struct parser *parser, WCHAR *pos);
+static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos);
+static WCHAR *eol_backslash_state(struct parser *parser, WCHAR *pos);
+static WCHAR *hex_multiline_state(struct parser *parser, WCHAR *pos);
+static WCHAR *unknown_data_state(struct parser *parser, WCHAR *pos);
+static WCHAR *set_value_state(struct parser *parser, WCHAR *pos);
+
+static const parser_state_func parser_funcs[NB_PARSER_STATES] =
+{
+ header_state, /* HEADER */
+ parse_win31_line_state, /* PARSE_WIN31_LINE */
+ line_start_state, /* LINE_START */
+ key_name_state, /* KEY_NAME */
+ delete_key_state, /* DELETE_KEY */
+ default_value_name_state, /* DEFAULT_VALUE_NAME */
+ quoted_value_name_state, /* QUOTED_VALUE_NAME */
+ data_start_state, /* DATA_START */
+ delete_value_state, /* DELETE_VALUE */
+ data_type_state, /* DATA_TYPE */
+ string_data_state, /* STRING_DATA */
+ dword_data_state, /* DWORD_DATA */
+ hex_data_state, /* HEX_DATA */
+ eol_backslash_state, /* EOL_BACKSLASH */
+ hex_multiline_state, /* HEX_MULTILINE */
+ unknown_data_state, /* UNKNOWN_DATA */
+ set_value_state, /* SET_VALUE */
+};
+
+/* set the new parser state and return the previous one */
+static inline enum parser_state set_state(struct parser *parser, enum parser_state
state)
+{
+ enum parser_state ret = parser->state;
+ parser->state = state;
+ return ret;
+}
+
/******************************************************************************
* Converts a hex representation of a DWORD into a DWORD.
*/
-static BOOL convertHexToDWord(WCHAR* str, DWORD *dw)
+static BOOL convert_hex_to_dword(WCHAR *str, DWORD *dw)
{
- char buf[9];
- char dummy;
+ WCHAR *p, *end;
+ int count = 0;
- WideCharToMultiByte(CP_ACP, 0, str, -1, buf, 9, NULL, NULL);
- if (lstrlenW(str) > 8 || sscanf(buf, "%lx%c", dw, &dummy) != 1) {
- fprintf(stderr,"%S: ERROR, invalid hex value\n", getAppName());
- return FALSE;
+ while (*str == ' ' || *str == '\t') str++;
+ if (!*str) goto error;
+
+ p = str;
+ while (iswxdigit(*p))
+ {
+ count++;
+ p++;
}
+ if (count > 8) goto error;
+
+ end = p;
+ while (*p == ' ' || *p == '\t') p++;
+ if (*p && *p != ';') goto error;
+
+ *end = 0;
+ *dw = wcstoul(str, &end, 16);
return TRUE;
+
+error:
+ return FALSE;
}
/******************************************************************************
- * Converts a hex comma separated values list into a binary string.
+ * Converts comma-separated hex data into a binary string and modifies
+ * the input parameter to skip the concatenating backslash, if found.
+ *
+ * Returns TRUE or FALSE to indicate whether parsing was successful.
*/
-static BYTE* convertHexCSVToHex(WCHAR *str, DWORD *size)
+static BOOL convert_hex_csv_to_hex(struct parser *parser, WCHAR **str)
{
+ size_t size;
+ BYTE *d;
WCHAR *s;
- BYTE *d, *data;
+
+ parser->backslash = FALSE;
/* The worst case is 1 digit + 1 comma per byte */
- *size=(lstrlenW(str)+1)/2;
- data=HeapAlloc(GetProcessHeap(), 0, *size);
- CHECK_ENOUGH_MEMORY(data);
-
- s = str;
- d = data;
- *size=0;
- while (*s != '\0') {
- UINT wc;
+ size = ((lstrlenW(*str) + 1) / 2) + parser->data_size;
+ parser->data = realloc(parser->data, size);
+
+ s = *str;
+ d = (BYTE *)parser->data + parser->data_size;
+
+ while (*s)
+ {
WCHAR *end;
+ unsigned long wc;
+
+ wc = wcstoul(s, &end, 16);
+ if (wc > 0xff) return FALSE;
- wc = strtoulW(s,&end,16);
- if (end == s || wc > 0xff || (*end && *end != ',')) {
- char* strA = GetMultiByteString(s);
- fprintf(stderr,"%S: ERROR converting CSV hex stream. Invalid value at
'%s'\n",
- getAppName(), strA);
- HeapFree(GetProcessHeap(), 0, data);
- HeapFree(GetProcessHeap(), 0, strA);
- return NULL;
+ if (s == end && wc == 0)
+ {
+ while (*end == ' ' || *end == '\t') end++;
+ if (*end == '\\')
+ {
+ parser->backslash = TRUE;
+ *str = end + 1;
+ return TRUE;
+ }
+ else if (*end == ';')
+ return TRUE;
+ return FALSE;
+ }
+
+ *d++ = wc;
+ parser->data_size++;
+
+ if (*end && *end != ',')
+ {
+ while (*end == ' ' || *end == '\t') end++;
+ if (*end && *end != ';') return FALSE;
+ return TRUE;
}
- *d++ =(BYTE)wc;
- (*size)++;
+
if (*end) end++;
s = end;
}
- return data;
+ return TRUE;
}
/******************************************************************************
- * This function returns the HKEY associated with the data type encoded in the
- * value. It modifies the input parameter (key value) in order to skip this
- * "now useless" data type information.
+ * Parses the data type of the registry value being imported and modifies
+ * the input parameter to skip the string representation of the data type.
*
- * Note: Updated based on the algorithm used in 'server/registry.c'
+ * Returns TRUE or FALSE to indicate whether a data type was found.
*/
-static DWORD getDataType(LPWSTR *lpValue, DWORD* parse_type)
+static BOOL parse_data_type(struct parser *parser, WCHAR **line)
{
struct data_type { const WCHAR *tag; int len; int type; int parse_type; };
- static const WCHAR quote[] = {'"'};
- static const WCHAR str[] =
{'s','t','r',':','"'};
- static const WCHAR str2[] =
{'s','t','r','(','2',')',':','"'};
- static const WCHAR hex[] = {'h','e','x',':'};
- static const WCHAR dword[] =
{'d','w','o','r','d',':'};
- static const WCHAR hexp[] = {'h','e','x','('};
-
- static const struct data_type data_types[] = { /* actual type */
/* type to assume for parsing */
- { quote, 1, REG_SZ, REG_SZ },
- { str, 5, REG_SZ, REG_SZ },
- { str2, 8, REG_EXPAND_SZ, REG_SZ },
- { hex, 4, REG_BINARY, REG_BINARY },
- { dword, 6, REG_DWORD, REG_DWORD },
- { hexp, 4, -1, REG_BINARY },
- { NULL, 0, 0, 0 }
- };
+ static const struct data_type data_types[] = {
+ /* tag len type parse type */
+ { L"\"", 1, REG_SZ, REG_SZ },
+ { L"hex:", 4, REG_BINARY, REG_BINARY },
+ { L"dword:", 6, REG_DWORD, REG_DWORD },
+ { L"hex(", 4, -1, REG_BINARY }, /* REG_NONE, REG_EXPAND_SZ,
REG_MULTI_SZ */
+ { NULL, 0, 0, 0 }
+ };
const struct data_type *ptr;
- int type;
- for (ptr = data_types; ptr->tag; ptr++) {
- if (strncmpW( ptr->tag, *lpValue, ptr->len ))
+ for (ptr = data_types; ptr->tag; ptr++)
+ {
+ if (wcsncmp(ptr->tag, *line, ptr->len))
continue;
- /* Found! */
- *parse_type = ptr->parse_type;
- type=ptr->type;
- *lpValue+=ptr->len;
- if (type == -1) {
- WCHAR* end;
+ parser->parse_type = ptr->parse_type;
+ parser->data_type = ptr->parse_type;
+ *line += ptr->len;
+
+ if (ptr->type == -1)
+ {
+ WCHAR *end;
+ DWORD val;
+
+ if (!**line || towlower((*line)[1]) == 'x')
+ return FALSE;
/* "hex(xx):" is special */
- type = (int)strtoulW( *lpValue , &end, 16 );
- if (**lpValue=='\0' || *end!=')' || *(end+1)!=':') {
- type=REG_NONE;
- } else {
- *lpValue = end + 2;
- }
+ val = wcstoul(*line, &end, 16);
+ if (*end != ')' || *(end + 1) != ':' || (val == ~0u
&& errno == ERANGE))
+ return FALSE;
+
+ parser->data_type = val;
+ *line = end + 2;
}
- return type;
+ return TRUE;
}
- *parse_type=REG_NONE;
- return REG_NONE;
+ return FALSE;
}
/******************************************************************************
- * Replaces escape sequences with the characters.
+ * Replaces escape sequences with their character equivalents and
+ * null-terminates the string on the first non-escaped double quote.
+ *
+ * Assigns a pointer to the remaining unparsed data in the line.
+ * Returns TRUE or FALSE to indicate whether a closing double quote was found.
*/
-static void REGPROC_unescape_string(WCHAR* str)
+static BOOL REGPROC_unescape_string(WCHAR *str, WCHAR **unparsed)
{
int str_idx = 0; /* current character under analysis */
int val_idx = 0; /* the last character of the unescaped string */
int len = lstrlenW(str);
+ BOOL ret;
+
for (str_idx = 0; str_idx < len; str_idx++, val_idx++) {
if (str[str_idx] == '\\') {
str_idx++;
@@ -266,1191 +371,1186 @@ static void REGPROC_unescape_string(WCHAR* str)
case 'n':
str[val_idx] = '\n';
break;
+ case 'r':
+ str[val_idx] = '\r';
+ break;
+ case '0':
+ return FALSE;
case '\\':
case '"':
str[val_idx] = str[str_idx];
break;
default:
- fprintf(stderr,"Warning! Unrecognized escape sequence:
\\%c'\n",
- str[str_idx]);
+ if (!str[str_idx]) return FALSE;
+ output_message(STRING_ESCAPE_SEQUENCE, str[str_idx]);
str[val_idx] = str[str_idx];
break;
}
+ } else if (str[str_idx] == '"') {
+ break;
} else {
str[val_idx] = str[str_idx];
}
}
+
+ ret = (str[str_idx] == '"');
+ *unparsed = str + str_idx + 1;
str[val_idx] = '\0';
+ return ret;
}
-static BOOL parseKeyName(LPWSTR lpKeyName, HKEY *hKey, LPWSTR *lpKeyPath)
+static HKEY parse_key_name(WCHAR *key_name, WCHAR **key_path)
{
- WCHAR* lpSlash = NULL;
- unsigned int i, len;
+ unsigned int i;
- if (lpKeyName == NULL)
- return FALSE;
+ if (!key_name) return 0;
- for(i = 0; *(lpKeyName+i) != 0; i++)
+ *key_path = wcschr(key_name, '\\');
+ if (*key_path) (*key_path)++;
+
+ for (i = 0; i < ARRAY_SIZE(reg_class_keys); i++)
{
- if(*(lpKeyName+i) == '\\')
+ int len = lstrlenW(reg_class_namesW[i]);
+#ifdef __REACTOS__
+ if (!_wcsnicmp(key_name, reg_class_namesW[i], len) &&
+#else
+ if (!wcsnicmp(key_name, reg_class_namesW[i], len) &&
+#endif
+ (key_name[len] == 0 || key_name[len] == '\\'))
{
- lpSlash = lpKeyName+i;
- break;
+ return reg_class_keys[i];
}
}
- if (lpSlash)
- {
- len = lpSlash-lpKeyName;
- }
- else
+ return 0;
+}
+
+static void close_key(struct parser *parser)
+{
+ if (parser->hkey)
{
- len = lstrlenW(lpKeyName);
- lpSlash = lpKeyName+len;
- }
- *hKey = NULL;
+ free(parser->key_name);
+ parser->key_name = NULL;
- for (i = 0; i < REG_CLASS_NUMBER; i++) {
- if (CompareStringW(LOCALE_USER_DEFAULT, 0, lpKeyName, len, reg_class_namesW[i],
len) == CSTR_EQUAL &&
- len == lstrlenW(reg_class_namesW[i])) {
- *hKey = reg_class_keys[i];
- break;
- }
+ RegCloseKey(parser->hkey);
+ parser->hkey = NULL;
}
-
- if (*hKey == NULL)
- return FALSE;
-
-
- if (*lpSlash != '\0')
- lpSlash++;
- *lpKeyPath = lpSlash;
- return TRUE;
}
-/* Globals used by the setValue() & co */
-static LPSTR currentKeyName;
-static HKEY currentKeyHandle = NULL;
-
/******************************************************************************
- * Sets the value with name val_name to the data in val_data for the currently
- * opened key.
- *
- * Parameters:
- * val_name - name of the registry value
- * val_data - registry value data
+ * Opens the registry key given by the input path.
+ * This key must be closed by calling close_key().
*/
-static LONG setValue(WCHAR* val_name, WCHAR* val_data, BOOL is_unicode)
+static LONG open_key(struct parser *parser, WCHAR *path)
{
+ HKEY key_class;
+ WCHAR *key_path;
LONG res;
- DWORD dwDataType, dwParseType;
- LPBYTE lpbData;
- DWORD dwData, dwLen;
- WCHAR del[] = {'-',0};
- if ( (val_name == NULL) || (val_data == NULL) )
+ close_key(parser);
+
+ /* Get the registry class */
+ if (!path || !(key_class = parse_key_name(path, &key_path)))
return ERROR_INVALID_PARAMETER;
- if (lstrcmpW(val_data, del) == 0)
+ res = RegCreateKeyExW(key_class, key_path, 0, NULL, REG_OPTION_NON_VOLATILE,
+ KEY_ALL_ACCESS, NULL, &parser->hkey, NULL);
+
+ if (res == ERROR_SUCCESS)
{
- res=RegDeleteValueW(currentKeyHandle,val_name);
- return (res == ERROR_FILE_NOT_FOUND ? ERROR_SUCCESS : res);
+ parser->key_name = malloc((lstrlenW(path) + 1) * sizeof(WCHAR));
+ lstrcpyW(parser->key_name, path);
}
+ else
+ parser->hkey = NULL;
+
+ return res;
+}
- /* Get the data type stored into the value field */
- dwDataType = getDataType(&val_data, &dwParseType);
+static void free_parser_data(struct parser *parser)
+{
+ if (parser->parse_type == REG_DWORD || parser->parse_type == REG_BINARY)
+ free(parser->data);
+
+ parser->data = NULL;
+ parser->data_size = 0;
+}
- if (dwParseType == REG_SZ) /* no conversion for string */
+static void prepare_hex_string_data(struct parser *parser)
+{
+ if (parser->data_type == REG_EXPAND_SZ || parser->data_type == REG_MULTI_SZ ||
+ parser->data_type == REG_SZ)
{
- REGPROC_unescape_string(val_data);
- /* Compute dwLen after REGPROC_unescape_string because it may
- * have changed the string length and we don't want to store
- * the extra garbage in the registry.
- */
- dwLen = lstrlenW(val_data);
- if(val_data[dwLen-1] != '"')
- return ERROR_INVALID_DATA;
- if (dwLen>0 && val_data[dwLen-1]=='"')
+ if (parser->is_unicode)
{
- dwLen--;
- val_data[dwLen]='\0';
+ WCHAR *data = parser->data;
+ DWORD len = parser->data_size / sizeof(WCHAR);
+
+ if (data[len - 1] != 0)
+ {
+ data[len] = 0;
+ parser->data_size += sizeof(WCHAR);
+ }
+ }
+ else
+ {
+ BYTE *data = parser->data;
+
+ if (data[parser->data_size - 1] != 0)
+ {
+ data[parser->data_size] = 0;
+ parser->data_size++;
+ }
+
+ parser->data = GetWideStringN(parser->data, parser->data_size,
&parser->data_size);
+ parser->data_size *= sizeof(WCHAR);
+ free(data);
}
- lpbData = (BYTE*) val_data;
- dwLen++; /* include terminating null */
- dwLen = dwLen * sizeof(WCHAR); /* size is in bytes */
}
- else if (dwParseType == REG_DWORD) /* Convert the dword types */
+}
+
+enum reg_versions {
+ REG_VERSION_31,
+ REG_VERSION_40,
+ REG_VERSION_50,
+ REG_VERSION_FUZZY,
+ REG_VERSION_INVALID
+};
+
+static enum reg_versions parse_file_header(const WCHAR *s)
+{
+ static const WCHAR header_31[] = L"REGEDIT";
+
+ while (*s == ' ' || *s == '\t') s++;
+
+ if (!lstrcmpW(s, header_31))
+ return REG_VERSION_31;
+
+ if (!lstrcmpW(s, L"REGEDIT4"))
+ return REG_VERSION_40;
+
+ if (!lstrcmpW(s, L"Windows Registry Editor Version 5.00"))
+ return REG_VERSION_50;
+
+ /* The Windows version accepts registry file headers beginning with
"REGEDIT" and ending
+ * with other characters, as long as "REGEDIT" appears at the start of the
line. For example,
+ * "REGEDIT 4", "REGEDIT9" and "REGEDIT4FOO" are all
treated as valid file headers.
+ * In all such cases, however, the contents of the registry file are not imported.
+ */
+ if (!wcsncmp(s, header_31, 7)) /* "REGEDIT" without NUL */
+ return REG_VERSION_FUZZY;
+
+ return REG_VERSION_INVALID;
+}
+
+/* handler for parser HEADER state */
+static WCHAR *header_state(struct parser *parser, WCHAR *pos)
+{
+ WCHAR *line, *header;
+
+ if (!(line = get_line(parser->file)))
+ return NULL;
+
+ if (!parser->is_unicode)
{
- if (!convertHexToDWord(val_data, &dwData))
- return ERROR_INVALID_DATA;
- lpbData = (BYTE*)&dwData;
- dwLen = sizeof(dwData);
+ header = malloc((lstrlenW(line) + 3) * sizeof(WCHAR));
+ header[0] = parser->two_wchars[0];
+ header[1] = parser->two_wchars[1];
+ lstrcpyW(header + 2, line);
+ parser->reg_version = parse_file_header(header);
+ free(header);
}
- else if (dwParseType == REG_BINARY) /* Convert the binary data */
- {
- lpbData = convertHexCSVToHex(val_data, &dwLen);
- if (!lpbData)
- return ERROR_INVALID_DATA;
+ else parser->reg_version = parse_file_header(line);
- if((dwDataType == REG_MULTI_SZ || dwDataType == REG_EXPAND_SZ) &&
!is_unicode)
- {
- LPBYTE tmp = lpbData;
- lpbData = (LPBYTE)GetWideStringN((char*)lpbData, dwLen, &dwLen);
- dwLen *= sizeof(WCHAR);
- HeapFree(GetProcessHeap(), 0, tmp);
- }
- }
- else /* unknown format */
+ switch (parser->reg_version)
{
- fprintf(stderr,"%S: ERROR, unknown data format\n", getAppName());
- return ERROR_INVALID_DATA;
+ case REG_VERSION_31:
+ set_state(parser, PARSE_WIN31_LINE);
+ break;
+ case REG_VERSION_40:
+ case REG_VERSION_50:
+ set_state(parser, LINE_START);
+ break;
+ default:
+ get_line(NULL); /* Reset static variables */
+ return NULL;
}
- res = RegSetValueExW(
- currentKeyHandle,
- val_name,
- 0, /* Reserved */
- dwDataType,
- lpbData,
- dwLen);
- if (dwParseType == REG_BINARY)
- HeapFree(GetProcessHeap(), 0, lpbData);
- return res;
+ return line;
}
-/******************************************************************************
- * A helper function for processRegEntry() that opens the current key.
- * That key must be closed by calling closeKey().
- */
-static LONG openKeyW(WCHAR* stdInput)
+/* handler for parser PARSE_WIN31_LINE state */
+static WCHAR *parse_win31_line_state(struct parser *parser, WCHAR *pos)
{
- HKEY keyClass;
- WCHAR* keyPath;
- DWORD dwDisp;
- LONG res;
+ WCHAR *line, *value;
+ static WCHAR hkcr[] = L"HKEY_CLASSES_ROOT";
+ unsigned int key_end = 0;
- /* Sanity checks */
- if (stdInput == NULL)
- return ERROR_INVALID_PARAMETER;
+ if (!(line = get_line(parser->file)))
+ return NULL;
- /* Get the registry class */
- if (!parseKeyName(stdInput, &keyClass, &keyPath))
- return ERROR_INVALID_PARAMETER;
+ if (wcsncmp(line, hkcr, lstrlenW(hkcr)))
+ return line;
- res = RegCreateKeyExW(
- keyClass, /* Class */
- keyPath, /* Sub Key */
- 0, /* MUST BE 0 */
- NULL, /* object type */
- REG_OPTION_NON_VOLATILE, /* option, REG_OPTION_NON_VOLATILE ... */
- KEY_ALL_ACCESS, /* access mask, KEY_ALL_ACCESS */
- NULL, /* security attribute */
- ¤tKeyHandle, /* result */
- &dwDisp); /* disposition, REG_CREATED_NEW_KEY or
- REG_OPENED_EXISTING_KEY */
+ /* get key name */
+ while (line[key_end] && !iswspace(line[key_end])) key_end++;
- if (res == ERROR_SUCCESS)
- currentKeyName = GetMultiByteString(stdInput);
- else
- currentKeyHandle = NULL;
+ value = line + key_end;
+ while (*value == ' ' || *value == '\t') value++;
- return res;
+ if (*value == '=') value++;
+ if (*value == ' ') value++; /* at most one space is skipped */
+
+ line[key_end] = 0;
+
+ if (open_key(parser, line) != ERROR_SUCCESS)
+ {
+ output_message(STRING_OPEN_KEY_FAILED, line);
+ return line;
+ }
+ parser->value_name = NULL;
+ parser->data_type = REG_SZ;
+ parser->data = value;
+ parser->data_size = (lstrlenW(value) + 1) * sizeof(WCHAR);
+
+ set_state(parser, SET_VALUE);
+ return value;
}
-/******************************************************************************
- * Close the currently opened key.
- */
-static void closeKey(void)
+/* handler for parser LINE_START state */
+static WCHAR *line_start_state(struct parser *parser, WCHAR *pos)
{
- if (currentKeyHandle)
+ WCHAR *line, *p;
+
+ if (!(line = get_line(parser->file)))
+ return NULL;
+
+ for (p = line; *p; p++)
{
- HeapFree(GetProcessHeap(), 0, currentKeyName);
- RegCloseKey(currentKeyHandle);
- currentKeyHandle = NULL;
+ switch (*p)
+ {
+ case '[':
+ set_state(parser, KEY_NAME);
+ return p + 1;
+ case '@':
+ set_state(parser, DEFAULT_VALUE_NAME);
+ return p;
+ case '"':
+ set_state(parser, QUOTED_VALUE_NAME);
+ return p + 1;
+ case ' ':
+ case '\t':
+ break;
+ default:
+ return p;
+ }
}
+
+ return p;
}
-/******************************************************************************
- * This function is a wrapper for the setValue function. It prepares the
- * land and cleans the area once completed.
- * Note: this function modifies the line parameter.
- *
- * line - registry file unwrapped line. Should have the registry value name and
- * complete registry value data.
- */
-static void processSetValue(WCHAR* line, BOOL is_unicode)
+/* handler for parser KEY_NAME state */
+static WCHAR *key_name_state(struct parser *parser, WCHAR *pos)
{
- WCHAR* val_name; /* registry value name */
- WCHAR* val_data; /* registry value data */
- int line_idx = 0; /* current character under analysis */
- LONG res;
+ WCHAR *p = pos, *key_end;
- /* get value name */
- while ( isspaceW(line[line_idx]) ) line_idx++;
- if (line[line_idx] == '@' && line[line_idx + 1] == '=') {
- line[line_idx] = '\0';
- val_name = line;
- line_idx++;
- } else if (line[line_idx] == '\"') {
- line_idx++;
- val_name = line + line_idx;
- while (line[line_idx]) {
- if (line[line_idx] == '\\') /* skip escaped character */
- {
- line_idx += 2;
- } else {
- if (line[line_idx] == '\"') {
- line[line_idx] = '\0';
- line_idx++;
- break;
- } else {
- line_idx++;
- }
- }
- }
- while ( isspaceW(line[line_idx]) ) line_idx++;
- if (!line[line_idx]) {
- fprintf(stderr, "%S: warning: unexpected EOL\n", getAppName());
- return;
- }
- if (line[line_idx] != '=') {
- char* lineA;
- line[line_idx] = '\"';
- lineA = GetMultiByteString(line);
- fprintf(stderr,"%S: warning: unrecognized line: '%s'\n",
getAppName(), lineA);
- HeapFree(GetProcessHeap(), 0, lineA);
- return;
- }
+ if (*p == ' ' || *p == '\t' || !(key_end = wcsrchr(p, ']')))
+ goto done;
- } else {
- char* lineA = GetMultiByteString(line);
- fprintf(stderr,"%S: warning: unrecognized line: '%s'\n",
getAppName(), lineA);
- HeapFree(GetProcessHeap(), 0, lineA);
- return;
- }
- line_idx++; /* skip the '=' character */
-
- while ( isspaceW(line[line_idx]) ) line_idx++;
- val_data = line + line_idx;
- /* trim trailing blanks */
- line_idx = strlenW(val_data);
- while (line_idx > 0 && isspaceW(val_data[line_idx-1])) line_idx--;
- val_data[line_idx] = '\0';
-
- REGPROC_unescape_string(val_name);
- res = setValue(val_name, val_data, is_unicode);
- if ( res != ERROR_SUCCESS )
+ *key_end = 0;
+
+ if (*p == '-')
{
- char* val_nameA = GetMultiByteString(val_name);
- char* val_dataA = GetMultiByteString(val_data);
- fprintf(stderr,"%S: ERROR Key %s not created. Value: %s, Data: %s\n",
- getAppName(),
- currentKeyName,
- val_nameA,
- val_dataA);
- HeapFree(GetProcessHeap(), 0, val_nameA);
- HeapFree(GetProcessHeap(), 0, val_dataA);
+ set_state(parser, DELETE_KEY);
+ return p + 1;
}
+ else if (open_key(parser, p) != ERROR_SUCCESS)
+ output_message(STRING_OPEN_KEY_FAILED, p);
+
+done:
+ set_state(parser, LINE_START);
+ return p;
}
-/******************************************************************************
- * This function receives the currently read entry and performs the
- * corresponding action.
- * isUnicode affects parsing of REG_MULTI_SZ values
- */
-static void processRegEntry(WCHAR* stdInput, BOOL isUnicode)
+/* handler for parser DELETE_KEY state */
+static WCHAR *delete_key_state(struct parser *parser, WCHAR *pos)
{
- /*
- * We encountered the end of the file, make sure we
- * close the opened key and exit
- */
- if (stdInput == NULL) {
- closeKey();
- return;
- }
+ WCHAR *p = pos;
- if ( stdInput[0] == '[') /* We are reading a new key */
- {
- WCHAR* keyEnd;
- closeKey(); /* Close the previous key */
+ close_key(parser);
- /* Get rid of the square brackets */
- stdInput++;
- keyEnd = strrchrW(stdInput, ']');
- if (keyEnd)
- *keyEnd='\0';
+ if (*p == 'H' || *p == 'h')
+ delete_registry_key(p);
- /* delete the key if we encounter '-' at the start of reg key */
- if ( stdInput[0] == '-')
- {
- delete_registry_key(stdInput + 1);
- } else if ( openKeyW(stdInput) != ERROR_SUCCESS )
- {
- char* stdInputA = GetMultiByteString(stdInput);
- fprintf(stderr,"%S: setValue failed to open key %s\n",
- getAppName(), stdInputA);
- HeapFree(GetProcessHeap(), 0, stdInputA);
- }
- } else if( currentKeyHandle &&
- (( stdInput[0] == '@') || /* reading a default @=data pair */
- ( stdInput[0] == '\"'))) /* reading a new value=data pair
*/
+ set_state(parser, LINE_START);
+ return p;
+}
+
+/* handler for parser DEFAULT_VALUE_NAME state */
+static WCHAR *default_value_name_state(struct parser *parser, WCHAR *pos)
+{
+ free(parser->value_name);
+ parser->value_name = NULL;
+
+ set_state(parser, DATA_START);
+ return pos + 1;
+}
+
+/* handler for parser QUOTED_VALUE_NAME state */
+static WCHAR *quoted_value_name_state(struct parser *parser, WCHAR *pos)
+{
+ WCHAR *val_name = pos, *p;
+
+ free(parser->value_name);
+ parser->value_name = NULL;
+
+ if (!REGPROC_unescape_string(val_name, &p))
+ goto invalid;
+
+ /* copy the value name in case we need to parse multiple lines and the buffer is
overwritten */
+ parser->value_name = malloc((lstrlenW(val_name) + 1) * sizeof(WCHAR));
+ lstrcpyW(parser->value_name, val_name);
+
+ set_state(parser, DATA_START);
+ return p;
+
+invalid:
+ set_state(parser, LINE_START);
+ return val_name;
+}
+
+/* handler for parser DATA_START state */
+static WCHAR *data_start_state(struct parser *parser, WCHAR *pos)
+{
+ WCHAR *p = pos;
+ unsigned int len;
+
+ while (*p == ' ' || *p == '\t') p++;
+ if (*p != '=') goto done;
+ p++;
+ while (*p == ' ' || *p == '\t') p++;
+
+ /* trim trailing whitespace */
+ len = lstrlenW(p);
+ while (len > 0 && (p[len - 1] == ' ' || p[len - 1] ==
'\t')) len--;
+ p[len] = 0;
+
+ if (*p == '-')
+ set_state(parser, DELETE_VALUE);
+ else
+ set_state(parser, DATA_TYPE);
+ return p;
+
+done:
+ set_state(parser, LINE_START);
+ return p;
+}
+
+/* handler for parser DELETE_VALUE state */
+static WCHAR *delete_value_state(struct parser *parser, WCHAR *pos)
+{
+ WCHAR *p = pos + 1;
+
+ while (*p == ' ' || *p == '\t') p++;
+ if (*p && *p != ';') goto done;
+
+ RegDeleteValueW(parser->hkey, parser->value_name);
+
+done:
+ set_state(parser, LINE_START);
+ return p;
+}
+
+/* handler for parser DATA_TYPE state */
+static WCHAR *data_type_state(struct parser *parser, WCHAR *pos)
+{
+ WCHAR *line = pos;
+
+ if (!parse_data_type(parser, &line))
{
- processSetValue(stdInput, isUnicode);
- } else
+ set_state(parser, LINE_START);
+ return line;
+ }
+
+ switch (parser->parse_type)
{
- /* Since we are assuming that the file format is valid we must be
- * reading a blank line which indicates the end of this key processing
- */
- closeKey();
+ case REG_SZ:
+ set_state(parser, STRING_DATA);
+ break;
+ case REG_DWORD:
+ set_state(parser, DWORD_DATA);
+ break;
+ case REG_BINARY: /* all hex data types, including undefined */
+ set_state(parser, HEX_DATA);
+ break;
+ default:
+ set_state(parser, UNKNOWN_DATA);
}
+
+ return line;
}
-/******************************************************************************
- * Processes a registry file.
- * Correctly processes comments (in # and ; form), line continuation.
- *
- * Parameters:
- * in - input stream to read from
- * first_chars - beginning of stream, read due to Unicode check
- */
-static void processRegLinesA(FILE *in, char* first_chars)
+/* handler for parser STRING_DATA state */
+static WCHAR *string_data_state(struct parser *parser, WCHAR *pos)
{
- LPSTR line = NULL; /* line read from input stream */
- ULONG lineSize = REG_VAL_BUF_SIZE;
+ WCHAR *line;
- line = HeapAlloc(GetProcessHeap(), 0, lineSize);
- CHECK_ENOUGH_MEMORY(line);
- memcpy(line, first_chars, 2);
+ parser->data = pos;
- while (!feof(in)) {
- LPSTR s; /* The pointer into line for where the current fgets should read */
- WCHAR* lineW;
- s = line;
+ if (!REGPROC_unescape_string(parser->data, &line))
+ goto invalid;
- if(first_chars)
- {
- s += 2;
- first_chars = NULL;
- }
+ while (*line == ' ' || *line == '\t') line++;
+ if (*line && *line != ';') goto invalid;
- for (;;) {
- size_t size_remaining;
- int size_to_get, i;
- char *s_eol; /* various local uses */
+ parser->data_size = (lstrlenW(parser->data) + 1) * sizeof(WCHAR);
- /* Do we need to expand the buffer ? */
- assert (s >= line && s <= line + lineSize);
- size_remaining = lineSize - (s-line);
- if (size_remaining < 2) /* room for 1 character and the \0 */
- {
- char *new_buffer;
- size_t new_size = lineSize + REG_VAL_BUF_SIZE;
- if (new_size > lineSize) /* no arithmetic overflow */
- new_buffer = HeapReAlloc (GetProcessHeap(), 0, line, new_size);
- else
- new_buffer = NULL;
- CHECK_ENOUGH_MEMORY(new_buffer);
- line = new_buffer;
- s = line + lineSize - size_remaining;
- lineSize = new_size;
- size_remaining = lineSize - (s-line);
- }
+ set_state(parser, SET_VALUE);
+ return line;
- /* Get as much as possible into the buffer, terminated either by
- * eof, error, eol or getting the maximum amount. Abort on error.
- */
- size_to_get = (size_remaining > INT_MAX ? INT_MAX : size_remaining);
-
- /* get a single line. note that `i' must be one past the last
- * meaningful character in `s' when this loop exits */
- for(i = 0; i < size_to_get-1; ++i){
- int xchar;
-
- xchar = fgetc(in);
- s[i] = xchar;
- if(xchar == EOF){
- if(ferror(in)){
- perror("While reading input");
- exit(IO_ERROR);
- }else
- assert(feof(in));
- break;
- }
- if(s[i] == '\r'){
- /* read the next character iff it's \n */
- if(i+2 >= size_to_get){
- /* buffer too short, so put back the EOL char to
- * read next cycle */
- ungetc('\r', in);
- break;
- }
- s[i+1] = fgetc(in);
- if(s[i+1] != '\n'){
- ungetc(s[i+1], in);
- i = i+1;
- }else
- i = i+2;
- break;
- }
- if(s[i] == '\n'){
- i = i+1;
- break;
- }
- }
- s[i] = '\0';
+invalid:
+ free_parser_data(parser);
+ set_state(parser, LINE_START);
+ return line;
+}
- /* If we didn't read the eol nor the eof go around for the rest */
- s_eol = strpbrk (s, "\r\n");
- if (!feof (in) && !s_eol) {
- s = strchr (s, '\0');
- continue;
- }
+/* handler for parser DWORD_DATA state */
+static WCHAR *dword_data_state(struct parser *parser, WCHAR *pos)
+{
+ WCHAR *line = pos;
- /* If it is a comment line then discard it and go around again */
- if (line [0] == '#' || line [0] == ';') {
- s = line;
- continue;
- }
+ parser->data = malloc(sizeof(DWORD));
- /* Remove any line feed. Leave s_eol on the first \0 */
- if (s_eol) {
- if (*s_eol == '\r' && *(s_eol+1) == '\n')
- *(s_eol+1) = '\0';
- *s_eol = '\0';
- } else
- s_eol = strchr (s, '\0');
-
- /* If there is a concatenating \\ then go around again */
- if (s_eol > line && *(s_eol-1) == '\\') {
- int c;
- s = s_eol-1;
-
- do
- {
- c = fgetc(in);
- } while(c == ' ' || c == '\t');
-
- if(c == EOF)
- {
- fprintf(stderr,"%S: ERROR - invalid continuation.\n",
- getAppName());
- }
- else
- {
- *s = c;
- s++;
- }
- continue;
- }
+ if (!convert_hex_to_dword(line, parser->data))
+ goto invalid;
- lineW = GetWideString(line);
+ parser->data_size = sizeof(DWORD);
- break; /* That is the full virtual line */
- }
+ set_state(parser, SET_VALUE);
+ return line;
- processRegEntry(lineW, FALSE);
- HeapFree(GetProcessHeap(), 0, lineW);
+invalid:
+ free_parser_data(parser);
+ set_state(parser, LINE_START);
+ return line;
+}
+
+/* handler for parser HEX_DATA state */
+static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
+{
+ WCHAR *line = pos;
+
+ if (!*line)
+ goto set_value;
+
+ if (!convert_hex_csv_to_hex(parser, &line))
+ goto invalid;
+
+ if (parser->backslash)
+ {
+ set_state(parser, EOL_BACKSLASH);
+ return line;
}
- processRegEntry(NULL, FALSE);
- HeapFree(GetProcessHeap(), 0, line);
+ prepare_hex_string_data(parser);
+
+set_value:
+ set_state(parser, SET_VALUE);
+ return line;
+
+invalid:
+ free_parser_data(parser);
+ set_state(parser, LINE_START);
+ return line;
}
-static void processRegLinesW(FILE *in)
+/* handler for parser EOL_BACKSLASH state */
+static WCHAR *eol_backslash_state(struct parser *parser, WCHAR *pos)
{
- WCHAR* buf = NULL; /* line read from input stream */
- ULONG lineSize = REG_VAL_BUF_SIZE;
- size_t CharsInBuf = -1;
+ WCHAR *p = pos;
- WCHAR* s; /* The pointer into buf for where the current fgets should read */
- WCHAR* line; /* The start of the current line */
+ while (*p == ' ' || *p == '\t') p++;
+ if (*p && *p != ';') goto invalid;
- buf = HeapAlloc(GetProcessHeap(), 0, lineSize * sizeof(WCHAR));
- CHECK_ENOUGH_MEMORY(buf);
+ set_state(parser, HEX_MULTILINE);
+ return pos;
- s = buf;
- line = buf;
+invalid:
+ free_parser_data(parser);
+ set_state(parser, LINE_START);
+ return p;
+}
- while(!feof(in)) {
- size_t size_remaining;
- int size_to_get;
- WCHAR *s_eol = NULL; /* various local uses */
+/* handler for parser HEX_MULTILINE state */
+static WCHAR *hex_multiline_state(struct parser *parser, WCHAR *pos)
+{
+ WCHAR *line;
- /* Do we need to expand the buffer ? */
- assert (s >= buf && s <= buf + lineSize);
- size_remaining = lineSize - (s-buf);
- if (size_remaining < 2) /* room for 1 character and the \0 */
- {
- WCHAR *new_buffer;
- size_t new_size = lineSize + (REG_VAL_BUF_SIZE / sizeof(WCHAR));
- if (new_size > lineSize) /* no arithmetic overflow */
- new_buffer = HeapReAlloc (GetProcessHeap(), 0, buf, new_size *
sizeof(WCHAR));
- else
- new_buffer = NULL;
- CHECK_ENOUGH_MEMORY(new_buffer);
- buf = new_buffer;
- line = buf;
- s = buf + lineSize - size_remaining;
- lineSize = new_size;
- size_remaining = lineSize - (s-buf);
- }
+ if (!(line = get_line(parser->file)))
+ {
+ prepare_hex_string_data(parser);
+ set_state(parser, SET_VALUE);
+ return pos;
+ }
- /* Get as much as possible into the buffer, terminated either by
- * eof, error or getting the maximum amount. Abort on error.
- */
- size_to_get = (size_remaining > INT_MAX ? INT_MAX : size_remaining);
-
- CharsInBuf = fread(s, sizeof(WCHAR), size_to_get - 1, in);
- s[CharsInBuf] = 0;
-
- if (CharsInBuf == 0) {
- if (ferror(in)) {
- perror ("While reading input");
- exit (IO_ERROR);
- } else {
- assert (feof(in));
- *s = '\0';
- /* It is not clear to me from the definition that the
- * contents of the buffer are well defined on detecting
- * an eof without managing to read anything.
- */
- }
- }
+ while (*line == ' ' || *line == '\t') line++;
+ if (!*line || *line == ';') return line;
- /* If we didn't read the eol nor the eof go around for the rest */
- while(1)
- {
- const WCHAR line_endings[] = {'\r','\n',0};
- s_eol = strpbrkW(line, line_endings);
-
- if(!s_eol) {
- /* Move the stub of the line to the start of the buffer so
- * we get the maximum space to read into, and so we don't
- * have to recalculate 'line' if the buffer expands */
- MoveMemory(buf, line, (strlenW(line)+1) * sizeof(WCHAR));
- line = buf;
- s = strchrW(line, '\0');
- break;
- }
+ if (!iswxdigit(*line)) goto invalid;
- /* If it is a comment line then discard it and go around again */
- if (*line == '#' || *line == ';') {
- if (*s_eol == '\r' && *(s_eol+1) == '\n')
- line = s_eol + 2;
- else
- line = s_eol + 1;
- continue;
- }
+ set_state(parser, HEX_DATA);
+ return line;
- /* If there is a concatenating \\ then go around again */
- if (*(s_eol-1) == '\\') {
- WCHAR* NextLine = s_eol + 1;
+invalid:
+ free_parser_data(parser);
+ set_state(parser, LINE_START);
+ return line;
+}
- if(*s_eol == '\r' && *(s_eol+1) == '\n')
- NextLine++;
+/* handler for parser UNKNOWN_DATA state */
+static WCHAR *unknown_data_state(struct parser *parser, WCHAR *pos)
+{
+ output_message(STRING_UNKNOWN_DATA_FORMAT, parser->data_type);
- while(isspaceW(*NextLine))
- NextLine++;
+ set_state(parser, LINE_START);
+ return pos;
+}
- if (!*NextLine)
- {
- s = NextLine;
- break;
- }
+/* handler for parser SET_VALUE state */
+static WCHAR *set_value_state(struct parser *parser, WCHAR *pos)
+{
+ RegSetValueExW(parser->hkey, parser->value_name, 0, parser->data_type,
+ parser->data, parser->data_size);
- MoveMemory(s_eol - 1, NextLine, (CharsInBuf - (NextLine - s) +
1)*sizeof(WCHAR));
- CharsInBuf -= NextLine - s_eol + 1;
- s_eol = 0;
- continue;
- }
+ free_parser_data(parser);
- /* Remove any line feed. Leave s_eol on the last \0 */
- if (*s_eol == '\r' && *(s_eol + 1) == '\n')
- *s_eol++ = '\0';
- *s_eol = '\0';
+ if (parser->reg_version == REG_VERSION_31)
+ set_state(parser, PARSE_WIN31_LINE);
+ else
+ set_state(parser, LINE_START);
- processRegEntry(line, TRUE);
- line = s_eol + 1;
- s_eol = 0;
- continue; /* That is the full virtual line */
- }
+ return pos;
+}
+
+static WCHAR *get_lineA(FILE *fp)
+{
+ static WCHAR *lineW;
+ static size_t size;
+ static char *buf, *next;
+ char *line;
+
+ free(lineW);
+
+ if (!fp) goto cleanup;
+
+ if (!size)
+ {
+ size = REG_VAL_BUF_SIZE;
+ buf = malloc(size);
+ *buf = 0;
+ next = buf;
}
+ line = next;
- processRegEntry(NULL, TRUE);
+ while (next)
+ {
+ char *p = strpbrk(line, "\r\n");
+ if (!p)
... 2072 lines suppressed ...