Commit Graph

183 Commits

Author SHA1 Message Date
Hugh McMaster 66dcf0a87d regedit: Update some resource strings associated with key parsing.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-12 19:51:54 +02:00
Hugh McMaster ae147a5bf6 regedit: Output an error message and exit with error code zero instead of calling exit(1).
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-12 19:51:53 +02:00
Hugh McMaster 7f11a24fee regedit: Null-terminate REG_EXPAND_SZ and REG_MULTI_SZ hex data during concatenation if we reach EOF.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 20:51:11 +02:00
Michael Stefaniuc a9987fa11a regedit: Remove a redundant NULL check before HeapFree().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-07 19:48:32 +02:00
Hugh McMaster e2ae9e3c58 regedit: Use a function to free the parser data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-07 19:48:32 +02:00
Hugh McMaster 3908296237 regedit: Null-terminate REG_EXPAND_SZ and REG_MULTI_SZ data if the parsed hex data does not end in a null-terminating character.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:48 +02:00
Hugh McMaster 7b95ddcb04 regedit: Hex data lines may be terminated by a semicolon.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:48 +02:00
Hugh McMaster b811b16694 regedit: Do not import the line if a hex data type has a "0x" prefix.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-05 18:21:37 +02:00
Hugh McMaster 1a4c3e5d28 regedit: Check if any hex data exists before attempting to parse it.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-05 18:21:18 +02:00
Hugh McMaster 5cc1b227b7 regedit: Do not remove lines beginning with a semicolon from the read buffer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-05 18:21:10 +02:00
Hugh McMaster 5d8a1283f2 regedit: Do not remove lines beginning with '#' from the read buffer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-04 19:49:57 +02:00
Hugh McMaster e336c86359 regedit: Skip blank and whitespace-only lines during hex data concatenation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-04 19:49:49 +02:00
Hugh McMaster 6ffa89ebd3 regedit: Skip lines that do not begin with a hexadecimal character during hex data concatenation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-04 19:49:42 +02:00
Hugh McMaster 50caf838b6 regedit: Simplify a while loop for skipping whitespace.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-04 19:49:32 +02:00
Hugh McMaster 032d32f940 regedit: Improve the parsing of multiline hex data during the registry import operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-03 15:57:44 +02:00
Hugh McMaster c750c2a98d regedit: Remove un-necessary parser state assignment if we are returning to the same state.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-03 15:57:44 +02:00
Hugh McMaster 758340a6e1 regedit: Free the buffer and reset data information on error and after setting the value.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-26 18:19:09 +02:00
Hugh McMaster 8803b9616b regedit: Fail when parsing any hex data type that is greater than ULONG_MAX on Windows.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-21 19:15:12 +02:00
Hugh McMaster e3234f6ede regedit: Use a generic data type to correctly process all data types.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-20 18:43:30 +02:00
Hugh McMaster 1f08ee2453 regedit: Allow the deletion of registry keys beginning with a lowercase 'H'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-16 15:25:38 +02:00
Hugh McMaster f535341d2b regedit: Use a case insensitive comparison when parsing registry classes from registry file versions 4 and 5.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-16 15:25:37 +02:00
Hugh McMaster 8504a1563d regedit: Free the memory used by the REG_DWORD and hex data types after saving the registry value.
We use a BOOL to handle all hex types, including those that are undefined (e.g.0x100).

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-16 15:25:37 +02:00
Hugh McMaster a1924ae2da regedit: Export hex data types without warning about unsupported data types.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-16 15:25:37 +02:00
Hugh McMaster 300df08e70 regedit: Remove an unused #define.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-16 15:22:07 +02:00
Hugh McMaster 191b81dbd3 regedit: Add data parsing operations to the state machine.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-15 21:54:38 +02:00
Hugh McMaster d60c31eadb regedit: Perform value name operations in the state machine.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-15 18:51:08 +02:00
Hugh McMaster ca98e23451 regedit: Perform key operations in the state machine.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-15 18:51:08 +02:00
Hugh McMaster ec87800856 regedit: Introduce a partial state machine for importing registry data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-15 18:51:08 +02:00
Hugh McMaster afde1624ca regedit: Do not use REG_NONE as the default data type if strtoulW() fails.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-08 16:44:58 +02:00
Hugh McMaster 5669282e1d regedit: Do not create registry keys that end without a closing bracket.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-08 16:44:58 +02:00
Hugh McMaster 27b2519ca4 regedit: Re-implement favourite registry key handling.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-05 11:12:32 +02:00
Nikolay Sivov 02b178e791 regedit: Fix a crash when exporting from top level key.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 16:17:48 +02:00
Hugh McMaster 82246874d2 regedit: Merge processRegLinesA/W() into their caller.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-05 14:12:18 +02:00
Hugh McMaster e8f0a8b38b regedit: Merge header checks from processRegLinesA/W() to their caller.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-05 14:12:18 +02:00
Hugh McMaster 8753a1b271 regedit: Use a function pointer to read each registry line instead of calling get_lineA/W() directly.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-03 22:58:02 +02:00
Hugh McMaster 76b9e6c712 regedit: Return a Unicode line from get_lineA().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-03 22:58:02 +02:00
Hugh McMaster 6b596ecf9e regedit: Simplify clean-up in get_lineA/W().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-03 22:58:02 +02:00
Hugh McMaster 2392743146 regedit: Re-implement processSetValue().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-25 20:53:07 +02:00
Hugh McMaster 9aff5c88ad regedit: Validate REG_SZ import data before processing it any further.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-25 20:53:07 +02:00
Hugh McMaster 0481f31d4c regedit: Simplify parseKeyName.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-25 20:53:07 +02:00
Hugh McMaster 0a71d4fa72 regedit: Re-implement convertHexToDWord().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 15:55:24 +02:00
Hugh McMaster aacae19602 regedit: Skip any leading spaces and tabs that may be present in the line being parsed.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-03 14:09:49 +02:00
Hugh McMaster 9ea9874abf regedit: Remove unused #define.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-31 14:03:56 +02:00
Hugh McMaster 9ad4152e6d regedit: Make "Unknown Type" translatable.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-30 22:06:33 +02:00
Hugh McMaster 6d89696121 regedit: Do not use REG_NONE as the default data type on import error.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-29 08:47:20 +02:00
Hugh McMaster 523a61da85 regedit: Remove data types that cannot be imported and clean-up data_types array.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-29 08:47:18 +02:00
Hugh McMaster 0a7ff8aff7 regedit: Accept various forms of "REGEDIT" with trailing characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-22 16:28:50 +01:00
Hugh McMaster 5052a759b3 regedit: Return success or failure from import functions.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-22 16:28:10 +01:00
Hugh McMaster f56d919ffe regedit: Re-implement processRegLinesA().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-22 16:25:01 +01:00
Hugh McMaster e1e79d12b3 regedit: Parse UTF-16 file header for validation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-22 16:23:49 +01:00