Matthew Davison mjd77@cam.ac.uk writes:
Without this patch, the INF parser in setupapi will strip any spaces which are not inside quotes from an INF file. Windows will only strip spaces at the start and end of each field/line.
This is supposed to be handled by the TRAILING_SPACES state already. Do you have a test case demonstrating the problem?
On Fri, 2005-07-22 at 09:36 +0200, Alexandre Julliard wrote:
Matthew Davison mjd77@cam.ac.uk writes:
Without this patch, the INF parser in setupapi will strip any spaces which are not inside quotes from an INF file. Windows will only strip spaces at the start and end of each field/line.
This is supposed to be handled by the TRAILING_SPACES state already. Do you have a test case demonstrating the problem?
The Trailing Spaces state strips ALL spaces outside of quotes, which is wrong and leads to a space being wrongly stripped from several (non-vital) lines in the IE6 installer. This is responsible for the 15 0r so lines looking like:
err:rundll32:main Unable to find the entry point L"DelNodeRunDLL32C:\\ \Program" in L"adpack.dll"
In the console output of setup Rundll32 is fail to find an entry point DelNodeRunDll32C:\Program, because the space has been erroneously stripped.
The Line in the INF file looks like: rundll32.exe advpack.dll,DelNodeRunDLL32 "%24%%LProgramF%% UninstallData%\IE UserData NT"
What my patch does is prevent us going into Trailing_Spaces unless there really are only spaces left in the current field of the line, which prevents this error, and allows the spaces to remain.
Matthew Davison mjd77@cam.ac.uk writes:
The Trailing Spaces state strips ALL spaces outside of quotes, which is wrong and leads to a space being wrongly stripped from several (non-vital) lines in the IE6 installer.
No, the trailing spaces state doesn't strip anything if it's not the end of the token, since it pops back to the original state in that case.
err:rundll32:main Unable to find the entry point L"DelNodeRunDLL32C:\\ \Program" in L"adpack.dll"
In the console output of setup Rundll32 is fail to find an entry point DelNodeRunDll32C:\Program, because the space has been erroneously stripped.
The Line in the INF file looks like: rundll32.exe advpack.dll,DelNodeRunDLL32 "%24%%LProgramF%% UninstallData%\IE UserData NT"
It looks like the bug is with quotes in the middle of tokens then.
Alexandre Julliard julliard@winehq.org writes:
It looks like the bug is with quotes in the middle of tokens then.
Does this work for you?
Index: dlls/setupapi/parser.c =================================================================== RCS file: /opt/cvs-commit/wine/dlls/setupapi/parser.c,v retrieving revision 1.17 diff -u -p -r1.17 parser.c --- dlls/setupapi/parser.c 1 Jun 2005 11:05:47 -0000 1.17 +++ dlls/setupapi/parser.c 22 Jul 2005 09:41:44 -0000 @@ -647,7 +647,7 @@ static const WCHAR *key_name_state( stru set_state( parser, COMMENT ); return p + 1; case '"': - push_token( parser, token_end ); + push_token( parser, p ); parser->start = p + 1; push_state( parser, KEY_NAME ); set_state( parser, QUOTES ); @@ -699,7 +699,7 @@ static const WCHAR *value_name_state( st set_state( parser, LEADING_SPACES ); return p + 1; case '"': - push_token( parser, token_end ); + push_token( parser, p ); parser->start = p + 1; push_state( parser, VALUE_NAME ); set_state( parser, QUOTES );
On Fri, 2005-07-22 at 11:45 +0200, Alexandre Julliard wrote:
Alexandre Julliard julliard@winehq.org writes:
It looks like the bug is with quotes in the middle of tokens then.
Does this work for you?
Yep, that works.