regedit: Remove setAppName() as the application name is hardcoded anyway.

This commit is contained in:
Francois Gouget 2007-06-14 11:36:54 +02:00 committed by Alexandre Julliard
parent 021c4dba17
commit de2fc93b6b
3 changed files with 5 additions and 18 deletions

View File

@ -59,6 +59,11 @@ typedef enum {
} REGEDIT_ACTION; } REGEDIT_ACTION;
const CHAR *getAppName(void)
{
return "regedit";
}
/****************************************************************************** /******************************************************************************
* Copies file name from command line string to the buffer. * Copies file name from command line string to the buffer.
* Rewinds the command line string pointer to the next non-space character * 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 */ LPSTR s = lpCmdLine; /* command line pointer */
CHAR ch = *s; /* current character */ CHAR ch = *s; /* current character */
setAppName("regedit");
while (ch && ((ch == '-') || (ch == '/'))) { while (ch && ((ch == '-') || (ch == '/'))) {
char chu; char chu;
char ch2; char ch2;

View File

@ -40,8 +40,6 @@ static HKEY currentKeyClass = 0;
static HKEY currentKeyHandle = 0; static HKEY currentKeyHandle = 0;
static BOOL bTheKeyIsOpen = FALSE; static BOOL bTheKeyIsOpen = FALSE;
static const CHAR *app_name = "UNKNOWN";
static const CHAR *reg_class_names[] = { static const CHAR *reg_class_names[] = {
"HKEY_LOCAL_MACHINE", "HKEY_USERS", "HKEY_CLASSES_ROOT", "HKEY_LOCAL_MACHINE", "HKEY_USERS", "HKEY_CLASSES_ROOT",
"HKEY_CURRENT_CONFIG", "HKEY_CURRENT_USER", "HKEY_DYN_DATA" "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); 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;
}

View File

@ -39,7 +39,6 @@ BOOL export_registry_key(CHAR *file_name, CHAR *reg_key_name);
BOOL import_registry_file(LPTSTR filename); BOOL import_registry_file(LPTSTR filename);
void delete_registry_key(CHAR *reg_key_name); void delete_registry_key(CHAR *reg_key_name);
void setAppName(const CHAR *name);
const CHAR *getAppName(void); const CHAR *getAppName(void);
void processRegLines(FILE *in, CommandAPI command); void processRegLines(FILE *in, CommandAPI command);