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

winhelp: Handle '> ' on command lines.

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