Author: dreimer Date: Mon Jun 30 08:47:42 2008 New Revision: 34220
URL: http://svn.reactos.org/svn/reactos?rev=34220&view=rev Log: Update ROSCalc to version 1.09 to fix some bugs. * Fixed bug with Conversion function: "Category" type must be found like "from" and "to" because the combobox sorts its items alphabetically. * Fixed bug with memory function and GNU multi-precision libraries: the memory must be initialized to zero when the calculator starts, otherwise "MP" will crash. * Fixed bug when closing an expression with right parentheses.
Modified: trunk/reactos/base/applications/calc/calc.h trunk/reactos/base/applications/calc/convert.c trunk/reactos/base/applications/calc/rpn_mpfr.c trunk/reactos/base/applications/calc/whatsnew.txt
Modified: trunk/reactos/base/applications/calc/calc.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/calc... ============================================================================== --- trunk/reactos/base/applications/calc/calc.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/calc.h [iso-8859-1] Mon Jun 30 08:47:42 2008 @@ -42,7 +42,7 @@ #define IDC_STATIC ((DWORD)-1) #endif
-#define CALC_VERSION TEXT("1.08") +#define CALC_VERSION TEXT("1.09")
/*#define USE_KEYBOARD_HOOK*/
Modified: trunk/reactos/base/applications/calc/convert.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/conv... ============================================================================== --- trunk/reactos/base/applications/calc/convert.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/convert.c [iso-8859-1] Mon Jun 30 08:47:42 2008 @@ -467,7 +467,7 @@ void ConvExecute(HWND hWnd) { DWORD c_cat = (DWORD)SendDlgItemMessage(hWnd, IDC_COMBO_CATEGORY, CB_GETCURSEL, 0, 0); - const conv_t *items = conv_table[c_cat].items; + const conv_t *items = NULL; DWORD from = SendDlgItemMessage(hWnd, IDC_COMBO_FROM, CB_GETCURSEL, 0, 0); DWORD to = SendDlgItemMessage(hWnd, IDC_COMBO_TO, CB_GETCURSEL, 0, 0); TCHAR txt_cb[128]; @@ -478,6 +478,16 @@ if (from == to) return;
+ /* Search correct category, since it can be sorted too */ + SendDlgItemMessage(hWnd, IDC_COMBO_CATEGORY, CB_GETLBTEXT, c_cat, (LPARAM)txt_cb); + for (c_cat=0; c_cat < SIZEOF(conv_table); c_cat++) { + LoadString(calc.hInstance, conv_table[c_cat].category, txt, SIZEOF(txt)); + if (!_tcscmp(txt_cb, txt)) { + items = conv_table[c_cat].items; + break; + } + } + /* The units can be sorted, so I must search the exact match */ item = items; SendDlgItemMessage(hWnd, IDC_COMBO_FROM, CB_GETLBTEXT, from, (LPARAM)txt_cb); @@ -551,3 +561,4 @@ ConvAdjust(hWnd, 0); }
+
Modified: trunk/reactos/base/applications/calc/rpn_mpfr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/rpn_... ============================================================================== --- trunk/reactos/base/applications/calc/rpn_mpfr.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/rpn_mpfr.c [iso-8859-1] Mon Jun 30 08:47:42 2008 @@ -387,6 +387,7 @@ { stack_node_t *op, ip;
+ rpn_alloc(&ip.node.number); rpn_copy(&ip.node.number, number); while (!is_stack_empty()) { op = pop(); @@ -401,6 +402,7 @@ } } rpn_copy(number, &ip.node.number); + rpn_free(&ip.node.number); }
int eval_parent_count(void) @@ -434,6 +436,7 @@ mpfr_init(calc.prev.mf); mpfr_init(calc.memory.number.mf); mpfr_init(temp.node.number.mf); + rpn_zero(&calc.memory.number); }
void stop_rpn_engine(void)
Modified: trunk/reactos/base/applications/calc/whatsnew.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/what... ============================================================================== --- trunk/reactos/base/applications/calc/whatsnew.txt [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/whatsnew.txt [iso-8859-1] Mon Jun 30 08:47:42 2008 @@ -1,3 +1,9 @@ +1.09 (20080630) +======================= +* Fixed bug with Conversion function: "Category" type must be found like "from" and "to" because the combobox sorts its items alphabetically. +* Fixed bug with memory function and GNU multi-precision libraries: the memory must be initialized to zero when the calculator starts, otherwise "MP" will crash. +* Fixed bug when closing an expression with right parentheses. + 1.08 (20080520) ======================= * Added macro DISABLE_HTMLHELP_SUPPORT for disabling the compilation of htmlhelp support.