Alexander Nicolaysen Sørnes : regedit: Remove some unused code.

Alexandre Julliard julliard at winehq.org
Wed Sep 3 07:43:42 CDT 2008


Module: wine
Branch: master
Commit: 7bb5df75d376ee4cd68511018f160702e40c8dd4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7bb5df75d376ee4cd68511018f160702e40c8dd4

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Tue Sep  2 18:43:57 2008 +0200

regedit: Remove some unused code.

---

 programs/regedit/childwnd.c |   17 ++---------------
 programs/regedit/main.h     |    1 -
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c
index 11a8d2a..18323c0 100644
--- a/programs/regedit/childwnd.c
+++ b/programs/regedit/childwnd.c
@@ -21,11 +21,9 @@
 #define WIN32_LEAN_AND_MEAN     /* Exclude rarely-used stuff from Windows headers */
 #include <windows.h>
 #include <commctrl.h>
-#include <tchar.h>
 #include <stdio.h>
 
 #include "main.h"
-#include "regproc.h"
 
 #include "wine/debug.h"
 #include "wine/unicode.h"
@@ -39,18 +37,7 @@ static int last_split;
  * Local module support methods
  */
 
-LPCTSTR GetRootKeyName(HKEY hRootKey)
-{
-    if (hRootKey == HKEY_CLASSES_ROOT) return _T("HKEY_CLASSES_ROOT");
-    if (hRootKey == HKEY_CURRENT_USER) return _T("HKEY_CURRENT_USER");
-    if (hRootKey == HKEY_LOCAL_MACHINE) return _T("HKEY_LOCAL_MACHINE");
-    if (hRootKey == HKEY_USERS) return _T("HKEY_USERS");
-    if (hRootKey == HKEY_CURRENT_CONFIG) return _T("HKEY_CURRENT_CONFIG");
-    if (hRootKey == HKEY_DYN_DATA) return _T("HKEY_DYN_DATA");
-    return _T("UNKNOWN HKEY, PLEASE REPORT");
-}
-
-LPCWSTR GetRootKeyNameW(HKEY hRootKey)
+LPCWSTR GetRootKeyName(HKEY hRootKey)
 {
     if(hRootKey == HKEY_CLASSES_ROOT)
         return reg_class_namesW[INDEX_HKEY_CLASSES_ROOT];
@@ -142,7 +129,7 @@ static LPWSTR GetPathRoot(HWND hwndTV, HTREEITEM hItem, BOOL bFull) {
     if (!bFull && !hRootKey)
         return NULL;
     if (hRootKey)
-        parts[1] = GetRootKeyNameW(hRootKey);
+        parts[1] = GetRootKeyName(hRootKey);
     if (bFull) {
         DWORD dwSize = sizeof(text)/sizeof(WCHAR);
         GetComputerNameW(text, &dwSize);
diff --git a/programs/regedit/main.h b/programs/regedit/main.h
index 3c40515..ab51256 100644
--- a/programs/regedit/main.h
+++ b/programs/regedit/main.h
@@ -107,7 +107,6 @@ extern const WCHAR* reg_class_namesW[];
 extern void ShowAboutBox(HWND hWnd);
 
 /* childwnd.c */
-extern LPCTSTR GetRootKeyName(HKEY hRootKey);
 extern LPWSTR GetItemFullPath(HWND hwndTV, HTREEITEM hItem, BOOL bFull);
 extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
 




More information about the wine-cvs mailing list