[CALC] Enable support for HTMLHELP (#1877)
authorCarlo Bramini <30959007+carlo-bramini@users.noreply.github.com>
Mon, 26 Aug 2019 14:14:01 +0000 (16:14 +0200)
committerHermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Mon, 26 Aug 2019 14:14:01 +0000 (16:14 +0200)
Nowadays ReactOS includes support for htmlhelp.h and a working implementation of HHCTRL.OCX. Although current imported HHCTRL.OCX suffers of this issue:

https://bugs.winehq.org/show_bug.cgi?id=47379
See also CORE-15019

+ Revert 'intptr_t' to 'size_t'.

base/applications/calc/CMakeLists.txt
base/applications/calc/htmlhelp.c
base/applications/calc/winmain.c

index d273f10..07104ff 100644 (file)
@@ -1,6 +1,4 @@
 
-add_definitions(-DDISABLE_HTMLHELP_SUPPORT=1)
-
 list(APPEND SOURCE
     convert.c
     fun_ieee.c
index a306ae4..38f3ea3 100644 (file)
@@ -49,7 +49,7 @@ dummy_HtmlHelpW(HWND hWnd, LPCWSTR pszFile, UINT uCommand, DWORD dwData)
 
 void HtmlHelp_Start(HINSTANCE hInstance)
 {
-    hHtmlHelp = LoadLibrary(_T("HTMLHELP"));
+    hHtmlHelp = LoadLibrary(_T("HHCTRL.OCX"));
     if (hHtmlHelp == NULL)
         return;
 
index 222dff4..6bf11a3 100644 (file)
@@ -894,7 +894,7 @@ static void delete_stat_item(int n)
 
 static char *ReadConversion(const char *formula)
 {
-    intptr_t len = strlen(formula);
+    size_t len = strlen(formula);
     char *str = (char *)malloc(len+3);
 
     if (str == NULL)