6 Commits
0.9.0 ... 0.9.1

Author SHA1 Message Date
9e25a7bc7a changed: version of the program: 0.9.1 now
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@288 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-02-07 19:02:11 +00:00
c3a35102a3 fixed: the correct language of the menu on a pad window was not set properly
when the program started
updated: chinese translation



git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@280 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-01-12 16:07:29 +00:00
29f1aa1c8b updated chinese translation
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@279 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-01-11 11:52:49 +00:00
56fea5a67c changed: ttmath::Parser doesn't use SmallToZero() longer
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@278 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-01-06 01:02:55 +00:00
47e4d83eab updated: chinese translation
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@276 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-01-05 18:17:35 +00:00
48d182a05f fixed: the pad window didn't take into account following options (from display tab):
grouping, input commas and parameter separators
added:   some more info on update dialog (when the update is not available)


git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@257 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-12-05 18:30:33 +00:00
16 changed files with 294 additions and 179 deletions

View File

@@ -1,3 +1,23 @@
Version 0.9.1 (2009.02.07):
* fixed: the pad window didn't take into account following options (from display tab):
grouping, input commas and parameter separators
* updated: Chinese translation
Changes from TTMath 0.9.1 relating to TTCalc:
* fixed: the parser didn't use characters for changing the base (# and &)
those characters were skipped
(this bug was introduced in 0.9.0)
* fixed: added in the parser: operator's associativity
operator ^ (powering) is right-associative:
sample: 2^3^4 is equal 2^(3^4) and it is: 2.41e+24
previously was: 2^3^4 = (2^3)^4 = 4096
* changed: in Big::ToString() the base rounding is made only if the result value
would not be an integer, e.g. if the value is 1.999999999999 then
the base rounding will not be done - because as the result would be 2
* added: IEEE 754 half-to-even rounding (bankers' rounding) to the following
floating point algorithms: Big::Add, Big::Sub, Big::Mul, Big::Div
Version 0.9.0 (2009.11.25): Version 0.9.0 (2009.11.25):
* fixed: when 'C' button was pressed, the cursor was not placed in the edit window * fixed: when 'C' button was pressed, the cursor was not placed in the edit window
* added: Pad window - a multiline edit window * added: Pad window - a multiline edit window

View File

@@ -1,4 +1,4 @@
Copyright (c) 2006-2009, Tomasz Sowa Copyright (c) 2006-2010, Tomasz Sowa
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -91,6 +91,7 @@
<li><a href="rounding_functions.html">round(x)</a></li> <li><a href="rounding_functions.html">round(x)</a></li>
<li><a href="rounding_functions.html">ceil(x)</a></li> <li><a href="rounding_functions.html">ceil(x)</a></li>
<li><a href="rounding_functions.html">floor(x)</a></li> <li><a href="rounding_functions.html">floor(x)</a></li>
<li><a href="rounding_functions.html">frac(x)</a></li>
</ul> </ul>

View File

@@ -1,4 +1,4 @@
Copyright (c) 2006-2009, Tomasz Sowa Copyright (c) 2006-2010, Tomasz Sowa
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@@ -3,8 +3,8 @@
[Setup] [Setup]
AppName=TTCalc AppName=TTCalc
AppVerName=TTCalc 0.9.0 AppVerName=TTCalc 0.9.1
AppVersion=0.9.0 AppVersion=0.9.1
AppPublisher=Tomasz Sowa AppPublisher=Tomasz Sowa
AppPublisherURL=http://ttcalc.sourceforge.net AppPublisherURL=http://ttcalc.sourceforge.net
AppSupportURL=http://ttcalc.sourceforge.net AppSupportURL=http://ttcalc.sourceforge.net

View File

@@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2006-2009, Tomasz Sowa * Copyright (c) 2006-2010, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -55,7 +55,7 @@
*/ */
#define TTCALC_MAJOR_VER 0 #define TTCALC_MAJOR_VER 0
#define TTCALC_MINOR_VER 9 #define TTCALC_MINOR_VER 9
#define TTCALC_REVISION_VER 0 #define TTCALC_REVISION_VER 1
#define TTCALC_PRERELEASE_VER 0 #define TTCALC_PRERELEASE_VER 0

View File

@@ -1,4 +1,3 @@
/* /*
* This file is a part of TTCalc - a mathematical calculator * This file is a part of TTCalc - a mathematical calculator
* and is distributed under the (new) BSD licence. * and is distributed under the (new) BSD licence.
@@ -36,6 +35,7 @@
* THE POSSIBILITY OF SUCH DAMAGE. * THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <cstdio>
#include "compileconfig.h" #include "compileconfig.h"
#include "download.h" #include "download.h"
@@ -119,10 +119,17 @@ DWORD read;
bool Download::DownloadUrl(const char * url) bool Download::DownloadUrl(const char * url)
{ {
bool res = true; bool res = true;
char browser[100];
down_size = 0; down_size = 0;
sprintf(browser, "TTCalc updater %d.%d.%d%s",
TTCALC_MAJOR_VER,
TTCALC_MINOR_VER,
TTCALC_REVISION_VER,
(TTCALC_PRERELEASE_VER>0)? " prerelease" : "");
HINTERNET hint = InternetOpen("TTCalcAutoUpdate",INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0);
HINTERNET hint = InternetOpen(browser,INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0);
if( !hint ) if( !hint )
return false; return false;

View File

@@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2006-2009, Tomasz Sowa * Copyright (c) 2006-2010, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -535,7 +535,8 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_check_at_startup, "Always check for the update on startup"); InsertGuiPair(update_check_at_startup, "Always check for the update on startup");
InsertGuiPair(update_check_for_info, "Press Next to check for the update..."); InsertGuiPair(update_check_for_info, "Press Next to check for the update...");
InsertGuiPair(update_is_new_version, "Version %d.%d.%d is available, press Next to download..."); InsertGuiPair(update_is_new_version, "Version %d.%d.%d is available, press Next to download...");
InsertGuiPair(update_no_new_version, "There is not a new version available."); InsertGuiPair(update_no_new_version1, "There is not a newer version available.");
InsertGuiPair(update_no_new_version2, "You have the newest version.");
InsertGuiPair(update_download_from, "Downloading from..."); InsertGuiPair(update_download_from, "Downloading from...");
#ifndef TTCALC_PORTABLE #ifndef TTCALC_PORTABLE
InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded."); InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded.");
@@ -730,7 +731,8 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_check_at_startup, "Zawsze sprawdzaj aktualizacje podczas uruchamiania"); InsertGuiPair(update_check_at_startup, "Zawsze sprawdzaj aktualizacje podczas uruchamiania");
InsertGuiPair(update_check_for_info, "Wci<EFBFBD>nij Dalej aby sprawdzi<7A> dost<73>pno<6E><6F> aktualizacji..."); InsertGuiPair(update_check_for_info, "Wci<EFBFBD>nij Dalej aby sprawdzi<7A> dost<73>pno<6E><6F> aktualizacji...");
InsertGuiPair(update_is_new_version, "Wersja %d.%d.%d jest dost<73>pna, wci<63>nij Dalej aby j<> pobra<72>..."); InsertGuiPair(update_is_new_version, "Wersja %d.%d.%d jest dost<73>pna, wci<63>nij Dalej aby j<> pobra<72>...");
InsertGuiPair(update_no_new_version, "Nie ma dost<73>pnej nowej wersji programu."); InsertGuiPair(update_no_new_version1, "Nie ma dost<73>pnej nowszej wersji programu.");
InsertGuiPair(update_no_new_version2, "Obecnie masz najnowsz<73> wersj<73>.");
InsertGuiPair(update_download_from, "Pobieranie z..."); InsertGuiPair(update_download_from, "Pobieranie z...");
#ifndef TTCALC_PORTABLE #ifndef TTCALC_PORTABLE
InsertGuiPair(update_downloaded_info1, "Nowy instalator zosta<74> <20>ci<63>gni<6E>ty."); InsertGuiPair(update_downloaded_info1, "Nowy instalator zosta<74> <20>ci<63>gni<6E>ty.");
@@ -930,7 +932,8 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_check_at_startup, "Comprobar siempre al comienzo si hay una nueva versi<73>n"); InsertGuiPair(update_check_at_startup, "Comprobar siempre al comienzo si hay una nueva versi<73>n");
InsertGuiPair(update_check_for_info, "Pulse Siguiente para ver si hay actualizaciones..."); InsertGuiPair(update_check_for_info, "Pulse Siguiente para ver si hay actualizaciones...");
InsertGuiPair(update_is_new_version, "La versi<73>n %d.%d.%d est<73> disponible, pulse Siguiente para descargar..."); InsertGuiPair(update_is_new_version, "La versi<73>n %d.%d.%d est<73> disponible, pulse Siguiente para descargar...");
InsertGuiPair(update_no_new_version, "No hay versiones nuevas disponibles."); InsertGuiPair(update_no_new_version1, "No hay versiones nuevas disponibles.");
InsertGuiPair(update_no_new_version2, "");
InsertGuiPair(update_download_from, "Descargando desde..."); InsertGuiPair(update_download_from, "Descargando desde...");
#ifndef TTCALC_PORTABLE #ifndef TTCALC_PORTABLE
InsertGuiPair(update_downloaded_info1, "Se ha descargado un nuevo programa de instalaci<63>n."); InsertGuiPair(update_downloaded_info1, "Se ha descargado un nuevo programa de instalaci<63>n.");
@@ -1126,7 +1129,8 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_check_at_startup, "Tjek altid for opdateringer ved opstart"); InsertGuiPair(update_check_at_startup, "Tjek altid for opdateringer ved opstart");
InsertGuiPair(update_check_for_info, "Tryk p<> N<>ste for at tjekke for opdateringen..."); InsertGuiPair(update_check_for_info, "Tryk p<> N<>ste for at tjekke for opdateringen...");
InsertGuiPair(update_is_new_version, "Version %d.%d.%d er tilg<6C>ngelig, tryk p<> N<>ste for at downloade..."); InsertGuiPair(update_is_new_version, "Version %d.%d.%d er tilg<6C>ngelig, tryk p<> N<>ste for at downloade...");
InsertGuiPair(update_no_new_version, "Der er ingen ny version tilg<6C>ngelig."); InsertGuiPair(update_no_new_version1, "Der er ingen ny version tilg<6C>ngelig.");
InsertGuiPair(update_no_new_version2, "");
InsertGuiPair(update_download_from, "Downloader fra..."); InsertGuiPair(update_download_from, "Downloader fra...");
#ifndef TTCALC_PORTABLE #ifndef TTCALC_PORTABLE
InsertGuiPair(update_downloaded_info1, "Et nyt installerings program er blevet downloadet."); InsertGuiPair(update_downloaded_info1, "Et nyt installerings program er blevet downloadet.");
@@ -1217,20 +1221,21 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_always_scientific,"һֱ"); InsertGuiPair(display_always_scientific,"һֱ");
InsertGuiPair(display_not_always_scientific,"<EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:"); InsertGuiPair(display_not_always_scientific,"<EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
InsertGuiPair(display_group_scientific, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); InsertGuiPair(display_group_scientific, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(display_deg_rad_grad, "Trigonometric functions"); InsertGuiPair(display_deg_rad_grad, "<EFBFBD><EFBFBD><EFBFBD>Ǻ<EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(display_grouping, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); // e.g. 1`000`000
InsertGuiPair(display_grouping_none, "<EFBFBD><EFBFBD>");
InsertGuiPair(display_grouping_space, "<EFBFBD>ո<EFBFBD>");
InsertGuiPair(display_input_decimal_point, "С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point_item1, " . or ,");
InsertGuiPair(display_output_decimal_point, "С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ"); // Decimal point in result
InsertGuiPair(display_param_sep, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(display_param_sep_item2, " ; or .");
InsertGuiPair(display_param_sep_item3, " ; or ,");
InsertGuiPair(convert_type, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); InsertGuiPair(convert_type, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(convert_input, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); InsertGuiPair(convert_input, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(convert_output, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); InsertGuiPair(convert_output, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(convert_dynamic_output, "<EFBFBD>Զ<EFBFBD>"); InsertGuiPair(convert_dynamic_output, "<EFBFBD>Զ<EFBFBD>");
InsertGuiPair(display_grouping, "Grouping");
InsertGuiPair(display_grouping_none, "None");
InsertGuiPair(display_grouping_space, "Space");
InsertGuiPair(display_input_decimal_point, "Input decimal point");
InsertGuiPair(display_input_decimal_point_item1, " . or ,");
InsertGuiPair(display_output_decimal_point, "Output decimal point");
InsertGuiPair(display_param_sep, "Parameters separated by");
InsertGuiPair(display_param_sep_item2, " ; or .");
InsertGuiPair(display_param_sep_item3, " ; or ,");
InsertGuiPair(menu_view, "&<26>"); InsertGuiPair(menu_view, "&<26>");
InsertGuiPair(menu_edit, "&<26>"); InsertGuiPair(menu_edit, "&<26>");
@@ -1240,30 +1245,31 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_normal_view, "&<26><>ͨ<EFBFBD><CDA8>ͼ"); InsertGuiPair(menu_view_normal_view, "&<26><>ͨ<EFBFBD><CDA8>ͼ");
InsertGuiPair(menu_view_compact_view, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ"); InsertGuiPair(menu_view_compact_view, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ");
InsertGuiPair(menu_view_always_on_top, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ"); InsertGuiPair(menu_view_always_on_top, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ");
InsertGuiPair(menu_view_pad, "&Pad"); InsertGuiPair(menu_view_pad, "ճ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(menu_view_lang_english, "<><D3A2>"); InsertGuiPair(menu_view_lang_english, "<><D3A2>");
InsertGuiPair(menu_view_lang_polish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); InsertGuiPair(menu_view_lang_polish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(menu_view_lang_spanish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); InsertGuiPair(menu_view_lang_spanish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(menu_view_lang_danish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); InsertGuiPair(menu_view_lang_danish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(menu_view_lang_chinese, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); InsertGuiPair(menu_view_lang_chinese, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(menu_view_lang_russian, "&Russian"); InsertGuiPair(menu_view_lang_russian, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(menu_view_lang_swedish, "&Swedish"); InsertGuiPair(menu_view_lang_swedish, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(menu_view_close_program, "&<26>ر<EFBFBD>"); InsertGuiPair(menu_view_close_program, "&<26>ر<EFBFBD>");
InsertGuiPair(menu_edit_undo, "<><C8A1> \tCtrl+Z"); InsertGuiPair(menu_edit_undo, "<><C8A1> \tCtrl+Z");
InsertGuiPair(menu_edit_cut, "Cu&t \tCtrl+X"); InsertGuiPair(menu_edit_cut, "&<26><><EFBFBD><EFBFBD> \tCtrl+X");
InsertGuiPair(menu_edit_copy, "&Copy \tCtrl+C"); InsertGuiPair(menu_edit_copy, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tCtrl+C");
InsertGuiPair(menu_edit_paste, "&Paste"); InsertGuiPair(menu_edit_paste, "&ճ<EFBFBD><EFBFBD>"); // cutting, copying, pasting the the edit which has a focus
InsertGuiPair(menu_edit_del, "&Delete \tDel"); InsertGuiPair(menu_edit_del, "&ɾ<EFBFBD><EFBFBD> \tDel");
InsertGuiPair(menu_edit_paste_formula, "&ճ<EFBFBD><EFBFBD>"); InsertGuiPair(menu_edit_copy_both, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD>) \tCtrl+B"); // copying in this way: "input edit = output edit"
InsertGuiPair(menu_edit_paste_formula, "<><D5B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\tCtrl+V"); // pasting directly to the input edit
InsertGuiPair(menu_edit_copy_result, "&<26><><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD> \tCtrl+R"); InsertGuiPair(menu_edit_copy_result, "&<26><><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD> \tCtrl+R");
InsertGuiPair(menu_edit_copy_both, "Copy &both \tCtrl+B"); InsertGuiPair(menu_edit_select_all, "&ȫѡ\tEsc");
InsertGuiPair(menu_edit_select_all, "Select &all \tEsc"); InsertGuiPair(menu_edit_bracket, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tCtrl+0"); // inserting brackets: (...)
InsertGuiPair(menu_edit_bracket, "Bracke&t \tCtrl+0");
InsertGuiPair(menu_help_help, "&<26><><EFBFBD><EFBFBD>"); InsertGuiPair(menu_help_help, "&<26><><EFBFBD><EFBFBD>");
InsertGuiPair(menu_help_project_page, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ"); InsertGuiPair(menu_help_project_page, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ");
InsertGuiPair(menu_help_check_update, "&Check update...");
InsertGuiPair(menu_help_about, "&<26><><EFBFBD><EFBFBD>"); InsertGuiPair(menu_help_about, "&<26><><EFBFBD><EFBFBD>");
InsertGuiPair(menu_update_available, "&New version is available"); InsertGuiPair(menu_help_check_update, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(menu_update_available, "&<26>п<EFBFBD><D0BF>õ<EFBFBD><C3B5>°汾"); // not implemented yet
// this will be a new main menu item (one after 'help') visible only if there is an update
InsertGuiPair(cant_init_calculations, "<EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>"); InsertGuiPair(cant_init_calculations, "<EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>");
InsertGuiPair(message_box_error_caption,"TTCalc"); InsertGuiPair(message_box_error_caption,"TTCalc");
@@ -1292,17 +1298,17 @@ void Languages::InitGuiMessagesTab()
"mantissa and 32 bits for the exponent) it's about +/-6.9e+646457021.\r\n" "mantissa and 32 bits for the exponent) it's about +/-6.9e+646457021.\r\n"
"\r\n" "\r\n"
#endif #endif
"Translations:\r\n" "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\r\n"
"Spanish Alejandro S. Valdezate\r\n" "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Alejandro S. Valdezate\r\n"
" alesanval@gmail.com\r\n" " alesanval@gmail.com\r\n"
"Danish Rune Bisgaard Vammen\r\n" "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Rune Bisgaard Vammen\r\n"
" runebisgaard@gmail.com\r\n" " runebisgaard@gmail.com\r\n"
"Chinese Juis\r\n" "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Juis\r\n"
" zsyfly@gmail.com\r\n" " zsyfly@gmail.com\r\n"
"Russian Vladimir Gladilovich\r\n" "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vladimir Gladilovich\r\n"
" vdgladilovich@gmail.com\r\n" " vdgladilovich@gmail.com\r\n"
"Swedish Lars 'Bafvert' Gafvert\r\n" "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Lars 'Bafvert' Gafvert\r\n"
" lars.gafvert@gmail.com\r\n" " lars.gafvert@gmail.com\r\n"
); );
InsertGuiPair(about_text_portable_version, " portable version"); InsertGuiPair(about_text_portable_version, " portable version");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n"); InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n");
@@ -1311,37 +1317,39 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(unknown_error, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ֪<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); InsertGuiPair(unknown_error, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ֪<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(cant_find_help, "û<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"); InsertGuiPair(cant_find_help, "û<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>");
InsertGuiPair(cant_open_project_page, "<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ"); InsertGuiPair(cant_open_project_page, "<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ");
InsertGuiPair(update_title, "Check for a new version");
InsertGuiPair(update_button_next, "Next"); InsertGuiPair(update_title, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(update_button_finish, "Finish"); InsertGuiPair(update_button_next, "<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>");
InsertGuiPair(update_button_cancel, "Cancel"); InsertGuiPair(update_button_finish, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(update_check_at_startup, "Always check for the update on startup"); InsertGuiPair(update_button_cancel, "ȡ<EFBFBD><EFBFBD>");
InsertGuiPair(update_check_for_info, "Press Next to check for the update..."); InsertGuiPair(update_check_at_startup, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(update_is_new_version, "Version %d.%d.%d is available, press Next to download..."); InsertGuiPair(update_check_for_info, "<EFBFBD><EFBFBD>\"<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>\"<EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><EFBFBD><EFBFBD>...");
InsertGuiPair(update_no_new_version, "There is not a new version available."); InsertGuiPair(update_is_new_version, "<EFBFBD>汾 %d.%d.%d <20><><EFBFBD><EFBFBD>, <20><>\"<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>\"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
InsertGuiPair(update_download_from, "Downloading from..."); InsertGuiPair(update_no_new_version1, "û<EFBFBD>п<EFBFBD><EFBFBD>õ<EFBFBD><EFBFBD>°汾<EFBFBD><EFBFBD>");
InsertGuiPair(update_no_new_version2, "");
InsertGuiPair(update_download_from, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
#ifndef TTCALC_PORTABLE #ifndef TTCALC_PORTABLE
InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded."); InsertGuiPair(update_downloaded_info1, "<EFBFBD>°汾<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD>");
InsertGuiPair(update_downloaded_info2, "Press Finish to close TTCalc and run the installer."); InsertGuiPair(update_downloaded_info2, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Թرճ<EFBFBD><EFBFBD>򲢿<EFBFBD>ʼ<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD>.");
#else #else
InsertGuiPair(update_downloaded_info1, "A new version of TTCalc has been downloaded."); InsertGuiPair(update_downloaded_info1, "<EFBFBD>°汾<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD>");
InsertGuiPair(update_downloaded_info2, ""); InsertGuiPair(update_downloaded_info2, "");
#endif #endif
InsertGuiPair(update_download_error, "There was a problem with downloading, please try again later."); InsertGuiPair(update_download_error, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ժ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԡ<EFBFBD>");
InsertGuiPair(pad_title, "Pad"); InsertGuiPair(pad_title, "ճ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(pad_menu_file, "&File"); InsertGuiPair(pad_menu_file, "&<EFBFBD>ļ<EFBFBD>");
InsertGuiPair(pad_menu_edit, "&Edit"); InsertGuiPair(pad_menu_edit, "&<EFBFBD>");
InsertGuiPair(pad_menu_file_new, "&New"); // temporarily not used InsertGuiPair(pad_menu_file_new, "&<EFBFBD>½<EFBFBD>"); // temporarily not used
InsertGuiPair(pad_menu_file_open, "&Open..."); InsertGuiPair(pad_menu_file_open, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
InsertGuiPair(pad_menu_file_saveas, "Save &as..."); InsertGuiPair(pad_menu_file_saveas, "&<26><><EFBFBD><EFBFBD>Ϊ...");
InsertGuiPair(pad_menu_file_close, "&Close"); InsertGuiPair(pad_menu_file_close, "&<EFBFBD>ر<EFBFBD>");
InsertGuiPair(pad_menu_edit_undo, "&Undo \tCtrl+Z"); InsertGuiPair(pad_menu_edit_undo, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tCtrl+Z");
InsertGuiPair(pad_menu_edit_cut, "Cu&t \tCtrl+X"); InsertGuiPair(pad_menu_edit_cut, "&<26><><EFBFBD><EFBFBD> \tCtrl+X");
InsertGuiPair(pad_menu_edit_copy, "&Copy \tCtrl+C"); InsertGuiPair(pad_menu_edit_copy, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tCtrl+C");
InsertGuiPair(pad_menu_edit_paste, "&Paste \tCtrl+V"); InsertGuiPair(pad_menu_edit_paste, "&ճ<EFBFBD><EFBFBD> \tCtrl+V");
InsertGuiPair(pad_menu_edit_del, "&Del \tDel"); InsertGuiPair(pad_menu_edit_del, "&ɾ<EFBFBD><EFBFBD> \tDel");
InsertGuiPair(pad_menu_edit_select_all, "Select &all \tCtrl+A"); InsertGuiPair(pad_menu_edit_select_all, "&ȫѡ \tCtrl+A");
@@ -1518,7 +1526,8 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_check_at_startup, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); InsertGuiPair(update_check_at_startup, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
InsertGuiPair(update_check_for_info, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..."); InsertGuiPair(update_check_for_info, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
InsertGuiPair(update_is_new_version, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %d.%d.%d, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>..."); InsertGuiPair(update_is_new_version, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %d.%d.%d, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>...");
InsertGuiPair(update_no_new_version, "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>."); InsertGuiPair(update_no_new_version1, "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.");
InsertGuiPair(update_no_new_version2, "");
InsertGuiPair(update_download_from, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>..."); InsertGuiPair(update_download_from, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>...");
#ifndef TTCALC_PORTABLE #ifndef TTCALC_PORTABLE
InsertGuiPair(update_downloaded_info1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>."); InsertGuiPair(update_downloaded_info1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.");
@@ -1712,7 +1721,8 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_check_at_startup, "Always check for the update on startup"); InsertGuiPair(update_check_at_startup, "Always check for the update on startup");
InsertGuiPair(update_check_for_info, "Press Next to check for the update..."); InsertGuiPair(update_check_for_info, "Press Next to check for the update...");
InsertGuiPair(update_is_new_version, "Version %d.%d.%d is available, press Next to download..."); InsertGuiPair(update_is_new_version, "Version %d.%d.%d is available, press Next to download...");
InsertGuiPair(update_no_new_version, "There is not a new version available."); InsertGuiPair(update_no_new_version1, "There is not a newer version available.");
InsertGuiPair(update_no_new_version2, "You have the newest version.");
InsertGuiPair(update_download_from, "Downloading from..."); InsertGuiPair(update_download_from, "Downloading from...");
#ifndef TTCALC_PORTABLE #ifndef TTCALC_PORTABLE
InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded."); InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded.");

View File

@@ -162,7 +162,8 @@ public:
update_check_at_startup, update_check_at_startup,
update_check_for_info, update_check_for_info,
update_is_new_version, update_is_new_version,
update_no_new_version, update_no_new_version1,
update_no_new_version2,
update_download_from, update_download_from,
update_downloaded_info1, update_downloaded_info1,
update_downloaded_info2, update_downloaded_info2,

View File

@@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2006-2009, Tomasz Sowa * Copyright (c) 2006-2010, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -61,10 +61,20 @@ int when_scientific;
int rounding; int rounding;
bool remove_zeroes; bool remove_zeroes;
int angle_deg_rad_grad; int angle_deg_rad_grad;
char decimal_point; char decimal_point;
char grouping;
char input_comma1;
char input_comma2;
char param_sep;
Languages::Country country; Languages::Country country;
int last_variables_id;
int last_functions_id;
ttmath::Objects * variables; ttmath::Objects * variables;
ttmath::Objects * functions; ttmath::Objects * functions;
ttmath::ErrorCode code; ttmath::ErrorCode code;
bool calculated; bool calculated;
@@ -113,8 +123,18 @@ unsigned int i = 0;
try try
{ {
ValueType result = matparser.stack[i].value; ValueType result = matparser.stack[i].value;
ttmath::Conv conv;
conv.base = base_output;
conv.scient = always_scientific;
conv.scient_from = when_scientific;
conv.round = rounding;
conv.trim_zeroes = remove_zeroes;
conv.comma = decimal_point;
conv.group = grouping;
if( result.ToString(res2, base_output, always_scientific, when_scientific, rounding, remove_zeroes, decimal_point) ) if( result.ToString(res2, conv) )
res2 = GetPrgRes()->GetLanguages()->GuiMessage(country, Languages::overflow_during_printing); res2 = GetPrgRes()->GetLanguages()->GuiMessage(country, Languages::overflow_during_printing);
} }
catch(...) catch(...)
@@ -217,8 +237,12 @@ void ParseString(ttmath::Parser<ValueType> & matparser)
{ {
matparser.SetBase(base_input); matparser.SetBase(base_input);
matparser.SetDegRadGrad(angle_deg_rad_grad); matparser.SetDegRadGrad(angle_deg_rad_grad);
matparser.SetFunctions(functions); matparser.SetComma(input_comma1, input_comma2);
matparser.SetGroup(grouping);
matparser.SetParamSep(param_sep);
matparser.SetVariables(variables); matparser.SetVariables(variables);
matparser.SetFunctions(functions);
code = matparser.Parse(parse_string.c_str()); code = matparser.Parse(parse_string.c_str());
@@ -237,11 +261,11 @@ void SetParameters()
remove_zeroes = GetPrgRes()->GetRemovingZeroes(); remove_zeroes = GetPrgRes()->GetRemovingZeroes();
angle_deg_rad_grad = GetPrgRes()->GetDegRadGrad(); angle_deg_rad_grad = GetPrgRes()->GetDegRadGrad();
country = GetPrgRes()->GetLanguages()->GetCurrentLanguage(); country = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
decimal_point = GetPrgRes()->GetDecimalPointChar();
grouping = GetPrgRes()->GetGroupingChar();
param_sep = GetPrgRes()->GetParamSepChar();
if( GetPrgRes()->GetDecimalPoint() == 0 ) GetPrgRes()->GetInputDecimalPointChar(&input_comma1, &input_comma2);
decimal_point = '.';
else
decimal_point = ',';
variables = GetPrgRes()->GetVariables(); variables = GetPrgRes()->GetVariables();
functions = GetPrgRes()->GetFunctions(); functions = GetPrgRes()->GetFunctions();
@@ -338,6 +362,8 @@ Languages * pLang = GetPrgRes()->GetLanguages();
ModifyMenu(menu, menu_id, MF_BYCOMMAND|MF_STRING, menu_id, pLang->GuiMessage(msg) ); ModifyMenu(menu, menu_id, MF_BYCOMMAND|MF_STRING, menu_id, pLang->GuiMessage(msg) );
} }
void SetPadMenuLanguage(HWND hWnd) void SetPadMenuLanguage(HWND hWnd)
{ {
HMENU menu = GetMenu(hWnd); HMENU menu = GetMenu(hWnd);
@@ -878,6 +904,7 @@ ATOM a = RegisterPadClass(ttcalc_pad_class_name);
0 /*GetPrgRes()->GetMainWindow()*/, 0, GetPrgRes()->GetInstance(), 0); 0 /*GetPrgRes()->GetMainWindow()*/, 0, GetPrgRes()->GetInstance(), 0);
GetPrgRes()->SetPadWindow(pad); GetPrgRes()->SetPadWindow(pad);
SetPadLanguage();
GetPrgRes()->SetPadMaximized( pad_maximized_from_file ); GetPrgRes()->SetPadMaximized( pad_maximized_from_file );
GetPrgRes()->ShowPad( GetPrgRes()->IsPadVisible() ); GetPrgRes()->ShowPad( GetPrgRes()->IsPadVisible() );

