- Removed the deprecated OF_SEARCH flag.

- Handle quotes in command-line parsing.
oldstable
Ken Belleau 2004-09-23 22:54:12 +00:00 committed by Alexandre Julliard
parent b72a682751
commit d696f21b8a
2 changed files with 7 additions and 1 deletions

View File

@ -287,7 +287,7 @@ static BOOL HLPFILE_DoReadHlpFile(HLPFILE *hlpfile, LPCSTR lpszPath)
DWORD ref = 0x0C;
unsigned index, old_index, offset, len, offs;
hFile = OpenFile(lpszPath, &ofs, OF_READ | OF_SEARCH);
hFile = OpenFile(lpszPath, &ofs, OF_READ);
if (hFile == HFILE_ERROR) return FALSE;
ret = HLPFILE_ReadFileToBuffer(hFile);

View File

@ -164,6 +164,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
MSG msg;
LONG lHash = 0;
HLPFILE* hlpfile;
CHAR* quote;
Globals.hInstance = hInstance;
@ -207,6 +208,11 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
WINHELP_RegisterWinClasses();
if (*cmdline)
{
if ((*cmdline == '"') && (quote = strchr(cmdline+1, '"')))
{
cmdline++;
*quote = '\0';
}
hlpfile = WINHELP_LookupHelpFile(cmdline);
if (!hlpfile) return 0;
}