winhelp: Handle '> ' on command lines.

oldstable
Eric Pouech 2005-12-19 18:23:02 +01:00 committed by Alexandre Julliard
parent be849decf6
commit e5b40ab56a
1 changed files with 13 additions and 7 deletions

View File

@ -161,10 +161,10 @@ static HLPFILE_WINDOWINFO* WINHELP_GetPopupWindowInfo(HLPFILE* hlpfile, HWND
*/
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
{
MSG msg;
LONG lHash = 0;
HLPFILE* hlpfile;
CHAR* quote;
MSG msg;
LONG lHash = 0;
HLPFILE* hlpfile;
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))