View File

@@ -89,6 +89,8 @@ ttmath::ErrorCode ParserManager::GetLastCode()
} }
ttmath::ErrorCode ParserManager::Parse() ttmath::ErrorCode ParserManager::Parse()
{ {
try try
@@ -98,41 +100,21 @@ ttmath::ErrorCode ParserManager::Parse()
switch( precision ) switch( precision )
{ {
case 0: case 0:
parser1.SetBase(base_input); Parse(parser1);
parser1.SetDegRadGrad(angle_deg_rad_grad);
parser1.SetComma(input_comma1, input_comma2);
parser1.SetGroup(grouping);
parser1.SetParamSep(param_sep);
code = parser1.Parse(buffer);
break; break;
case 1: case 1:
parser2.SetBase(base_input); Parse(parser2);
parser2.SetDegRadGrad(angle_deg_rad_grad);
parser2.SetComma(input_comma1, input_comma2);
parser2.SetGroup(grouping);
parser2.SetParamSep(param_sep);
code = parser2.Parse(buffer);
break; break;
default: default:
parser3.SetBase(base_input); Parse(parser3);
parser3.SetDegRadGrad(angle_deg_rad_grad);
parser3.SetComma(input_comma1, input_comma2);
parser3.SetGroup(grouping);
parser3.SetParamSep(param_sep);
code = parser3.Parse(buffer);
break; break;
} }
#else #else
parser1.SetBase(base_input); Parse(parser1);
parser1.SetDegRadGrad(angle_deg_rad_grad);
parser1.SetComma(input_comma1, input_comma2);
parser1.SetGroup(grouping);
parser1.SetParamSep(param_sep);
code = parser1.Parse(buffer);
#endif #endif
} }
@@ -170,10 +152,9 @@ unsigned int i;
last_functions_id = GetPrgRes()->GetFunctionsId(); last_functions_id = GetPrgRes()->GetFunctionsId();
} }
//
base_input = GetPrgRes()->GetBaseInput();
base_output = GetPrgRes()->GetBaseOutput();
base_input = GetPrgRes()->GetBaseInput();
base_output = GetPrgRes()->GetBaseOutput();
always_scientific = GetPrgRes()->GetDisplayAlwaysScientific(); always_scientific = GetPrgRes()->GetDisplayAlwaysScientific();
when_scientific = GetPrgRes()->GetDisplayWhenScientific(); when_scientific = GetPrgRes()->GetDisplayWhenScientific();
rounding = GetPrgRes()->GetDisplayRounding(); rounding = GetPrgRes()->GetDisplayRounding();
@@ -181,55 +162,14 @@ unsigned int i;
remove_zeroes = GetPrgRes()->GetRemovingZeroes(); remove_zeroes = GetPrgRes()->GetRemovingZeroes();
angle_deg_rad_grad = GetPrgRes()->GetDegRadGrad(); angle_deg_rad_grad = GetPrgRes()->GetDegRadGrad();
country = GetPrgRes()->GetLanguages()->GetCurrentLanguage(); country = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
decimal_point = GetPrgRes()->GetDecimalPointChar();
grouping = GetPrgRes()->GetGroupingChar();
param_sep = GetPrgRes()->GetParamSepChar();
GetPrgRes()->GetInputDecimalPointChar(&input_comma1, &input_comma2);
conv_type = GetPrgRes()->GetConvert()->GetCurrentType(); conv_type = GetPrgRes()->GetConvert()->GetCurrentType();
GetPrgRes()->GetConvert()->GetCurrentUnit(conv_type, conv_input_unit, conv_output_unit); GetPrgRes()->GetConvert()->GetCurrentUnit(conv_type, conv_input_unit, conv_output_unit);
if( GetPrgRes()->GetDecimalPoint() == 0 )
decimal_point = '.';
else
decimal_point = ',';
// grouping
static char group_table[] = "\0 `'.,"; // 5 items
int g = GetPrgRes()->GetGrouping();
if( g>=0 && g<=5 )
grouping = group_table[g];
else
grouping = 0;
// input decimal point
switch( GetPrgRes()->GetInputDecimalPoint() )
{
case 0:
input_comma1 = '.';
input_comma2 = ',';
break;
case 1:
input_comma1 = '.';
input_comma2 = 0;
break;
case 2:
default:
input_comma1 = ',';
input_comma2 = 0;
break;
}
// additional param separator
static char param_table[] = ";.,"; // 3 items
g = GetPrgRes()->GetParamSep();
if( g>=0 && g<=3 )
param_sep = param_table[g];
else
param_sep = ';';
} }

