Commit 7ae1bb28 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winhelp: Fixed JumpId and JumpKeyword with correct signature and implementation.

parent 951926e6
...@@ -110,7 +110,7 @@ static struct MacroDesc MACRO_Builtins[] = { ...@@ -110,7 +110,7 @@ static struct MacroDesc MACRO_Builtins[] = {
{"JumpContext", "JC", 0, "SSU", (FARPROC)MACRO_JumpContext}, {"JumpContext", "JC", 0, "SSU", (FARPROC)MACRO_JumpContext},
{"JumpHash", "JH", 0, "SSU", (FARPROC)MACRO_JumpHash}, {"JumpHash", "JH", 0, "SSU", (FARPROC)MACRO_JumpHash},
{"JumpHelpOn", NULL, 0, "", (FARPROC)MACRO_JumpHelpOn}, {"JumpHelpOn", NULL, 0, "", (FARPROC)MACRO_JumpHelpOn},
{"JumpID", "JI", 0, "SSS", (FARPROC)MACRO_JumpID}, {"JumpID", "JI", 0, "SS", (FARPROC)MACRO_JumpID},
{"JumpKeyword", "JK", 0, "SSS", (FARPROC)MACRO_JumpKeyword}, {"JumpKeyword", "JK", 0, "SSS", (FARPROC)MACRO_JumpKeyword},
{"KLink", "KL", 0, "SUSS", (FARPROC)MACRO_KLink}, {"KLink", "KL", 0, "SUSS", (FARPROC)MACRO_KLink},
{"Menu", "MU", 0, "", (FARPROC)MACRO_Menu}, {"Menu", "MU", 0, "", (FARPROC)MACRO_Menu},
...@@ -654,15 +654,32 @@ void CALLBACK MACRO_JumpHelpOn(void) ...@@ -654,15 +654,32 @@ void CALLBACK MACRO_JumpHelpOn(void)
WINE_FIXME("()\n"); WINE_FIXME("()\n");
} }
/* FIXME: those two macros are wrong void CALLBACK MACRO_JumpID(LPCSTR lpszPathWindow, LPCSTR topic_id)
* they should only contain 2 strings, path & window are coded as path>window
*/
void CALLBACK MACRO_JumpID(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR topic_id)
{ {
WINE_TRACE("(\"%s\", \"%s\", \"%s\")\n", lpszPath, lpszWindow, topic_id); LPSTR ptr;
MACRO_JumpHash(lpszPath, lpszWindow, HLPFILE_Hash(topic_id));
WINE_TRACE("(\"%s\", \"%s\")\n", lpszPathWindow, topic_id);
if ((ptr = strchr(lpszPathWindow, '>')) != NULL)
{
LPSTR tmp;
size_t sz = ptr - lpszPathWindow;
tmp = HeapAlloc(GetProcessHeap(), 0, sz + 1);
if (tmp)
{
memcpy(tmp, lpszPathWindow, sz);
tmp[sz] = '\0';
MACRO_JumpHash(tmp, ptr + 1, HLPFILE_Hash(topic_id));
HeapFree(GetProcessHeap(), 0, tmp);
}
}
else
MACRO_JumpHash(lpszPathWindow, NULL, HLPFILE_Hash(topic_id));
} }
/* FIXME: this macros is wrong
* it should only contain 2 strings, path & window are coded as path>window
*/
void CALLBACK MACRO_JumpKeyword(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR keyword) void CALLBACK MACRO_JumpKeyword(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR keyword)
{ {
WINE_FIXME("(\"%s\", \"%s\", \"%s\")\n", lpszPath, lpszWindow, keyword); WINE_FIXME("(\"%s\", \"%s\", \"%s\")\n", lpszPath, lpszWindow, keyword);
......
...@@ -98,7 +98,7 @@ void CALLBACK MACRO_JumpContents(LPCSTR, LPCSTR); ...@@ -98,7 +98,7 @@ void CALLBACK MACRO_JumpContents(LPCSTR, LPCSTR);
void CALLBACK MACRO_JumpContext(LPCSTR, LPCSTR, LONG); void CALLBACK MACRO_JumpContext(LPCSTR, LPCSTR, LONG);
void CALLBACK MACRO_JumpHash(LPCSTR, LPCSTR, LONG); void CALLBACK MACRO_JumpHash(LPCSTR, LPCSTR, LONG);
void CALLBACK MACRO_JumpHelpOn(void); void CALLBACK MACRO_JumpHelpOn(void);
void CALLBACK MACRO_JumpID(LPCSTR, LPCSTR, LPCSTR); void CALLBACK MACRO_JumpID(LPCSTR, LPCSTR);
void CALLBACK MACRO_JumpKeyword(LPCSTR, LPCSTR, LPCSTR); void CALLBACK MACRO_JumpKeyword(LPCSTR, LPCSTR, LPCSTR);
void CALLBACK MACRO_KLink(LPCSTR, LONG, LPCSTR, LPCSTR); void CALLBACK MACRO_KLink(LPCSTR, LONG, LPCSTR, LPCSTR);
void CALLBACK MACRO_Menu(void); void CALLBACK MACRO_Menu(void);
......
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