Hugh McMaster
493b5aab22
regedit: Hard-code "regedit" instead of passing getAppName() as an argument.
...
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-23 22:51:31 +09:00
Jiaxing Wang
ebacf05258
regedit: Need 3 bytes of room at end of buffer for \r\n\0 to avoid endless loop.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-26 23:58:28 +09:00
Jiaxing Wang
a53371497f
regedit: Avoid appending '\0' to string value of imported key.
2015-05-20 18:32:47 +09:00
Sebastian Lackner
fb37d215cd
regedit: Fix incorrect usage of CompareString in parseKeyName.
2014-11-19 23:36:35 +09:00
Bruno Jesus
84d7239640
regedit: Allow importing/exporting strings with '\r'.
2014-10-30 12:00:38 +09:00
Bruno Jesus
c35bca6561
regedit: Allow importing strings with escaped NULL.
2014-10-29 20:31:10 +09:00
Bruno Jesus
01b0746906
regedit: Append exported strings using the correct size.
2014-10-28 14:54:12 +09:00
Bruno Jesus
0d3807dbc5
regedit: Fix qword entries export.
2012-05-17 10:18:54 +02:00
Bruno Jesus
1fba4a6886
regedit: Allows semicolon comments.
2012-04-27 12:01:48 +02:00
Ilya Basin
f900ed1474
regedit: Fix buffer size when exporting binary values.
2012-04-12 20:38:52 +02:00
Alexandre Julliard
65dfc51b2e
regedit: Don't use tchar.h.
2012-01-23 16:07:34 +01:00
Francois Gouget
5920de5ffb
Assorted spelling and case fixes.
2011-05-09 12:09:27 +02:00
Andrew Nguyen
3e19c4ca3b
regedit: Explicitly use ANSI functions in regedit helper functions.
2011-04-18 11:50:32 +02:00
Akihiro Sagawa
3c6de3b348
regedit: Export a decent newline in Unicode format.
2011-03-07 15:06:04 +01:00
Marcus Meissner
62f270e269
regedit: fgetc() gets int, not char (Coverity).
2011-02-23 18:22:35 +01:00
Andrew Nguyen
6c8f8a64b0
regedit: Remove an unused string array.
...
Spotted by Austin English with LLVM/Clang.
2011-01-21 13:40:46 +01:00
Andrew Eikum
06f4532cf6
regedit: Don't call ungetc() twice consecutively.
...
Spotted by Sylvain Hitier.
2010-08-23 15:41:53 +02:00
Andrew Eikum
dcfdfbaa54
regedit: Improve importing of REG_SZ with invalid quoting.
2010-08-16 17:28:42 +02:00
Andrew Eikum
8851a4eb1f
regedit: Process reg files which use \r line endings.
2010-08-02 13:58:19 +02:00
Andrew Eikum
4a6ed21094
regedit: Escape the value name portion during export.
2010-06-08 16:35:22 +02:00
Alexander Nicolaysen Sørnes
dcade85261
regedit: Fix reading from stdin.
2009-06-17 12:04:03 +02:00
Jim Cameron
5bd7e306b4
regedit: Fix crash importing large values from Unicode.
2009-03-09 14:21:26 +01:00
Francois Gouget
5898a5c767
regedit: Make some functions static.
2009-01-26 15:13:21 +01:00
Erich Hoover
51a04d5b65
regedit: Fix import mangling REG_EXPAND_SZ values.
2009-01-19 13:36:26 +01:00
Michael Stefaniuc
683c53db42
regedit: Remove some superfluous casts.
2008-12-04 12:08:27 +01:00
Francois Gouget
dfb823bb6f
regedit: Deal with races in 'regedit /E' by resizing the buffers and retrying.
2008-12-01 12:57:39 +01:00
Michael Stefaniuc
c75a143f3d
regedit: Remove NULL check before HeapFree (Smatch).
2008-11-25 11:55:59 +01:00
Francois Gouget
c880ccea1a
regedit: Fix handling of zero-byte binary values for 'regedit /E'.
2008-11-24 13:43:47 +01:00
Francois Gouget
be19acfbe8
regedit: Avoid wsprintfW() so we can avoid loading user32.dll for 'regedit /E'.
2008-11-21 10:00:47 +01:00
Francois Gouget
a81bb704df
regedit: Fix exporting of REG_EXPAND_SZ and other 'weird' strings.
...
REG_EXPAND_SZ must be exported as hexadecimal to preserve the string type.
0-byte strings and those missing a trailing '\0' or with odd sizes must
be saved as hexadecimal too so they are restored as is.
Move the binary-value export code to the new REGPROC_export_binary()
function.
2008-11-21 10:00:41 +01:00
Francois Gouget
3ef0b0ef2d
regedit: Pass the string length to REGPROC_export_string().
...
We already know it in the caller so this saves us one lstrlenW() call.
2008-11-21 10:00:17 +01:00
Francois Gouget
d92c976803
regedit: Fix a buffer allocation in export_registry_key().
...
This fixes a major buffer overflow bug in 'regedit /E'.
2008-11-21 10:00:13 +01:00
Francois Gouget
3b140ccb0e
Assorted spelling fixes.
2008-11-17 16:04:39 +01:00
Francois Gouget
e1901500ee
regedit: Fix the wrapping of binary values in export_hkey().
...
Don't wait until the line overflows before wrapping it.
Don't wrap the last line.
2008-11-12 13:12:35 +01:00
Francois Gouget
f0f91a69b3
regedit: Fix a buffer overflow when exporting binary values in export_hkey().
...
We must take the indentation into account to compute the number of lines a binary value will use.
2008-11-12 13:12:31 +01:00
Francois Gouget
7df7222594
regedit: Simplify / clean up export_hkey().
...
Avoid unneeded/redundant calls to lstrcatW() and lstrlenW().
Tighten the scope of variables.
2008-11-12 13:12:23 +01:00
Francois Gouget
126ffb1f8a
regedit: Tighten a buffer size calculation.
2008-11-12 13:12:12 +01:00
Francois Gouget
d1d3db4183
regedit: Simplify REGPROC_export_string().
2008-11-12 13:12:09 +01:00
Francois Gouget
7f707b3037
regedit: The xxx_name_len variables track buffer sizes. That is they count the trailing '\0'. Adjust a couple of places that got this wrong and rename them to xxx_name_size.
2008-11-12 13:11:59 +01:00
Francois Gouget
5940ada80b
regedit: line_size is supposed to track a string length.
...
That is it does not count the trailing '\0'.
Fix a few places that got this wrong and rename it to line_len.
2008-11-12 13:11:41 +01:00
Francois Gouget
f982e731c5
regedit: Check that we were able to allocate line_buf too.
2008-11-12 13:11:30 +01:00
Francois Gouget
71af3e1582
regedit: Remove unneeded variable initializations.
2008-11-12 13:11:23 +01:00
Andrey Turkin
ae097646ab
regedit: Ignore spaces in regedit files.
2008-09-30 11:33:14 -05:00
Alexandre Julliard
700b5c6d7f
regedit: Fix file exports in ASCII format.
2008-09-22 15:34:41 +02:00
Alexander Nicolaysen Sørnes
4f332e610e
regedit: Fix some fprintf arguments.
2008-09-22 12:20:07 +02:00
Alexander Nicolaysen Sørnes
1e0a77622b
regedit: Fix char escaping for registry export.
2008-09-22 12:19:54 +02:00
Alexander Nicolaysen Sørnes
c4d58a4b07
regedit: Add support for exporting unicode files.
2008-09-16 13:35:31 +02:00
Alexander Nicolaysen Sørnes
60cd910797
regedit: Gather a full string before exporting it.
2008-09-16 13:35:27 +02:00
Alexander Nicolaysen Sørnes
484421560b
regedit: Fix importing REG_MULTI_SZ values for ANSI files.
2008-09-10 11:08:30 +02:00
Alexander Nicolaysen Sørnes
32f890939f
regedit: Convert parts of export handling to unicode.
2008-09-09 11:46:14 +02:00
Alexander Nicolaysen Sørnes
92e9b1edcf
regedit: Fix a memory leak in export handling.
2008-09-04 11:51:29 +02:00
Alexander Nicolaysen Sørnes
7aa56d249a
regedit: Don't try to convert NULL pointers.
2008-09-02 12:52:03 +02:00
Alexander Nicolaysen Sørnes
f7ff9e76f9
regedit: Avoid conversion to ANSI when importing hex values.
2008-08-28 11:24:50 +02:00
Alexander Nicolaysen Sørnes
b058648ae3
regedit: Fix concat handling for ANSI files.
2008-08-28 11:24:50 +02:00
Alexander Nicolaysen Sørnes
6168a7c60c
regedit: Convert clipboard handling to unicode.
2008-08-20 12:20:37 +02:00
Francois Gouget
22ff8c9b29
regedit: Remove a couple of left-over debug statements.
2008-07-21 12:59:55 +02:00
Alexander Nicolaysen Sørnes
4ef4777630
regedit: Fix concat handling in unicode import.
2008-07-14 12:25:49 +02:00
Alexander Nicolaysen Sørnes
2a9713a6cb
regedit: Null-terminate buffer in Unicode file import.
2008-07-11 14:07:07 +02:00
Alexander Nicolaysen Sørnes
e4b1abefdd
regedit: Fix comment handling in Unicode file import.
2008-07-11 14:06:57 +02:00
Alexander Nicolaysen Sørnes
e83d8dad04
regedit: Use strchrW instead of custom code in Unicode file import.
2008-07-11 14:06:49 +02:00
Alexander Nicolaysen Sørnes
6f2e3e1b1e
regedit: Add support for importing Unicode files.
2008-07-10 18:09:15 +02:00
Alexander Nicolaysen Sørnes
9d60849037
regedit: Convert remaining registry import code to Unicode.
2008-07-10 18:01:33 +02:00
Alexander Nicolaysen Sørnes
db074ee9a3
regedit: Convert openKey to Unicode.
2008-07-10 17:58:56 +02:00
Alexander Nicolaysen Sørnes
2e7b8cbc42
regedit: Convert the rest of setValue to Unicode.
2008-07-10 17:54:21 +02:00
Alexandre Julliard
f7f249e59b
regedit: Fixed the GetWideString and GetMultiByteString functions to work with null-terminated strings.
2008-07-10 17:49:36 +02:00
Alexander Nicolaysen Sørnes
c23da6c35f
regedit: Use RegSetValueExW when importing data.
2008-07-10 13:33:53 +02:00
Alexander Nicolaysen Sørnes
f4c3e0f464
regedit: Use unicode for all key deletion.
2008-07-10 13:32:54 +02:00
Alexander Nicolaysen Sørnes
eafa99ea55
regedit: Convert import delete handling to unicode.
2008-07-08 21:26:21 +02:00
Alexandre Julliard
e568580447
regedit: Fix editing and exporting of zero-size strings.
2008-05-13 20:27:11 +02:00
Aric Stewart
58801f0d73
regedit: Check for unicode file without using fseek.
2008-03-17 15:11:25 +01:00
Alexandre Julliard
b9e578528f
regedit: Include the terminating null in string lengths.
2008-03-03 12:07:16 +01:00
Eric Pouech
a6d85fe801
regedit: Warn about newest unicode export from native regedit.
2008-01-23 11:31:43 +01:00
Alexandre Julliard
98c133312f
regedit: Fixed parsing of hex sequences.
2008-01-07 21:17:10 +01:00
Francois Gouget
5f7a9cea38
Assorted spelling fixes.
2007-12-07 16:35:32 +01:00
Stefan Leichter
b0180f7b1d
regedit: Replace call to delete_branch with RegDeleteTreeA.
2007-10-10 12:16:33 +02:00
Francois Gouget
ea5d653f3e
regedit: Add support for 'regedit /E -', to export the registry to stdout.
2007-10-10 11:18:56 +02:00
Jason Edmeades
34749c2a07
regedit: Fix importing of .reg hex.
2007-08-13 12:09:46 +02:00
Francois Gouget
afa9d0a60d
regedit: Merge getRegClass() and getRegKeyName() to form parseKeyName().
...
Keep track of the full registry path (including the root key) in
currentKeyName. This makes the error messages more informative.
Reduce the number of global variables used by openKey() & co. Only
use one variable, currentKeyHandle, to indicate whether a key is
currently open or not.
2007-06-18 12:14:19 +02:00
Francois Gouget
f6d5738d9a
regedit: Don't allow square-bracketed registry paths on the command line (to match native).
...
The only place they are allowed is in .reg files, so exclusively deal with them in processRegEntry().
Fix detection of the trailing ']' in processRegEntry(): it can be followed by some garbage.
2007-06-18 12:13:55 +02:00
Francois Gouget
8585fb3112
regedit: Add missing '\n' to an error message.
2007-06-18 12:13:45 +02:00
Francois Gouget
8e362cb65a
regedit: Modify getRegClass() to avoid dubious comparisons and casts between HKEYs and error codes.
2007-06-14 14:01:14 +02:00
Francois Gouget
0dac54b3a7
regedit: Having garbage after the dash in '"foo"=-' is not valid.
...
Don't complain if the value already does not exist.
2007-06-14 14:01:02 +02:00
Francois Gouget
bde3cf9b5f
regedit: The registry functions return standard error codes, not HRESULTs.
2007-06-14 14:00:48 +02:00
Francois Gouget
804ec04472
regedit: Make the dword and binary data parsing both more flexible and stricter.
...
Make sure it does not modify the value if the data is invalid.
2007-06-14 14:00:31 +02:00
Francois Gouget
90d7707235
regedit: If the data for a given value is in an unknown format, then print an error and don't modify the value.
...
Note that '"foo"=' is not valid.
2007-06-14 13:59:21 +02:00
Francois Gouget
0d2d994ecc
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().
2007-06-14 13:59:15 +02:00
Francois Gouget
de2fc93b6b
regedit: Remove setAppName() as the application name is hardcoded anyway.
2007-06-14 13:56:43 +02:00
Francois Gouget
b668c52802
regedit: Move PerformRegAction() and get_file_name() around to eliminate forward references. Make them static.
2007-06-14 12:11:13 +02:00
Lei Zhang
4de636208f
regedit: Correctly parse key name containing ']' when deleting/exporting.
2007-03-02 11:47:50 +01:00
Lei Zhang
054fd8cb42
regedit: Allow entering - for a key in a .reg file to delete that key.
2007-03-02 11:47:44 +01:00
Lei Zhang
1a54a89b8b
regedit: Removed dead code from regproc.c.
2007-03-02 11:47:36 +01:00
Lei Zhang
d113419682
regedit: Correctly parse key name containing ']'.
2007-03-01 11:39:02 +01:00
H. Verbeet
b6a9109c03
regedit: Format warning fixes.
2006-10-11 12:09:02 +02:00
Yuriy Kozlov
1e1031b41d
regedit: Allow entering - for a value in a .reg file to delete that value.
2006-07-29 11:53:06 +02:00
Jonathan Ernst
360a3f9142
Update the address of the Free Software Foundation.
2006-05-23 14:11:13 +02:00
Mike McCormack
516a577df1
Fix gcc 4.0 warnings.
2005-08-19 10:04:03 +00:00
Stefan Huehner
204ecdaa20
Remove some more -Wstrict-prototypes warnings.
2005-06-22 12:00:31 +00:00
Mike McCormack
d73dad6630
Fixes for -Wmissing-declarations and -Wwrite-strings warnings.
2005-06-04 10:01:25 +00:00
Francois Gouget
6b10c324c5
Assorted spelling fixes.
2005-03-30 17:08:31 +00:00
Peter Berg Larsen
e732fc023d
Janitorial: Get rid of strncpy/strncpyW.
2005-03-28 14:17:51 +00:00
Jon Griffiths
eb5bf7dd38
Documentation spelling fixes.
2005-02-25 14:07:56 +00:00
Michael Stefaniuc
5ad7d858e0
Do not check for non NULL pointer before HeapFree'ing it. It's
...
redundant.
2004-12-23 17:06:43 +00:00
Hans Leidekker
719a789792
Fix signed/unsigned comparison warnings.
2004-09-22 02:46:38 +00:00
Robert Reif
cddb03e6b9
Added HKEY_DYN_DATA support.
2004-07-08 20:14:10 +00:00
Francois Gouget
bfc60dfb7b
Compute dwLen after passing the string through
...
REGPROC_unescape_string() so we don't save garbage characters in the
registry.
2004-03-23 23:02:59 +00:00
Dimitrie O. Paun
58c185ecf0
Reformat regedit in a consistent manner.
2003-12-08 22:48:07 +00:00
Francois Gouget
46f11eda58
Print error messages to stderr as is customary.
2003-12-05 04:42:06 +00:00
Dimitrie O. Paun
e81dedf1a7
HeapReAlloc() does not allocate memory.
2003-11-20 23:43:12 +00:00
Francois Gouget
f405629e8e
Weekly spelling fixes.
2003-10-28 21:45:30 +00:00
Alexandre Julliard
f752b1246b
Authors: Robert Dickenson <robd@reactos.org>, Steven Edwards <Steven_Ed4153@yahoo.com>, Mike McCormack <mike@codeweavers.com>
...
Implemented GUI for regedit.
2003-08-07 03:10:13 +00:00
Juraj Hercek
04fd4a2756
Bug fixes related to sparc 4-byte boundary alignment.
2002-11-06 22:02:52 +00:00
Andriy Palamarchuk
fe61065cd7
Linked regedit against msvcrt instead of the platform I/O library, so
...
it can handle full Windows paths.
2002-08-15 21:45:28 +00:00
Andriy Palamarchuk
d2aa62bf45
Fixed a few bugs, added processing of REG_MULTI_SZ format.
2002-06-28 17:33:09 +00:00
Bill Medland
530b4e9aca
- Rework the line reading. This version uses a single expanding
...
buffer rather than a main buffer and a "next line" buffer. This
version does not overflow the allocated memory (hopefully). The
previous version did when concatenating the continuation lines.
- Add protection to the HexCSVToHex to prevent overflow.
- Allow for conversion of larger hex values. Tested on a real 2.6KB
value.
2002-06-21 20:12:02 +00:00
Vincent Béron
9a62491660
Removed trailing whitespace.
2002-05-31 23:06:46 +00:00
Alexandre Julliard
5769d1de00
Better support for configure detection of missing types, added check
...
for ssize_t.
Removed a couple of no longer used portability functions.
Various portability fixes in port.h.
2002-04-26 19:05:15 +00:00
Andriy Palamarchuk
4e2e176c2f
Created regedit replacement. Fixed some bugs.
2002-04-11 23:58:40 +00:00