View File

@@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2006-2009, Tomasz Sowa * Copyright (c) 2006-2010, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -134,12 +134,13 @@ private:
int precision; int precision;
Languages::Country country; Languages::Country country;
ttmath::ErrorCode code; ttmath::ErrorCode code;
char decimal_point;
int angle_deg_rad_grad; int angle_deg_rad_grad;
int grouping;
int input_comma1; char decimal_point;
int input_comma2; char grouping;
int param_sep; char input_comma1;
char input_comma2;
char param_sep;
/* /*
some buffers which we use in some method in the second thread, some buffers which we use in some method in the second thread,
@@ -230,6 +231,18 @@ private:
return 0; return 0;
} }
template<class ValueType>
void Parse(ttmath::Parser<ValueType> & matparser)
{
matparser.SetBase(base_input);
matparser.SetDegRadGrad(angle_deg_rad_grad);
matparser.SetComma(input_comma1, input_comma2);
matparser.SetGroup(grouping);
matparser.SetParamSep(param_sep);
code = matparser.Parse(buffer);
}
}; };

View File

@@ -381,8 +381,78 @@ int ProgramResources::GetDecimalPoint()
} }
char ProgramResources::GetDecimalPointChar()
{
char c;
if( GetDecimalPoint() == 0 )
c = '.';
else
c = ',';
return c;
}
char ProgramResources::GetGroupingChar()
{
char c;
// grouping
static char group_table[] = "\0 `'.,"; // 5 items
int g = GetGrouping();
if( g>=0 && g<=5 )
c = group_table[g];
else
c = 0;
return c;
}
void ProgramResources::GetInputDecimalPointChar(char * comma1, char * comma2)
{
// input decimal point
switch( GetInputDecimalPoint() )
{
case 0:
*comma1 = '.';
*comma2 = ',';
break;
case 1:
*comma1 = '.';
*comma2 = 0;
break;
case 2:
default:
*comma1 = ',';
*comma2 = 0;
break;
}
}
char ProgramResources::GetParamSepChar()
{
char c;
// additional param separator
static char param_table[] = ";.,"; // 3 items
int sep = GetParamSep();
if( sep>=0 && sep<=3 )
c = param_table[sep];
else
c = ';';
return c;
}
//
ttmath::Objects * ProgramResources::GetVariables() ttmath::Objects * ProgramResources::GetVariables()
{ {

View File

@@ -366,14 +366,6 @@ public:
*/ */
int GetBadLine(); int GetBadLine();
/*!
setting and returning the decimal point used during printig values
0 - '.'
1 - ','
*/
void SetDecimalPoint(int decimal);
int GetDecimalPoint();
/*! /*!
setting and returning the state of removing trailing zeroes setting and returning the state of removing trailing zeroes
@@ -418,6 +410,12 @@ public:
int GetGrouping(); int GetGrouping();
/*!
returning the grouping character
*/
char GetGroupingChar();
/*! /*!
setting/getting the input decimal point setting/getting the input decimal point
0 - dot or comma, 1 - dot, 2 - comma 0 - dot or comma, 1 - dot, 2 - comma
@@ -426,14 +424,41 @@ public:
int GetInputDecimalPoint(); int GetInputDecimalPoint();
/*!
returning the input decimal point characters
*/
void GetInputDecimalPointChar(char * comma1, char * comma2);
/*!
setting and returning the decimal point used during printig values
0 - '.'
1 - ','
*/
void SetDecimalPoint(int decimal);
int GetDecimalPoint();
/*!
returning the decimal point char (used during printig values)
*/
char GetDecimalPointChar();
/*! /*!
setting/getting the separator of function arguments setting/getting the separator of function arguments
0 - semicolon, 1 - dot, 2 - comma 0 - semicolon, 1 - semicolon or dot, 2 - semicolon or comma
*/ */
void SetParamSep(int s); void SetParamSep(int s);
int GetParamSep(); int GetParamSep();
/*!
returning the character of param separator
either a semicolon, dot or comma
*/
char GetParamSepChar();
/*! /*!
setting/getting the test which is made when the program starts setting/getting the test which is made when the program starts
(testing for an update) (testing for an update)

View File

@@ -1,19 +1,19 @@
# this file is downloaded from a webserver during checking for an update # this file is downloaded from a webserver during checking for an update
[normal] [normal]
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.0/ttcalc-0.9.0-setup.exe?use_mirror=dfn url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.1/ttcalc-0.9.1-setup.exe?use_mirror=dfn
filename = ttcalc-0.9.0-setup.exe filename = ttcalc-0.9.1-setup.exe
version.major = 0 version.major = 0
version.minor = 9 version.minor = 9
version.revision = 0 version.revision = 1
version.prerelease = 0 version.prerelease = 0
[portable] [portable]
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.0/ttcalc-portable-0.9.0-bin.tar.gz?use_mirror=dfn url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.1/ttcalc-portable-0.9.1-bin.tar.gz?use_mirror=dfn
filename = ttcalc-portable-0.9.0-bin.tar.gz filename = ttcalc-portable-0.9.1-bin.tar.gz
version.major = 0 version.major = 0
version.minor = 9 version.minor = 9
version.revision = 0 version.revision = 1
version.prerelease = 0 version.prerelease = 0

View File

@@ -352,7 +352,8 @@ char buffer[200];
else else
{ {
level = 100; level = 100;
SetDlgItemText(hwnd, IDC_UPDATE_INFO1, pl->GuiMessage(Languages::update_no_new_version)); SetDlgItemText(hwnd, IDC_UPDATE_INFO1, pl->GuiMessage(Languages::update_no_new_version1));
SetDlgItemText(hwnd, IDC_UPDATE_INFO2, pl->GuiMessage(Languages::update_no_new_version2));
SetDlgItemText(hwnd, IDC_BUTTON_NEXT, pl->GuiMessage(Languages::update_button_finish)); SetDlgItemText(hwnd, IDC_BUTTON_NEXT, pl->GuiMessage(Languages::update_button_finish));
ShowWindow(GetDlgItem(hwnd, IDC_PROGRESS), SW_HIDE); ShowWindow(GetDlgItem(hwnd, IDC_PROGRESS), SW_HIDE);
EnableWindow(GetDlgItem(hwnd, IDC_BUTTON_CANCEL), false); EnableWindow(GetDlgItem(hwnd, IDC_BUTTON_CANCEL), false);