From 523a61da855d0aff094553f65e263467dcab92f2 Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Wed, 29 Mar 2017 05:25:31 +0000 Subject: [PATCH] regedit: Remove data types that cannot be imported and clean-up data_types array. Signed-off-by: Hugh McMaster Signed-off-by: Alexandre Julliard --- programs/regedit/regproc.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 066fb2d58e7..a54a96ff6e0 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -205,21 +205,18 @@ static DWORD getDataType(LPWSTR *lpValue, DWORD* parse_type) 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 */ + { quote, 1, REG_SZ, REG_SZ }, + { hex, 4, REG_BINARY, REG_BINARY }, + { dword, 6, REG_DWORD, REG_DWORD }, + { hexp, 4, -1, REG_BINARY }, /* REG_NONE, REG_EXPAND_SZ, REG_MULTI_SZ */ + { NULL, 0, 0, 0 } + }; const struct data_type *ptr; int type;