mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
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. svn path=/trunk/; revision=34220
This commit is contained in:
parent
cfee3fb383
commit
60c4f5e798
4 changed files with 22 additions and 2 deletions
|
@ -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*/
|
||||
|
||||
|
|
|
@ -467,7 +467,7 @@ static const conv_category_t conv_table[] = {
|
|||
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 @@ void ConvExecute(HWND hWnd)
|
|||
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 @@ void ConvInit(HWND hWnd)
|
|||
ConvAdjust(hWnd, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -387,6 +387,7 @@ void exec_closeparent(calc_number_t *number)
|
|||
{
|
||||
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 @@ void exec_closeparent(calc_number_t *number)
|
|||
}
|
||||
}
|
||||
rpn_copy(number, &ip.node.number);
|
||||
rpn_free(&ip.node.number);
|
||||
}
|
||||
|
||||
int eval_parent_count(void)
|
||||
|
@ -434,6 +436,7 @@ void start_rpn_engine(void)
|
|||
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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue