From de2fc93b6bf624831a2896fc161e8dca93bffea8 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 14 Jun 2007 11:36:54 +0200 Subject: [PATCH] regedit: Remove setAppName() as the application name is hardcoded anyway. --- programs/regedit/regedit.c | 6 +++++- programs/regedit/regproc.c | 16 ---------------- programs/regedit/regproc.h | 1 - 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/programs/regedit/regedit.c b/programs/regedit/regedit.c index 0c587d6bf8c..41ef20498f0 100644 --- a/programs/regedit/regedit.c +++ b/programs/regedit/regedit.c @@ -59,6 +59,11 @@ typedef enum { } REGEDIT_ACTION; +const CHAR *getAppName(void) +{ + return "regedit"; +} + /****************************************************************************** * Copies file name from command line string to the buffer. * Rewinds the command line string pointer to the next non-space character @@ -229,7 +234,6 @@ BOOL ProcessCmdLine(LPSTR lpCmdLine) LPSTR s = lpCmdLine; /* command line pointer */ CHAR ch = *s; /* current character */ - setAppName("regedit"); while (ch && ((ch == '-') || (ch == '/'))) { char chu; char ch2; diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 27181944b5e..c796d0badcb 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -40,8 +40,6 @@ static HKEY currentKeyClass = 0; static HKEY currentKeyHandle = 0; static BOOL bTheKeyIsOpen = FALSE; -static const CHAR *app_name = "UNKNOWN"; - static const CHAR *reg_class_names[] = { "HKEY_LOCAL_MACHINE", "HKEY_USERS", "HKEY_CLASSES_ROOT", "HKEY_CURRENT_CONFIG", "HKEY_CURRENT_USER", "HKEY_DYN_DATA" @@ -1229,17 +1227,3 @@ void delete_registry_key(CHAR *reg_key_name) } HeapFree(GetProcessHeap(), 0, branch_name); } - -/****************************************************************************** - * Sets the application name. Then application name is used in the error - * reporting. - */ -void setAppName(const CHAR *name) -{ - app_name = name; -} - -const CHAR *getAppName(void) -{ - return app_name; -} diff --git a/programs/regedit/regproc.h b/programs/regedit/regproc.h index 0b23c6aff73..b462546a328 100644 --- a/programs/regedit/regproc.h +++ b/programs/regedit/regproc.h @@ -39,7 +39,6 @@ BOOL export_registry_key(CHAR *file_name, CHAR *reg_key_name); BOOL import_registry_file(LPTSTR filename); void delete_registry_key(CHAR *reg_key_name); -void setAppName(const CHAR *name); const CHAR *getAppName(void); void processRegLines(FILE *in, CommandAPI command);