- Removed the deprecated OF_SEARCH flag.
- Handle quotes in command-line parsing.
This commit is contained in:
parent
b72a682751
commit
d696f21b8a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue