Eric Pouech : winhelp: Handle '> ' on command lines.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 19 14:22:15 CST 2005
Module: wine
Branch: refs/heads/master
Commit: e5b40ab56a6760b4132f00a84031c03f401f3c41
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e5b40ab56a6760b4132f00a84031c03f401f3c41
Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date: Mon Dec 19 18:23:02 2005 +0100
winhelp: Handle '> ' on command lines.
---
programs/winhelp/winhelp.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c
index 5c4b9e2..f3abdd5 100644
--- a/programs/winhelp/winhelp.c
+++ b/programs/winhelp/winhelp.c
@@ -161,10 +161,10 @@ static HLPFILE_WINDOWINFO* WINHELP_G
*/
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,
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))
More information about the wine-cvs
mailing list