From e87308c7219e45aa8b758c18a866f5edc2d22b3e Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Thu, 23 Sep 2010 22:52:28 +0000 Subject: [PATCH] added: blocks try{} catch(...) to first and second thread changed: version of the program: 0.9.2 now git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@322 e52654a7-88a9-db11-a3e9-0013d4bc506e --- CHANGELOG | 6 +++++- setup/innosetup.iss | 4 ++-- src/Makefile.dep | 26 ++++++++++++++------------ src/compileconfig.h | 2 +- src/ttcalc_update.ini | 12 ++++++------ src/update.cpp | 12 +++++++++--- src/winmain.cpp | 8 ++++++++ 7 files changed, 45 insertions(+), 25 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4764571..3369cb7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -Version 0.9.2 prerelease (2010.09.14): +Version 0.9.2 (2010.09.24): * added: Italian translation made by Damiano Monaco * added: menu: edit->swap (ctrl+W) @@ -6,6 +6,10 @@ Version 0.9.2 prerelease (2010.09.14): Changes from TTMath 0.9.2 relating to TTCalc: * fixed: Big::Add() sometimes incorrectly rounded the last bit from its mantissa + * fixed: Big::ToString method + in some cases when in the output string the exponent should be equal zero + the method changes the exponent to one so the last digit from the mantissa + was lost Version 0.9.1 (2010.02.07): diff --git a/setup/innosetup.iss b/setup/innosetup.iss index 7f9107f..e13225f 100644 --- a/setup/innosetup.iss +++ b/setup/innosetup.iss @@ -3,8 +3,8 @@ [Setup] AppName=TTCalc -AppVerName=TTCalc 0.9.1 -AppVersion=0.9.1 +AppVerName=TTCalc 0.9.2 +AppVersion=0.9.2 AppPublisher=Tomasz Sowa AppPublisherURL=http://ttcalc.sourceforge.net AppSupportURL=http://ttcalc.sourceforge.net diff --git a/src/Makefile.dep b/src/Makefile.dep index 3caadad..c41eb21 100644 --- a/src/Makefile.dep +++ b/src/Makefile.dep @@ -1,24 +1,26 @@ # add "resource.o" to "o" as well o = resource.o calculation.o convert.o download.o functions.o iniparser.o languages.o mainwindow.o misc.o pad.o parsermanager.o programresources.o tabs.o threadcontroller.o update.o variables.o winmain.o -calculation.o: calculation.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h + +calculation.o: calculation.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h convert.o: convert.cpp convert.h compileconfig.h bigtypes.h download.o: download.cpp compileconfig.h download.h -functions.o: functions.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h -iniparser.o: iniparser.cpp compileconfig.h iniparser.h -languages.o: languages.cpp compileconfig.h languages.h bigtypes.h -mainwindow.o: mainwindow.cpp compileconfig.h winmain.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h tabs.h pad.h update.h download.h misc.h -misc.o: misc.cpp -pad.o: pad.cpp programresources.h compileconfig.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h pad.h -parsermanager.o: parsermanager.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h -programresources.o: programresources.cpp compileconfig.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h -tabs.o: tabs.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h -threadcontroller.o: threadcontroller.cpp threadcontroller.h stopcalculating.h compileconfig.h +functions.o: functions.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h +iniparser.o: iniparser.cpp compileconfig.h iniparser.h +languages.o: languages.cpp compileconfig.h languages.h bigtypes.h +mainwindow.o: mainwindow.cpp compileconfig.h winmain.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h tabs.h pad.h update.h download.h misc.h +misc.o: misc.cpp +pad.o: pad.cpp programresources.h compileconfig.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h pad.h +parsermanager.o: parsermanager.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h +programresources.o: programresources.cpp compileconfig.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h +tabs.o: tabs.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h +threadcontroller.o: threadcontroller.cpp threadcontroller.h stopcalculating.h compileconfig.h update.o: update.cpp compileconfig.h update.h download.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h messages.h resource.h winmain.h tabs.h pad.h misc.h -variables.o: variables.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h +variables.o: variables.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h winmain.o: winmain.cpp compileconfig.h winmain.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h tabs.h pad.h update.h download.h + .SUFFIXES: .cpp .o .cpp.o: diff --git a/src/compileconfig.h b/src/compileconfig.h index e51a82f..a4b50f0 100644 --- a/src/compileconfig.h +++ b/src/compileconfig.h @@ -56,7 +56,7 @@ #define TTCALC_MAJOR_VER 0 #define TTCALC_MINOR_VER 9 #define TTCALC_REVISION_VER 2 -#define TTCALC_PRERELEASE_VER 1 +#define TTCALC_PRERELEASE_VER 0 diff --git a/src/ttcalc_update.ini b/src/ttcalc_update.ini index 005a7db..dca052e 100644 --- a/src/ttcalc_update.ini +++ b/src/ttcalc_update.ini @@ -1,19 +1,19 @@ # this file is downloaded from a webserver during checking for an update [normal] -url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.1/ttcalc-0.9.1-setup.exe -filename = ttcalc-0.9.1-setup.exe +url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.2/ttcalc-0.9.2-setup.exe +filename = ttcalc-0.9.2-setup.exe version.major = 0 version.minor = 9 -version.revision = 1 +version.revision = 2 version.prerelease = 0 [portable] -url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.1/ttcalc-portable-0.9.1-bin.tar.gz -filename = ttcalc-portable-0.9.1-bin.tar.gz +url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.2/ttcalc-portable-0.9.2-bin.tar.gz +filename = ttcalc-portable-0.9.2-bin.tar.gz version.major = 0 version.minor = 9 -version.revision = 1 +version.revision = 2 version.prerelease = 0 diff --git a/src/update.cpp b/src/update.cpp index 7a4b222..554f40d 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -594,10 +594,16 @@ unsigned __stdcall UpdateBackgroundProc(void *) { using namespace Background; - if( CheckUpdateFromIni(0, url_, remote_file_name_, major_, minor_, revision_, prerelease_, 0) ) + try + { + if( CheckUpdateFromIni(0, url_, remote_file_name_, major_, minor_, revision_, prerelease_, 0) ) + { + HWND main = GetPrgRes()->GetMainWindow(); + SendMessage(main, WM_UPDATE_EXISTS, 0, 0); + } + } + catch(...) { - HWND main = GetPrgRes()->GetMainWindow(); - SendMessage(main, WM_UPDATE_EXISTS, 0, 0); } _endthreadex(0); diff --git a/src/winmain.cpp b/src/winmain.cpp index e6522d4..7a295dc 100644 --- a/src/winmain.cpp +++ b/src/winmain.cpp @@ -53,6 +53,8 @@ */ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) { + try + { GetPrgRes()->SetInstance(hInstance); // we're using GetLanguages() simultaneously in two threads, this is to be sure @@ -112,6 +114,12 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) DestroyPadWindow(); CloseHandle( (HANDLE)thread_handle ); + } + catch(...) + { + ShowError( Languages::unknown_error ); + } + return 0; }