Module: wine Branch: master Commit: ae097646abfbf7e405311f463794a2fcd683e3f0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ae097646abfbf7e405311f4637...
Author: Andrey Turkin andrey.turkin@gmail.com Date: Fri Sep 26 09:31:24 2008 +0400
regedit: Ignore spaces in regedit files.
---
programs/regedit/regproc.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 9178d4e..c3825bd 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -488,6 +488,7 @@ static void processSetValue(WCHAR* line, BOOL is_unicode) LONG res;
/* get value name */ + while ( isspaceW(line[line_idx]) ) line_idx++; if (line[line_idx] == '@' && line[line_idx + 1] == '=') { line[line_idx] = '\0'; val_name = line; @@ -509,6 +510,7 @@ static void processSetValue(WCHAR* line, BOOL is_unicode) } } } + while ( isspaceW(line[line_idx]) ) line_idx++; if (line[line_idx] != '=') { char* lineA; line[line_idx] = '"'; @@ -525,7 +527,13 @@ static void processSetValue(WCHAR* line, BOOL is_unicode) return; } line_idx++; /* skip the '=' character */ + + while ( isspaceW(line[line_idx]) ) line_idx++; val_data = line + line_idx; + /* trim trailing blanks */ + line_idx = strlenW(val_data); + while (line_idx > 0 && isspaceW(val_data[line_idx-1])) line_idx--; + val_data[line_idx] = '\0';
REGPROC_unescape_string(val_name); res = setValue(val_name, val_data, is_unicode);