Commit e5b40ab5 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winhelp: Handle '> ' on command lines.

parent be849dec
...@@ -161,10 +161,10 @@ static HLPFILE_WINDOWINFO* WINHELP_GetPopupWindowInfo(HLPFILE* hlpfile, HWND ...@@ -161,10 +161,10 @@ static HLPFILE_WINDOWINFO* WINHELP_GetPopupWindowInfo(HLPFILE* hlpfile, HWND
*/ */
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
{ {
MSG msg; MSG msg;
LONG lHash = 0; LONG lHash = 0;
HLPFILE* hlpfile; HLPFILE* hlpfile;
CHAR* quote; char* wndname = "main";
WINHELP_DLL* dll; WINHELP_DLL* dll;
Globals.hInstance = hInstance; Globals.hInstance = hInstance;
...@@ -214,17 +214,23 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) ...@@ -214,17 +214,23 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
if (*cmdline) if (*cmdline)
{ {
if ((*cmdline == '"') && (quote = strchr(cmdline+1, '"'))) char* ptr;
if ((*cmdline == '"') && (ptr = strchr(cmdline+1, '"')))
{ {
cmdline++; cmdline++;
*quote = '\0'; *ptr = '\0';
}
if ((ptr = strchr(cmdline, '>')))
{
*ptr = '\0';
wndname = ptr + 1;
} }
hlpfile = WINHELP_LookupHelpFile(cmdline); hlpfile = WINHELP_LookupHelpFile(cmdline);
if (!hlpfile) return 0; if (!hlpfile) return 0;
} }
else hlpfile = NULL; else hlpfile = NULL;
WINHELP_CreateHelpWindowByHash(hlpfile, lHash, WINHELP_CreateHelpWindowByHash(hlpfile, lHash,
WINHELP_GetWindowInfo(hlpfile, "main"), show); WINHELP_GetWindowInfo(hlpfile, wndname), show);
/* Message loop */ /* Message loop */
while (GetMessage(&msg, 0, 0, 0)) while (GetMessage(&msg, 0, 0, 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