Commit d696f21b authored by Ken Belleau's avatar Ken Belleau Committed by Alexandre Julliard

- Removed the deprecated OF_SEARCH flag.

- Handle quotes in command-line parsing.
parent b72a6827
......@@ -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);
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment