Commit 0d2d994e authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

regedit: Remove cruft and make functions static, reordering where necessary to…

regedit: Remove cruft and make functions static, reordering where necessary to avoid forward declarations. Remove the command parameter of processRegLines() as it can only be used with processRegEntry().
parent de2fc93b
......@@ -154,7 +154,6 @@ static void AddEntryToList(HWND hwndLV, LPTSTR Name, DWORD dwValType,
index = ListView_InsertItem(hwndLV, &item);
if (index != -1) {
/* LPTSTR pszText = NULL; */
switch (dwValType) {
case REG_SZ:
case REG_EXPAND_SZ:
......@@ -169,7 +168,6 @@ static void AddEntryToList(HWND hwndLV, LPTSTR Name, DWORD dwValType,
wsprintf(buf, _T("0x%08X (%d)"), *(DWORD*)ValBuf, *(DWORD*)ValBuf);
ListView_SetItemText(hwndLV, index, 2, buf);
}
/* lpsRes = convertHexToDWORDStr(lpbData, dwLen); */
break;
case REG_BINARY: {
unsigned int i;
......@@ -188,7 +186,6 @@ static void AddEntryToList(HWND hwndLV, LPTSTR Name, DWORD dwValType,
break;
default:
{
/* lpsRes = convertHexToHexCSV(lpbData, dwLen); */
TCHAR szText[128];
LoadString(hInst, IDS_REGISTRY_VALUE_CANT_DISPLAY, szText, COUNT_OF(szText));
ListView_SetItemText(hwndLV, index, 2, szText);
......
......@@ -158,7 +158,7 @@ static BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
fprintf(stderr,"%s: Can't open file \"%s\"\n", getAppName(), filename);
exit(1);
}
processRegLines(reg_file, doSetValue);
processRegLines(reg_file);
if (realname)
{
HeapFree(GetProcessHeap(),0,realname);
......
......@@ -17,49 +17,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/******************************************************************************
* Defines and consts
*/
#define KEY_MAX_LEN 1024
/* Return values */
#define SUCCESS 0
#define KEY_VALUE_ALREADY_SET 2
typedef void (*CommandAPI)(LPSTR lpsLine);
void doSetValue(LPSTR lpsLine);
void doDeleteValue(LPSTR lpsLine);
void doCreateKey(LPSTR lpsLine);
void doDeleteKey(LPSTR lpsLine);
void doRegisterDLL(LPSTR lpsLine);
void doUnregisterDLL(LPSTR lpsLine);
const CHAR *getAppName(void);
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);
const CHAR *getAppName(void);
void processRegLines(FILE *in, CommandAPI command);
/*
* Generic prototypes
*/
char* getToken(char** str, const char* delims);
DWORD convertHexToDWord(char *str, BYTE *buf);
DWORD convertHexCSVToHex(char *str, BYTE *buf, ULONG bufLen);
LPSTR convertHexToHexCSV( BYTE *buf, ULONG len);
LPSTR convertHexToDWORDStr( BYTE *buf, ULONG len);
LPSTR getRegKeyName(LPSTR lpLine);
HKEY getRegClass(LPSTR lpLine);
DWORD getDataType(LPSTR *lpValue, DWORD* parse_type);
LPSTR getArg(LPSTR arg);
HRESULT openKey(LPSTR stdInput);
void closeKey(void);
/*
* api setValue prototypes
*/
void processSetValue(LPSTR cmdline);
HRESULT setValue(LPSTR val_name, LPSTR val_data);
void processRegLines(FILE *in);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment