You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(36) |
Sep
(44) |
Oct
(25) |
Nov
(2) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
(4) |
Aug
(8) |
Sep
(16) |
Oct
|
Nov
(2) |
Dec
(28) |
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(33) |
Jul
(5) |
Aug
(7) |
Sep
(9) |
Oct
(31) |
Nov
(25) |
Dec
(21) |
2011 |
Jan
(2) |
Feb
(12) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mapi B. <ma...@us...> - 2009-10-25 17:52:08
|
Update of /cvsroot/easycalc/PPCport In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29145 Modified Files: EasyCalc.vcproj ReadMe.txt Log Message: Functional, not much bugs should be left, still limited in function (no list, no matrix, no graph ..) Index: EasyCalc.vcproj =================================================================== RCS file: /cvsroot/easycalc/PPCport/EasyCalc.vcproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** EasyCalc.vcproj 21 Oct 2009 20:54:35 -0000 1.9 --- EasyCalc.vcproj 25 Oct 2009 17:51:53 -0000 1.10 *************** *** 408,412 **** Optimization="2" FavorSizeOrSpeed="2" ! PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCKETPC2003_UI_MODEL" RuntimeLibrary="0" UsePrecompiledHeader="2" --- 408,413 ---- Optimization="2" FavorSizeOrSpeed="2" ! AdditionalIncludeDirectories="E:\AppsDev\EasyCalc\EasyCalc;E:\AppsDev\EasyCalc\EasyCalc\include;E:\AppsDev\EasyCalc\EasyCalc\core\mlib;"E:\AppsDev\EasyCalc\EasyCalc\system - UI"" ! PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCKETPC2003_UI_MODEL;SPECFUN_ENABLED;GRAPHS_ENABLED" RuntimeLibrary="0" UsePrecompiledHeader="2" Index: ReadMe.txt =================================================================== RCS file: /cvsroot/easycalc/PPCport/ReadMe.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReadMe.txt 22 Jun 2009 21:53:07 -0000 1.2 --- ReadMe.txt 25 Oct 2009 17:51:55 -0000 1.3 *************** *** 1,63 **** ======================================================================== ! WIN32 APPLICATION : EasyCalc Project Overview ======================================================================== ! AppWizard has created this EasyCalc application for you. ! ! This file contains a summary of what you will find in each of the files that ! make up your EasyCalc application. ! ! ! EasyCalc.vcproj ! This is the main project file for VC++ projects generated using an Application Wizard. ! It contains information about the version of Visual C++ that generated the file, and ! information about the platforms, configurations, and project features selected with the ! Application Wizard. ! ! EasyCalc.cpp ! This is the main application source file. ! ! ///////////////////////////////////////////////////////////////////////////// ! AppWizard has created the following resources: ! ! ! EasyCalcppc.rc ! This is a listing of all of the Microsoft Windows resources that the ! program uses when compiling for the Pocket PC 2003 platform, or a platform ! that supports the same user interface model. It includes the icons, bitmaps, ! and cursors that are stored in the RES subdirectory. This file can be ! directly edited in Microsoft Visual C++. When the .rc file is persisted, ! the defines in the data section are persisted as the hexadecimal version ! of the numeric value they are defined to rather than the friendly name of ! the define. ! EasyCalcppc.rc2 ! This file contains resources that are not edited by Microsoft ! Visual C++. You should place all resources not editable by ! the resource editor in this file. ! Resourceppc.h ! This is the standard header file, which defines new resource IDs. ! Microsoft Visual C++ reads and updates this file. ! EasyCalc.ico ! This is an icon file, which is used as the application's icon (32x32). ! This icon is included by the main resource file EasyCalc.rc. ! ///////////////////////////////////////////////////////////////////////////// ! Other standard files: ! StdAfx.h, StdAfx.cpp ! These files are used to build a precompiled header (PCH) file ! named EasyCalc.pch and a precompiled types file named StdAfx.obj. ! ///////////////////////////////////////////////////////////////////////////// ! Other notes: ! AppWizard uses "TODO:" comments to indicate parts of the source code you ! should add to or customize. ! /////////////////////////////////////////////////////////////////////////////s \ No newline at end of file --- 1,63 ---- ======================================================================== ! EasyCalc Pocket PC (PPC) port ======================================================================== ! Differences with legacy Palm EasyCalc: ! -------------------------------------- ! - Fully skinable: one can create new skins (.gif and .layout files) to ! customize EasyCalc look as they want, including redesigning buttons ! and their function or placement, "à-la" free42. ! This doesn't require recompilation nor special skills, except some ! image crafting plus understanding the .layout syntax. ! - Dynamic change of skins: change them on the fly through the options ! panel. ! - The old B / S / I approach has been abandonned as being too specific. ! Any skin including the standard supplied one can have up to 3 customizable ! panels + graph, which can be accessed at any time by a tap on screen. + - Dynamic switch of language on the UI, by just going to the options panel. + No more several versions to pick from. + When starting for the first time, EasyCalc PPC determines the user + language and adopts it if it knows it. + - Adding or modifying a language doesn't require re-compilation, just a + Windows machine with an editor, and a click on a batch file to generate + the merged lang.rcp language file. Then transfer lang.rcp to the directory + where EasyCalc PPC is installed on your PDA, and next time it starts, the + new or modified language will be available and taken into account. + Note: if you modify a language file or add a new one, please post it + in the Feature Requests Tracker of EasyCalc on SourceForge + http://sourceforge.net/tracker/?group_id=13138&atid=363138 + so that can be accounted for in the next release of EasyCalc PPC. + - Not yet translated objects in a chosen language appear on the UI + as $$XXX, where XXX is the unique token to translate, originally in + english. To resolve that, just add a "$$XXX" = "<translated_text>" + in the corresponding language .rcp file, execute merge.bat, and + push the new lang.rcp on the Pocket PC as described above. + And don't forget to post your work to the Tracker ;-) ! - An imprecision on sqrt() with negative or complex numbers is resolved: ! sqrt(-1) returned a complex value which had a non 0 real part, whose ! value was depending on the precision of float / double / math means used ! behind calculations. I.e., sqrt(-1) was returning 6.12303176911E-17 + 1i ! on my PPC, and 0.000000000000147 + 1i on my Sony Clié emulation. ! This is now corrected, and it returns for example +1i in this case. ! - An imprecision on y^x with complex numbers or negative y with non integral x ! is resolved: ! i^2 was returning something like -1+1,0106431E-15i (again subject to the ! precision of calculations behind). ! Now this example calculation returns a proper -1. ! - An infinite loop has been corrected, when displaying 0 in Engineer mode. ! - Added the capability to enter and manipulate infinity (= Inf) in formulae ! and in the input area. ! - Minor text insert difference on ^(), 2^() and 10^(), where if text is ! selected, it is put between brackets instead of being overwritten. ! Mapi. \ No newline at end of file |
From: Mapi B. <ma...@us...> - 2009-10-21 20:57:02
|
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27791 Modified Files: Skin.cpp Skin.h StateManager.cpp StateManager.h Log Message: Bug fixes, dynamic language change enabled on UI. Index: StateManager.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/StateManager.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StateManager.h 17 Oct 2009 13:53:14 -0000 1.3 --- StateManager.h 21 Oct 2009 20:56:50 -0000 1.4 *************** *** 38,42 **** ~StateManager(void); ! t_state *init(TCHAR *fn, void *hWnd_p); void save(TCHAR *fn, void *hWnd_p); }; --- 38,43 ---- ~StateManager(void); ! t_state *getState(void); ! void init(TCHAR *fn, void *hWnd_p); void save(TCHAR *fn, void *hWnd_p); }; Index: Skin.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Skin.h 17 Oct 2009 13:53:14 -0000 1.5 --- Skin.h 21 Oct 2009 20:56:50 -0000 1.6 *************** *** 129,132 **** --- 129,135 ---- bool display_enabled; // Enable or disable screen repaints. TCHAR dispResult[RESULTAREA_SIZE]; // Contains the result area string + int result_len; // Length of the result area string (-1 to ask for recalculation of result_size) + SIZE result_size; // Result "would-be" size on display without clipping + int scroll_result; // DT_LEFT if scrolled left (left align), DT_RIGHT if scrolled right (right align) TCHAR inputText[INPUTAREA_SIZE]; // Used to get the input area string int pow_pos; // Current posistion right when writing *************** *** 181,184 **** --- 184,189 ---- void print_result(HDC hdc); void paint_result(HDC hdc); + void scroll_result_left(HWND hWnd); + void scroll_result_right(HWND hWnd); void print_resultpowInit(void *hdc, TCHAR *res_text); void print_resultpowNext(bool smallf, TCHAR *res_piece, int len); Index: StateManager.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/StateManager.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StateManager.cpp 17 Oct 2009 13:53:14 -0000 1.2 --- StateManager.cpp 21 Oct 2009 20:56:50 -0000 1.3 *************** *** 54,58 **** } ! t_state *StateManager::init(TCHAR *fn, void *hWnd_p) { stateFilename = fn; stateFile = _tfopen(fn, _T("rb")); --- 54,62 ---- } ! t_state *StateManager::getState(void) { ! return (&state); ! } ! ! void StateManager::init(TCHAR *fn, void *hWnd_p) { stateFilename = fn; stateFile = _tfopen(fn, _T("rb")); *************** *** 89,94 **** /* Coming from prefs.c, after preferences are loaded or initialized */ fp_set_prefs(calcPrefs.dispPrefs); - - return (&state); } --- 93,96 ---- Index: Skin.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Skin.cpp 17 Oct 2009 13:53:14 -0000 1.5 --- Skin.cpp 21 Oct 2009 20:56:50 -0000 1.6 *************** *** 31,34 **** --- 31,35 ---- #include "core/core_display.h" #include "core/Main.h" + #include "EasyCalc.h" /*------------------------------------------------------------------------------- *************** *** 78,81 **** --- 79,84 ---- keymap_length = 0; *dispResult = 0; // Empty string + result_len = 0; + scroll_result = DT_RIGHT; hwndE = NULL; display_enabled = true; *************** *** 525,529 **** } else { if (display_scale.x == 0) ! display_w = 219; else display_w = 131 * display_scale.x; --- 528,532 ---- } else { if (display_scale.x == 0) ! display_w = 217; else display_w = 131 * display_scale.x; *************** *** 1277,1280 **** --- 1280,1284 ---- HDC hdc = GetDC((HWND) hWnd_p); print_result(hdc); + ReleaseDC((HWND) hWnd_p, hdc); } *************** *** 1291,1295 **** --- 1295,1302 ---- COLORREF old_fg = SetTextColor(hdc, display_fg); BitBlt(hdc, display_loc.x, display_loc.y, display_w, 18, memdc, 0, 0, SRCCOPY); + DeleteDC(memdc); + result_len = -1; // Recalculate result_size in paint_result() + scroll_result = DT_RIGHT; paint_result(hdc); } *************** *** 1317,1322 **** HFONT oldFont = (HFONT)SelectObject(hdc, hFontNew); ! // Display text ! DrawText(hdc, dispResult, -1, &rc, DT_RIGHT | DT_BOTTOM | DT_SINGLELINE | DT_NOPREFIX); } --- 1324,1386 ---- HFONT oldFont = (HFONT)SelectObject(hdc, hFontNew); ! // Display text - scroll result is either DT_LEFT or DT_RIGHT ! if (result_len == -1) { ! result_len = _tcslen(dispResult); ! GetTextExtentPoint32(hdc, dispResult, result_len, &result_size); ! } ! DrawText(hdc, dispResult, -1, &rc, scroll_result | DT_BOTTOM | DT_SINGLELINE | DT_NOPREFIX); ! if (result_len > 0) { // Handle scroll annunciators when necessary ! if (result_size.cx > display_w) { ! if (scroll_result == DT_RIGHT) { // Light the scroll left annunciator ! shell_scroll_annunciators(ANNVAL_SCR_LEFT); ! } else { // Light the scroll right annunciator ! shell_scroll_annunciators(ANNVAL_SCR_RIGHT); ! } ! } else { ! shell_scroll_annunciators(ANNVAL_SCR_NONE); ! } ! } else { ! shell_scroll_annunciators(ANNVAL_SCR_NONE); ! } ! } ! ! /******************************************************************************** ! * OS specific: scroll result left in the display area. * ! ********************************************************************************/ ! void Skin::scroll_result_left(HWND hWnd) { ! HBITMAP bitmap = CreateBitmap(display_w, 18, 1, 1, disp_bitmap); ! HDC hdc = GetDC((HWND) hWnd); ! HDC memdc = CreateCompatibleDC(hdc); ! ! SelectObject(memdc, bitmap); ! ! COLORREF old_bg = SetBkColor(hdc, display_bg); ! COLORREF old_fg = SetTextColor(hdc, display_fg); ! BitBlt(hdc, display_loc.x, display_loc.y, display_w, 18, memdc, 0, 0, SRCCOPY); ! DeleteDC(memdc); ! ! scroll_result = DT_LEFT; ! paint_result(hdc); ! ReleaseDC(hWnd, hdc); ! } ! ! /******************************************************************************** ! * OS specific: scroll result right in the display area. * ! ********************************************************************************/ ! void Skin::scroll_result_right(HWND hWnd) { ! HBITMAP bitmap = CreateBitmap(display_w, 18, 1, 1, disp_bitmap); ! HDC hdc = GetDC((HWND) hWnd); ! HDC memdc = CreateCompatibleDC(hdc); ! ! SelectObject(memdc, bitmap); ! ! COLORREF old_bg = SetBkColor(hdc, display_bg); ! COLORREF old_fg = SetTextColor(hdc, display_fg); ! BitBlt(hdc, display_loc.x, display_loc.y, display_w, 18, memdc, 0, 0, SRCCOPY); ! DeleteDC(memdc); ! ! scroll_result = DT_RIGHT; ! paint_result(hdc); ! ReleaseDC(hWnd, hdc); } |
From: Mapi B. <ma...@us...> - 2009-10-21 20:56:45
|
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27764 Modified Files: resourceppc.h Log Message: Bug fixes, dynamic language change enabled on UI. Index: resourceppc.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/resourceppc.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** resourceppc.h 17 Oct 2009 13:53:14 -0000 1.3 --- resourceppc.h 21 Oct 2009 20:56:36 -0000 1.4 *************** *** 19,23 **** #define IDD_DATAMGR 139 #define IDD_EDITFCT 140 - #define IDD_RES_MENU1 141 #define IDD_LARGE_MENU 141 #define IDD_SLIM_MENU 142 --- 19,22 ---- *************** *** 33,37 **** #define IDC_SKIN2 1021 #define IDC_SKIN1 1022 - #define IDC_LIST1 1023 #define IDC_LIST_FV 1023 #define IDC_LIST_RESM 1034 --- 32,35 ---- *************** *** 43,47 **** #define IDC_EDIT1 1047 #define IDC_EDIT2 1048 - #define IDC_RCL 1053 #define IDC_USERF 1054 #define IDC_CALCF 1055 --- 41,44 ---- *************** *** 64,68 **** #define IDC_TRUNCPREC 1072 #define IDC_INTEGERS 1073 - #define IDC_PRECVAL2 1074 #define IDC_FORMATNUM 1074 #define IDC_STRIP_0 1075 --- 61,64 ---- *************** *** 75,78 **** --- 71,83 ---- #define IDC_ASSISTGROUP 1085 #define IDC_SIP1 1086 + #define IDC_VARNAME1 1087 + #define IDC_VARNAME2 1088 + #define IDC_TITLE3 1089 + #define IDC_TITLE1 1090 + #define IDC_VARNAME3 1091 + #define IDC_TITLE4 1091 + #define IDC_TITLE2 1092 + #define IDC_LANGUAGE_CB 1093 + #define IDC_LANGUAGE 1094 #define ID_TEST_TEST 32771 #define ID_EDIT_CANCEL 32772 *************** *** 86,91 **** #define IDM_FILE 40003 #define IDM_EDIT 40004 - #define IDC_TITLE -1 - #define IDC_VARNAME -1 // Next default values for new objects --- 91,94 ---- *************** *** 94,100 **** #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 ! #define _APS_NEXT_RESOURCE_VALUE 148 #define _APS_NEXT_COMMAND_VALUE 32778 ! #define _APS_NEXT_CONTROL_VALUE 1087 #define _APS_NEXT_SYMED_VALUE 112 #endif --- 97,103 ---- #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 ! #define _APS_NEXT_RESOURCE_VALUE 149 #define _APS_NEXT_COMMAND_VALUE 32778 ! #define _APS_NEXT_CONTROL_VALUE 1095 #define _APS_NEXT_SYMED_VALUE 112 #endif |
From: Mapi B. <ma...@us...> - 2009-10-21 20:56:33
|
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27742 Modified Files: EasyCalc.layout EasyCalcppc.aps EasyCalcppc.rc Log Message: Bug fixes, dynamic language change enabled on UI. Index: EasyCalc.layout =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.layout,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EasyCalc.layout 17 Oct 2009 13:53:14 -0000 1.3 --- EasyCalc.layout 21 Oct 2009 20:56:25 -0000 1.4 *************** *** 3,8 **** # Skin rectangle coordinates x1,y1,x2,y2 Skin: 0,0,240,268 ! # Description of the display area: x1,y1 ? ? fg_color bg_color ! Display: 7,13 0 3 a3b39d 0b2327 # Active elements: num x1,y1,l,h (on screen) x1_off,y1_off x1_on,y1_on (in the gif) --- 3,10 ---- # Skin rectangle coordinates x1,y1,x2,y2 Skin: 0,0,240,268 ! # Description of the display area: x1,y1 xscale yscale fg_color bg_color ! # With xscale = 0, screen width is 217 dots (only value used for now). ! # Do not touch yscale either for now. ! Display: 9,13 0 3 a3b39d 0b2327 # Active elements: num x1,y1,l,h (on screen) x1_off,y1_off x1_on,y1_on (in the gif) *************** *** 15,27 **** Annunciator: 7 134,6,13,7 100,268 100,275 # Binary indicator Annunciator: 8 150,6,16,7 112,268 112,275 # Hexadecimal indicator ! Annunciator: 9 205,6,6,7 0,268 0,275 # Skin 1 indicator ! Annunciator: 10 212,6,6,7 5,268 5,275 # Skin 2 indicator ! Annunciator: 11 219,6,6,7 10,268 10,275 # Skin 3 indicator ! Annunciator: 12 226,6,6,7 15,268 15,275 # Graph indicator ! Annunciator: 13 170,6,7,7 139,268 139,275 # Var list indicator ! Annunciator: 14 178,6,6,7 145,268 145,275 # User fct list indicator ! Annunciator: 15 185,6,6,7 150,268 150,275 # Calc fct list indicator ! Annunciator: 16 226,26,7,7 127,268 127,275 # Result Menu indicator ! Annunciator: 17 226,34,7,7 133,268 133,275 # History Menu indicator # Keys on the calculator gif: --- 17,31 ---- Annunciator: 7 134,6,13,7 100,268 100,275 # Binary indicator Annunciator: 8 150,6,16,7 112,268 112,275 # Hexadecimal indicator ! Annunciator: 9 4,16,5,7 155,268 155,275 # Result scroll left indicator ! Annunciator: 10 227,16,5,7 159,268 159,275 # Result scroll right indicator ! Annunciator: 11 205,6,6,7 0,268 0,275 # Skin 1 indicator ! Annunciator: 12 212,6,6,7 5,268 5,275 # Skin 2 indicator ! Annunciator: 13 219,6,6,7 10,268 10,275 # Skin 3 indicator ! Annunciator: 14 226,6,6,7 15,268 15,275 # Graph indicator ! Annunciator: 15 170,6,7,7 139,268 139,275 # Var list indicator ! Annunciator: 16 178,6,6,7 145,268 145,275 # User fct list indicator ! Annunciator: 17 185,6,6,7 150,268 150,275 # Calc fct list indicator ! Annunciator: 18 226,26,7,7 127,268 127,275 # Result Menu indicator ! Annunciator: 19 226,34,7,7 133,268 133,275 # History Menu indicator # Keys on the calculator gif: *************** *** 189,193 **** Key: -2 162,70,32,22 167,75,22,12 167,74 Key: -1 201,70,32,22 206,75,22,12 206,74 ! Key: 38 6,97,32,22 11,102,22,12 11,101 Key: 31 45,97,32,22 50,102,22,12 50,101 Key: 30 84,97,32,22 89,102,22,12 89,101 --- 193,197 ---- Key: -2 162,70,32,22 167,75,22,12 167,74 Key: -1 201,70,32,22 206,75,22,12 206,74 ! Key: 48 6,97,32,22 11,102,22,12 11,101 Key: 31 45,97,32,22 50,102,22,12 50,101 Key: 30 84,97,32,22 89,102,22,12 89,101 Index: EasyCalcppc.rc =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalcppc.rc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EasyCalcppc.rc 17 Oct 2009 13:53:14 -0000 1.3 --- EasyCalcppc.rc 21 Oct 2009 20:56:25 -0000 1.4 *************** *** 45,49 **** PUSHBUTTON "Cancel",IDCANCEL,73,41,41,14 COMBOBOX IDC_VARCOMBO,43,7,71,47,CBS_DROPDOWN | CBS_SORT | CBS_LOWERCASE | WS_VSCROLL | WS_GROUP | WS_TABSTOP ! LTEXT "Name:",IDC_VARNAME,0,7,35,12 CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE | WS_TABSTOP,47,41,14,14 END --- 45,49 ---- PUSHBUTTON "Cancel",IDCANCEL,73,41,41,14 COMBOBOX IDC_VARCOMBO,43,7,71,47,CBS_DROPDOWN | CBS_SORT | CBS_LOWERCASE | WS_VSCROLL | WS_GROUP | WS_TABSTOP ! LTEXT "Name:",IDC_VARNAME3,0,7,35,12 CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE | WS_TABSTOP,47,41,14,14 END *************** *** 58,62 **** PUSHBUTTON "F",IDC_USERF,127,70,16,14 PUSHBUTTON "f",IDC_CALCF,143,70,16,14 ! LTEXT "Name:",IDC_VARNAME,0,9,25,8 EDITTEXT IDC_EDIT1,32,7,60,14,ES_LOWERCASE | ES_AUTOHSCROLL | WS_GROUP EDITTEXT IDC_EDIT2,0,24,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL --- 58,62 ---- PUSHBUTTON "F",IDC_USERF,127,70,16,14 PUSHBUTTON "f",IDC_CALCF,143,70,16,14 ! LTEXT "Name:",IDC_VARNAME1,0,9,25,8 EDITTEXT IDC_EDIT1,32,7,60,14,ES_LOWERCASE | ES_AUTOHSCROLL | WS_GROUP EDITTEXT IDC_EDIT2,0,24,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL *************** *** 87,91 **** PUSHBUTTON "F",IDC_USERF,127,70,16,14 PUSHBUTTON "f",IDC_CALCF,143,70,16,14 ! LTEXT "Name:",IDC_VARNAME,0,9,25,8 EDITTEXT IDC_EDIT1,32,7,60,14,ES_LOWERCASE | ES_AUTOHSCROLL | WS_GROUP EDITTEXT IDC_EDIT2,0,24,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL --- 87,91 ---- PUSHBUTTON "F",IDC_USERF,127,70,16,14 PUSHBUTTON "f",IDC_CALCF,143,70,16,14 ! LTEXT "Name:",IDC_VARNAME2,0,9,25,8 EDITTEXT IDC_EDIT1,32,7,60,14,ES_LOWERCASE | ES_AUTOHSCROLL | WS_GROUP EDITTEXT IDC_EDIT2,0,24,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL *************** *** 108,121 **** FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "General",IDC_TITLE,4,3,63,8 ! CONTROL "Dynamic mouse",IDC_CHECK_MOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,42,83,10 END IDD_OPT_SKINS DIALOG 0, 0, 161, 153 STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION ! CAPTION "Default skin" FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "Skins",IDC_TITLE,4,3,63,8 COMBOBOX IDC_COMBO_SKIN1,9,32,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO_SKIN2,9,51,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP --- 108,123 ---- FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "General",IDC_TITLE1,4,3,63,8 ! CONTROL "Dynamic mouse",IDC_CHECK_MOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,27,83,10 ! COMBOBOX IDC_LANGUAGE_CB,7,44,78,88,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! LTEXT "Language",IDC_LANGUAGE,91,47,54,8 END IDD_OPT_SKINS DIALOG 0, 0, 161, 153 STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION ! CAPTION "Skins" FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "Skins",IDC_TITLE2,4,3,63,8 COMBOBOX IDC_COMBO_SKIN1,9,32,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO_SKIN2,9,51,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP *************** *** 131,138 **** IDD_OPT_PREFS DIALOG 0, 0, 161, 153 STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION ! CAPTION "Calc Preferences" FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "Calc Preferences",IDC_TITLE,4,3,149,8 CONTROL "Degree",IDC_DEGREE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,5,15,40,10 CONTROL "Radian",IDC_RADIAN,"Button",BS_AUTORADIOBUTTON,57,15,39,10 --- 133,140 ---- IDD_OPT_PREFS DIALOG 0, 0, 161, 153 STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION ! CAPTION "Preferences" FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "Preferences",IDC_TITLE3,4,3,149,8 CONTROL "Degree",IDC_DEGREE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,5,15,40,10 CONTROL "Radian",IDC_RADIAN,"Button",BS_AUTORADIOBUTTON,57,15,39,10 *************** *** 165,168 **** --- 167,192 ---- END + IDD_ABOUTBOX DIALOG 8, 18, 120, 101 + STYLE DS_SETFONT | WS_POPUP | WS_CAPTION + EXSTYLE 0x80000000L + CAPTION "About..." + FONT 8, "MS Sans Serif" + BEGIN + ICON IDI_EASYCALC,IDC_STATIC_1,12,12,20,20,SS_REALSIZEIMAGE + LTEXT "EasyCalc Version 1.25a PPC",IDC_STATIC_2,12,36,100,8,SS_NOPREFIX + LTEXT "Copyright (C) 2009",IDC_STATIC_3,12,48,66,8 + END + + IDD_ABOUTBOX_WIDE DIALOG 18, 8, 138, 84 + STYLE DS_SETFONT | WS_POPUP | WS_CAPTION + EXSTYLE 0x80000000L + CAPTION "About EasyCalc" + FONT 8, "MS Sans Serif" + BEGIN + ICON IDI_EASYCALC,IDC_STATIC_1,9,12,21,20,SS_REALSIZEIMAGE + LTEXT "EasyCalc Version 1.25a PPC",IDC_STATIC_2,49,12,76,8,SS_NOPREFIX + LTEXT "Copyright (C) 2009",IDC_STATIC_3,49,24,66,8 + END + ///////////////////////////////////////////////////////////////////////////// *************** *** 219,274 **** BOTTOMMARGIN, 152 END - END - #endif // APSTUDIO_INVOKED - - #endif // Neutral resources - ///////////////////////////////////////////////////////////////////////////// - - - ///////////////////////////////////////////////////////////////////////////// - // English (U.S.) resources - - #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) - #ifdef _WIN32 - LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - #pragma code_page(1252) - #endif //_WIN32 - - ///////////////////////////////////////////////////////////////////////////// - // - // Dialog - // - - IDD_ABOUTBOX DIALOG 8, 18, 120, 101 - STYLE DS_SETFONT | WS_POPUP | WS_CAPTION - EXSTYLE 0x80000000L - CAPTION "About EasyCalc" - FONT 8, "MS Sans Serif" - BEGIN - ICON IDI_EASYCALC,IDC_STATIC_1,12,12,20,20,SS_REALSIZEIMAGE - LTEXT "EasyCalc Version 1.25a PPC",IDC_STATIC_2,12,36,100,8,SS_NOPREFIX - LTEXT "Copyright (C) 2009",IDC_STATIC_3,12,48,66,8 - END - - IDD_ABOUTBOX_WIDE DIALOG 18, 8, 138, 84 - STYLE DS_SETFONT | WS_POPUP | WS_CAPTION - EXSTYLE 0x80000000L - CAPTION "About EasyCalc" - FONT 8, "MS Sans Serif" - BEGIN - ICON IDI_EASYCALC,IDC_STATIC_1,9,12,21,20,SS_REALSIZEIMAGE - LTEXT "EasyCalc Version 1.25",IDC_STATIC_2,49,12,76,8,SS_NOPREFIX - LTEXT "Copyright (C) 2008",IDC_STATIC_3,49,24,66,8 - END - - - ///////////////////////////////////////////////////////////////////////////// - // - // DESIGNINFO - // - #ifdef APSTUDIO_INVOKED - GUIDELINES DESIGNINFO - BEGIN IDD_ABOUTBOX, DIALOG BEGIN --- 243,247 ---- *************** *** 316,320 **** POPUP "Help" BEGIN ! MENUITEM "About EasyCalc...", IDM_HELP_ABOUT END END --- 289,293 ---- POPUP "Help" BEGIN ! MENUITEM "About...", IDM_HELP_ABOUT END END *************** *** 333,370 **** - #ifdef APSTUDIO_INVOKED - ///////////////////////////////////////////////////////////////////////////// - // - // TEXTINCLUDE - // - - 1 TEXTINCLUDE - BEGIN - "resourceppc.h\0" - END - - 2 TEXTINCLUDE - BEGIN - "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" - "#include ""windows.h""\r\n" - "#include ""resdefce.h""\r\n" - "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" - "\0" - END - - 3 TEXTINCLUDE - BEGIN - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#include ""EasyCalcppc.rc2"" // non-Microsoft Visual C++ edited resources\r\n" - "#endif\r\n" - "\0" - END - - #endif // APSTUDIO_INVOKED - - ///////////////////////////////////////////////////////////////////////////// // --- 306,309 ---- *************** *** 385,420 **** END ! #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// ! // Farsi resources ! #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FAR) #ifdef _WIN32 ! LANGUAGE LANG_FARSI, SUBLANG_DEFAULT ! #pragma code_page(1256) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // ! // String Table // ! STRINGTABLE BEGIN ! IDS_APP_TITLE "EasyCalc" ! IDC_EASYCALC "EASYCALC" END ! STRINGTABLE BEGIN ! IDS_FILE "Fichier" ! IDS_HELP "Aide" ! IDS_EDIT "Editer" END ! #endif // Farsi resources ///////////////////////////////////////////////////////////////////////////// --- 324,374 ---- END ! #endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// ! // English (U.S.) resources ! #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 ! LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US ! #pragma code_page(1252) #endif //_WIN32 + #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // ! // TEXTINCLUDE // ! 1 TEXTINCLUDE BEGIN ! "resourceppc.h\0" END ! 2 TEXTINCLUDE BEGIN ! "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" ! "#include ""windows.h""\r\n" ! "#include ""resdefce.h""\r\n" ! "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" ! "\0" END ! 3 TEXTINCLUDE ! BEGIN ! "\r\n" ! "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" ! "LANGUAGE 9, 1\r\n" ! "#pragma code_page(1252)\r\n" ! "#include ""EasyCalcppc.rc2"" // non-Microsoft Visual C++ edited resources\r\n" ! "#endif\r\n" ! "\0" ! END ! ! #endif // APSTUDIO_INVOKED ! ! #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// Index: EasyCalcppc.aps =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalcppc.aps,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsmGCOoK and /tmp/cvsg1ZTHI differ |
From: Mapi B. <ma...@us...> - 2009-10-21 20:56:22
|
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27710 Modified Files: EasyCalc.cpp EasyCalc.gif EasyCalc.h Log Message: Bug fixes, dynamic language change enabled on UI. Index: EasyCalc.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EasyCalc.cpp 17 Oct 2009 13:53:14 -0000 1.3 --- EasyCalc.cpp 21 Oct 2009 20:56:12 -0000 1.4 *************** *** 66,74 **** - Global variables. - -------------------------------------------------------------------------------*/ ! HINSTANCE g_hInst; // current instance ! HWND g_hWnd; // current main window handle ! HWND g_hWndMenuBar; // menu bar handle ! StateManager stateMgr; ! LibLang *libLang; --- 66,75 ---- - Global variables. - -------------------------------------------------------------------------------*/ ! HINSTANCE g_hInst = NULL; // current instance ! HWND g_hWnd = NULL; // current main window handle ! HWND g_hWndMenuBar = NULL; // menu bar handle ! int g_systUserLangId = 0; // Detected language of the system user ! StateManager *stateMgr = NULL; ! LibLang *libLang = NULL; *************** *** 81,88 **** static TCHAR *easyCalcStateFileName = _T("\\state.bin"); static TCHAR fileName[FILENAMELEN]; ! static t_state *state; static int ann_state[NB_ANNUN]; static int ckey = KEY_NONE; // Current key static int skey; --- 82,93 ---- static TCHAR *easyCalcStateFileName = _T("\\state.bin"); static TCHAR fileName[FILENAMELEN]; ! static t_state *state; static int ann_state[NB_ANNUN]; + // For handling changes to the main window and application after option changes + static bool screen_redraw = false; + static TCHAR *new_lang = NULL; + static int ckey = KEY_NONE; // Current key static int skey; *************** *** 119,124 **** - Forward declarations. - -------------------------------------------------------------------------------*/ ! ATOM MyRegisterClass (HINSTANCE, LPTSTR); ! BOOL InitInstance (HINSTANCE, int); LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); INT_PTR CALLBACK WndAbout (HWND, UINT, WPARAM, LPARAM); --- 124,130 ---- - Forward declarations. - -------------------------------------------------------------------------------*/ ! static ATOM MyRegisterClass (HINSTANCE, LPTSTR); ! static BOOL InitScreen (void); ! static BOOL InitInstance (HINSTANCE, int); LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); INT_PTR CALLBACK WndAbout (HWND, UINT, WPARAM, LPARAM); *************** *** 225,231 **** --- 231,250 ---- MainShowCmd = nCmdShow; // Make it available to other parts of code + + // Check if the application is running. If it's running then focus on the window. + if (hPrevInstance) { + return(FALSE); + } + // Perform application initialization. // Show the hourglass during that initialization since it will take some time. SetCursor(LoadCursor(NULL, IDC_WAIT)); + + TCHAR language[100]; + GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IDEFAULTLANGUAGE, language, sizeof(language)); + int rc = _stscanf(language, _T("%x"), &g_systUserLangId); + if (rc != 1) // English by default if we can't recognize user language + g_systUserLangId = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US); + if (!InitInstance(hInstance, nCmdShow)) { SetCursor(NULL); *************** *** 255,259 **** * Registers the window class. * ********************************************************************************/ ! ATOM MyRegisterClass (HINSTANCE hInstance, LPTSTR szWindowClass) { ATOM a; WNDCLASS wc; --- 274,278 ---- * Registers the window class. * ********************************************************************************/ ! static ATOM MyRegisterClass (HINSTANCE hInstance, LPTSTR szWindowClass) { ATOM a; WNDCLASS wc; *************** *** 284,292 **** /******************************************************************************** * FUNCTION: InitInstance(HINSTANCE, int) * * Saves instance handle, creates main window, initialize overall application * * variables. * ********************************************************************************/ ! BOOL InitInstance (HINSTANCE hInstance, int nCmdShow) { TCHAR szTitle[MAX_LOADSTRING]; // title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // main window class name --- 303,429 ---- /******************************************************************************** + * FUNCTION: InitScreen(HINSTANCE) * + * (Re-)creates main window and menus. * + ********************************************************************************/ + static BOOL InitScreen (void) { + // Initialize menus with proper translated strings + TBBUTTONINFO tbbi; + memset(&tbbi,0,sizeof(tbbi)); + tbbi.cbSize = sizeof(tbbi); + tbbi.dwMask = TBIF_TEXT; + tbbi.pszText = (TCHAR *) libLang->translate(_T("$$FILE")); + int rc = SendMessage(g_hWndMenuBar, TB_SETBUTTONINFO, IDM_FILE, (LPARAM) &tbbi); + tbbi.pszText = (TCHAR *) libLang->translate(_T("$$EDIT")); + rc = SendMessage(g_hWndMenuBar, TB_SETBUTTONINFO, IDM_EDIT, (LPARAM) &tbbi); + tbbi.pszText = (TCHAR *) libLang->translate(_T("$$HELP")); + rc = SendMessage(g_hWndMenuBar, TB_SETBUTTONINFO, IDM_HELP, (LPARAM) &tbbi); + // Doesn't seem to do anything ... + // rc = DrawMenuBar(g_hWndMenuBar); + + HMENU hmmb = (HMENU)SendMessage(g_hWndMenuBar, SHCMBM_GETMENU, (WPARAM) 0, (LPARAM) 0); + MENUITEMINFO mii; + memset(&mii,0,sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_TYPE; + mii.fType = MFT_STRING; + HMENU hmmb_sub = (HMENU) SendMessage(g_hWndMenuBar, SHCMBM_GETSUBMENU, (WPARAM) 0, + (LPARAM) IDM_FILE); + mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$EXIT")); // Force "const" off + rc = SetMenuItemInfo(hmmb_sub, IDM_FILE_EXIT, FALSE, &mii); + hmmb_sub = (HMENU) SendMessage(g_hWndMenuBar, SHCMBM_GETSUBMENU, (WPARAM) 0, (LPARAM) IDM_EDIT); + mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$OPTIONS")); // Force "const" off + rc = SetMenuItemInfo(hmmb_sub, IDM_EDIT_OPTIONS, FALSE, &mii); + hmmb_sub = (HMENU) SendMessage(g_hWndMenuBar, SHCMBM_GETSUBMENU, (WPARAM) 0, (LPARAM) IDM_HELP); + mii.dwTypeData = (TCHAR *) libLang->translate(_T("$$ABOUT...")); // Force "const" off + rc = SetMenuItemInfo(hmmb_sub, IDM_HELP_ABOUT, FALSE, &mii); + // Doesn't seem to do anything ... + // rc = DrawMenuBar(g_hWndMenuBar); + + // Set skin + cur_skin = loaded_skins + state->cur_skin_nb; + // core_init(init_mode, version); + + // Get the screen dimensions and load the skin on it + RECT r; + GetClientRect(hMainWnd, &r); + if ((rc = cur_skin->load(state->skinName[state->cur_skin_nb], + easyCalcDirname, + r.right, + r.bottom))) { + if (rc == -1) { + FrmPopupForm(altNoLayoutFile, g_hWnd); + } else if (rc == -2) { + FrmPopupForm(altErrorGifFile, g_hWnd); + } + return (FALSE); + } + + // Set the annunciators state + for (int i=0 ; i<NB_ANNUN ; i++) ann_state[i] = false; + ann_state[ANN_DEG + calcPrefs.trigo_mode - degree] = true; + switch (dispPrefs.base) { + case disp_decimal: + ann_state[ANN_DEC] = true; + break; + case disp_octal: + ann_state[ANN_OCT] = true; + break; + case disp_binary: + ann_state[ANN_BIN] = true; + break; + case disp_hexa: + ann_state[ANN_HEX] = true; + break; + } + ann_state[ANN_S1 + state->cur_skin_nb] = true; + + // Prepare options panels + #define DEF_NUM_OF_PAGES 3 + propPages = new PROPSHEETPAGE[DEF_NUM_OF_PAGES]; + memset(propPages, 0, sizeof(PROPSHEETPAGE) * DEF_NUM_OF_PAGES); + + propPages[0].dwSize = sizeof(PROPSHEETPAGE); + propPages[0].dwFlags = PSP_DEFAULT | PSP_USETITLE; + propPages[0].pszTemplate = MAKEINTRESOURCE(IDD_OPT_GENERAL); + propPages[0].pfnDlgProc = (DLGPROC)WndOptionsGen; + propPages[0].hInstance = g_hInst; + propPages[0].pszIcon = NULL; + propPages[0].pszTitle = libLang->translate(_T("$$GENERAL")); + propPages[0].lParam = (LPARAM) NULL; + + propPages[1].dwSize = sizeof(PROPSHEETPAGE); + propPages[1].dwFlags = PSP_DEFAULT | PSP_USETITLE; + propPages[1].pszTemplate = MAKEINTRESOURCE(IDD_OPT_SKINS); + propPages[1].pfnDlgProc = (DLGPROC)WndOptionsSkins; + propPages[1].hInstance = g_hInst; + propPages[1].pszIcon = NULL; + propPages[1].pszTitle = libLang->translate(_T("$$SKINS")); + propPages[1].lParam = (LPARAM) NULL; + + propPages[2].dwSize = sizeof(PROPSHEETPAGE); + propPages[2].dwFlags = PSP_DEFAULT | PSP_USETITLE; + propPages[2].pszTemplate = MAKEINTRESOURCE(IDD_OPT_PREFS); + propPages[2].pfnDlgProc = (DLGPROC)WndOptionsCalcPrefs; + propPages[2].hInstance = g_hInst; + propPages[2].pszIcon = NULL; + propPages[2].pszTitle = libLang->translate(_T("$$PREFERENCES TITLE")); + propPages[2].lParam = (LPARAM) NULL; + + // Prepare the painting brush for the input area Edit control + editBgBrush = CreateSolidBrush(cur_skin->getDisplayBgColor()); + cur_skin->create_input_area(hMainWnd, g_hInst); + + // Force redisplay of full zone. + InvalidateRect(hMainWnd, NULL, TRUE); + + return(TRUE); + } + + /******************************************************************************** * FUNCTION: InitInstance(HINSTANCE, int) * * Saves instance handle, creates main window, initialize overall application * * variables. * ********************************************************************************/ ! static BOOL InitInstance (HINSTANCE hInstance, int nCmdShow) { TCHAR szTitle[MAX_LOADSTRING]; // title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // main window class name *************** *** 370,373 **** --- 507,520 ---- libLang = new LibLang (f); + // Create the StateMgr object with proper default language. + stateMgr = new StateManager (); + state = stateMgr->getState(); // This will simplify accessing state part of the object + const TCHAR *defLangName; + if ((defLangName = libLang->getLang(g_systUserLangId)) != NULL) { + // If NULL, then "en" has already been set by default by the constructor. + // Handle other case. + _tcscpy(state->langName, defLangName); + } + // Initialize application level objects Err err=0; *************** *** 384,467 **** } ! cur_skin = loaded_skins + state->cur_skin_nb; ! libLang->setLang(state->langName); // Set the language according to the state. _tcscpy(state->langName, libLang->getLang()); // Copy in state the final selected language. - // core_init(init_mode, version); - - // Get the screen dimensions and load the skin on it - RECT r; - GetClientRect(hMainWnd, &r); - int rc; - if ((rc = cur_skin->load(state->skinName[state->cur_skin_nb], - easyCalcDirname, - r.right, - r.bottom))) { - if (rc == -1) { - FrmPopupForm(altNoLayoutFile, g_hWnd); - } else if (rc == -2) { - FrmPopupForm(altErrorGifFile, g_hWnd); - } - return (FALSE); - } - - // Set the annunciators state - for (int i=0 ; i<NB_ANNUN ; i++) ann_state[i] = false; - ann_state[ANN_DEG + calcPrefs.trigo_mode - degree] = true; - switch (dispPrefs.base) { - case disp_decimal: - ann_state[ANN_DEC] = true; - break; - case disp_octal: - ann_state[ANN_OCT] = true; - break; - case disp_binary: - ann_state[ANN_BIN] = true; - break; - case disp_hexa: - ann_state[ANN_HEX] = true; - break; - } - ann_state[ANN_S1 + stateMgr.state.cur_skin_nb] = true; ! // Prepare the options panels ! #define DEF_NUM_OF_PAGES 3 ! propPages = new PROPSHEETPAGE[DEF_NUM_OF_PAGES]; ! memset(propPages, 0, sizeof(PROPSHEETPAGE) * DEF_NUM_OF_PAGES); ! ! propPages[0].dwSize = sizeof(PROPSHEETPAGE); ! propPages[0].dwFlags = PSP_DEFAULT; ! propPages[0].pszTemplate = MAKEINTRESOURCE(IDD_OPT_GENERAL); ! propPages[0].pfnDlgProc = (DLGPROC)WndOptionsGen; ! propPages[0].hInstance = g_hInst; ! propPages[0].pszIcon = NULL; ! propPages[0].lParam = (LPARAM) NULL; ! ! propPages[1].dwSize = sizeof(PROPSHEETPAGE); ! propPages[1].dwFlags = PSP_DEFAULT; ! propPages[1].pszTemplate = MAKEINTRESOURCE(IDD_OPT_SKINS); ! propPages[1].pfnDlgProc = (DLGPROC)WndOptionsSkins; ! propPages[1].hInstance = g_hInst; ! propPages[1].pszIcon = NULL; ! propPages[1].lParam = (LPARAM) NULL; ! ! propPages[2].dwSize = sizeof(PROPSHEETPAGE); ! propPages[2].dwFlags = PSP_DEFAULT; ! propPages[2].pszTemplate = MAKEINTRESOURCE(IDD_OPT_PREFS); ! propPages[2].pfnDlgProc = (DLGPROC)WndOptionsCalcPrefs; ! propPages[2].hInstance = g_hInst; ! propPages[2].pszIcon = NULL; ! propPages[2].lParam = (LPARAM) NULL; ! // Show window contents (force redisplay of full zone in case an error msg happened ! // and modified the invalidate portion of screen). ! InvalidateRect(hMainWnd, NULL, TRUE); ShowWindow(hMainWnd, nCmdShow); UpdateWindow(hMainWnd); - // Prepare the painting brush for the input area Edit control - editBgBrush = CreateSolidBrush(cur_skin->getDisplayBgColor()); - cur_skin->create_input_area(hMainWnd, g_hInst); - // cur_skin->set_input_text(NULL, _T("Hello 0,1234")); - return (TRUE); } --- 531,547 ---- } ! // From there, proper language has been set, either from initialization ! // or from loading state.bin. ! // Set corresponding current language in libLang. ! libLang->setLang(state->langName); _tcscpy(state->langName, libLang->getLang()); // Copy in state the final selected language. ! // Create main window contents ! InitScreen(); ! // Show window contents ShowWindow(hMainWnd, nCmdShow); UpdateWindow(hMainWnd); return (TRUE); } *************** *** 475,479 **** _tcscpy(fileName, easyCalcDirname); _tcscat(fileName, easyCalcStateFileName); ! state = stateMgr.init(fileName, g_hWnd); } --- 555,559 ---- _tcscpy(fileName, easyCalcDirname); _tcscat(fileName, easyCalcStateFileName); ! stateMgr->init(fileName, g_hWnd); } *************** *** 486,490 **** _tcscpy(fileName, easyCalcDirname); _tcscat(fileName, easyCalcStateFileName); ! stateMgr.save(fileName, g_hWnd); } --- 566,570 ---- _tcscpy(fileName, easyCalcDirname); _tcscat(fileName, easyCalcStateFileName); ! stateMgr->save(fileName, g_hWnd); } *************** *** 502,506 **** cur_skin->repaint_annunciator(hdc, memdc, -(skey+2), 2); else cur_skin->repaint_key(hdc, memdc, skey, 1); ! DeleteObject(memdc); ReleaseDC(hMainWnd, hdc); } --- 582,586 ---- cur_skin->repaint_annunciator(hdc, memdc, -(skey+2), 2); else cur_skin->repaint_key(hdc, memdc, skey, 1); ! DeleteDC(memdc); ReleaseDC(hMainWnd, hdc); } *************** *** 561,565 **** cur_skin->repaint_annunciator(hdc, memdc, -(skey+2), ann_state[-(skey+2)]); else cur_skin->repaint_key(hdc, memdc, skey, 0); ! DeleteObject(memdc); ReleaseDC(hMainWnd, hdc); --- 641,645 ---- cur_skin->repaint_annunciator(hdc, memdc, -(skey+2), ann_state[-(skey+2)]); else cur_skin->repaint_key(hdc, memdc, skey, 0); ! DeleteDC(memdc); ReleaseDC(hMainWnd, hdc); *************** *** 576,580 **** } ! // Process the annunciators, only if the state is up or if it is always selectable if ((skey <= -2) && (skey >= -1-NB_ANNUN) && ((ann_state[-(skey+2)] == 1) || ((skey <= -(ANN_S1+2)) && (skey >= -(ANN_HSTMENU+2))))) { --- 656,660 ---- } ! // Process annunciators, only if the state is up or if it is always selectable if ((skey <= -2) && (skey >= -1-NB_ANNUN) && ((ann_state[-(skey+2)] == 1) || ((skey <= -(ANN_S1+2)) && (skey >= -(ANN_HSTMENU+2))))) { *************** *** 599,602 **** --- 679,688 ---- shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_HEX, ANNVAL_UNCH); break; + case ANN_SCRL: + cur_skin->scroll_result_left(g_hWnd); + break; + case ANN_SCRR: + cur_skin->scroll_result_right(g_hWnd); + break; case ANN_HEX: shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_DEC, ANNVAL_UNCH); *************** *** 713,717 **** cur_skin->repaint_annunciator(hdc, memdc, ANN_S3, (ann_state[ANN_S3] = false)); cur_skin->repaint_annunciator(hdc, memdc, ANN_SG, (ann_state[ANN_SG] = false)); ! stateMgr.state.cur_skin_nb = 0; } } else if (skin == ANNVAL_S2) { --- 799,803 ---- cur_skin->repaint_annunciator(hdc, memdc, ANN_S3, (ann_state[ANN_S3] = false)); cur_skin->repaint_annunciator(hdc, memdc, ANN_SG, (ann_state[ANN_SG] = false)); ! state->cur_skin_nb = 0; } } else if (skin == ANNVAL_S2) { *************** *** 721,725 **** cur_skin->repaint_annunciator(hdc, memdc, ANN_S3, (ann_state[ANN_S3] = false)); cur_skin->repaint_annunciator(hdc, memdc, ANN_SG, (ann_state[ANN_SG] = false)); ! stateMgr.state.cur_skin_nb = 1; } } else if (skin == ANNVAL_S3) { --- 807,811 ---- cur_skin->repaint_annunciator(hdc, memdc, ANN_S3, (ann_state[ANN_S3] = false)); cur_skin->repaint_annunciator(hdc, memdc, ANN_SG, (ann_state[ANN_SG] = false)); ! state->cur_skin_nb = 1; } } else if (skin == ANNVAL_S3) { *************** *** 729,733 **** cur_skin->repaint_annunciator(hdc, memdc, ANN_S3, (ann_state[ANN_S3] = true)); cur_skin->repaint_annunciator(hdc, memdc, ANN_SG, (ann_state[ANN_SG] = false)); ! stateMgr.state.cur_skin_nb = 3; } } else if (skin == ANNVAL_SG) { --- 815,819 ---- cur_skin->repaint_annunciator(hdc, memdc, ANN_S3, (ann_state[ANN_S3] = true)); cur_skin->repaint_annunciator(hdc, memdc, ANN_SG, (ann_state[ANN_SG] = false)); ! state->cur_skin_nb = 3; } } else if (skin == ANNVAL_SG) { *************** *** 813,816 **** --- 899,926 ---- /******************************************************************************** + * FUNCTION: shell_scroll_annunciators() * + * Callback invoked by the skin object to change the state of the result scroll * + * annunciators (none, left, right). * + ********************************************************************************/ + void shell_scroll_annunciators(int scroll) { + HDC hdc = GetDC(hMainWnd); + HDC memdc = CreateCompatibleDC(hdc); + + if (scroll == ANNVAL_SCR_NONE) { + cur_skin->repaint_annunciator(hdc, memdc, ANN_SCRL, (ann_state[ANN_SCRL] = false)); + cur_skin->repaint_annunciator(hdc, memdc, ANN_SCRR, (ann_state[ANN_SCRR] = false)); + } else if (scroll == ANNVAL_SCR_LEFT) { + cur_skin->repaint_annunciator(hdc, memdc, ANN_SCRL, (ann_state[ANN_SCRL] = true)); + cur_skin->repaint_annunciator(hdc, memdc, ANN_SCRR, (ann_state[ANN_SCRR] = false)); + } else { + cur_skin->repaint_annunciator(hdc, memdc, ANN_SCRL, (ann_state[ANN_SCRL] = false)); + cur_skin->repaint_annunciator(hdc, memdc, ANN_SCRR, (ann_state[ANN_SCRR] = true)); + } + + DeleteDC(memdc); + ReleaseDC(hMainWnd, hdc); + } + + /******************************************************************************** * FUNCTION: shell_powerdown() * * Execute command to end the calculator. * *************** *** 1074,1077 **** --- 1184,1197 ---- psh.ppsp = propPages; PropertySheet(&psh); + // Re-create main window contents if necessary + if (new_lang) { // Set new language and remember it + _tcscpy(state->langName, new_lang); + new_lang = NULL; + libLang->setLang(state->langName); + } + if (screen_redraw) { + screen_redraw = false; + InitScreen(); + } break; #ifdef WIN32_PLATFORM_PSPC *************** *** 1128,1131 **** --- 1248,1257 ---- EndPaint(hWnd, &ps); + // { + // int rc = DrawMenuBar(g_hWnd); + // DWORD wrc = GetLastError(); + // rc = DrawMenuBar(g_hWndMenuBar); + // wrc = GetLastError(); + // } break; *************** *** 1652,1655 **** --- 1778,1782 ---- // SHInitDialog(&shidi); #endif // SHELL_AYGSHELL + SetWindowText(hDlg, libLang->translate(_T("$$ABOUT..."))); return ((INT_PTR) TRUE); *************** *** 1708,1714 **** * Some formatting for the title of option property pages. * ********************************************************************************/ ! BOOL DefDlgCtlColorStaticProc(HWND hDlg, WPARAM wParam, LPARAM lParam) { HDC hDC = (HDC) wParam; ! if (GetDlgCtrlID((HWND)lParam) == IDC_TITLE) { SetBkMode(hDC, TRANSPARENT); SetTextColor(hDC, GetSysColor(COLOR_HIGHLIGHT)); --- 1835,1841 ---- * Some formatting for the title of option property pages. * ********************************************************************************/ ! BOOL DefDlgCtlColorStaticProc(HWND hDlg, WPARAM wParam, LPARAM lParam, int idc_title) { HDC hDC = (HDC) wParam; ! if (GetDlgCtrlID((HWND)lParam) == idc_title) { SetBkMode(hDC, TRANSPARENT); SetTextColor(hDC, GetSysColor(COLOR_HIGHLIGHT)); *************** *** 1732,1736 **** const TCHAR *text = libLang->translate(_T("$$GENERAL")); SetWindowText(hDlg, text); ! HWND hWnd = GetDlgItem(hDlg, IDC_TITLE); SetWindowText(hWnd, text); hWnd = GetDlgItem(hDlg, IDC_CHECK_MOUSE); --- 1859,1863 ---- const TCHAR *text = libLang->translate(_T("$$GENERAL")); SetWindowText(hDlg, text); ! HWND hWnd = GetDlgItem(hDlg, IDC_TITLE1); SetWindowText(hWnd, text); hWnd = GetDlgItem(hDlg, IDC_CHECK_MOUSE); *************** *** 1738,1741 **** --- 1865,1882 ---- if (state->mouse_cont) SendMessage(hWnd, BM_SETCHECK, BST_CHECKED, 0); + hWnd = GetDlgItem(hDlg, IDC_LANGUAGE); + SetWindowText(hWnd, libLang->translate(_T("$$LANGUAGE"))); + hWnd = GetDlgItem(hDlg, IDC_LANGUAGE_CB); + int nbLangs = libLang->getNbLang(); + int numSel = 0; + const TCHAR *selLang = libLang->getLang(); + const TCHAR *lang; + for (int i=0 ; i<nbLangs ; i++) { + lang = libLang->getLangByIndex(i); + SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) lang); + if (selLang == lang) + numSel = i; + } + SendMessage(hWnd, CB_SETCURSEL, (WPARAM) numSel, (LPARAM) 0); } return (TRUE); *************** *** 1751,1756 **** } case WM_CTLCOLORSTATIC: ! return (DefDlgCtlColorStaticProc(hDlg, wParam, lParam)); default: --- 1892,1928 ---- } + case WM_COMMAND: + { + BOOL res = FALSE; + unsigned int notify_msg = wParam >> 16; + unsigned int notify_src = wParam & 0xFFFF; + HWND hWnd = (HWND) lParam; + switch (notify_src) { + case IDC_LANGUAGE_CB: + switch (notify_msg) { + case CBN_CLOSEUP: + int cur_sel = (int) SendMessage(hWnd, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0); + dispPrefs.mode = ((cur_sel == 0) + ? disp_normal + : ((cur_sel == 1) + ? disp_sci + : disp_eng + ) + ); + // Set chosen language, and tell WndProc to modify menus + // and propSheets accordingly. + new_lang = (TCHAR *) libLang->getLangByIndex(cur_sel); // Force "const" off + screen_redraw = true; + + res = TRUE; + break; + } + break; + } + return (res); + } + break; case WM_CTLCOLORSTATIC: ! return (DefDlgCtlColorStaticProc(hDlg, wParam, lParam, IDC_TITLE1)); default: *************** *** 1776,1780 **** const TCHAR *text = libLang->translate(_T("$$SKINS")); SetWindowText(hDlg, text); ! HWND hWnd = GetDlgItem(hDlg, IDC_TITLE); SetWindowText(hWnd, text); text = libLang->translate(_T("$$SKIN")); --- 1948,1952 ---- const TCHAR *text = libLang->translate(_T("$$SKINS")); SetWindowText(hDlg, text); ! HWND hWnd = GetDlgItem(hDlg, IDC_TITLE2); SetWindowText(hWnd, text); text = libLang->translate(_T("$$SKIN")); *************** *** 1794,1803 **** int numSel = -1; for (int i=0 ; i<3 ; i++) { ! if (stateMgr.state.skinName[i][0] != 0) { TCHAR numText[2]; numText[0] = _T('0'+i); numText[1] = 0; SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) numText); ! if (i == stateMgr.state.cur_skin_nb) numSel = i; } --- 1966,1975 ---- int numSel = -1; for (int i=0 ; i<3 ; i++) { ! if (state->skinName[i][0] != 0) { TCHAR numText[2]; numText[0] = _T('0'+i); numText[1] = 0; SendMessage(hWnd, CB_ADDSTRING, (WPARAM) 0, (LPARAM) numText); ! if (i == state->cur_skin_nb) numSel = i; } *************** *** 1830,1837 **** int numSel = SendMessage(hWnd, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0); for (int i=0 ; i<3 ; i++) { ! if (stateMgr.state.skinName[i][0] != 0) { if (numSel-- == 0) { // Done in shell_annunciators ! // stateMgr.state.cur_skin_nb = i; shell_annunciators(ANNVAL_S1+i, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH); break; // Stop loop, we have found it --- 2002,2009 ---- int numSel = SendMessage(hWnd, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0); for (int i=0 ; i<3 ; i++) { ! if (state->skinName[i][0] != 0) { if (numSel-- == 0) { // Done in shell_annunciators ! // state->cur_skin_nb = i; shell_annunciators(ANNVAL_S1+i, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH); break; // Stop loop, we have found it *************** *** 1848,1852 **** case WM_CTLCOLORSTATIC: ! return (DefDlgCtlColorStaticProc(hDlg, wParam, lParam)); default: --- 2020,2024 ---- case WM_CTLCOLORSTATIC: ! return (DefDlgCtlColorStaticProc(hDlg, wParam, lParam, IDC_TITLE2)); default: *************** *** 1871,1877 **** SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); propSheet = (LPPROPSHEETPAGE) lParam; ! const TCHAR *text = libLang->translate(_T("$$CALC PREFERENCES")); SetWindowText(hDlg, text); ! HWND hWnd = GetDlgItem(hDlg, IDC_TITLE); SetWindowText(hWnd, text); hWnd = GetDlgItem(hDlg, IDC_DEGREE); --- 2043,2049 ---- SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); propSheet = (LPPROPSHEETPAGE) lParam; ! const TCHAR *text = libLang->translate(_T("$$PREFERENCES TITLE")); SetWindowText(hDlg, text); ! HWND hWnd = GetDlgItem(hDlg, IDC_TITLE3); SetWindowText(hWnd, text); hWnd = GetDlgItem(hDlg, IDC_DEGREE); *************** *** 2171,2175 **** case WM_CTLCOLORSTATIC: ! return (DefDlgCtlColorStaticProc(hDlg, wParam, lParam)); default: --- 2343,2347 ---- case WM_CTLCOLORSTATIC: ! return (DefDlgCtlColorStaticProc(hDlg, wParam, lParam, IDC_TITLE3)); default: *************** *** 2315,2319 **** { SetWindowText(hDlg, libLang->translate(_T("$$SAVE AS TITLE"))); ! HWND hWnd = GetDlgItem(hDlg, IDC_VARNAME); SetWindowText(hWnd, libLang->translate(_T("$$NAME:"))); hWnd = GetDlgItem(hDlg, IDOK); --- 2487,2491 ---- { SetWindowText(hDlg, libLang->translate(_T("$$SAVE AS TITLE"))); ! HWND hWnd = GetDlgItem(hDlg, IDC_VARNAME3); SetWindowText(hWnd, libLang->translate(_T("$$NAME:"))); hWnd = GetDlgItem(hDlg, IDOK); *************** *** 2638,2642 **** hWnd = GetDlgItem(hDlg, IDCANCEL); SetWindowText(hWnd, libLang->translate(_T("$$CANCEL"))); ! hWnd = GetDlgItem(hDlg, IDC_VARNAME); SetWindowText(hWnd, libLang->translate(_T("$$NAME:"))); SetFocus(hWnd); --- 2810,2814 ---- hWnd = GetDlgItem(hDlg, IDCANCEL); SetWindowText(hWnd, libLang->translate(_T("$$CANCEL"))); ! hWnd = GetDlgItem(hDlg, IDC_VARNAME1); SetWindowText(hWnd, libLang->translate(_T("$$NAME:"))); SetFocus(hWnd); *************** *** 2744,2748 **** hWnd = GetDlgItem(hDlg, IDC_EDIT3); SetWindowText(hWnd, parameter_name); ! hWnd = GetDlgItem(hDlg, IDC_VARNAME); SetWindowText(hWnd, libLang->translate(_T("$$NAME:"))); SetFocus(hWnd); --- 2916,2920 ---- hWnd = GetDlgItem(hDlg, IDC_EDIT3); SetWindowText(hWnd, parameter_name); ! hWnd = GetDlgItem(hDlg, IDC_VARNAME2); SetWindowText(hWnd, libLang->translate(_T("$$NAME:"))); SetFocus(hWnd); *************** *** 2855,2859 **** hWnd = GetDlgItem(hDlg, IDCANCEL); SetWindowText(hWnd, libLang->translate(_T("$$CANCEL"))); ! hWnd = GetDlgItem(hDlg, IDC_VARNAME); SetWindowText(hWnd, libLang->translate(_T("$$NAME:"))); hWnd = GetDlgItem(hDlg, IDC_EDIT1); --- 3027,3031 ---- hWnd = GetDlgItem(hDlg, IDCANCEL); SetWindowText(hWnd, libLang->translate(_T("$$CANCEL"))); ! hWnd = GetDlgItem(hDlg, IDC_VARNAME1); SetWindowText(hWnd, libLang->translate(_T("$$NAME:"))); hWnd = GetDlgItem(hDlg, IDC_EDIT1); *************** *** 2960,2964 **** hWnd = GetDlgItem(hDlg, IDCANCEL); SetWindowText(hWnd, libLang->translate(_T("$$CANCEL"))); ! hWnd = GetDlgItem(hDlg, IDC_VARNAME); SetWindowText(hWnd, libLang->translate(_T("$$NAME:"))); hWnd = GetDlgItem(hDlg, IDC_PARAM); --- 3132,3136 ---- hWnd = GetDlgItem(hDlg, IDCANCEL); SetWindowText(hWnd, libLang->translate(_T("$$CANCEL"))); ! hWnd = GetDlgItem(hDlg, IDC_VARNAME2); SetWindowText(hWnd, libLang->translate(_T("$$NAME:"))); hWnd = GetDlgItem(hDlg, IDC_PARAM); Index: EasyCalc.gif =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.gif,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsslyUA1 and /tmp/cvstZ0Mss differ Index: EasyCalc.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EasyCalc.h 17 Oct 2009 13:53:14 -0000 1.3 --- EasyCalc.h 21 Oct 2009 20:56:12 -0000 1.4 *************** *** 144,147 **** --- 144,148 ---- #include "compat/Lang.h" extern LibLang *libLang; + extern int g_systUserLangId; // Detected language of the system user #endif *************** *** 151,156 **** void save_state (void); void shell_beeper(int frequency, int duration); ! void shell_annunciators(int skin, int shf, int angle_mode, int int_mode, int run) SHELL1_SECT; ! void shell_powerdown() SHELL1_SECT; void alertErrorMessage(CError err); void ErrFatalDisplayIf(int cond, TCHAR *msg); --- 152,158 ---- void save_state (void); void shell_beeper(int frequency, int duration); ! void shell_annunciators(int skin, int shf, int angle_mode, int int_mode, int run); ! void shell_scroll_annunciators(int scroll); ! void shell_powerdown(); void alertErrorMessage(CError err); void ErrFatalDisplayIf(int cond, TCHAR *msg); |
From: Mapi B. <ma...@us...> - 2009-10-21 20:55:56
|
Update of /cvsroot/easycalc/PPCport/langs/merge In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27596 Modified Files: lang.rcp Log Message: Bug fixes, dynamic language change enabled on UI. Index: lang.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/merge/lang.rcp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang.rcp 17 Oct 2009 13:51:34 -0000 1.3 --- lang.rcp 21 Oct 2009 20:55:47 -0000 1.4 *************** *** 999,1002 **** --- 999,1008 ---- "$$LIST EDITOR..." = "List Editor..." + "$$FILE" = "File" + "$$EXIT" = "Exit" + "$$GENERAL" = "General" + "$$SKINS" = "Skins" + "$$LANGUAGE" = "Language" + /************************************************** * ALERTS (20) * *************** *** 1449,1452 **** --- 1455,1463 ---- "$$LIST EDITOR..." = "Éditeur de listes..." + "$$FILE" = "Fichier" + "$$EXIT" = "Fermer" + "$$GENERAL" = "Général" + "$$SKINS" = "Skins" + "$$LANGUAGE" = "Langue" /************************************************** |
From: Mapi B. <ma...@us...> - 2009-10-21 20:55:42
|
Update of /cvsroot/easycalc/PPCport/langs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27578 Modified Files: en.rcp fr.rcp Log Message: Bug fixes, dynamic language change enabled on UI. Index: en.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/en.rcp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** en.rcp 17 Oct 2009 13:51:13 -0000 1.2 --- en.rcp 21 Oct 2009 20:55:27 -0000 1.3 *************** *** 134,137 **** --- 134,143 ---- "$$LIST EDITOR..." = "List Editor..." + "$$FILE" = "File" + "$$EXIT" = "Exit" + "$$GENERAL" = "General" + "$$SKINS" = "Skins" + "$$LANGUAGE" = "Language" + /************************************************** * ALERTS (20) * Index: fr.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/fr.rcp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fr.rcp 17 Oct 2009 13:51:13 -0000 1.2 --- fr.rcp 21 Oct 2009 20:55:27 -0000 1.3 *************** *** 141,144 **** --- 141,149 ---- "$$LIST EDITOR..." = "Éditeur de listes..." + "$$FILE" = "Fichier" + "$$EXIT" = "Fermer" + "$$GENERAL" = "Général" + "$$SKINS" = "Skins" + "$$LANGUAGE" = "Langue" /************************************************** |
From: Mapi B. <ma...@us...> - 2009-10-21 20:55:15
|
Update of /cvsroot/easycalc/PPCport/core In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27548 Modified Files: core_globals.h Log Message: Bug fixes, dynamic language change enabled on UI. Index: core_globals.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_globals.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** core_globals.h 17 Oct 2009 13:46:30 -0000 1.3 --- core_globals.h 21 Oct 2009 20:55:03 -0000 1.4 *************** *** 77,81 **** /* Annunciator codes */ /*********************/ ! #define NB_ANNUN 17 #define ANN_SHIFT 0 #define ANN_DEG 1 --- 77,81 ---- /* Annunciator codes */ /*********************/ ! #define NB_ANNUN 19 #define ANN_SHIFT 0 #define ANN_DEG 1 *************** *** 86,98 **** #define ANN_BIN 6 #define ANN_HEX 7 ! #define ANN_S1 8 ! #define ANN_S2 9 ! #define ANN_S3 10 ! #define ANN_SG 11 ! #define ANN_VAR 12 ! #define ANN_UFCT 13 ! #define ANN_CFCT 14 ! #define ANN_RESMENU 15 ! #define ANN_HSTMENU 16 /******************************/ --- 86,100 ---- #define ANN_BIN 6 #define ANN_HEX 7 ! #define ANN_SCRL 8 ! #define ANN_SCRR 9 ! #define ANN_S1 10 ! #define ANN_S2 11 ! #define ANN_S3 12 ! #define ANN_SG 13 ! #define ANN_VAR 14 ! #define ANN_UFCT 15 ! #define ANN_CFCT 16 ! #define ANN_RESMENU 17 ! #define ANN_HSTMENU 18 /******************************/ *************** *** 112,115 **** --- 114,120 ---- #define ANNVAL_S3 2 #define ANNVAL_SG 3 + #define ANNVAL_SCR_NONE 0 + #define ANNVAL_SCR_LEFT 1 + #define ANNVAL_SCR_RIGHT 2 |
From: Mapi B. <ma...@us...> - 2009-10-21 20:55:03
|
Update of /cvsroot/easycalc/PPCport/compat In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27506 Modified Files: Lang.cpp Lang.h Log Message: Bug fixes, dynamic language change enabled on UI. Index: Lang.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/Lang.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Lang.h 17 Oct 2009 13:44:17 -0000 1.2 --- Lang.h 21 Oct 2009 20:54:50 -0000 1.3 *************** *** 34,37 **** --- 34,38 ---- stdext::hash_map<String,String> translation; public: + int systLangId; String langName; TCHAR *localeInfo; *************** *** 56,60 **** Lang *defLang; TCHAR *wcstr; ! size_t allocLen; stdext::hash_map<String,Lang*> libLang; stdext::hash_map<String,Lang*>::const_iterator libIterator; --- 57,61 ---- Lang *defLang; TCHAR *wcstr; ! size_t allocLen; // Track size m-allocated to wcstr stdext::hash_map<String,Lang*> libLang; stdext::hash_map<String,Lang*>::const_iterator libIterator; *************** *** 70,74 **** --- 71,77 ---- const TCHAR *getNext(void); int setLang(TCHAR *langName); + const TCHAR *getLang(int systLangId); const TCHAR *getLang(void); + const TCHAR *getLangByIndex(int index); const TCHAR *translate(TCHAR *key); }; Index: Lang.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/Lang.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Lang.cpp 17 Oct 2009 13:44:17 -0000 1.2 --- Lang.cpp 21 Oct 2009 20:54:49 -0000 1.3 *************** *** 65,83 **** --- 65,89 ---- if (_tcscmp(name, _T("cs")) == 0) { codePage = 1250; + systLangId = MAKELANGID(LANG_CZECH, SUBLANG_DEFAULT); localeInfo = _tsetlocale(LC_ALL, _T("Czech")); } else if (_tcscmp(name, _T("de")) == 0) { codePage = 1252; + systLangId = MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN); localeInfo = _tsetlocale(LC_ALL, _T("German")); } else if (_tcscmp(name, _T("en")) == 0) { codePage = 1252; + systLangId = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US); localeInfo = _tsetlocale(LC_ALL, _T("English")); } else if (_tcscmp(name, _T("fr")) == 0) { codePage = 1252; + systLangId = MAKELANGID(LANG_FRENCH, SUBLANG_FRENCH); localeInfo = _tsetlocale(LC_ALL, _T("French")); } else if (_tcscmp(name, _T("it")) == 0) { codePage = 1252; + systLangId = MAKELANGID(LANG_ITALIAN, SUBLANG_ITALIAN); localeInfo = _tsetlocale(LC_ALL, _T("Italian")); } else if (_tcscmp(name, _T("ja")) == 0) { codePage = 932; + systLangId = MAKELANGID(LANG_JAPANESE, SUBLANG_DEFAULT); localeInfo = _tsetlocale(LC_ALL, _T("Japanese_Japan.932")); // This may not load correctly on western systems with Japan non installed, *************** *** 88,101 **** --- 94,111 ---- } else if (_tcscmp(name, _T("pt")) == 0) { codePage = 1252; + systLangId = MAKELANGID(LANG_PORTUGUESE, SUBLANG_PORTUGUESE); localeInfo = _tsetlocale(LC_ALL, _T("Portuguese")); } else if (_tcscmp(name, _T("ru_koi8")) == 0) { // Note that koi8-u, for Ukrainia, is 21866 codePage = 20866; + systLangId = MAKELANGID(LANG_UKRAINIAN, SUBLANG_DEFAULT); localeInfo = _tsetlocale(LC_ALL, _T("Russian_Russia.20866")); } else if (_tcscmp(name, _T("ru_win")) == 0) { codePage = 1251; + systLangId = MAKELANGID(LANG_RUSSIAN, SUBLANG_DEFAULT); localeInfo = _tsetlocale(LC_ALL, _T("Russian")); } else if (_tcscmp(name, _T("sp")) == 0) { codePage = 1252; + systLangId = MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH); localeInfo = _tsetlocale(LC_ALL, _T("Spanish")); } *************** *** 103,106 **** --- 113,117 ---- // for converting from what is read to wide characters. codePage = 1252; + systLangId = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US); localeInfo = _tsetlocale(LC_ALL, _T("English")); } *************** *** 407,414 **** --- 418,460 ---- res = libLang.insert(LibPair(lang->langName, lang)); + nbLang++; return (res.second); } /******************************************************************************** + * Get a Lang name by its system identifier. * + ********************************************************************************/ + const TCHAR *LibLang::getLang(int systLangId) { + stdext::hash_map<String,Lang*>::const_iterator res; + + res = libLang.begin(); + while (res != libLang.end()) { + if (res->second->systLangId == systLangId) + break; + res++; + } + if (res == libLang.end()) return (NULL); + return (res->second->langName.c_str()); + } + + /******************************************************************************** + * Get a Lang name by its indexe in the language library. * + ********************************************************************************/ + const TCHAR *LibLang::getLangByIndex(int index) { + stdext::hash_map<String,Lang*>::const_iterator res; + + if (index >= nbLang) + return (NULL); + + res = libLang.begin(); + while (index > 0) { + res++; + index--; + } + if (res == libLang.end()) return (NULL); + return (res->second->langName.c_str()); + } + + /******************************************************************************** * Get a Lang object by its name. * ********************************************************************************/ *************** *** 454,461 **** const TCHAR *text = curLang->get(token); if (text == NULL) { ! if (defLang != curLang) { ! text = defLang->get(token); ! } ! if (text == NULL) text = token; } --- 500,510 ---- const TCHAR *text = curLang->get(token); if (text == NULL) { ! // Use default application language if not found. ! // Note: desactivated for now, we want to see unmapped tokens to ! // complement language files. ! // if (defLang != curLang) { ! // text = defLang->get(token); ! // } ! // if (text == NULL) text = token; } |
From: Mapi B. <ma...@us...> - 2009-10-21 20:54:49
|
Update of /cvsroot/easycalc/PPCport In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27444 Modified Files: EasyCalc.vcproj EasyCalc.vcproj.CLIENT5.Admin.user grprefs.h Log Message: Bug fixes, dynamic language change enabled on UI. Index: grprefs.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/grprefs.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** grprefs.h 24 Jun 2009 21:38:50 -0000 1.3 --- grprefs.h 21 Oct 2009 20:54:35 -0000 1.4 *************** *** 26,30 **** #define _GRPREFS_H_ ! #include "segment.h" #include "defuns.h" --- 26,30 ---- #define _GRPREFS_H_ ! #include "compat/segment.h" #include "defuns.h" Index: EasyCalc.vcproj =================================================================== RCS file: /cvsroot/easycalc/PPCport/EasyCalc.vcproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** EasyCalc.vcproj 17 Oct 2009 13:43:46 -0000 1.8 --- EasyCalc.vcproj 21 Oct 2009 20:54:35 -0000 1.9 *************** *** 16,19 **** --- 16,22 ---- Name="Windows Mobile 6 Professional SDK (ARMV4I)" /> + <Platform + Name="Windows Mobile 5.0 Smartphone SDK (ARMV4I)" + /> </Platforms> <ToolFiles> *************** *** 138,142 **** ExecutionBucket="7" Optimization="0" ! PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCKETPC2003_UI_MODEL" MinimalRebuild="true" RuntimeLibrary="1" --- 141,235 ---- ExecutionBucket="7" Optimization="0" ! AdditionalIncludeDirectories="E:\AppsDev\EasyCalc\EasyCalc;E:\AppsDev\EasyCalc\EasyCalc\include;E:\AppsDev\EasyCalc\EasyCalc\core\mlib;"E:\AppsDev\EasyCalc\EasyCalc\system - UI"" ! PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCKETPC2003_UI_MODEL;SPECFUN_ENABLED;GRAPHS_ENABLED" ! MinimalRebuild="true" ! RuntimeLibrary="1" ! UsePrecompiledHeader="2" ! WarningLevel="3" ! DebugInformationFormat="3" ! ShowIncludes="true" ! /> ! <Tool ! Name="VCManagedResourceCompilerTool" ! /> ! <Tool ! Name="VCResourceCompilerTool" ! PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)" ! Culture="1033" ! AdditionalIncludeDirectories="$(IntDir)" ! /> ! <Tool ! Name="VCPreLinkEventTool" ! /> ! <Tool ! Name="VCLinkerTool" ! AdditionalOptions=" /subsystem:windowsce,5.02" ! OutputFile="$(OutDir)/EasyCalc.exe" ! LinkIncremental="2" ! DelayLoadDLLs="$(NOINHERIT)" ! GenerateDebugInformation="true" ! ProgramDatabaseFile="$(OutDir)/EasyCalc.pdb" ! SubSystem="0" ! StackReserveSize="65536" ! StackCommitSize="4096" ! RandomizedBaseAddress="1" ! DataExecutionPrevention="0" ! /> ! <Tool ! Name="VCALinkTool" ! /> ! <Tool ! Name="VCXDCMakeTool" ! /> ! <Tool ! Name="VCBscMakeTool" ! /> ! <Tool ! Name="VCFxCopTool" ! /> ! <Tool ! Name="VCCodeSignTool" ! /> ! <Tool ! Name="VCPostBuildEventTool" ! /> ! <DeploymentTool ! ForceDirty="-1" ! RemoteDirectory="" ! RegisterOutput="0" ! AdditionalFiles="" ! /> ! <DebuggerTool ! /> ! </Configuration> ! <Configuration ! Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" ! OutputDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)" ! IntermediateDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)" ! ConfigurationType="1" ! CharacterSet="1" ! > ! <Tool ! Name="VCPreBuildEventTool" ! /> ! <Tool ! Name="VCCustomBuildTool" ! /> ! <Tool ! Name="VCXMLDataGeneratorTool" ! /> ! <Tool ! Name="VCWebServiceProxyGeneratorTool" ! /> ! <Tool ! Name="VCMIDLTool" ! TargetEnvironment="1" ! /> ! <Tool ! Name="VCCLCompilerTool" ! ExecutionBucket="7" ! Optimization="0" ! AdditionalIncludeDirectories="E:\AppsDev\EasyCalc\EasyCalc;E:\AppsDev\EasyCalc\EasyCalc\include;E:\AppsDev\EasyCalc\EasyCalc\core\mlib;"E:\AppsDev\EasyCalc\EasyCalc\system - UI"" ! PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCKETPC2003_UI_MODEL;;SPECFUN_ENABLED;GRAPHS_ENABLED" MinimalRebuild="true" RuntimeLibrary="1" *************** *** 144,147 **** --- 237,241 ---- WarningLevel="3" DebugInformationFormat="3" + ShowIncludes="true" /> <Tool *************** *** 170,173 **** --- 264,268 ---- RandomizedBaseAddress="1" DataExecutionPrevention="0" + TargetMachine="0" /> <Tool *************** *** 374,377 **** --- 469,562 ---- /> </Configuration> + <Configuration + Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" + OutputDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)" + IntermediateDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="1" + /> + <Tool + Name="VCCLCompilerTool" + ExecutionBucket="7" + Optimization="2" + FavorSizeOrSpeed="2" + PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCKETPC2003_UI_MODEL" + RuntimeLibrary="0" + UsePrecompiledHeader="2" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)" + Culture="1033" + AdditionalIncludeDirectories="$(IntDir)" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions=" /subsystem:windowsce,5.02" + OutputFile="$(OutDir)/EasyCalc.exe" + LinkIncremental="1" + DelayLoadDLLs="$(NOINHERIT)" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/EasyCalc.pdb" + SubSystem="0" + StackReserveSize="65536" + StackCommitSize="4096" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="0" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCCodeSignTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + <DeploymentTool + ForceDirty="-1" + RemoteDirectory="" + RegisterOutput="0" + AdditionalFiles="" + /> + <DebuggerTool + /> + </Configuration> </Configurations> <References> *************** *** 422,425 **** --- 607,618 ---- </FileConfiguration> <FileConfiguration + Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" > *************** *** 437,440 **** --- 630,641 ---- /> </FileConfiguration> + <FileConfiguration + Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> </File> </Filter> Index: EasyCalc.vcproj.CLIENT5.Admin.user =================================================================== RCS file: /cvsroot/easycalc/PPCport/EasyCalc.vcproj.CLIENT5.Admin.user,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EasyCalc.vcproj.CLIENT5.Admin.user 6 Aug 2009 21:43:14 -0000 1.2 --- EasyCalc.vcproj.CLIENT5.Admin.user 21 Oct 2009 20:54:35 -0000 1.3 *************** *** 69,76 **** /> <DeploymentTool ! DeploymentDevice="d1a7b239-28d5-4485-9b8c-5764e3dc79b6" /> <DebuggerTool ! RemoteExecutable="" Arguments="" /> --- 69,111 ---- /> <DeploymentTool ! DeploymentDevice="1f261bf1-9987-41a3-ba3c-ca801816d8f3" /> <DebuggerTool ! RemoteExecutable="%CSIDL_PROGRAM_FILES%\EasyCalc\EasyCalc.exe" ! Arguments="" ! /> ! </Configuration> ! <Configuration ! Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" ! > ! <DebugSettings ! Command="$(TargetPath)" ! WorkingDirectory="" ! CommandArguments="" ! Attach="false" ! DebuggerType="3" ! Remote="1" ! RemoteMachine="CLIENT5" ! RemoteCommand="" ! HttpUrl="" ! PDBPath="" ! SQLDebugging="" ! Environment="" ! EnvironmentMerge="true" ! DebuggerFlavor="5" ! MPIRunCommand="" ! MPIRunArguments="" ! MPIRunWorkingDirectory="" ! ApplicationCommand="" ! ApplicationArguments="" ! ShimCommand="" ! MPIAcceptMode="" ! MPIAcceptFilter="" ! /> ! <DeploymentTool ! DeploymentDevice="BEDE20EF-6548-413E-943F-1E87FEC249FA" ! /> ! <DebuggerTool ! RemoteExecutable="%CSIDL_PROGRAM_FILES%\EasyCalc\EasyCalc.exe" Arguments="" /> *************** *** 146,149 **** --- 181,219 ---- /> </Configuration> + <Configuration + Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" + > + <DebugSettings + Command="$(TargetPath)" + WorkingDirectory="" + CommandArguments="" + Attach="false" + DebuggerType="3" + Remote="1" + RemoteMachine="CLIENT5" + RemoteCommand="" + HttpUrl="" + PDBPath="" + SQLDebugging="" + Environment="" + EnvironmentMerge="true" + DebuggerFlavor="" + MPIRunCommand="" + MPIRunArguments="" + MPIRunWorkingDirectory="" + ApplicationCommand="" + ApplicationArguments="" + ShimCommand="" + MPIAcceptMode="" + MPIAcceptFilter="" + /> + <DeploymentTool + DeploymentDevice="BEDE20EF-6548-413E-943F-1E87FEC249FA" + /> + <DebuggerTool + RemoteExecutable="" + Arguments="" + /> + </Configuration> </Configurations> </VisualStudioUserFile> |
From: Mapi B. <ma...@us...> - 2009-10-17 14:23:24
|
Update of /cvsroot/easycalc/PPCport In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2327 Removed Files: chkstack.h Log Message: no message --- chkstack.h DELETED --- |
From: Mapi B. <ma...@us...> - 2009-10-17 13:53:28
|
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31998 Modified Files: EasyCalc.cpp EasyCalc.gif EasyCalc.h EasyCalc.layout EasyCalcppc.aps EasyCalcppc.rc resourceppc.h Skin.cpp Skin.h StateManager.cpp StateManager.h Removed Files: core_display.cpp core_display.h Log Message: 1.25a Compiling, linking, running, limited function set, with bugs Index: EasyCalc.layout =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.layout,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EasyCalc.layout 24 Sep 2009 21:19:19 -0000 1.2 --- EasyCalc.layout 17 Oct 2009 13:53:14 -0000 1.3 *************** *** 4,8 **** Skin: 0,0,240,268 # Description of the display area: x1,y1 ? ? fg_color bg_color ! Display: 10,13 0 3 a3b39d 0b2327 # Active elements: num x1,y1,l,h (on screen) x1_off,y1_off x1_on,y1_on (in the gif) --- 4,8 ---- Skin: 0,0,240,268 # Description of the display area: x1,y1 ? ? fg_color bg_color ! Display: 7,13 0 3 a3b39d 0b2327 # Active elements: num x1,y1,l,h (on screen) x1_off,y1_off x1_on,y1_on (in the gif) *************** *** 19,208 **** Annunciator: 11 219,6,6,7 10,268 10,275 # Skin 3 indicator Annunciator: 12 226,6,6,7 15,268 15,275 # Graph indicator ! Annunciator: 13 226,26,7,7 127,268 127,275 # Result Menu indicator ! Annunciator: 14 226,34,7,7 133,268 133,275 # History Menu indicator # Keys on the calculator gif: # num[, shifted_num] x1_sel,y1_sel,l_sel,h_sel (selection zone) x1_off,y1_off,l,h x1_on,y1_on # with num and shifted_num as follows: ! # 1 -> 0,"0" ! # 2 -> 1,"1" ! # 3 -> 2,"2" ! # 4 -> 3,"3" ! # 5 -> 4,"4" ! # 6 -> 5,"5" ! # 7 -> 6,"6" ! # 8 -> 7,"7" ! # 9 -> 8,"8" ! # 10 -> 9,"9" ! # 11 -> A,"A" ! # 12 -> B,"B" ! # 13 -> C,"C" ! # 14 -> D,"D" ! # 15 -> E,"E" ! # 16 -> F,"F" ! # 17 -> And,"&" ! # 18 -> Or,"|" ! # 19 -> Xor,"^" ! # 20 -> Shl,"<<" ! # 21 -> Shr,">>" ! # 22 -> Plus,"+" ! # 23 -> Minus,"-" ! # 24 -> Neg,"-" ! # 25 -> Mult,"*" ! # 26 -> Divide,"/" ! # 27 -> Ans,"ans" ! # 28 -> OpBr,"" ! # 29 -> Pow,"^" ! # 30 -> Log,"log" ! # 31 -> Ln,"ln" ! # 32 -> Inv,"^(-1)" ! # 33 -> Sq1,"^(1/" ! # 34 -> Sqr,"^2" ! # 35 -> Sqrt,"sqrt" ! # 36 -> Sin,"sin" ! # 37 -> Cos,"cos" ! # 38 -> Tan,"tan" ! # 39 -> Exp,"exp" ! # 40 -> Fact,"fact" ! # 41 -> Pi,"pi" ! # 42 -> Degrees,"°" ! # 43 -> Minutes,"'" ! # 44 -> Magnitude,"abs" ! # 45 -> Angle,"angle" ! # 46 -> complex_i,"i" ! # 47 -> Coln,":" ! # 48 -> ClBr,")" ! # 49 -> EE,"E" ! # 50 -> asin ! # 51 -> acos ! # 52 -> atan ! # 53 -> sinh ! # 54 -> cosh ! # 55 -> tanh ! # 56 -> asinh ! # 57 -> acosh ! # 58 -> atanh ! # 59 -> log ! # 60 -> 10^ ! # 61 -> log2 ! # 62 -> 2^ ! # 63 -> fact ! # 64 -> ncr ! # 65 -> npr ! # 66 -> round ! # 67 -> trunc ! # 68 -> floor ! # 69 -> gamma ! # 70 -> beta ! # 71 -> rand ! # 72 -> rNorm ! # 73 -> real ! # 74 -> imag ! # 75 -> conj ! # 76 -> exp(i* ! # 77 -> fzero ! # 78 -> fvalue ! # 79 -> fmin ! # 80 -> fmax ! # 81 -> fd_dx // d/dx ! # 82 -> fromberg // integ ! # 83 -> fd2_dx // d2/dx ! # 84 -> ()=" ! # 85 -> " ! # 86 -> x ! # 87 -> list ! # 88 -> median ! # 89 -> mean ! # 90 -> sum ! # 91 -> lmin // min ! # 92 -> lmax // max ! # 93 -> prod ! # 94 -> variance ! # 95 -> stddev ! # 96 -> dim ! # 97 -> [ ! # 98 -> matrix ! # 99 -> identity ! # 100 -> det ! # 101 -> qrs ! # 102 -> rref ! # 103 -> qrq ! # 104 -> qrr ! # 105 -> [ // x[] ! # 106 -> ] ! # 107 -> qBinomial ! # 108 -> qBeta ! # 109 -> qChiSq ! # 110 -> qF ! # 111 -> qPoisson ! # 112 -> qStudentt ! # 113 -> qWeibull ! # 114 -> qNormal ! # 115 -> range ! # 116 -> rNorm ! # 117 -> find ! # 118 -> sample ! # 119 -> filter ! # 120 -> conv ! # 121 -> fft ! # 122 -> ifft ! # 123 -> prevprime ! # 124 -> isprime ! # 125 -> nextprime ! # 126 -> gcd ! # 127 -> lcm ! # 128 -> phi ! # 129 -> gcdex ! # 130 -> chinese ! # 131 -> modinv ! # 132 -> modpow ! # 133 -> factor ! # 134 -> besseli ! # 135 -> besselj ! # 136 -> besselk ! # 137 -> bessely ! # 138 -> ellc1 ! # 139 -> ellc2 ! # 140 -> elli1 ! # 141 -> elli2 ! # 142 -> euler ! # 143 -> cn ! # 144 -> dn ! # 145 -> sn ! # 146 -> igamma ! # 147 -> ibeta ! # 148 -> erf ! # 149 -> erfc # ! key: 1 6,70,32,22 11,75,22,12 11,74 ! key: 2 45,70,32,22 50,75,22,12 50,74 ! key: 3 84,70,32,22 89,75,22,12 89,74 ! Key: 4 123,70,32,22 128,75,22,12 128,74 ! Key: 5 162,70,32,22 167,75,22,12 167,74 ! Key: 6 201,70,32,22 206,75,22,12 206,74 ! Key: 7 6,97,32,22 11,102,22,12 11,101 ! Key: 8 45,97,32,22 50,102,22,12 50,101 ! Key: 9 84,97,32,22 89,102,22,12 89,101 ! Key: 10 123,97,32,22 128,102,22,12 128,101 ! Key: 11 162,97,32,22 167,102,22,12 167,101 ! Key: 12 201,97,32,22 206,102,22,12 206,101 ! Key: 13 6,127,40,29 11,132,30,19 11,131 ! Key: 14 53,127,40,29 58,132,30,19 58,131 ! Key: 15 101,127,40,29 106,132,30,19 106,131 ! Key: 16 148,127,40,29 153,132,30,19 153,131 ! Key: 17 196,127,40,29 201,132,30,19 201,131 ! Key: 18 6,163,40,29 11,168,30,19 11,167 ! Key: 14 53,163,40,29 58,168,30,19 58,167 ! Key: 15 101,163,40,29 106,168,30,19 106,167 ! Key: 16 148,163,40,29 153,168,30,19 153,167 ! Key: 17 196,163,40,29 201,168,30,19 201,167 ! Key: 19 6,199,40,29 11,204,30,19 11,203 ! Key: 20 53,199,40,29 58,204,30,19 58,203 ! Key: 21 101,199,40,29 106,204,30,19 106,203 Key: 22 148,199,40,29 153,204,30,19 153,203 ! Key: 23 196,199,40,29 201,204,30,19 201,203 ! Key: 24 6,236,40,29 11,241,30,19 11,240 ! Key: 25 53,236,40,29 58,241,30,19 58,240 ! Key: 26 101,236,40,29 106,241,30,19 106,240 ! Key: 27 148,236,40,29 153,241,30,19 153,240 ! Key: 28 196,236,40,29 201,241,30,19 201,240 --- 19,216 ---- Annunciator: 11 219,6,6,7 10,268 10,275 # Skin 3 indicator Annunciator: 12 226,6,6,7 15,268 15,275 # Graph indicator ! Annunciator: 13 170,6,7,7 139,268 139,275 # Var list indicator ! Annunciator: 14 178,6,6,7 145,268 145,275 # User fct list indicator ! Annunciator: 15 185,6,6,7 150,268 150,275 # Calc fct list indicator ! Annunciator: 16 226,26,7,7 127,268 127,275 # Result Menu indicator ! Annunciator: 17 226,34,7,7 133,268 133,275 # History Menu indicator # Keys on the calculator gif: # num[, shifted_num] x1_sel,y1_sel,l_sel,h_sel (selection zone) x1_off,y1_off,l,h x1_on,y1_on # with num and shifted_num as follows: ! # -5 -> shift // Note: practice is to put -4,-4 to ensure the same shift key can toggle on/off the shift state ! # -4 -> dot // decimal dot ! # -3 -> EXE // run evaluation ! # -2 -> bckspc // back space ! # -1 -> clr // clear input and result fields ! # 0 -> 0,"0" ! # 1 -> 1,"1" ! # 2 -> 2,"2" ! # 3 -> 3,"3" ! # 4 -> 4,"4" ! # 5 -> 5,"5" ! # 6 -> 6,"6" ! # 7 -> 7,"7" ! # 8 -> 8,"8" ! # 9 -> 9,"9" ! # 10 -> A,"A" ! # 11 -> B,"B" ! # 12 -> C,"C" ! # 13 -> D,"D" ! # 14 -> E,"E" ! # 15 -> F,"F" ! # 16 -> And,"&" ! # 17 -> Or,"|" ! # 18 -> Xor,"^" ! # 19 -> Shl,"<<" ! # 20 -> Shr,">>" ! # 21 -> Plus,"+" ! # 22 -> Minus,"-" ! # 23 -> Neg,"-" ! # 24 -> Mult,"*" ! # 25 -> Divide,"/" ! # 26 -> Ans,"ans" ! # 27 -> OpBr,"(" ! # 28 -> Pow,"^" ! # 29 -> Log,"log" ! # 30 -> Ln,"ln" ! # 31 -> Inv,"^(-1)" ! # 32 -> Sq1,"^(1/" ! # 33 -> Sqr,"^2" ! # 34 -> Sqrt,"sqrt" ! # 35 -> Sin,"sin" ! # 36 -> Cos,"cos" ! # 37 -> Tan,"tan" ! # 38 -> Exp,"exp" ! # 39 -> Fact,"fact" ! # 40 -> Pi,"pi" ! # 41 -> Degrees,"°" ! # 42 -> Minutes,"'" ! # 43 -> Magnitude,"abs" ! # 44 -> Angle,"angle" ! # 45 -> complex_i,"i" ! # 46 -> Coln,":" ! # 47 -> ClBr,")" ! # 48 -> EE,"E" ! # 49 -> asin ! # 50 -> acos ! # 51 -> atan ! # 52 -> sinh ! # 53 -> cosh ! # 54 -> tanh ! # 55 -> asinh ! # 56 -> acosh ! # 57 -> atanh ! # 58 -> log ! # 59 -> 10^ ! # 60 -> log2 ! # 61 -> 2^ ! # 62 -> fact ! # 63 -> ncr ! # 64 -> npr ! # 65 -> round ! # 66 -> trunc ! # 67 -> floor ! # 68 -> gamma ! # 69 -> beta ! # 70 -> rand ! # 71 -> rNorm ! # 72 -> real ! # 73 -> imag ! # 74 -> conj ! # 75 -> exp(i* ! # 76 -> fzero ! # 77 -> fvalue ! # 78 -> fmin ! # 79 -> fmax ! # 80 -> fd_dx // d/dx ! # 81 -> fromberg // integ ! # 82 -> fd2_dx // d2/dx ! # 83 -> ()=" ! # 84 -> " ! # 85 -> x ! # 86 -> list ! # 87 -> median ! # 88 -> mean ! # 89 -> sum ! # 90 -> lmin // min ! # 91 -> lmax // max ! # 92 -> prod ! # 93 -> variance ! # 94 -> stddev ! # 95 -> dim ! # 96 -> [ ! # 97 -> matrix ! # 98 -> identity ! # 99 -> det ! # 100 -> qrs ! # 101 -> rref ! # 102 -> qrq ! # 103 -> qrr ! # 104 -> [ // x[] ! # 105 -> ] ! # 106 -> qBinomial ! # 107 -> qBeta ! # 108 -> qChiSq ! # 109 -> qF ! # 110 -> qPoisson ! # 111 -> qStudentt ! # 112 -> qWeibull ! # 113 -> qNormal ! # 114 -> range ! # 115 -> rNorm ! # 116 -> find ! # 117 -> sample ! # 118 -> filter ! # 119 -> conv ! # 120 -> fft ! # 121 -> ifft ! # 122 -> prevprime ! # 123 -> isprime ! # 124 -> nextprime ! # 125 -> gcd ! # 126 -> lcm ! # 127 -> phi ! # 128 -> gcdex ! # 129 -> chinese ! # 130 -> modinv ! # 131 -> modpow ! # 132 -> factor ! # 133 -> besseli ! # 134 -> besselj ! # 135 -> besselk ! # 136 -> bessely ! # 137 -> ellc1 ! # 138 -> ellc2 ! # 139 -> elli1 ! # 140 -> elli2 ! # 141 -> euler ! # 142 -> cn ! # 143 -> dn ! # 144 -> sn ! # 145 -> igamma ! # 146 -> ibeta ! # 147 -> erf ! # 148 -> erfc # ! key: -5,-5 6,70,32,22 11,75,22,12 11,74 ! key: 34 45,70,32,22 50,75,22,12 50,74 ! key: 33 84,70,32,22 89,75,22,12 89,74 ! Key: 28 123,70,32,22 128,75,22,12 128,74 ! Key: -2 162,70,32,22 167,75,22,12 167,74 ! Key: -1 201,70,32,22 206,75,22,12 206,74 ! Key: 38 6,97,32,22 11,102,22,12 11,101 ! Key: 31 45,97,32,22 50,102,22,12 50,101 ! Key: 30 84,97,32,22 89,102,22,12 89,101 ! Key: 29 123,97,32,22 128,102,22,12 128,101 ! Key: 27 162,97,32,22 167,102,22,12 167,101 ! Key: 47 201,97,32,22 206,102,22,12 206,101 ! Key: 7 6,127,40,29 11,132,30,19 11,131 ! Key: 8 53,127,40,29 58,132,30,19 58,131 ! Key: 9 101,127,40,29 106,132,30,19 106,131 ! Key: 25 148,127,40,29 153,132,30,19 153,131 ! Key: 35 196,127,40,29 201,132,30,19 201,131 ! Key: 4 6,163,40,29 11,168,30,19 11,167 ! Key: 5 53,163,40,29 58,168,30,19 58,167 ! Key: 6 101,163,40,29 106,168,30,19 106,167 ! Key: 24 148,163,40,29 153,168,30,19 153,167 ! Key: 26 196,163,40,29 201,168,30,19 201,167 ! Key: 1 6,199,40,29 11,204,30,19 11,203 ! Key: 2 53,199,40,29 58,204,30,19 58,203 ! Key: 3 101,199,40,29 106,204,30,19 106,203 Key: 22 148,199,40,29 153,204,30,19 153,203 ! Key: 36 196,199,40,29 201,204,30,19 201,203 ! Key: 0 6,236,40,29 11,241,30,19 11,240 ! Key: 23 53,236,40,29 58,241,30,19 58,240 ! Key: -4 101,236,40,29 106,241,30,19 106,240 ! Key: 21 148,236,40,29 153,241,30,19 153,240 ! Key: -3 196,236,40,29 201,241,30,19 201,240 Index: EasyCalc.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EasyCalc.h 24 Sep 2009 21:19:19 -0000 1.2 --- EasyCalc.h 17 Oct 2009 13:53:14 -0000 1.3 *************** *** 133,136 **** --- 133,140 ---- #define altCompute 8 #define altBadParameter 9 + #define altNoStateFile 10 + #define altNoLayoutFile 11 + #define altErrorGifFile 12 + #define altWriteStateFile 13 #define FrmAlert FrmPopupForm int FrmPopupForm(int formNb, void *hWnd_p); *************** *** 144,147 **** --- 148,153 ---- #include "compat/PalmOS.h" #include "core/mlib/konvert.h" + void read_state (void); + void save_state (void); void shell_beeper(int frequency, int duration); void shell_annunciators(int skin, int shf, int angle_mode, int int_mode, int run) SHELL1_SECT; Index: EasyCalcppc.aps =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalcppc.aps,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsIFrPzI and /tmp/cvsRocgfa differ Index: EasyCalc.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EasyCalc.cpp 24 Sep 2009 21:19:19 -0000 1.2 --- EasyCalc.cpp 17 Oct 2009 13:53:14 -0000 1.3 *************** *** 42,45 **** --- 42,48 ---- #include "core/varmgr.h" #include "core/defmgr.h" + #include "core/calc.h" + #include "core/mlib/fp.h" + #include "core/ansops.h" *************** *** 50,53 **** [...2747 lines suppressed...] timer = SetTimer(NULL, 0, 1750, timeout2); --- 3273,3277 ---- static VOID CALLBACK timeout1(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime) { KillTimer(NULL, timer); ! if (ckey != KEY_NONE) { core_keytimeout1(); timer = SetTimer(NULL, 0, 1750, timeout2); *************** *** 2598,2602 **** static VOID CALLBACK timeout2(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime) { KillTimer(NULL, timer); ! if (ckey != 0) core_keytimeout2(); timer = 0; --- 3285,3289 ---- static VOID CALLBACK timeout2(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime) { KillTimer(NULL, timer); ! if (ckey != KEY_NONE) core_keytimeout2(); timer = 0; Index: Skin.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Skin.h 24 Sep 2009 21:19:19 -0000 1.4 --- Skin.h 17 Oct 2009 13:53:14 -0000 1.5 *************** *** 148,152 **** Skin(); // Constructor ! void load(TCHAR *skinname, const TCHAR *basedir, int width, int height); int getchar(); void rewind(); --- 148,152 ---- Skin(); // Constructor ! int load(TCHAR *skinname, const TCHAR *basedir, int width, int height); int getchar(); void rewind(); *************** *** 174,177 **** --- 174,178 ---- unsigned long get_insert_pos(void *hwnd); void set_insert_pos(void *hwnd, unsigned long pos); + void back_delete(void *hwnd); void insert_input_text(void *hwnd, const TCHAR *text); void set_input_text(void *hwnd, const TCHAR *text); *************** *** 179,182 **** --- 180,184 ---- void print_result(void *hWnd_p, TCHAR *res_text); void print_result(HDC hdc); + void paint_result(HDC hdc); void print_resultpowInit(void *hdc, TCHAR *res_text); void print_resultpowNext(bool smallf, TCHAR *res_piece, int len); *************** *** 187,190 **** --- 189,193 ---- void varSavePopup(TCHAR *choices[], int length, void *hWnd); void varMgrPopup(TCHAR *choices[], int length, void *hWnd); + void varDefReset(void *hWnd); void varDefList(TCHAR *name, TCHAR *deftext, int itemNum, void *hWnd); void display_set_enabled(bool enable); Index: StateManager.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/StateManager.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StateManager.cpp 22 Jun 2009 22:13:35 -0000 1.1 --- StateManager.cpp 17 Oct 2009 13:53:14 -0000 1.2 *************** *** 1,4 **** #include "StdAfx.h" ! #include "StateManager.h" StateManager::StateManager(void) { --- 1,9 ---- #include "StdAfx.h" ! ! #include "system - UI/StateManager.h" ! #include "core/mlib/calcDB.h" ! #include "core/mlib/fp.h" ! #include "core/mlib/history.h" ! StateManager::StateManager(void) { *************** *** 18,43 **** } ! t_state *StateManager::init(TCHAR *fn) { stateFilename = fn; stateFile = _tfopen(fn, _T("rb")); if (stateFile != NULL) { ! if (read_shell_state(&version)) init_mode = 1; ! else { // Incorrect version/contents, create the state contents init_shell_state(-1); init_mode = 2; } ! } else { // No state file, create the state contents init_shell_state(-1); init_mode = 0; } ! // Close the file if was open if (stateFile != NULL) { fclose(stateFile); stateFile = NULL; } - - return (&state); } --- 23,111 ---- } ! void StateManager::initCalcPrefs() { ! /* Coming from prefs.c */ ! state.calcPrefs.version = PREF_VERSION; ! state.calcPrefs.input[0]=_T('\0'); ! state.calcPrefs.skin = 0; ! state.calcPrefs.btnRow = 0; ! state.calcPrefs.insertPos = 0; ! state.calcPrefs.selPosStart=calcPrefs.selPosEnd = 0; ! state.calcPrefs.solverWorksheet = -1; ! ! state.calcPrefs.finBegin = false; ! state.calcPrefs.matchParenth = false; ! state.calcPrefs.trigo_mode = radian; ! ! state.calcPrefs.dispPrefs.forceInteger = false; ! state.calcPrefs.dispPrefs.decPoints = 9; ! state.calcPrefs.dispPrefs.stripZeros = true; ! state.calcPrefs.reducePrecision = false; ! state.calcPrefs.dispPrefs.base = disp_decimal; ! state.calcPrefs.dispPrefs.mode = disp_normal; ! state.calcPrefs.dispPrefs.cvtUnits = true; ! state.calcPrefs.insertHelp = true; ! state.calcPrefs.acceptOSPref = false; ! state.calcPrefs.dispScien = false; ! ! // Publish calcPrefs and dispPrefs for old core modules ! calcPrefs = state.calcPrefs; ! dispPrefs = state.calcPrefs.dispPrefs; /* db_recompile needs dispPrefs */ ! db_recompile_all(); ! } ! ! t_state *StateManager::init(TCHAR *fn, void *hWnd_p) { stateFilename = fn; stateFile = _tfopen(fn, _T("rb")); if (stateFile != NULL) { ! if (read_shell_state(&version)) { init_mode = 1; ! if (state.calcPrefs.version != PREF_VERSION) { ! // Incorrect version/contents, create the state contents ! FrmPopupForm(altNoStateFile, hWnd_p); ! initCalcPrefs(); ! } else { ! // Publish calcPrefs and dispPrefs for old core modules ! calcPrefs = state.calcPrefs; ! dispPrefs = state.calcPrefs.dispPrefs; ! } ! } else { // Could not read state file ! FrmPopupForm(altNoStateFile, hWnd_p); init_shell_state(-1); init_mode = 2; } ! ! fclose(stateFile); ! stateFile = NULL; ! } else { // No state file, create default bases and create state contents ! FrmPopupForm(altNoStateFile, hWnd_p); ! Err error = db_open(); ! ErrFatalDisplayIf(error, _T("Can't open CalcDB")); ! error = history_open(); ! ErrFatalDisplayIf(error, _T("Can't open History DB")); init_shell_state(-1); init_mode = 0; } ! /* Coming from prefs.c, after preferences are loaded or initialized */ ! fp_set_prefs(calcPrefs.dispPrefs); ! ! return (&state); ! } ! ! void StateManager::save(TCHAR *fn, void *hWnd_p) { ! state.calcPrefs = calcPrefs; ! ! stateFilename = fn; ! stateFile = _tfopen(fn, _T("wb")); if (stateFile != NULL) { + if (!write_shell_state()) { // Error ... + FrmPopupForm(altWriteStateFile, hWnd_p); + } + fclose(stateFile); stateFile = NULL; + } else { // Error ... + FrmPopupForm(altWriteStateFile, hWnd_p); } } *************** *** 51,57 **** case -1: // Set interface and calculator options to their defaults // fall through ! case 0: // current version, // so nothing to do here since everything --- 119,126 ---- case -1: // Set interface and calculator options to their defaults + initCalcPrefs(); // fall through ! case SHELL_VERSION: // current version, // so nothing to do here since everything *************** *** 113,116 **** --- 182,187 ---- int4 state_size; int4 state_version; + DataManager *dm, *dmHist; + Err error; if (shell_read_saved_state(&magic, sizeof(int4)) != sizeof(int4)) *************** *** 135,138 **** --- 206,242 ---- if (shell_read_saved_state(&state, state_size) != state_size) return (false); + if (shell_read_saved_state(&dm, sizeof(DataManager *)) != sizeof(DataManager *)) + return (false); + if (shell_read_saved_state(&dmHist, sizeof(DataManager *)) != sizeof(DataManager *)) + return (false); + + if (dm != NULL) { + dm = new DataManager (); + if (dm->deSerialize(stateFile)) { + delete dm; + return (false); + } + // Overwrite previously initialized object + if (stateMgrDB != NULL) + delete stateMgrDB; + stateMgrDB = dm; + } + error = db_open(); + ErrFatalDisplayIf(error, _T("Can't open CalcDB")); + + if (dmHist != NULL) { + dmHist = new DataManager (); + if (dmHist->deSerialize(stateFile)) { + delete dmHist; + return (false); + } + // Overwrite previously initialized object + if (stateMgrHistDB != NULL) + delete stateMgrHistDB; + stateMgrHistDB = dmHist; + } + error = history_open(); + ErrFatalDisplayIf(error, _T("Can't open History DB")); + // Initialize the parts of the shell state // that were NOT read from the state file *************** *** 167,170 **** --- 271,282 ---- if (!shell_write_saved_state(&state, sizeof(t_state))) return (false); + if (!shell_write_saved_state(&stateMgrDB, sizeof(DataManager *))) + return (false); + if (!shell_write_saved_state(&stateMgrHistDB, sizeof(DataManager *))) + return (false); + if ((stateMgrDB != NULL) && stateMgrDB->serialize(stateFile)) + return (false); + if ((stateMgrHistDB != NULL) && stateMgrHistDB->serialize(stateFile)) + return (false); return (true); Index: EasyCalcppc.rc =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalcppc.rc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EasyCalcppc.rc 24 Sep 2009 21:19:19 -0000 1.2 --- EasyCalcppc.rc 17 Oct 2009 13:53:14 -0000 1.3 *************** *** 30,117 **** // ! IDD_OPT_GENERAL DIALOG 0, 0, 139, 181 ! STYLE DS_SETFONT | WS_POPUP | WS_CAPTION ! CAPTION "General" ! FONT 8, "System" ! BEGIN ! LTEXT "General",IDC_TITLE,4,3,63,8 ! CONTROL "Dynamic mouse",IDC_CHECK_MOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,42,83,10 ! END ! ! IDD_RES_MENU DIALOG 30, 10, 81, 108 ! STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP FONT 8, "MS Shell Dlg" BEGIN ! LISTBOX IDC_LIST_RESM,0,0,81,108,NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_DLGMODALFRAME END ! IDD_VARENTRY DIALOG 0, 0, 230, 79 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Save variable as" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,7,58,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,173,58,50,14 ! COMBOBOX IDC_VARCOMBO,7,19,216,34,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! LTEXT "Name:",IDC_VARNAME,7,7,216,12 END ! IDD_EDITVAR DIALOG 0, 0, 230, 92 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Edit variable" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,7,71,50,14 ! PUSHBUTTON "V",IDC_VAR,175,71,16,14 ! PUSHBUTTON "F",IDC_USERF,191,71,16,14 ! PUSHBUTTON "f",IDC_CALCF,207,71,16,14 ! LTEXT "Name:",IDC_VARNAME,7,9,25,8 ! EDITTEXT IDC_EDIT1,34,7,95,14,ES_AUTOHSCROLL ! EDITTEXT IDC_EDIT2,7,24,216,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL ! PUSHBUTTON "Cancel",IDCANCEL,61,71,50,14 END ! IDD_DATAMGR DIALOG 0, 0, 230, 231 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Data manager" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,7,210,50,14 ! CONTROL "",IDC_DATALIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,216,196 ! PUSHBUTTON "New",IDC_NEW,63,210,50,14 ! PUSHBUTTON "Modify",IDC_MODIFY,118,210,50,14 ! PUSHBUTTON "Delete",IDC_DELETE,173,210,50,14 ! LISTBOX IDC_LIST_FV,63,190,50,20,NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_DLGMODALFRAME END ! IDD_EDITFCT DIALOG 0, 0, 230, 92 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Edit function" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,7,71,50,14 ! PUSHBUTTON "V",IDC_VAR,175,71,16,14 ! PUSHBUTTON "F",IDC_USERF,191,71,16,14 ! PUSHBUTTON "f",IDC_CALCF,207,71,16,14 ! LTEXT "Name:",IDC_VARNAME,7,9,25,8 ! EDITTEXT IDC_EDIT1,34,7,95,14,ES_AUTOHSCROLL ! EDITTEXT IDC_EDIT2,7,24,216,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL ! PUSHBUTTON "Cancel",IDCANCEL,61,71,50,14 ! LTEXT "Param:",IDC_PARAM,140,9,24,8 ! EDITTEXT IDC_EDIT3,169,7,54,14,ES_AUTOHSCROLL END ! IDD_LARGE_MENU DIALOG 30, 10, 144, 116 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP FONT 8, "MS Shell Dlg" BEGIN ! LISTBOX IDC_LIST_LARGE,0,0,144,116,LBS_DISABLENOSCROLL | NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_DLGMODALFRAME END ! IDD_SLIM_MENU DIALOG 30, 10, 72, 244 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP FONT 8, "MS Shell Dlg" BEGIN ! LISTBOX IDC_LIST_SLIM,0,0,72,244,LBS_DISABLENOSCROLL | NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_DLGMODALFRAME END --- 30,166 ---- // ! IDD_RES_MENU DIALOG 70, 10, 82, 100 ! STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN ! LISTBOX IDC_LIST_RESM,0,0,82,100,NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP END ! IDD_VARENTRY DIALOG 0, 0, 115, 55 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Save variable as" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,0,41,32,14 ! PUSHBUTTON "Cancel",IDCANCEL,73,41,41,14 ! COMBOBOX IDC_VARCOMBO,43,7,71,47,CBS_DROPDOWN | CBS_SORT | CBS_LOWERCASE | WS_VSCROLL | WS_GROUP | WS_TABSTOP ! LTEXT "Name:",IDC_VARNAME,0,7,35,12 ! CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE | WS_TABSTOP,47,41,14,14 END ! IDD_EDITVAR DIALOG 0, 0, 160, 85 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Edit variable" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,0,70,30,14 ! PUSHBUTTON "V",IDC_VAR,111,70,16,14 ! PUSHBUTTON "F",IDC_USERF,127,70,16,14 ! PUSHBUTTON "f",IDC_CALCF,143,70,16,14 ! LTEXT "Name:",IDC_VARNAME,0,9,25,8 ! EDITTEXT IDC_EDIT1,32,7,60,14,ES_LOWERCASE | ES_AUTOHSCROLL | WS_GROUP ! EDITTEXT IDC_EDIT2,0,24,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL ! PUSHBUTTON "Cancel",IDCANCEL,33,70,50,14 ! CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE,91,70,14,14 END ! IDD_DATAMGR DIALOG 0, 0, 160, 165 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Data manager" FONT 8, "MS Shell Dlg" BEGIN ! LISTBOX IDC_LIST_FV,33,132,40,27,NOT WS_VISIBLE | NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_DLGMODALFRAME ! CONTROL "",IDC_DATALIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,1,158,147 ! DEFPUSHBUTTON "OK",IDOK,0,150,30,14 ! PUSHBUTTON "New",IDC_NEW,33,150,40,14 ! PUSHBUTTON "Modify",IDC_MODIFY,76,150,40,14 ! PUSHBUTTON "Delete",IDC_DELETE,119,150,40,14 END ! IDD_EDITFCT DIALOG 0, 0, 160, 85 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Edit function" FONT 8, "MS Shell Dlg" BEGIN ! DEFPUSHBUTTON "OK",IDOK,0,70,30,14 ! PUSHBUTTON "V",IDC_VAR,111,70,16,14 ! PUSHBUTTON "F",IDC_USERF,127,70,16,14 ! PUSHBUTTON "f",IDC_CALCF,143,70,16,14 ! LTEXT "Name:",IDC_VARNAME,0,9,25,8 ! EDITTEXT IDC_EDIT1,32,7,60,14,ES_LOWERCASE | ES_AUTOHSCROLL | WS_GROUP ! EDITTEXT IDC_EDIT2,0,24,159,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL ! PUSHBUTTON "Cancel",IDCANCEL,33,70,50,14 ! LTEXT "Param:",IDC_PARAM,97,9,30,8 ! EDITTEXT IDC_EDIT3,129,7,30,14,ES_AUTOHSCROLL ! CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE,91,70,14,14 END ! IDD_LARGE_MENU DIALOG 30, 10, 102, 116 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE FONT 8, "MS Shell Dlg" BEGIN ! LISTBOX IDC_LIST_LARGE,0,0,102,116,LBS_DISABLENOSCROLL | NOT WS_BORDER | WS_VSCROLL | WS_GROUP | WS_TABSTOP,WS_EX_DLGMODALFRAME END ! IDD_OPT_GENERAL DIALOG 0, 0, 161, 153 ! STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION ! CAPTION "General" FONT 8, "MS Shell Dlg" BEGIN ! LTEXT "General",IDC_TITLE,4,3,63,8 ! CONTROL "Dynamic mouse",IDC_CHECK_MOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,42,83,10 ! END ! ! IDD_OPT_SKINS DIALOG 0, 0, 161, 153 ! STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION ! CAPTION "Default skin" ! FONT 8, "MS Shell Dlg" ! BEGIN ! LTEXT "Skins",IDC_TITLE,4,3,63,8 ! COMBOBOX IDC_COMBO_SKIN1,9,32,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_COMBO_SKIN2,9,51,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_COMBO_SKIN3,9,70,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! LTEXT "Skin 1",IDC_SKIN1,62,34,39,10 ! LTEXT "Skin 2",IDC_SKIN2,62,53,39,10 ! LTEXT "Skin 3",IDC_SKIN3,62,72,39,10 ! COMBOBOX IDC_SKINVAL,72,87,21,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! LTEXT "Default skin",IDC_SKIN,10,90,58,8 ! CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE,121,85,14,14 ! END ! ! IDD_OPT_PREFS DIALOG 0, 0, 161, 153 ! STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION ! CAPTION "Calc Preferences" ! FONT 8, "MS Shell Dlg" ! BEGIN ! LTEXT "Calc Preferences",IDC_TITLE,4,3,149,8 ! CONTROL "Degree",IDC_DEGREE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,5,15,40,10 ! CONTROL "Radian",IDC_RADIAN,"Button",BS_AUTORADIOBUTTON,57,15,39,10 ! CONTROL "Grad",IDC_GRAD,"Button",BS_AUTORADIOBUTTON,110,15,48,10 ! CONTROL "Decimal",IDC_DECIMAL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,15,27,60,10 ! CONTROL "Binary",IDC_BINARY,"Button",BS_AUTORADIOBUTTON,15,37,59,10 ! CONTROL "Octal",IDC_OCTAL,"Button",BS_AUTORADIOBUTTON,88,37,64,10 ! CONTROL "Hexadecimal",IDC_HEXADECIMAL,"Button",BS_AUTORADIOBUTTON,88,27,64,10 ! COMBOBOX IDC_FORMATNUM,5,88,68,39,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! LTEXT "Precision",IDC_PRECISION,81,91,45,8 ! COMBOBOX IDC_PRECVAL,130,88,24,62,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! CONTROL "Reduce precision",IDC_TRUNCPREC,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,5,56,69,19 ! CONTROL "Force Integer Nums",IDC_INTEGERS,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,80,56,73,19 ! CONTROL "Strip zeros",IDC_STRIP_0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,104,70,10 ! CONTROL "Show Units",IDC_SHOW_UNITS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,80,104,73,10 ! CONTROL "System Num Prefs",IDC_OS_NUMPREFS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,116,76,10 ! GROUPBOX "Format Numbers",IDC_FORMATGROUP,0,78,160,51 ! GROUPBOX "Calculations",IDC_CALCGROUP,0,48,160,29 ! CONTROL "Match ()'s",IDC_MATCH_BKT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,139,70,10 ! CONTROL "Insert Help",IDC_INS_HELP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,80,139,78,10 ! GROUPBOX "Edit Assistance",IDC_ASSISTGROUP,0,130,160,22 ! CONTROL "SIP1",IDC_SIP1,"SIPPREF",NOT WS_VISIBLE,145,114,14,14 ! END ! ! IDD_SLIM_MENU DIALOG 30, 10, 72, 116 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE ! FONT 8, "MS Shell Dlg" ! BEGIN ! LISTBOX IDC_LIST_SLIM,0,0,72,116,LBS_DISABLENOSCROLL | NOT WS_BORDER | WS_VSCROLL | WS_GROUP | WS_TABSTOP,WS_EX_DLGMODALFRAME END *************** *** 127,164 **** IDD_VARENTRY, DIALOG BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 223 TOPMARGIN, 7 - BOTTOMMARGIN, 72 END IDD_EDITVAR, DIALOG BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 223 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 85 END IDD_DATAMGR, DIALOG BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 223 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 224 END IDD_EDITFCT, DIALOG BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 223 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 85 END ! IDD_LARGE_MENU, DIALOG BEGIN ! RIGHTMARGIN, 81 ! BOTTOMMARGIN, 108 END END --- 176,221 ---- IDD_VARENTRY, DIALOG BEGIN ! RIGHTMARGIN, 114 TOPMARGIN, 7 END IDD_EDITVAR, DIALOG BEGIN ! RIGHTMARGIN, 159 ! TOPMARGIN, 2 ! BOTTOMMARGIN, 84 END IDD_DATAMGR, DIALOG BEGIN ! LEFTMARGIN, 1 ! RIGHTMARGIN, 159 ! TOPMARGIN, 1 ! BOTTOMMARGIN, 164 END IDD_EDITFCT, DIALOG BEGIN ! RIGHTMARGIN, 159 ! TOPMARGIN, 2 ! BOTTOMMARGIN, 84 END ! IDD_OPT_GENERAL, DIALOG BEGIN ! RIGHTMARGIN, 159 ! BOTTOMMARGIN, 152 ! END ! ! IDD_OPT_SKINS, DIALOG ! BEGIN ! RIGHTMARGIN, 159 ! BOTTOMMARGIN, 152 ! END ! ! IDD_OPT_PREFS, DIALOG ! BEGIN ! RIGHTMARGIN, 159 ! BOTTOMMARGIN, 152 END END *************** *** 189,194 **** FONT 8, "MS Sans Serif" BEGIN ! ICON IDI_EASYCALC,IDC_STATIC_1,12,12,21,20,SS_REALSIZEIMAGE ! LTEXT "EasyCalc Version 1.25 PPC",IDC_STATIC_2,12,36,100,8,SS_NOPREFIX LTEXT "Copyright (C) 2009",IDC_STATIC_3,12,48,66,8 END --- 246,251 ---- FONT 8, "MS Sans Serif" BEGIN ! ICON IDI_EASYCALC,IDC_STATIC_1,12,12,20,20,SS_REALSIZEIMAGE ! LTEXT "EasyCalc Version 1.25a PPC",IDC_STATIC_2,12,36,100,8,SS_NOPREFIX LTEXT "Copyright (C) 2009",IDC_STATIC_3,12,48,66,8 END *************** *** 205,222 **** END - IDD_OPT_SKINS DIALOG 0, 0, 139, 181 - STYLE DS_SETFONT | WS_POPUP | WS_CAPTION - CAPTION "Skins" - FONT 8, "System" - BEGIN - LTEXT "Skins",IDC_TITLE,4,3,63,8 - COMBOBOX IDC_COMBO_SKIN1,9,40,48,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_COMBO_SKIN2,9,59,48,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_COMBO_SKIN3,9,78,48,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "Skin 1",IDC_SKIN1,62,42,39,10 - LTEXT "Skin 2",IDC_SKIN2,62,61,39,10 - LTEXT "Skin 3",IDC_SKIN3,62,80,39,10 - END - ///////////////////////////////////////////////////////////////////////////// --- 262,265 ---- Index: StateManager.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/StateManager.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StateManager.h 6 Aug 2009 21:42:06 -0000 1.2 --- StateManager.h 17 Oct 2009 13:53:14 -0000 1.3 *************** *** 6,15 **** #include "EasyCalc.h" #include "compat/DataManager.h" typedef struct { ! TCHAR skinName[3][FILENAMELEN]; ! TCHAR langName[FILENAMELEN]; ! int cur_skin_nb; ! bool mouse_cont; } t_state; --- 6,17 ---- #include "EasyCalc.h" #include "compat/DataManager.h" + #include "core/prefs.h" typedef struct { ! TCHAR skinName[3][FILENAMELEN]; ! TCHAR langName[FILENAMELEN]; ! int cur_skin_nb; ! bool mouse_cont; ! tPrefs calcPrefs; } t_state; *************** *** 19,23 **** FILE *stateFile; int init_mode; - t_state state; void init_shell_state(int4 version); --- 21,24 ---- *************** *** 26,31 **** --- 27,34 ---- bool read_shell_state(int4 *ver); bool write_shell_state(); + void initCalcPrefs(); public: + t_state state; int4 version; DataManager historyDB; *************** *** 35,39 **** ~StateManager(void); ! t_state *init(TCHAR *fn); }; --- 38,43 ---- ~StateManager(void); ! t_state *init(TCHAR *fn, void *hWnd_p); ! void save(TCHAR *fn, void *hWnd_p); }; Index: EasyCalc.gif =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.gif,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvs5gHanJ and /tmp/cvsoyze9a differ Index: resourceppc.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/resourceppc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** resourceppc.h 24 Sep 2009 21:19:19 -0000 1.2 --- resourceppc.h 17 Oct 2009 13:53:14 -0000 1.3 *************** *** 22,25 **** --- 22,26 ---- #define IDD_LARGE_MENU 141 #define IDD_SLIM_MENU 142 + #define IDD_OPT_PREFS 145 #define IDC_STATIC_1 201 #define IDC_STATIC_2 202 *************** *** 50,53 **** --- 51,78 ---- #define IDC_LIST_SLIM 1059 #define IDC_VAR 1060 + #define IDC_RADIAN 1061 + #define IDC_DEGREE 1062 + #define IDC_GRAD 1063 + #define IDC_DECIMAL 1064 + #define IDC_BINARY 1065 + #define IDC_OCTAL 1066 + #define IDC_HEXADECIMAL 1067 + #define IDC_SKINVAL 1068 + #define IDC_SKIN 1069 + #define IDC_PRECISION 1070 + #define IDC_PRECVAL 1071 + #define IDC_TRUNCPREC 1072 + #define IDC_INTEGERS 1073 + #define IDC_PRECVAL2 1074 + #define IDC_FORMATNUM 1074 + #define IDC_STRIP_0 1075 + #define IDC_SHOW_UNITS 1076 + #define IDC_OS_NUMPREFS 1077 + #define IDC_CALCGROUP 1080 + #define IDC_FORMATGROUP 1081 + #define IDC_MATCH_BKT 1083 + #define IDC_INS_HELP 1084 + #define IDC_ASSISTGROUP 1085 + #define IDC_SIP1 1086 #define ID_TEST_TEST 32771 #define ID_EDIT_CANCEL 32772 *************** *** 69,75 **** #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 ! #define _APS_NEXT_RESOURCE_VALUE 138 #define _APS_NEXT_COMMAND_VALUE 32778 ! #define _APS_NEXT_CONTROL_VALUE 1061 #define _APS_NEXT_SYMED_VALUE 112 #endif --- 94,100 ---- #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 ! #define _APS_NEXT_RESOURCE_VALUE 148 #define _APS_NEXT_COMMAND_VALUE 32778 ! #define _APS_NEXT_CONTROL_VALUE 1087 #define _APS_NEXT_SYMED_VALUE 112 #endif --- core_display.h DELETED --- --- core_display.cpp DELETED --- Index: Skin.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Skin.cpp 24 Sep 2009 21:19:19 -0000 1.4 --- Skin.cpp 17 Oct 2009 13:53:14 -0000 1.5 *************** *** 30,34 **** #include "shell_loadimage.h" #include "core/core_display.h" ! /*------------------------------------------------------------------------------- --- 30,34 ---- #include "shell_loadimage.h" #include "core/core_display.h" ! #include "core/Main.h" /*------------------------------------------------------------------------------- *************** *** 271,276 **** /******************************************************************************** * Load skin descriptions in the object. * ********************************************************************************/ ! void Skin::load(TCHAR *skinname, const TCHAR *basedir, int width, int height) { char line[1024]; int success; --- 271,279 ---- /******************************************************************************** * Load skin descriptions in the object. * + * Return: 0 if all ok. * + * -1 if could not find the layout file. * + * -2 if could not load the gif file. * ********************************************************************************/ ! int Skin::load(TCHAR *skinname, const TCHAR *basedir, int width, int height) { char line[1024]; int success; *************** *** 292,296 **** if (!this->open(skinname, basedir, OPEN_LAYOUT)) { // goto fallback_on_1st_builtin_skin; ! return; } --- 295,299 ---- if (!this->open(skinname, basedir, OPEN_LAYOUT)) { // goto fallback_on_1st_builtin_skin; ! return (-1); } *************** *** 355,378 **** if (n == 1) shifted_keynum = keynum; ! SkinKey *key; ! if (nkeys == keys_cap) { ! keys_cap += 50; ! keylist = (SkinKey *) realloc(keylist, keys_cap * sizeof(SkinKey)); ! // TODO - handle memory allocation failure } - key = keylist + nkeys; - key->code = keynum; - key->shifted_code = shifted_keynum; - key->sens_rect.x = sens_x; - key->sens_rect.y = sens_y; - key->sens_rect.width = sens_width; - key->sens_rect.height = sens_height; - key->disp_rect.x = disp_x; - key->disp_rect.y = disp_y; - key->disp_rect.width = disp_width; - key->disp_rect.height = disp_height; - key->src.x = act_x; - key->src.y = act_y; - nkeys++; } } --- 358,385 ---- if (n == 1) shifted_keynum = keynum; ! // Special code for 'shift' key = -1 ! if ((keynum >= KEY_SHIFT) && (keynum < BUTTON_COUNT) ! && (shifted_keynum >= KEY_SHIFT) && (shifted_keynum < BUTTON_COUNT)) { ! SkinKey *key; ! if (nkeys == keys_cap) { ! keys_cap += 50; ! keylist = (SkinKey *) realloc(keylist, keys_cap * sizeof(SkinKey)); ! // TODO - handle memory allocation failure ! } ! key = keylist + nkeys; ! key->code = keynum; ! key->shifted_code = shifted_keynum; ! key->sens_rect.x = sens_x; ! key->sens_rect.y = sens_y; ! key->sens_rect.width = sens_width; ! key->sens_rect.height = sens_height; ! key->disp_rect.x = disp_x; ! key->disp_rect.y = disp_y; ! key->disp_rect.width = disp_width; ! key->disp_rect.height = disp_height; ! key->src.x = act_x; ! key->src.y = act_y; ! nkeys++; } } } *************** *** 529,533 **** if (!this->open(skinname, basedir, OPEN_IMAGE)) { // goto fallback_on_1st_builtin_skin; ! return; } --- 536,540 ---- if (!this->open(skinname, basedir, OPEN_IMAGE)) { // goto fallback_on_1st_builtin_skin; ! return (-2); } *************** *** 542,546 **** if (!success) { // goto fallback_on_1st_builtin_skin; ! return; } --- 549,553 ---- if (!success) { // goto fallback_on_1st_builtin_skin; ! return (-2); } *************** *** 567,570 **** --- 574,579 ---- // TODO - handle memory allocation failure memset(disp_bitmap, 255, size); + + return (0); } *************** *** 1094,1098 **** COLORREF old_fg = SetTextColor(hdc, display_fg); BitBlt(hdc, display_loc.x, display_loc.y, display_w, display_h, memdc, 0, 0, SRCCOPY); ! if (*dispResult != 0) print_result(hdc); // SetBkColor(hdc, old_bg); // SetTextColor(hdc, old_fg); --- 1103,1109 ---- COLORREF old_fg = SetTextColor(hdc, display_fg); BitBlt(hdc, display_loc.x, display_loc.y, display_w, display_h, memdc, 0, 0, SRCCOPY); ! if (*dispResult != 0) ! // print_result(hdc); ! paint_result(hdc); // SetBkColor(hdc, old_bg); // SetTextColor(hdc, old_fg); *************** *** 1136,1142 **** // No softline break character when getting the text. res = SendMessage (hwndE, EM_FMTLINES, FALSE, 0); ! TCHAR buf[100]; ! int nchar = GetClassName(hwndE, buf, 100); ! print_result(hWnd_p, buf); // return (hwndE); --- 1147,1155 ---- // No softline break character when getting the text. res = SendMessage (hwndE, EM_FMTLINES, FALSE, 0); ! ! //TCHAR buf[100]; ! //int nchar = GetClassName(hwndE, buf, 100); ! //print_result(hWnd_p, buf); ! SetFocus(hwndE); // return (hwndE); *************** *** 1180,1185 **** /******************************************************************************** ! * OS specific: get boundaries of selected text in the Edit Control passed as * ! * parameter. * * If parameter is NULL, this is the input area Edit Control. * ********************************************************************************/ --- 1193,1197 ---- /******************************************************************************** ! * OS specific: get insert position in the Edit Control passed as parameter. * * If parameter is NULL, this is the input area Edit Control. * ********************************************************************************/ *************** *** 1207,1210 **** --- 1219,1242 ---- /******************************************************************************** + * OS specific: remove selection, or remove character at left of cursor in * + * the Edit Control passed as parameter. * + * If parameter is NULL, this is the input area Edit Control. * + ********************************************************************************/ + void Skin::back_delete(void *hwnd) { + HWND hwnd_edit = (HWND) hwnd; + if (hwnd_edit == NULL) + hwnd_edit = hwndE; + + unsigned long start, end; + long res = SendMessage (hwnd_edit, EM_GETSEL, (WPARAM) &start, (LPARAM) &end); + if (start != end) { + res = SendMessage (hwnd_edit, WM_CLEAR, (WPARAM) 0, (LPARAM) 0); + } else if (start > 0) { + res = SendMessage (hwnd_edit, EM_SETSEL, (WPARAM) start, (LPARAM) (start-1)); + res = SendMessage (hwnd_edit, WM_CLEAR, (WPARAM) 0, (LPARAM) 0); + } + } + + /******************************************************************************** * OS specific: inserts text in the Edit Control passed as parameter, at the * * cursor (replacing selected text if any). * *************** *** 1248,1254 **** /******************************************************************************** ! * OS specific: display the saved result text in the display area. * ********************************************************************************/ void Skin::print_result(HDC hdc) { RECT rc = {display_loc.x, display_loc.y, display_loc.x + display_w, display_loc.y + 18}; --- 1280,1302 ---- /******************************************************************************** ! * OS specific: erase and display the saved result text in the display area. * ********************************************************************************/ void Skin::print_result(HDC hdc) { + HBITMAP bitmap = CreateBitmap(display_w, 18, 1, 1, disp_bitmap); + HDC memdc = CreateCompatibleDC(hdc); + + SelectObject(memdc, bitmap); + + COLORREF old_bg = SetBkColor(hdc, display_bg); + COLORREF old_fg = SetTextColor(hdc, display_fg); + BitBlt(hdc, display_loc.x, display_loc.y, display_w, 18, memdc, 0, 0, SRCCOPY); + + paint_result(hdc); + } + + /******************************************************************************** + * OS specific: overlay saved result text in the display area. * + ********************************************************************************/ + void Skin::paint_result(HDC hdc) { RECT rc = {display_loc.x, display_loc.y, display_loc.x + display_w, display_loc.y + 18}; *************** *** 1257,1260 **** --- 1305,1310 ---- COLORREF oldFg = SetTextColor(hdc, display_fg); int oldBg = SetBkMode(hdc, TRANSPARENT); + // COLORREF oldColor = SetBkColor(hdc, display_bg); + // int oldBg = SetBkMode(hdc, OPAQUE); LOGFONT lf; HFONT hFontNew; *************** *** 1350,1357 **** void Skin::clipCopy_result() { if (*dispResult != 0) { // Get the clipboard and put data in there EmptyClipboard(); ! HGLOBAL h = GlobalAlloc(GMEM_MOVEABLE, strlen((char *) dispResult)+1); // Using classical form to get real size in bytes ! SetClipboardData(CF_UNICODETEXT ,h); } } --- 1400,1413 ---- void Skin::clipCopy_result() { if (*dispResult != 0) { + int len = (_tcslen(dispResult) + 1)*sizeof(TCHAR); // Number of bytes + 1 // Get the clipboard and put data in there + HGLOBAL h = GlobalAlloc(GMEM_MOVEABLE, len); + void *p = GlobalLock(h); + memcpy(p, dispResult, len); + GlobalUnlock(h); + OpenClipboard(NULL); EmptyClipboard(); ! SetClipboardData(CF_UNICODETEXT, h); ! CloseClipboard(); } } *************** *** 1396,1399 **** --- 1452,1462 ---- /******************************************************************************** + * OS specific: reset the varDef list of values. * + ********************************************************************************/ + void Skin::varDefReset(void *hWnd) { + SendMessage((HWND) hWnd, LVM_DELETEALLITEMS, (WPARAM) 0, (LPARAM) 0); + } + + /******************************************************************************** * OS specific: displays the varDef list of values. * ********************************************************************************/ *************** *** 1404,1408 **** lvi.iSubItem = 0; lvi.pszText = name; ! int i = SendMessage((HWND) hWnd, LVM_INSERTITEM, 0, (LPARAM) &lvi); lvi.mask = LVIF_TEXT; --- 1467,1471 ---- lvi.iSubItem = 0; lvi.pszText = name; ! int i = SendMessage((HWND) hWnd, LVM_INSERTITEM, (WPARAM) 0, (LPARAM) &lvi); lvi.mask = LVIF_TEXT; *************** *** 1410,1414 **** lvi.iSubItem = 1; lvi.pszText = deftext; ! SendMessage((HWND) hWnd, LVM_SETITEM, 0, (LPARAM) &lvi); } --- 1473,1477 ---- lvi.iSubItem = 1; lvi.pszText = deftext; ! SendMessage((HWND) hWnd, LVM_SETITEM, (WPARAM) 0, (LPARAM) &lvi); } |
From: Mapi B. <ma...@us...> - 2009-10-17 13:51:42
|
Update of /cvsroot/easycalc/PPCport/langs/merge In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31867 Modified Files: lang.rcp Log Message: 1.25a Compiling, linking, running, limited function set, with bugs Index: lang.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/merge/lang.rcp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lang.rcp 24 Sep 2009 21:18:13 -0000 1.2 --- lang.rcp 17 Oct 2009 13:51:34 -0000 1.3 *************** *** 33,37 **** "$$SHOW UNITS" = "Zobrazovat jednotky" "$$INSERT HELP" = "Vkládat náp." ! "$$PALM NUM PREFS" = "Èís nastavení PDA" "$$DISP SCIEN" = "Norm=>Videc" --- 33,37 ---- "$$SHOW UNITS" = "Zobrazovat jednotky" "$$INSERT HELP" = "Vkládat náp." ! "$$OS NUM PREFS" = "Èís nastavení PDA" "$$DISP SCIEN" = "Norm=>Videc" *************** *** 465,469 **** "$$SHOW UNITS" = "Einheiten anzeigen" "$$INSERT HELP" = "Param.hilfe" ! "$$PALM NUM PREFS" = "PalmZahlenEinst" "$$DISP SCIEN" = "Wiss. Funkt. im Standardmodus" --- 465,469 ---- "$$SHOW UNITS" = "Einheiten anzeigen" "$$INSERT HELP" = "Param.hilfe" ! "$$OS NUM PREFS" = "PalmZahlenEinst" "$$DISP SCIEN" = "Wiss. Funkt. im Standardmodus" *************** *** 898,904 **** "$$SHOW UNITS" = "Show Units" "$$INSERT HELP" = "Insert Help" ! "$$PALM NUM PREFS" = "Palm Num Prefs" "$$DISP SCIEN" = "Scientific Calc in Basic mode" /************************************************** * MAIN FORMS (10) * --- 898,911 ---- "$$SHOW UNITS" = "Show Units" "$$INSERT HELP" = "Insert Help" ! "$$OS NUM PREFS" = "OS Num Prefs" "$$DISP SCIEN" = "Scientific Calc in Basic mode" + "$$DYNAMIC MOUSE" = "Dynamic mouse" + "$$SKIN" = "Skin" + "$$DEFAULT SKIN" = "Default Skin" + "$$CALCULATIONS" = "Calculations" + "$$FORMAT NUMBERS" = "Format numbers" + "$$EDIT ASSISTANCE" = "Edit assistance" + /************************************************** * MAIN FORMS (10) * *************** *** 1009,1012 **** --- 1016,1023 ---- "$$ANS PROBLEM" = "Can't get value of ANS variable." "$$BAD VALUES" = "Bad values." + "$$NO STATE FILE" = "No or wrong version state file. Reinitializing with defaults." + "$$NO LAYOUT FILE" = "Missing .layout file." + "$$ERROR LOADING GIF"= "Missing skin .gif file." + "$$ERROR SAVING STATE"= "Could not save state to file, state will be lost for next session." "$$NUMBER GUESSER" = "Number Guesser" *************** *** 1150,1154 **** "directly on the input line."\ "\n\n"\ ! "Palm Num Prefs - follow the palm number preferences on the input exactly "\ "including the dot/comma/space between thousands. Normally the dot and "\ "comma are both recognized as a decimal point but if you select this "\ --- 1161,1165 ---- "directly on the input line."\ "\n\n"\ ! "OS Num Prefs - follow the palm number preferences on the input exactly "\ "including the dot/comma/space between thousands. Normally the dot and "\ "comma are both recognized as a decimal point but if you select this "\ *************** *** 1338,1344 **** "$$INSERT HELP" = "Insère aide" /**************************************************/ ! "$$PALM NUM PREFS" = "Palm Num Prefs" "$$DISP SCIEN" = "Normal=>Scien" /**************************************************/ /************************************************** --- 1349,1361 ---- "$$INSERT HELP" = "Insère aide" /**************************************************/ ! "$$OS NUM PREFS" = "OS Num Prefs" "$$DISP SCIEN" = "Normal=>Scien" /**************************************************/ + "$$DYNAMIC MOUSE" = "Souris dynamique" + "$$SKIN" = "Skin" + "$$DEFAULT SKIN" = "Skin par défaut" + "$$CALCULATIONS" = "Calculs" + "$$FORMAT NUMBERS" = "Formattage des nombres" + "$$EDIT ASSISTANCE" = "Assistance édition" /************************************************** *************** *** 1365,1369 **** "$$NAME:" = "Nom:" "$$PARAM:" = "Param.:" ! "$$DONE" = "OK" "$$FINANCIAL TITLE" = "Calculatrice financière" --- 1382,1386 ---- "$$NAME:" = "Nom:" "$$PARAM:" = "Param.:" ! "$$DONE" = "Complet" "$$FINANCIAL TITLE" = "Calculatrice financière" *************** *** 1450,1453 **** --- 1467,1474 ---- "$$ANS PROBLEM" = "Impossible d'évaluer la variable ANS." "$$BAD VALUES" = "Valeurs incorrectes." + "$$NO STATE FILE" = "Pas de fichier state, ou mauvaise version. Reinitialisation aux défauts." + "$$NO LAYOUT FILE" = "Fichier .layout manquant." + "$$ERROR LOADING GIF"= "Fichier de Skin .gif manquant." + "$$ERROR SAVING STATE"= "Impossible de sauver dans le fichier state, l'état sera perdu pour la prochaine session." "$$NUMBER GUESSER" = "Analyse numérique" *************** *** 1597,1601 **** "directement dans le boîte de saisie."\ "\n\n"\ ! "Palm Num Prefs - utilise le format de nombres du système PalmOS "\ "exactement incluant les points, les virgules et les espaces. "\ "Normalement, la point et la virgule sont reconnus tous les deux "\ --- 1618,1622 ---- "directement dans le boîte de saisie."\ "\n\n"\ ! "OS Num Prefs - utilise le format de nombres du système "\ "exactement incluant les points, les virgules et les espaces. "\ "Normalement, la point et la virgule sont reconnus tous les deux "\ *************** *** 1788,1792 **** "$$SHOW UNITS" = "Mostra unità" "$$INSERT HELP" = "Ins. guidato" ! "$$PALM NUM PREFS" = "Formato di sys" "$$DISP SCIEN" = "Norm=>Scien" --- 1809,1813 ---- "$$SHOW UNITS" = "Mostra unità" "$$INSERT HELP" = "Ins. guidato" ! "$$OS NUM PREFS" = "Formato di sys" "$$DISP SCIEN" = "Norm=>Scien" *************** *** 2229,2233 **** "$$SHOW UNITS" = "PÊ\¦" "$$INSERT HELP" = "øðá¦" ! "$$PALM NUM PREFS" = "®ÝèÉ]¤" "$$DISP SCIEN" = "ÊíÅÖp" --- 2250,2254 ---- "$$SHOW UNITS" = "PÊ\¦" "$$INSERT HELP" = "øðá¦" ! "$$OS NUM PREFS" = "®ÝèÉ]¤" "$$DISP SCIEN" = "ÊíÅÖp" *************** *** 2688,2692 **** "$$SHOW UNITS" = "Ver Unidades" "$$INSERT HELP" = "Inserir Ajuda" ! "$$PALM NUM PREFS" = "Palm Num Prefs" "$$DISP SCIEN" = "Normal=>Cient" --- 2709,2713 ---- "$$SHOW UNITS" = "Ver Unidades" "$$INSERT HELP" = "Inserir Ajuda" ! "$$OS NUM PREFS" = "OS Num Prefs" "$$DISP SCIEN" = "Normal=>Cient" *************** *** 2947,2951 **** "\n\n"\ /************************************************************/ ! "Palm Num Prefs - follow the palm number preferences on the input exactly "\ "including the dot/comma/space between thousands. Normally the dot and "\ "comma are both recognized as a decimal point but if you select this "\ --- 2968,2972 ---- "\n\n"\ /************************************************************/ ! "OS Num Prefs - follow the palm number preferences on the input exactly "\ "including the dot/comma/space between thousands. Normally the dot and "\ "comma are both recognized as a decimal point but if you select this "\ *************** *** 3134,3138 **** "$$SHOW UNITS" = "ðÏËÁÚÙ×ÁÔØ ÅÄÉÎÉÃÙ " "$$INSERT HELP" = "÷ÓÔÁ×.ÓÐÒÁ×ËÕ" ! "$$PALM NUM PREFS" = "ÞÉÓÌ.ÎÁÓÔÒ.ëðë" "$$DISP SCIEN" = "äÏÐÏÌÎÉÔÅÌØÎÙÅ ÆÕÎËÃÉÉ " --- 3155,3159 ---- "$$SHOW UNITS" = "ðÏËÁÚÙ×ÁÔØ ÅÄÉÎÉÃÙ " "$$INSERT HELP" = "÷ÓÔÁ×.ÓÐÒÁ×ËÕ" ! "$$OS NUM PREFS" = "ÞÉÓÌ.ÎÁÓÔÒ.ëðë" "$$DISP SCIEN" = "äÏÐÏÌÎÉÔÅÌØÎÙÅ ÆÕÎËÃÉÉ " *************** *** 3588,3592 **** "$$SHOW UNITS" = "Ïîêàçûâàòü åäèíèöû " "$$INSERT HELP" = "Âñòàâ.ñïðàâêó" ! "$$PALM NUM PREFS" = "÷èñë.íàñòð.ÊÏÊ " "$$DISP SCIEN" = "Äîïîëíèòåëüíûå ôóíêöèè " --- 3609,3613 ---- "$$SHOW UNITS" = "Ïîêàçûâàòü åäèíèöû " "$$INSERT HELP" = "Âñòàâ.ñïðàâêó" ! "$$OS NUM PREFS" = "÷èñë.íàñòð.ÊÏÊ " "$$DISP SCIEN" = "Äîïîëíèòåëüíûå ôóíêöèè " *************** *** 4043,4047 **** "$$INSERT HELP" = "Insertar Ayuda" /**************************************************/ ! "$$PALM NUM PREFS" = "Palm Num Prefs" "$$DISP SCIEN" = "Calc. Científica en modo básico" /**************************************************/ --- 4064,4068 ---- "$$INSERT HELP" = "Insertar Ayuda" /**************************************************/ ! "$$OS NUM PREFS" = "OS Num Prefs" "$$DISP SCIEN" = "Calc. Científica en modo básico" /**************************************************/ *************** *** 4303,4307 **** "\n\n"\ /************************************************************/ ! "Palm Num Prefs - follow the palm number preferences on the input exactly "\ "including the dot/comma/space between thousands. Normally the dot and "\ "comma are both recognized as a decimal point but if you select this "\ --- 4324,4328 ---- "\n\n"\ /************************************************************/ ! "OS Num Prefs - follow the palm number preferences on the input exactly "\ "including the dot/comma/space between thousands. Normally the dot and "\ "comma are both recognized as a decimal point but if you select this "\ |
Update of /cvsroot/easycalc/PPCport/langs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31782 Modified Files: cs.rcp de.rcp en.rcp fr.rcp it.rcp ja.rcp pt.rcp ru_koi8.rcp ru_win.rcp sp.rcp Log Message: 1.25a Compiling, linking, running, limited function set, with bugs Index: it.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/it.rcp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** it.rcp 22 Jun 2009 22:05:28 -0000 1.1 --- it.rcp 17 Oct 2009 13:51:13 -0000 1.2 *************** *** 4,39 **** BEGIN ! "$$OK" = "OK" ! "$$CANCEL" = "Annulla" /************************************************** * PREFERENCES (19) * **************************************************/ ! "$$PREFERENCES TITLE" = "Impostazioni" ! "$$RADIAN" = "Radianti" ! "$$DEGREE" = "Gradi" ! "$$GRAD" = "Gradi centesimali" ! "$$DECIMAL" = "Decimale" ! "$$BINARY" = "Binaria" ! "$$OCTAL" = "Ott." ! "$$HEXADEC" = "Esadec." ! "$$NORMAL" = "Normale" ! "$$MNSCIENTIFIC" = "Scientifica" ! "$$ENGINEER" = "Ingegn." ! "$$SCIENTIFIC" = "Scien" ! "$$PRECISION" = "Precisione" ! "$$FORCE INTEGER" = "Forza numeri interi" ! "$$REDUCE PRECISION" = "Riduci precisione" ! "$$STRIP ZEROS" = "Taglia gli zeri" ! "$$MATCH BRACKETS" = "Controlla ()" ! "$$SHOW UNITS" = "Mostra unità" ! "$$INSERT HELP" = "Ins. guidato" ! "$$PALM NUM PREFS" = "Formato di sys" ! "$$DISP SCIEN" = "Norm=>Scien" /************************************************** --- 4,39 ---- BEGIN ! "$$OK" = "OK" ! "$$CANCEL" = "Annulla" /************************************************** * PREFERENCES (19) * **************************************************/ ! "$$PREFERENCES TITLE" = "Impostazioni" ! "$$RADIAN" = "Radianti" ! "$$DEGREE" = "Gradi" ! "$$GRAD" = "Gradi centesimali" ! "$$DECIMAL" = "Decimale" ! "$$BINARY" = "Binaria" ! "$$OCTAL" = "Ott." ! "$$HEXADEC" = "Esadec." ! "$$NORMAL" = "Normale" ! "$$MNSCIENTIFIC" = "Scientifica" ! "$$ENGINEER" = "Ingegn." ! "$$SCIENTIFIC" = "Scien" ! "$$PRECISION" = "Precisione" ! "$$FORCE INTEGER" = "Forza numeri interi" ! "$$REDUCE PRECISION" = "Riduci precisione" ! "$$STRIP ZEROS" = "Taglia gli zeri" ! "$$MATCH BRACKETS" = "Controlla ()" ! "$$SHOW UNITS" = "Mostra unità" ! "$$INSERT HELP" = "Ins. guidato" ! "$$OS NUM PREFS" = "Formato di sys" ! "$$DISP SCIEN" = "Norm=>Scien" /************************************************** *************** *** 41,55 **** **************************************************/ "$$TRIGONOMETRICS" = "Trigonometriche" ! "$$EXPONENTIAL" = "Esponenziali" ! "$$COMBINATORICS" = "Combinatorie" ! "$$COMPLEX" = "Complessi" ! "$$SPECIAL FUNCTIONS" = "Funzioni speciali" ! "$$SPECIAL FUNCTIONS2" = "Funzioni speciali 2" ! "$$FUNCTION SOLVING" = "Risoluzione funzioni" ! "$$LIST FUNCTIONS" = "Lista funzioni" ! "$$MATRIX FUNCTIONS" = "Funzioni matriciali" ! "$$UPPER TAIL PROBAB" = "Upper Tail Probab." ! "$$SIGNAL PROCESSING" = "Signal Processing" ! "$$DISCRETE MATH" = "Discrete Math" /************************************************** --- 41,55 ---- **************************************************/ "$$TRIGONOMETRICS" = "Trigonometriche" ! "$$EXPONENTIAL" = "Esponenziali" ! "$$COMBINATORICS" = "Combinatorie" ! "$$COMPLEX" = "Complessi" ! "$$SPECIAL FUNCTIONS" = "Funzioni speciali" ! "$$SPECIAL FUNCTIONS2" = "Funzioni speciali 2" ! "$$FUNCTION SOLVING" = "Risoluzione funzioni" ! "$$LIST FUNCTIONS" = "Lista funzioni" ! "$$MATRIX FUNCTIONS" = "Funzioni matriciali" ! "$$UPPER TAIL PROBAB" = "Upper Tail Probab." ! "$$SIGNAL PROCESSING" = "Signal Processing" ! "$$DISCRETE MATH" = "Discrete Math" /************************************************** *************** *** 57,101 **** **************************************************/ ! "$$SAVE AS TITLE" = "Salva variabile con nome" ! "$$NAME:" = "Nome:" ! "$$PARAM:" = "Par:" ! "$$DONE" = "OK" ! "$$FINANCIAL TITLE" = "Calcolatrice finanziaria" ! "$$BEGIN" = "Inizio" ! "$$END" = "Fine" ! "$$DEFINITION TITLE" = "Manager dati" ! "$$NEW" = "Nuovo" ! "$$MODIFY" = "Modifica" ! "$$DELETE" = "Elimina" ! "$$FUNCTION" = "funzione" ! "$$VARIABLE" = "variabile" ! "$$INSERT" = "Inserisci" ! "$$LIST EDITOR" = "Editor liste" ! "$$VALUE:" = "Valore:" ! "$$REFERENCE1" = "Riferimento 1" ! "$$MATRIX EDITOR" = "Editor di matrici" /************************************************** * Solver * **************************************************/ ! "$$SOLVER" = "Solver" ! "$$UPDATE" = "Update" ! "$$OPTIONS" = "Options" ! "$$NOTE" = "Note" ! "$$NEW WORKSHEET" = "New Worksheet" ! "$$MINIMUM:" = "Minimum:" ! "$$MAXIMUM:" = "Maximum:" ! "$$PRECISION:" = "Precision:" ! "$$SOLVE" = "Solve" ! "$$CALCULATE" = "Calculate" ! "$$WORKSHEET" = "worksheet" ! "$$NEW WORKSHEET" = "New Worksheet" ! "$$SOLVER OPTIONS" = "Solver Options" ! "$$VARIABLE DESCR" = "Variable Description:\n" ! "$$UNDEFINED" = "Undefined" /************************************************** --- 57,101 ---- **************************************************/ ! "$$SAVE AS TITLE" = "Salva variabile con nome" ! "$$NAME:" = "Nome:" ! "$$PARAM:" = "Par:" ! "$$DONE" = "OK" ! "$$FINANCIAL TITLE" = "Calcolatrice finanziaria" ! "$$BEGIN" = "Inizio" ! "$$END" = "Fine" ! "$$DEFINITION TITLE" = "Manager dati" ! "$$NEW" = "Nuovo" ! "$$MODIFY" = "Modifica" ! "$$DELETE" = "Elimina" ! "$$FUNCTION" = "funzione" ! "$$VARIABLE" = "variabile" ! "$$INSERT" = "Inserisci" ! "$$LIST EDITOR" = "Editor liste" ! "$$VALUE:" = "Valore:" ! "$$REFERENCE1" = "Riferimento 1" ! "$$MATRIX EDITOR" = "Editor di matrici" /************************************************** * Solver * **************************************************/ ! "$$SOLVER" = "Solver" ! "$$UPDATE" = "Update" ! "$$OPTIONS" = "Options" ! "$$NOTE" = "Note" ! "$$NEW WORKSHEET" = "New Worksheet" ! "$$MINIMUM:" = "Minimum:" ! "$$MAXIMUM:" = "Maximum:" ! "$$PRECISION:" = "Precision:" ! "$$SOLVE" = "Solve" ! "$$CALCULATE" = "Calculate" ! "$$WORKSHEET" = "worksheet" ! "$$NEW WORKSHEET" = "New Worksheet" ! "$$SOLVER OPTIONS" = "Solver Options" ! "$$VARIABLE DESCR" = "Variable Description:\n" ! "$$UNDEFINED" = "Undefined" /************************************************** *************** *** 103,150 **** **************************************************/ ! "$$LAYOUT" = "Layout" ! "$$BASIC" = "Base" ! "$$SCIENTIFIC" = "Scientifica" ! "$$INTEGER" = "Interi" ! "$$GRAPH" = "Grafici" ! "$$PREFERENCES..." = "Impostazioni..." ! "$$DEFINITION..." = "Manager dati..." ! "$$FINANCIAL..." = "Manager finanziario..." /**************************************************/ "$$SOLVER..." = "Solver..." /**************************************************/ ! "$$SPECIAL" = "Speciale" ! "$$CLEAR HISTORY" = "Elimina cronologia" ! "$$EXPORT TO MEMOPAD" = "Esporta a Blocco Note" ! "$$IMPORT FROM MEMOPAD" = "Importa da Blocco Note" ! "$$INFO" = "?" ! "$$ABOUT..." = "Informazioni su" ! "$$HELP" = "Aiuto" ! "$$MATRIX EDITOR..." = "Matrici..." ! "$$LIST EDITOR..." = "Liste..." /************************************************** * ALERTS (20) * **************************************************/ ! "$$OVERWRITE TITLE" = "Conferma sovrascrittura" ! "$$OVERWRITE MSG" = "L'oggetto '^1' esiste già, sovrascrivere?" ! "$$OVERWRITE" = "Sovrascrivi" ! "$$DELETE TITLE" = "Conferma eliminazione" ! "$$DELETE MSG" = "Eliminare definitivamente la ^1 '^2'?" ! "$$DELETE" = "Elimina" ! "$$ERROR" = "Errore" ! "$$BADNAME MSG" = "Nome variabile non valido." ! "$$BADPARAM MSG" = "Nome parametro non valido." ! "$$COMPUTE MSG" = "Errore durante il calcolo." ! "$$ANS PROBLEM" = "Impossibile recuperare la var. ANS" ! "$$BAD VALUES" = "Valore non valido." ! "$$NUMBER GUESSER" = "Indovina" ! "$$NUMBER NOT RECOG" = "Numero non riconosciuto." /**************************************************/ "$$OCTAL MODE SELECTED" = "Bad Mode Selected" --- 103,150 ---- **************************************************/ ! "$$LAYOUT" = "Layout" ! "$$BASIC" = "Base" ! "$$SCIENTIFIC" = "Scientifica" ! "$$INTEGER" = "Interi" ! "$$GRAPH" = "Grafici" ! "$$PREFERENCES..." = "Impostazioni..." ! "$$DEFINITION..." = "Manager dati..." ! "$$FINANCIAL..." = "Manager finanziario..." /**************************************************/ "$$SOLVER..." = "Solver..." /**************************************************/ ! "$$SPECIAL" = "Speciale" ! "$$CLEAR HISTORY" = "Elimina cronologia" ! "$$EXPORT TO MEMOPAD" = "Esporta a Blocco Note" ! "$$IMPORT FROM MEMOPAD" = "Importa da Blocco Note" ! "$$INFO" = "?" ! "$$ABOUT..." = "Informazioni su" ! "$$HELP" = "Aiuto" ! "$$MATRIX EDITOR..." = "Matrici..." ! "$$LIST EDITOR..." = "Liste..." /************************************************** * ALERTS (20) * **************************************************/ ! "$$OVERWRITE TITLE" = "Conferma sovrascrittura" ! "$$OVERWRITE MSG" = "L'oggetto '^1' esiste già, sovrascrivere?" ! "$$OVERWRITE" = "Sovrascrivi" ! "$$DELETE TITLE" = "Conferma eliminazione" ! "$$DELETE MSG" = "Eliminare definitivamente la ^1 '^2'?" ! "$$DELETE" = "Elimina" ! "$$ERROR" = "Errore" ! "$$BADNAME MSG" = "Nome variabile non valido." ! "$$BADPARAM MSG" = "Nome parametro non valido." ! "$$COMPUTE MSG" = "Errore durante il calcolo." ! "$$ANS PROBLEM" = "Impossibile recuperare la var. ANS" ! "$$BAD VALUES" = "Valore non valido." ! "$$NUMBER GUESSER" = "Indovina" ! "$$NUMBER NOT RECOG" = "Numero non riconosciuto." /**************************************************/ "$$OCTAL MODE SELECTED" = "Bad Mode Selected" *************** *** 162,194 **** * MISC STRINGS (17) * **************************************************/ ! "$$FUNCTION MODIFICATION" = "Modifica funzioni" ! "$$VARIABLE MODIFICATION" = "Modifica variabili" ! "$$NEW FUNCTION" = "Nuova funzione" ! "$$NEW VARIABLE" = "Nuova variabile" ! "$$STRVARIABLE" = "la variabile" ! "$$STRFUNCTION" = "la funzione" ! "$$GRAPH FUNCTION" = "Disegna funzione" ! "$$NONE" = "Vuoto" ! "$$USER" = "Utente" ! "$$MNCOPY" = "Copia" ! "$$MNSAVE AS" = "Salva con nome" ! "$$MNDATAMGR" = "Manager dati" ! "$$MNGUESSIT" = "Indovina" ! "$$ENGDISPL" = "EngDisplay" ! "$$MNDEGREE" = "->Gradi" ! "$$MNDEGREE2" = "->Gradi2" ! "$$MNRADIAN" = "->Radianti" ! "$$MNGON" = "->e^(ix)" ! "$$MNCIS" = "->c()+isin()" /************************************************** * Graph strings (15) * **************************************************/ ! "$$SELECT A FUNCTION" = "Scegli una funzione" ! "$$GRAPH COMPUTING" = "Calcolo grafico" ! "$$GRAPH COMPUTING RESULT" = "Risultato calcolo grafico" ! "$$COMPUTING" = "Calcolo in corso..." ! "$$COMPCONFIRM" = "Il calcolo potrebbe durare a lungo. Premere OK per iniziare" /* "Il" should be --- 162,194 ---- * MISC STRINGS (17) * **************************************************/ ! "$$FUNCTION MODIFICATION" = "Modifica funzioni" ! "$$VARIABLE MODIFICATION" = "Modifica variabili" ! "$$NEW FUNCTION" = "Nuova funzione" ! "$$NEW VARIABLE" = "Nuova variabile" ! "$$STRVARIABLE" = "la variabile" ! "$$STRFUNCTION" = "la funzione" ! "$$GRAPH FUNCTION" = "Disegna funzione" ! "$$NONE" = "Vuoto" ! "$$USER" = "Utente" ! "$$MNCOPY" = "Copia" ! "$$MNSAVE AS" = "Salva con nome" ! "$$MNDATAMGR" = "Manager dati" ! "$$MNGUESSIT" = "Indovina" ! "$$ENGDISPL" = "EngDisplay" ! "$$MNDEGREE" = "->Gradi" ! "$$MNDEGREE2" = "->Gradi2" ! "$$MNRADIAN" = "->Radianti" ! "$$MNGON" = "->e^(ix)" ! "$$MNCIS" = "->c()+isin()" /************************************************** * Graph strings (15) * **************************************************/ ! "$$SELECT A FUNCTION" = "Scegli una funzione" ! "$$GRAPH COMPUTING" = "Calcolo grafico" ! "$$GRAPH COMPUTING RESULT" = "Risultato calcolo grafico" ! "$$COMPUTING" = "Calcolo in corso..." ! "$$COMPCONFIRM" = "Il calcolo potrebbe durare a lungo. Premere OK per iniziare" /* "Il" should be *************** *** 196,238 **** * Lo for zero * Il for valore, min e max ! * Nothing for d/dx */ ! "$$COMPRESULT" = "Il ^1 della funzione è: ^2" ! "$$LEFTBOUND" = "Scegli il limite SX dell'intervallo e premi 'C'" ! "$$RIGHTBOUND" = "Scegli il limite DX dell'intervallo e premi 'C'" ! "$$POINTONGRAPH" = "Scegli il punto sul grafico e premi 'C'" ! "$$GRZERO" = "zero" ! "$$GRVALUE" = "valore" ! "$$GRMIN" = "min" ! "$$GRMAX" = "max" ! "$$GRDDX" = "d/dx" ! "$$GRINTEG" = "integrale" ! "$$GRCBOUNDERR" = "Il limite SX deve essere minore del DX" ! "$$GRINTERSECT" = "intersezioni" ! "$$GRCFUNCERR" = "Devi scegliere 2 funz. diverse" /************************************************** * ERROR MESSAGES (17) * **************************************************/ ! "$$ERRNO ERROR" = "Nessun errore" ! "$$ERRSYNTAX ERROR" = "Errore di sintassi" ! "$$ERRBAD FUNCTION" = "Funzione non valida" ! "$$ERRMISSING ARGUMENT" = "Argomenti non sufficienti" ! "$$ERRBAD ARGUMENT TYPE" = "Argomento non valido" ! "$$ERRINTERNAL ERROR" = "Errore interno" ! "$$ERRBAD MODE SELECTED"= "Modalità non valida" ! "$$ERRNO RESULT" = "Nessun risultato" ! "$$ERRDIVISION BY 0" = "Divisione per 0" ! "$$ERRNO SUCH VARIABLE" = "Variabili insufficienti" ! "$$ERRBAD RESULT" = "Risultato non valido" ! "$$ERRTOO DEEP RECURSION"= "Troppe ricorsioni" "$$ERRIMPOSSIBLE CALCULATION" = "Calcolo impossibile" ! "$$ERROUT OF RANGE" = "Fuori range" ! "$$ERRBAD ARG COUNT" = "Numero di argomenti non valido" ! "$$ERRBAD DIMENSION" = "Dimensione non valida" ! "$$ERRSINGULAR" = "Matrice singolare" /**************************************************/ ! "$$ERRINTERRUPTED" = "Operation interrupted" /**************************************************/ --- 196,238 ---- * Lo for zero * Il for valore, min e max ! * Nothing for d/dx */ ! "$$COMPRESULT" = "Il ^1 della funzione è: ^2" ! "$$LEFTBOUND" = "Scegli il limite SX dell'intervallo e premi 'C'" ! "$$RIGHTBOUND" = "Scegli il limite DX dell'intervallo e premi 'C'" ! "$$POINTONGRAPH" = "Scegli il punto sul grafico e premi 'C'" ! "$$GRZERO" = "zero" ! "$$GRVALUE" = "valore" ! "$$GRMIN" = "min" ! "$$GRMAX" = "max" ! "$$GRDDX" = "d/dx" ! "$$GRINTEG" = "integrale" ! "$$GRCBOUNDERR" = "Il limite SX deve essere minore del DX" ! "$$GRINTERSECT" = "intersezioni" ! "$$GRCFUNCERR" = "Devi scegliere 2 funz. diverse" /************************************************** * ERROR MESSAGES (17) * **************************************************/ ! "$$ERRNO ERROR" = "Nessun errore" ! "$$ERRSYNTAX ERROR" = "Errore di sintassi" ! "$$ERRBAD FUNCTION" = "Funzione non valida" ! "$$ERRMISSING ARGUMENT" = "Argomenti non sufficienti" ! "$$ERRBAD ARGUMENT TYPE" = "Argomento non valido" ! "$$ERRINTERNAL ERROR" = "Errore interno" ! "$$ERRBAD MODE SELECTED"= "Modalità non valida" ! "$$ERRNO RESULT" = "Nessun risultato" ! "$$ERRDIVISION BY 0" = "Divisione per 0" ! "$$ERRNO SUCH VARIABLE" = "Variabili insufficienti" ! "$$ERRBAD RESULT" = "Risultato non valido" ! "$$ERRTOO DEEP RECURSION"= "Troppe ricorsioni" "$$ERRIMPOSSIBLE CALCULATION" = "Calcolo impossibile" ! "$$ERROUT OF RANGE" = "Fuori range" ! "$$ERRBAD ARG COUNT" = "Numero di argomenti non valido" ! "$$ERRBAD DIMENSION" = "Dimensione non valida" ! "$$ERRSINGULAR" = "Matrice singolare" /**************************************************/ ! "$$ERRINTERRUPTED" = "Operation interrupted" /**************************************************/ *************** *** 240,275 **** * GRAPH SCREENS (13) * **************************************************/ ! "$$TABLE MODE..." = "Modalità tabella..." ! "$$TABLE MODE" = "Modalità tabella" ! "$$GOTO" = "Vai a" ! "$$STEP" = "Passo" ! "$$GO" = "Vai" ! "$$SETUP GRAPHS..." = "Setup grafici..." ! "$$SETUP GRAPHS" = "Setup grafici" ! "$$GRAPH PREFERENCES..." = "Impostazioni grafici..." ! "$$GRAPH PREFERENCES" = "Impostazioni grafici" ! "$$DEFAULT" = "Predefinite" ! "$$TRIGONO" = "Trigonom." ! "$$FUNCMODE" = "Funzione" ! "$$POLARMODE" = "Polare" ! "$$PARAMMODE" = "Parametrica" ! "$$GRAPH COLORS" = "Graph Color Setup" ! "$$BACKGRND" = "backg" ! "$$AXIS" = "axis" ! "$$GRID" = "grid" /************************************************** * MENU EDIT (8) * **************************************************/ ! "$$EDIT" = "Modif." ! "$$UNDO" = "Annulla" ! "$$CUT" = "Taglia" ! "$$COPY" = "Copia" ! "$$PASTE" = "Incolla" ! "$$SELECT ALL" = "Selez. tutto" ! "$$KEYBOARD" = "Tastiera" ! "$$GRAFFITI HELP" = "Aiuto Graffiti" /************************************************** --- 240,275 ---- * GRAPH SCREENS (13) * **************************************************/ ! "$$TABLE MODE..." = "Modalità tabella..." ! "$$TABLE MODE" = "Modalità tabella" ! "$$GOTO" = "Vai a" ! "$$STEP" = "Passo" ! "$$GO" = "Vai" ! "$$SETUP GRAPHS..." = "Setup grafici..." ! "$$SETUP GRAPHS" = "Setup grafici" ! "$$GRAPH PREFERENCES..." = "Impostazioni grafici..." ! "$$GRAPH PREFERENCES" = "Impostazioni grafici" ! "$$DEFAULT" = "Predefinite" ! "$$TRIGONO" = "Trigonom." ! "$$FUNCMODE" = "Funzione" ! "$$POLARMODE" = "Polare" ! "$$PARAMMODE" = "Parametrica" ! "$$GRAPH COLORS" = "Graph Color Setup" ! "$$BACKGRND" = "backg" ! "$$AXIS" = "axis" ! "$$GRID" = "grid" /************************************************** * MENU EDIT (8) * **************************************************/ ! "$$EDIT" = "Modif." ! "$$UNDO" = "Annulla" ! "$$CUT" = "Taglia" ! "$$COPY" = "Copia" ! "$$PASTE" = "Incolla" ! "$$SELECT ALL" = "Selez. tutto" ! "$$KEYBOARD" = "Tastiera" ! "$$GRAFFITI HELP" = "Aiuto Graffiti" /************************************************** *************** *** 277,441 **** **************************************************/ "$$PREFHELP" = "Impostazioni per EasyCalc\n\n"\ ! "Riduci precisione - se selezionato EasyCalc arrotonda il numero dopo "\ ! "ogni operazione per evitare errori con le virgole. Ciò rende tutte "\ ! "le operazioni leggermente più lente, quindi è bene lasciarlo "\ ! "disabilitato se si lavora con matrici, liste o funzioni."\ ! "\n\n"\ ! "Controlla () - se selezionato, la ')' è aggiunta automaticamente alla fine di ciascuna funzione."\ ! "\n\n"\ ! "Forza numeri interi - forza la conversione dell'input in numeri "\ ! "interi. E' utile lavorando con le conversioni di numeri, "\ ! "poiché l'output in virgola mobile segue la rappresentazione tradizionale "\ ! "ad un massimo di 10 cifre, mentre gli interi sono visualizzati "\ ! "come intero 32 bit in forma binaria senza problemi."\ ! "\n\n"\ ! "Mostra unità - passati alla modalità Eng, visualizzerà per es 10E3 come 10K "\ ! "ecc. Ovviamemnte puoi usare questi numeri in input senza problemi."\ ! "\n\n"\ ! "Aiuto inserimento - inserisce i nomi degli argomenti per alcune funzioni multiparametro "\ ! "direttamente sulla linea di input."\ ! "\n\n"\ ! "Formato di sistema - segue le opzioni internazionali in input in modo rigoroso "\ ! "compresi i punto/virgola/spazio tra le migliaia. In genere i punti e le "\ ! "virgole sono considerati come punti decimali ma se scegli questa opzione "\ ! "sarà considerato solamente quello selezionato. "\ ! "Può essere utile se vuoi incollare in EasyCalc numeri estratti da altre "\ ! "applicazioni." "$$BASIC HELP" = "Informazioni aggiornate disponibili all'indirizzo "\ ! "http://easycalc.sourceforge.net ."\ ! "\n\n"\ ! "Per ridurre la precisione ora EasyCalc utilizza nuovi algoritmi, "\ ! "migliori in molte situazioni. L'unica eccezione è "\ ! "quando vuoi lavorare con numeri come pi, dove ridurre la "\ ! "precisione potrebbe portare a risultati inaffidabili (soprattutto con "\ ! "funzioni goniometricge). Si consiglia di abilitare questa opzione solo "\ ! "se non si usano i radianti."\ ! "\n\n"\ ! "Per gli utenti Visor Platinum: sembra che in questi dispositivi "\ ! "MathLib sia integrato nella ROM, quindi non è necessario "\ ! "installarla. Se sono state già installate, è possibile rimuoverle con "\ ! "Applicazioni->Menu->Elimina."\ ! "\n\n"\ ! "Leggi il file INSTALL se hai l'impressione di non riuscire a trovare "\ ! "le funzioni (come i grafici) che ti aspettavi. EasyCalc è distribuito "\ ! "in pacchetti differenti, e ognuno ha un set di funzionalità particolare."\ ! "\n\n"\ ! "Le informazioni riguardanti le nuove funzioni sono state nel "\ ! "file specfuncs.pdf."\ ! "\n\n"\ ! "Per separare i paramenti nelle funzioni multiparametro usare ':', "\ ! "per esempio ncr(6:3)."\ ! "\n\n"\ ! "Aiuto per la calcolatrice\n"\ ! "Qualcosa di potenzialmente utile:\n"\ ! "'enter' di Graffiti corrisponde al tasto EXE\n\n"\ ! "Digitare gli operatori con Graffiti non aggiunge 'ans' all'inizio "\ ! "della linea (utile solo per '-3+4').\n\n"\ ! "Hai la possibilità di abilitare le parentesi auto-chiudenti in Impostazioni, "\ ! "così non sarai costretto a chiudere le "\ ! "parentesi a fine riga, per esempio 'sin(3.5'.\n\n"\ ! "Per definire una funzione: f()=\"x^2\" dove x è un parametro.\n\n"\ ! "Puoi immettere gradi in questo modo: 90°30'\n"\ ! "Non è possibile usare lo stile matematico in casi come 3pi+4e "\ ! "o 3sin(x)\n"\ ! "Lavorare con i numeri complessi è LENTO. Disabilitali nelle Preferenze."\ ! "\n\n"\ ! "Puoi usare unità come M-mega, G-giga, T-tera, n-nano, f-femto etc. "\ ! "così come fai su carta. P.e. 10G, 1/80T"\ ! "\n\n"\ ! "Puoi definire la una funzione multiparametro tua. Fai rifermimento al "\ ! "secondo parametro come 'x(2)', al terzo come 'x(3)' ecc. (in cui 'x' "\ ! "è il nome del parametro)." /*** Me: -> The GNU General Public License should stay in the original language <- ***/ "$$GNU NOTICE" = "The Scientific Calculator for PalmOS.\n"\ ! "Copyright (C) 1999-2003, 2006, 2007 Ondrej Palkovsky.\n"\ ! "http://easycalc.sourceforge.net\n\n"\ ! "This program is free software; you can redistribute it and/or modify "\ ! "it under the terms of the GNU General Public License as published by "\ ! "the Free Software Foundation; either version 2 of the License, or "\ ! "(at your option) any later version.\n\n"\ ! "This program is distributed in the hope that it will be useful, "\ ! "but WITHOUT ANY WARRANTY; without even the implied warranty of "\ ! "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "\ ! "GNU General Public License for more details.\n\n"\ ! "You should have received a copy of the GNU General Public License "\ ! "along with this program; if not, write to the Free Software "\ ! "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA" "$$GRPREF HELP" = "Opzioni di base per i grafici."\ ! "\n\n"\ ! "xmin, xmax, ymin, ymax - confini dell'area grafica"\ ! "\n\n"\ ! "Funzione,Polare,Parametrico - Definiscono il tipo di grafico. Funzione per "\ ! "il tipo y=f(x), Polare prende un angolo theta come parametro e restituisce "\ ! "la lunghezza di un segmento, come r=f(t), e Parametrica permette di "\ ! "specificare funzioni differenti per X e Y, come X=t, Y=6t." "$$GRSETUP HELP" = "Impostazioni del grafico da tracciare."\ ! "\n\n"\ ! "Clicca sull'ID della funzione (X1,Y1,r1..) per scegliere una funzione esistente."\ ! "\n\n"\ ! "Clicca quindi sul nome della funzione per modificarla." ! "$$FINHELP" = "Il calcolo finanziario di base può esser descritto così: "\ ! "Hai dei soldi in banca (PV, present value). X-volte all'anno (P/YR, "\ ! "payments per year) depositi un po' di soldi (PMT, payment) sul conto. "\ ! "La banca aggiunge ogni volta una certa quantità di denaro, in percentuale "\ ! "sull'ammontare complessivo del capitale presente. La percentuale è chiamata "\ ! "interesse (IT, interest).\n"\ ! "Dopo un dato numero di depositi (NP, Number of periods) decidi di "\ ! "prelevare "\ ! "i tuoi soldi dal conto. Quello che otterrai si chiama FV, future value.\n"\ ! "Questa implementazione presuppone che il periodo di deposito sia uguale "\ ! "al tempo per cui la banca alimenta interessi." \ ! "\n\n" \ ! "!!! Questa implementazione usa l'approccio 'cash flow': " \ ! "'+' significa 'soldi ALLA banca' e '-' 'soldi DALLA banca'. Molti " \ ! "mi chiedono di cambiare il segno, ma IMHO questa è la notazione " \ ! "corretta e il metodo che porta meno confusione." "$$MEMOHELP" = "Scegli un memo dalla lista e premi OK per eseguirlo. "\ ! "La prima riga del memo (titolo) è ignorata. Il memo è eseguito "\ ! "come se tu inserissi riga per riga i comandi nella calcolatrice.\n\n"\ ! "Se c'è la categoria 'EasyCalc' nel Blocco Note, solo i memo di questa "\ ! "saranno visualizzati." "$$FUNCHELP" = "Funzioni" \ ! "Nelle funzioni di 'risoluzione funzioni' l'argomento 'funzione' "\ ! "può esser specificato sia come 'f()' sia direttamente come stringa ('\"x+1\"'). "\ ! "Le seguenti funzioni hanno un argomento extra OPZIONALE che definisce "\ ! "l'approssimazione. Tanto più l'errore è piccolo, tanto più "\ ! "lento sarà il calcolo.\n\n" \ ! "fzero(min:max:func[:error]) - calcola le radici di func\n\n"\ ! "fvalue(min:max:value:func[:error]) - calcola x, dove f(x)=valore\n\n"\ ! "fmin(min:max:func[:error]) - calcola il min di func in [min:max]\n\n"\ ! "fmax(min:max:func[:error]) - calcola il max di func in [min:max]\n\n"\ ! "fd_dx(point:func[:error]) - calcola la derivata prima di func\n\n"\ ! "fsimps(min:max:func[:error]) - calcola l'integrale definito di func"\ ! "con l'algoritmo di integrazione Simpson\n\n" \ ! "fromberg(min:max:func[:n]) - calcola l'integrale definito di func "\ ! "con l'algoritmo Romberg ('n' grande, calcolo lento).\n\n" \ ! "fintersect(min:max:f1:f2[:error]) - trova le intersezioni delle funzioni "\ ! "f1 e f2" /**************************************************/ "$$SOLVERHELP" = "The Solver is a tool, that helps you store equations "\ "and formulas and compute results in a convinient way. "\ ! "Create a new worksheet or select existing one from the drop-down "\ ! "menu. When the worksheet is selected, you can type in either formula "\ ! "(e.g. pi*r^2) or equation (e.g. x^2=x+2). Then tap the 'Update' "\ ! "button and the list of variables gets updated. If you wrote in formula, "\ ! "set up the variables and tap button 'Calculate'. If you entered equation, "\ ! "select the variable you want to solve and press button 'Solve'.\n\n"\ ! "You may annotate the function and the variables. Press the 'Note' button "\ ! "and add a note. If you start a new line with a name of variable and colon "\ ! "(e.g. 't: Time'), the rest of the line is treated as a description of the "\ ! "variable and shown to you when you select the variable in the list.\n\n"\ ! "The equation solving internally uses fzero() function, you can modify the "\ ! "parameters by tapping the 'Options' button." END --- 277,441 ---- **************************************************/ "$$PREFHELP" = "Impostazioni per EasyCalc\n\n"\ ! "Riduci precisione - se selezionato EasyCalc arrotonda il numero dopo "\ ! "ogni operazione per evitare errori con le virgole. Ciò rende tutte "\ ! "le operazioni leggermente più lente, quindi è bene lasciarlo "\ ! "disabilitato se si lavora con matrici, liste o funzioni."\ ! "\n\n"\ ! "Controlla () - se selezionato, la ')' è aggiunta automaticamente alla fine di ciascuna funzione."\ ! "\n\n"\ ! "Forza numeri interi - forza la conversione dell'input in numeri "\ ! "interi. E' utile lavorando con le conversioni di numeri, "\ ! "poiché l'output in virgola mobile segue la rappresentazione tradizionale "\ ! "ad un massimo di 10 cifre, mentre gli interi sono visualizzati "\ ! "come intero 32 bit in forma binaria senza problemi."\ ! "\n\n"\ ! "Mostra unità - passati alla modalità Eng, visualizzerà per es 10E3 come 10K "\ ! "ecc. Ovviamemnte puoi usare questi numeri in input senza problemi."\ ! "\n\n"\ ! "Aiuto inserimento - inserisce i nomi degli argomenti per alcune funzioni multiparametro "\ ! "direttamente sulla linea di input."\ ! "\n\n"\ ! "Formato di sistema - segue le opzioni internazionali in input in modo rigoroso "\ ! "compresi i punto/virgola/spazio tra le migliaia. In genere i punti e le "\ ! "virgole sono considerati come punti decimali ma se scegli questa opzione "\ ! "sarà considerato solamente quello selezionato. "\ ! "Può essere utile se vuoi incollare in EasyCalc numeri estratti da altre "\ ! "applicazioni." "$$BASIC HELP" = "Informazioni aggiornate disponibili all'indirizzo "\ ! "http://easycalc.sourceforge.net ."\ ! "\n\n"\ ! "Per ridurre la precisione ora EasyCalc utilizza nuovi algoritmi, "\ ! "migliori in molte situazioni. L'unica eccezione è "\ ! "quando vuoi lavorare con numeri come pi, dove ridurre la "\ ! "precisione potrebbe portare a risultati inaffidabili (soprattutto con "\ ! "funzioni goniometricge). Si consiglia di abilitare questa opzione solo "\ ! "se non si usano i radianti."\ ! "\n\n"\ ! "Per gli utenti Visor Platinum: sembra che in questi dispositivi "\ ! "MathLib sia integrato nella ROM, quindi non è necessario "\ ! "installarla. Se sono state già installate, è possibile rimuoverle con "\ ! "Applicazioni->Menu->Elimina."\ ! "\n\n"\ ! "Leggi il file INSTALL se hai l'impressione di non riuscire a trovare "\ ! "le funzioni (come i grafici) che ti aspettavi. EasyCalc è distribuito "\ ! "in pacchetti differenti, e ognuno ha un set di funzionalità particolare."\ ! "\n\n"\ ! "Le informazioni riguardanti le nuove funzioni sono state nel "\ ! "file specfuncs.pdf."\ ! "\n\n"\ ! "Per separare i paramenti nelle funzioni multiparametro usare ':', "\ ! "per esempio ncr(6:3)."\ ! "\n\n"\ ! "Aiuto per la calcolatrice\n"\ ! "Qualcosa di potenzialmente utile:\n"\ ! "'enter' di Graffiti corrisponde al tasto EXE\n\n"\ ! "Digitare gli operatori con Graffiti non aggiunge 'ans' all'inizio "\ ! "della linea (utile solo per '-3+4').\n\n"\ ! "Hai la possibilità di abilitare le parentesi auto-chiudenti in Impostazioni, "\ ! "così non sarai costretto a chiudere le "\ ! "parentesi a fine riga, per esempio 'sin(3.5'.\n\n"\ ! "Per definire una funzione: f()=\"x^2\" dove x è un parametro.\n\n"\ ! "Puoi immettere gradi in questo modo: 90°30'\n"\ ! "Non è possibile usare lo stile matematico in casi come 3pi+4e "\ ! "o 3sin(x)\n"\ ! "Lavorare con i numeri complessi è LENTO. Disabilitali nelle Preferenze."\ ! "\n\n"\ ! "Puoi usare unità come M-mega, G-giga, T-tera, n-nano, f-femto etc. "\ ! "così come fai su carta. P.e. 10G, 1/80T"\ ! "\n\n"\ ! "Puoi definire la una funzione multiparametro tua. Fai rifermimento al "\ ! "secondo parametro come 'x(2)', al terzo come 'x(3)' ecc. (in cui 'x' "\ ! "è il nome del parametro)." /*** Me: -> The GNU General Public License should stay in the original language <- ***/ "$$GNU NOTICE" = "The Scientific Calculator for PalmOS.\n"\ ! "Copyright (C) 1999-2003, 2006, 2007 Ondrej Palkovsky.\n"\ ! "http://easycalc.sourceforge.net\n\n"\ ! "This program is free software; you can redistribute it and/or modify "\ ! "it under the terms of the GNU General Public License as published by "\ ! "the Free Software Foundation; either version 2 of the License, or "\ ! "(at your option) any later version.\n\n"\ ! "This program is distributed in the hope that it will be useful, "\ ! "but WITHOUT ANY WARRANTY; without even the implied warranty of "\ ! "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "\ ! "GNU General Public License for more details.\n\n"\ ! "You should have received a copy of the GNU General Public License "\ ! "along with this program; if not, write to the Free Software "\ ! "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA" "$$GRPREF HELP" = "Opzioni di base per i grafici."\ ! "\n\n"\ ! "xmin, xmax, ymin, ymax - confini dell'area grafica"\ ! "\n\n"\ ! "Funzione,Polare,Parametrico - Definiscono il tipo di grafico. Funzione per "\ ! "il tipo y=f(x), Polare prende un angolo theta come parametro e restituisce "\ ! "la lunghezza di un segmento, come r=f(t), e Parametrica permette di "\ ! "specificare funzioni differenti per X e Y, come X=t, Y=6t." "$$GRSETUP HELP" = "Impostazioni del grafico da tracciare."\ ! "\n\n"\ ! "Clicca sull'ID della funzione (X1,Y1,r1..) per scegliere una funzione esistente."\ ! "\n\n"\ ! "Clicca quindi sul nome della funzione per modificarla." ! "$$FINHELP" = "Il calcolo finanziario di base può esser descritto così: "\ ! "Hai dei soldi in banca (PV, present value). X-volte all'anno (P/YR, "\ ! "payments per year) depositi un po' di soldi (PMT, payment) sul conto. "\ ! "La banca aggiunge ogni volta una certa quantità di denaro, in percentuale "\ ! "sull'ammontare complessivo del capitale presente. La percentuale è chiamata "\ ! "interesse (IT, interest).\n"\ ! "Dopo un dato numero di depositi (NP, Number of periods) decidi di "\ ! "prelevare "\ ! "i tuoi soldi dal conto. Quello che otterrai si chiama FV, future value.\n"\ ! "Questa implementazione presuppone che il periodo di deposito sia uguale "\ ! "al tempo per cui la banca alimenta interessi." \ ! "\n\n" \ ! "!!! Questa implementazione usa l'approccio 'cash flow': " \ ! "'+' significa 'soldi ALLA banca' e '-' 'soldi DALLA banca'. Molti " \ ! "mi chiedono di cambiare il segno, ma IMHO questa è la notazione " \ ! "corretta e il metodo che porta meno confusione." "$$MEMOHELP" = "Scegli un memo dalla lista e premi OK per eseguirlo. "\ ! "La prima riga del memo (titolo) è ignorata. Il memo è eseguito "\ ! "come se tu inserissi riga per riga i comandi nella calcolatrice.\n\n"\ ! "Se c'è la categoria 'EasyCalc' nel Blocco Note, solo i memo di questa "\ ! "saranno visualizzati." "$$FUNCHELP" = "Funzioni" \ ! "Nelle funzioni di 'risoluzione funzioni' l'argomento 'funzione' "\ ! "può esser specificato sia come 'f()' sia direttamente come stringa ('\"x+1\"'). "\ ! "Le seguenti funzioni hanno un argomento extra OPZIONALE che definisce "\ ! "l'approssimazione. Tanto più l'errore è piccolo, tanto più "\ ! "lento sarà il calcolo.\n\n" \ ! "fzero(min:max:func[:error]) - calcola le radici di func\n\n"\ ! "fvalue(min:max:value:func[:error]) - calcola x, dove f(x)=valore\n\n"\ ! "fmin(min:max:func[:error]) - calcola il min di func in [min:max]\n\n"\ ! "fmax(min:max:func[:error]) - calcola il max di func in [min:max]\n\n"\ ! "fd_dx(point:func[:error]) - calcola la derivata prima di func\n\n"\ ! "fsimps(min:max:func[:error]) - calcola l'integrale definito di func"\ ! "con l'algoritmo di integrazione Simpson\n\n" \ ! "fromberg(min:max:func[:n]) - calcola l'integrale definito di func "\ ! "con l'algoritmo Romberg ('n' grande, calcolo lento).\n\n" \ ! "fintersect(min:max:f1:f2[:error]) - trova le intersezioni delle funzioni "\ ! "f1 e f2" /**************************************************/ "$$SOLVERHELP" = "The Solver is a tool, that helps you store equations "\ "and formulas and compute results in a convinient way. "\ ! "Create a new worksheet or select existing one from the drop-down "\ ! "menu. When the worksheet is selected, you can type in either formula "\ ! "(e.g. pi*r^2) or equation (e.g. x^2=x+2). Then tap the 'Update' "\ ! "button and the list of variables gets updated. If you wrote in formula, "\ ! "set up the variables and tap button 'Calculate'. If you entered equation, "\ ! "select the variable you want to solve and press button 'Solve'.\n\n"\ ! "You may annotate the function and the variables. Press the 'Note' button "\ ! "and add a note. If you start a new line with a name of variable and colon "\ ! "(e.g. 't: Time'), the rest of the line is treated as a description of the "\ ! "variable and shown to you when you select the variable in the list.\n\n"\ ! "The equation solving internally uses fzero() function, you can modify the "\ ! "parameters by tapping the 'Options' button." END Index: en.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/en.rcp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** en.rcp 22 Jun 2009 22:05:28 -0000 1.1 --- en.rcp 17 Oct 2009 13:51:13 -0000 1.2 *************** *** 4,38 **** BEGIN ! "$$OK" = "OK" ! "$$CANCEL" = "Cancel" /************************************************** * PREFERENCES (19) * **************************************************/ ! "$$PREFERENCES TITLE" = "Preferences" ! "$$RADIAN" = "Radian" ! "$$DEGREE" = "Degree" ! "$$GRAD" = "Grad" ! "$$DECIMAL" = "Decimal" ! "$$BINARY" = "Binary" ! "$$OCTAL" = "Octal" ! "$$HEXADEC" = "HexaDec" ! "$$NORMAL" = "Normal" ! "$$SCIENTIFIC" = "Scien" ! "$$MNSCIENTIFIC" = "Scientific" ! "$$ENGINEER" = "Engineer" ! "$$PRECISION" = "Precision" ! "$$FORCE INTEGER" = "Force integer nums" ! "$$REDUCE PRECISION" = "Reduce precision" ! "$$STRIP ZEROS" = "Strip zeros" ! "$$MATCH BRACKETS" = "Match ()'s" ! "$$SHOW UNITS" = "Show Units" ! "$$INSERT HELP" = "Insert Help" ! "$$PALM NUM PREFS" = "Palm Num Prefs" ! "$$DISP SCIEN" = "Scientific Calc in Basic mode" /************************************************** --- 4,45 ---- BEGIN ! "$$OK" = "OK" ! "$$CANCEL" = "Cancel" /************************************************** * PREFERENCES (19) * **************************************************/ ! "$$PREFERENCES TITLE" = "Preferences" ! "$$RADIAN" = "Radian" ! "$$DEGREE" = "Degree" ! "$$GRAD" = "Grad" ! "$$DECIMAL" = "Decimal" ! "$$BINARY" = "Binary" ! "$$OCTAL" = "Octal" ! "$$HEXADEC" = "HexaDec" ! "$$NORMAL" = "Normal" ! "$$SCIENTIFIC" = "Scien" ! "$$MNSCIENTIFIC" = "Scientific" ! "$$ENGINEER" = "Engineer" ! "$$PRECISION" = "Precision" ! "$$FORCE INTEGER" = "Force integer nums" ! "$$REDUCE PRECISION" = "Reduce precision" ! "$$STRIP ZEROS" = "Strip zeros" ! "$$MATCH BRACKETS" = "Match ()'s" ! "$$SHOW UNITS" = "Show Units" ! "$$INSERT HELP" = "Insert Help" ! "$$OS NUM PREFS" = "OS Num Prefs" ! "$$DISP SCIEN" = "Scientific Calc in Basic mode" ! ! "$$DYNAMIC MOUSE" = "Dynamic mouse" ! "$$SKIN" = "Skin" ! "$$DEFAULT SKIN" = "Default Skin" ! "$$CALCULATIONS" = "Calculations" ! "$$FORMAT NUMBERS" = "Format numbers" ! "$$EDIT ASSISTANCE" = "Edit assistance" /************************************************** *************** *** 40,54 **** **************************************************/ "$$TRIGONOMETRICS" = "Trigonometrics" ! "$$EXPONENTIAL" = "Exponential" ! "$$COMBINATORICS" = "Combinatorics" ! "$$COMPLEX" = "Complex" ! "$$SPECIAL FUNCTIONS" = "Special Functions" ! "$$SPECIAL FUNCTIONS2" = "Special Functions 2" ! "$$FUNCTION SOLVING" = "Function Solving" ! "$$LIST FUNCTIONS" = "List Functions" ! "$$MATRIX FUNCTIONS" = "Matrix Functions" ! "$$UPPER TAIL PROBAB" = "Upper Tail Probab." ! "$$SIGNAL PROCESSING" = "Signal Processing" ! "$$DISCRETE MATH" = "Discrete Math" /************************************************** --- 47,61 ---- **************************************************/ "$$TRIGONOMETRICS" = "Trigonometrics" ! "$$EXPONENTIAL" = "Exponential" ! "$$COMBINATORICS" = "Combinatorics" ! "$$COMPLEX" = "Complex" ! "$$SPECIAL FUNCTIONS" = "Special Functions" ! "$$SPECIAL FUNCTIONS2" = "Special Functions 2" ! "$$FUNCTION SOLVING" = "Function Solving" ! "$$LIST FUNCTIONS" = "List Functions" ! "$$MATRIX FUNCTIONS" = "Matrix Functions" ! "$$UPPER TAIL PROBAB" = "Upper Tail Probab." ! "$$SIGNAL PROCESSING" = "Signal Processing" ! "$$DISCRETE MATH" = "Discrete Math" /************************************************** *************** *** 56,101 **** **************************************************/ ! "$$SAVE AS TITLE" = "Save variable as" ! "$$NAME:" = "Name:" ! "$$PARAM:" = "Prm:" ! "$$DONE" = "Done" ! "$$FINANCIAL TITLE" = "Financial calculator" ! "$$BEGIN" = "Begin" ! "$$END" = "End" ! "$$DEFINITION TITLE" = "Data manager" ! "$$NEW" = "New" ! "$$MODIFY" = "Modify" ! "$$DELETE" = "Delete" ! "$$FUNCTION" = "function" ! "$$VARIABLE" = "variable" ! "$$INSERT" = "Insert" ! "$$LIST EDITOR" = "List Editor" ! "$$VALUE:" = "Value:" ! "$$REFERENCE1" = "Reference 1" ! "$$MATRIX EDITOR" = "Matrix Editor" /************************************************** * Solver * **************************************************/ ! "$$SOLVER" = "Solver" ! "$$UPDATE" = "Update" ! "$$OPTIONS" = "Options" ! "$$NOTE" = "Note" ! "$$NEW WORKSHEET" = "New Worksheet" ! "$$TITLE:" = "Title:" ! "$$MINIMUM:" = "Minimum:" ! "$$MAXIMUM:" = "Maximum:" ! "$$PRECISION:" = "Precision:" ! "$$SOLVE" = "Solve" ! "$$CALCULATE" = "Calculate" ! "$$WORKSHEET" = "worksheet" ! "$$NEW WORKSHEET" = "New Worksheet" ! "$$SOLVER OPTIONS" = "Solver Options" ! "$$VARIABLE DESCR" = "Variable Description:\n" ! "$$UNDEFINED" = "Undefined" /************************************************** --- 63,108 ---- **************************************************/ ! "$$SAVE AS TITLE" = "Save variable as" ! "$$NAME:" = "Name:" ! "$$PARAM:" = "Prm:" ! "$$DONE" = "Done" ! "$$FINANCIAL TITLE" = "Financial calculator" ! "$$BEGIN" = "Begin" ! "$$END" = "End" ! "$$DEFINITION TITLE" = "Data manager" ! "$$NEW" = "New" ! "$$MODIFY" = "Modify" ! "$$DELETE" = "Delete" ! "$$FUNCTION" = "function" ! "$$VARIABLE" = "variable" ! "$$INSERT" = "Insert" ! "$$LIST EDITOR" = "List Editor" ! "$$VALUE:" = "Value:" ! "$$REFERENCE1" = "Reference 1" ! "$$MATRIX EDITOR" = "Matrix Editor" /************************************************** * Solver * **************************************************/ ! "$$SOLVER" = "Solver" ! "$$UPDATE" = "Update" ! "$$OPTIONS" = "Options" ! "$$NOTE" = "Note" ! "$$NEW WORKSHEET" = "New Worksheet" ! "$$TITLE:" = "Title:" ! "$$MINIMUM:" = "Minimum:" ! "$$MAXIMUM:" = "Maximum:" ! "$$PRECISION:" = "Precision:" ! "$$SOLVE" = "Solve" ! "$$CALCULATE" = "Calculate" ! "$$WORKSHEET" = "worksheet" ! "$$NEW WORKSHEET" = "New Worksheet" ! "$$SOLVER OPTIONS" = "Solver Options" ! "$$VARIABLE DESCR" = "Variable Description:\n" ! "$$UNDEFINED" = "Undefined" /************************************************** *************** *** 103,150 **** **************************************************/ ! "$$LAYOUT" = "Layout" ! "$$BASIC" = "Basic" ! "$$SCIENTIFIC" = "Scientific" ! "$$INTEGER" = "Integer" ! "$$GRAPH" = "Graph" ! "$$PREFERENCES..." = "Preferences..." ! "$$DEFINITION..." = "Data Manager..." ! "$$FINANCIAL..." = "Financial Manager..." /**************************************************/ "$$SOLVER..." = "Solver..." /**************************************************/ ! "$$SPECIAL" = "Special" ! "$$CLEAR HISTORY" = "Clear history" ! "$$EXPORT TO MEMOPAD" = "Export to memopad" "$$IMPORT FROM MEMOPAD" = "Import from memopad" ! "$$INFO" = "Info" ! "$$ABOUT..." = "About..." ! "$$HELP" = "Help" ! "$$MATRIX EDITOR..." = "Matrix Editor..." ! "$$LIST EDITOR..." = "List Editor..." /************************************************** * ALERTS (20) * **************************************************/ ! "$$OVERWRITE TITLE" = "Confirm Overwrite" ! "$$OVERWRITE MSG" = "Object '^1' already exists, overwrite?" ! "$$OVERWRITE" = "Overwrite" ! "$$DELETE TITLE" = "Confirm Delete" ! "$$DELETE MSG" = "Permanently delete ^1 '^2'?" ! "$$DELETE" = "Delete" ! "$$ERROR" = "Error" ! "$$BADNAME MSG" = "Bad variable name." ! "$$BADPARAM MSG" = "Bad parameter name." ! "$$COMPUTE MSG" = "Error while computing." ! "$$ANS PROBLEM" = "Can't get value of ANS variable." ! "$$BAD VALUES" = "Bad values." ! "$$NUMBER GUESSER" = "Number Guesser" ! "$$NUMBER NOT RECOG" = "Number not recognized." "$$OCTAL MODE SELECTED" = "Bad Mode Selected" "$$OCTAL MODE ERROR" = "You cannot use this key in ^1 mode." --- 110,161 ---- **************************************************/ ! "$$LAYOUT" = "Layout" ! "$$BASIC" = "Basic" ! "$$SCIENTIFIC" = "Scientific" ! "$$INTEGER" = "Integer" ! "$$GRAPH" = "Graph" ! "$$PREFERENCES..." = "Preferences..." ! "$$DEFINITION..." = "Data Manager..." ! "$$FINANCIAL..." = "Financial Manager..." /**************************************************/ "$$SOLVER..." = "Solver..." /**************************************************/ ! "$$SPECIAL" = "Special" ! "$$CLEAR HISTORY" = "Clear history" ! "$$EXPORT TO MEMOPAD" = "Export to memopad" "$$IMPORT FROM MEMOPAD" = "Import from memopad" ! "$$INFO" = "Info" ! "$$ABOUT..." = "About..." ! "$$HELP" = "Help" ! "$$MATRIX EDITOR..." = "Matrix Editor..." ! "$$LIST EDITOR..." = "List Editor..." /************************************************** * ALERTS (20) * **************************************************/ ! "$$OVERWRITE TITLE" = "Confirm Overwrite" ! "$$OVERWRITE MSG" = "Object '^1' already exists, overwrite?" ! "$$OVERWRITE" = "Overwrite" ! "$$DELETE TITLE" = "Confirm Delete" ! "$$DELETE MSG" = "Permanently delete ^1 '^2'?" ! "$$DELETE" = "Delete" ! "$$ERROR" = "Error" ! "$$BADNAME MSG" = "Bad variable name." ! "$$BADPARAM MSG" = "Bad parameter name." ! "$$COMPUTE MSG" = "Error while computing." ! "$$ANS PROBLEM" = "Can't get value of ANS variable." ! "$$BAD VALUES" = "Bad values." ! "$$NO STATE FILE" = "No or wrong version state file. Reinitializing with defaults." ! "$$NO LAYOUT FILE" = "Missing .layout file." ! "$$ERROR LOADING GIF"= "Missing skin .gif file." ! "$$ERROR SAVING STATE"= "Could not save state to file, state will be lost for next session." ! "$$NUMBER GUESSER" = "Number Guesser" ! "$$NUMBER NOT RECOG" = "Number not recognized." "$$OCTAL MODE SELECTED" = "Bad Mode Selected" "$$OCTAL MODE ERROR" = "You cannot use this key in ^1 mode." *************** *** 160,263 **** * MISC STRINGS (17) * **************************************************/ ! "$$FUNCTION MODIFICATION" = "Function Modification" ! "$$VARIABLE MODIFICATION" = "Variable Modification" ! "$$NEW FUNCTION" = "New Function" ! "$$NEW VARIABLE" = "New Variable" ! "$$STRVARIABLE" = "variable" ! "$$STRFUNCTION" = "function" ! "$$GRAPH FUNCTION" = "Graph Function" ! "$$NONE" = "None" ! "$$USER" = "User" ! "$$MNCOPY" = "Copy" ! "$$MNSAVE AS" = "Save as" ! "$$MNDATAMGR" = "DataMgr" ! "$$MNGUESSIT" = "GuessIt" ! "$$ENGDISPL" = "EngDisplay" ! "$$MNDEGREE" = "->Degree" ! "$$MNDEGREE2" = "->Degree2" ! "$$MNRADIAN" = "->Radian" ! "$$MNGON" = "->e^(ix)" ! "$$MNCIS" = "->c()+isin()" /************************************************** * Graph strings (15) * **************************************************/ ! "$$SELECT A FUNCTION" = "Select a Function" ! "$$GRAPH COMPUTING" = "Graph Computing" ! "$$GRAPH COMPUTING RESULT" = "Graph Computing Result" ! "$$COMPUTING" = "Computing" ! "$$COMPCONFIRM" = "The computing may take a while, press OK to start" ! "$$COMPRESULT" = "The ^1 of a function is: ^2" ! "$$LEFTBOUND" = "Please select the LEFT bound of the interval and press the 'C' button" ! "$$RIGHTBOUND" = "Please select the RIGHT bound of the interval and press the 'C' button" ! "$$POINTONGRAPH" = "Please select the point on graph and press the 'C' button" ! "$$GRZERO" = "zero" ! "$$GRVALUE" = "value" ! "$$GRMIN" = "minimum" ! "$$GRMAX" = "maximum" ! "$$GRDDX" = "d/dx" ! "$$GRINTEG" = "integral" ! "$$GRCBOUNDERR" = "Left bound must be smaller than right bound" ! "$$GRINTERSECT" = "intersect" ! "$$GRCFUNCERR" = "You have to select 2 different functions" /************************************************** * ERROR MESSAGES (17) * **************************************************/ ! "$$ERRNO ERROR" = "No Error" ! "$$ERRSYNTAX ERROR" = "Syntax error" ! "$$ERRBAD FUNCTION" = "Bad function" ! "$$ERRMISSING ARGUMENT" = "Missing argument" ! "$$ERRBAD ARGUMENT TYPE" = "Bad argument type" ! "$$ERRINTERNAL ERROR" = "Internal error" ! "$$ERRBAD MODE SELECTED"= "Bad mode selected" ! "$$ERRNO RESULT" = "No result" ! "$$ERRDIVISION BY 0" = "Division by 0" ! "$$ERRNO SUCH VARIABLE" = "No such variable" ! "$$ERRBAD RESULT" = "Bad result" ! "$$ERRTOO DEEP RECURSION"= "Too deep recursion" "$$ERRIMPOSSIBLE CALCULATION" = "Impossible calculation" ! "$$ERROUT OF RANGE" = "Out of range" ! "$$ERRBAD ARG COUNT" = "Bad argument count" ! "$$ERRBAD DIMENSION" = "Bad dimension" ! "$$ERRSINGULAR" = "Singular matrix" ! "$$ERRINTERRUPTED" = "Operation interrupted" /************************************************** * GRAPH SCREENS (13) * **************************************************/ ! "$$TABLE MODE..." = "Table Mode..." ! "$$TABLE MODE" = "Table Mode" ! "$$GOTO" = "GoTo" ! "$$STEP" = "Step" ! "$$GO" = "Go" ! "$$SETUP GRAPHS..." = "Setup Graphs..." ! "$$SETUP GRAPHS" = "Setup Graphs" ! "$$GRAPH PREFERENCES..." = "Graph Preferences..." ! "$$GRAPH PREFERENCES" = "Graph Preferences" ! "$$DEFAULT" = "Default" ! "$$TRIGONO" = "Trigono" ! "$$FUNCMODE" = "Function" ! "$$POLARMODE" = "Polar" ! "$$PARAMMODE" = "Parametric" ! "$$GRAPH COLORS" = "Graph Color Setup" ! "$$BACKGRND" = "backg" ! "$$AXIS" = "axis" ! "$$GRID" = "grid" /************************************************** * MENU EDIT (8) * **************************************************/ ! "$$EDIT" = "Edit" ! "$$UNDO" = "Undo" ! "$$CUT" = "Cut" ! "$$COPY" = "Copy" ! "$$PASTE" = "Paste" ! "$$SELECT ALL" = "Select All" ! "$$KEYBOARD" = "Keyboard" ! "$$GRAFFITI HELP" = "Graffiti Help" /************************************************** --- 171,274 ---- * MISC STRINGS (17) * **************************************************/ ! "$$FUNCTION MODIFICATION" = "Function Modification" ! "$$VARIABLE MODIFICATION" = "Variable Modification" ! "$$NEW FUNCTION" = "New Function" ! "$$NEW VARIABLE" = "New Variable" ! "$$STRVARIABLE" = "variable" ! "$$STRFUNCTION" = "function" ! "$$GRAPH FUNCTION" = "Graph Function" ! "$$NONE" = "None" ! "$$USER" = "User" ! "$$MNCOPY" = "Copy" ! "$$MNSAVE AS" = "Save as" ! "$$MNDATAMGR" = "DataMgr" ! "$$MNGUESSIT" = "GuessIt" ! "$$ENGDISPL" = "EngDisplay" ! "$$MNDEGREE" = "->Degree" ! "$$MNDEGREE2" = "->Degree2" ! "$$MNRADIAN" = "->Radian" ! "$$MNGON" = "->e^(ix)" ! "$$MNCIS" = "->c()+isin()" /************************************************** * Graph strings (15) * **************************************************/ ! "$$SELECT A FUNCTION" = "Select a Function" ! "$$GRAPH COMPUTING" = "Graph Computing" ! "$$GRAPH COMPUTING RESULT" = "Graph Computing Result" ! "$$COMPUTING" = "Computing" ! "$$COMPCONFIRM" = "The computing may take a while, press OK to start" ! "$$COMPRESULT" = "The ^1 of a function is: ^2" ! "$$LEFTBOUND" = "Please select the LEFT bound of the interval and press the 'C' button" ! "$$RIGHTBOUND" = "Please select the RIGHT bound of the interval and press the 'C' button" ! "$$POINTONGRAPH" = "Please select the point on graph and press the 'C' button" ! "$$GRZERO" = "zero" ! "$$GRVALUE" = "value" ! "$$GRMIN" = "minimum" ! "$$GRMAX" = "maximum" ! "$$GRDDX" = "d/dx" ! "$$GRINTEG" = "integral" ! "$$GRCBOUNDERR" = "Left bound must be smaller than right bound" ! "$$GRINTERSECT" = "intersect" ! "$$GRCFUNCERR" = "You have to select 2 different functions" /************************************************** * ERROR MESSAGES (17) * **************************************************/ ! "$$ERRNO ERROR" = "No Error" ! "$$ERRSYNTAX ERROR" = "Syntax error" ! "$$ERRBAD FUNCTION" = "Bad function" ! "$$ERRMISSING ARGUMENT" = "Missing argument" ! "$$ERRBAD ARGUMENT TYPE" = "Bad argument type" ! "$$ERRINTERNAL ERROR" = "Internal error" ! "$$ERRBAD MODE SELECTED"= "Bad mode selected" ! "$$ERRNO RESULT" = "No result" ! "$$ERRDIVISION BY 0" = "Division by 0" ! "$$ERRNO SUCH VARIABLE" = "No such variable" ! "$$ERRBAD RESULT" = "Bad result" ! "$$ERRTOO DEEP RECURSION"= "Too deep recursion" "$$ERRIMPOSSIBLE CALCULATION" = "Impossible calculation" ! "$$ERROUT OF RANGE" = "Out of range" ! "$$ERRBAD ARG COUNT" = "Bad argument count" ! "$$ERRBAD DIMENSION" = "Bad dimension" ! "$$ERRSINGULAR" = "Singular matrix" ! "$$ERRINTERRUPTED" = "Operation interrupted" /************************************************** * GRAPH SCREENS (13) * **************************************************/ ! "$$TABLE MODE..." = "Table Mode..." ! "$$TABLE MODE" = "Table Mode" ! "$$GOTO" = "GoTo" ! "$$STEP" = "Step" ! "$$GO" = "Go" ! "$$SETUP GRAPHS..." = "Setup Graphs..." ! "$$SETUP GRAPHS" = "Setup Graphs" ! "$$GRAPH PREFERENCES..." = "Graph Preferences..." ! "$$GRAPH PREFERENCES" = "Graph Preferences" ! "$$DEFAULT" = "Default" ! "$$TRIGONO" = "Trigono" ! "$$FUNCMODE" = "Function" ! "$$POLARMODE" = "Polar" ! "$$PARAMMODE" = "Parametric" ! "$$GRAPH COLORS" = "Graph Color Setup" ! "$$BACKGRND" = "backg" ! "$$AXIS" = "axis" ! "$$GRID" = "grid" /************************************************** * MENU EDIT (8) * **************************************************/ ! "$$EDIT" = "Edit" ! "$$UNDO" = "Undo" ! "$$CUT" = "Cut" ! "$$COPY" = "Copy" ! "$$PASTE" = "Paste" ! "$$SELECT ALL" = "Select All" ! "$$KEYBOARD" = "Keyboard" ! "$$GRAFFITI HELP" = "Graffiti Help" /************************************************** *************** *** 265,430 **** **************************************************/ "$$PREFHELP" = "Preferences for EasyCalc\n\n"\ ! "Reduce precision - if checked, EasyCalc rounds the number after "\ ! "every operation a little to avoid effects of floating point. It makes "\ ! "all operations slower though, that's why I recommend turing it off "\ ! "if you work with matrices, lists or function solving."\ ! "\n\n"\ ! "Match ()'s - if checked, the ')' is automatically added to a function "\ ! "name and cursor is moved between the parentheses."\ ! "\n\n"\ ! "Integer input - force input conversion to convert numbers to "\ ! "integer numbers. This is generally better for working with number "\ ! "conversions, because floating point output follows the traditional "\ ! "scheme to display maximum of 10 numbers, while integer numbers will "\ ! "show you a 32 bit integer in binary without problem."\ ! "\n\n"\ ! "Show units - after switching to Eng mode will display e.g. 10E3 as 10K "\ ! "etc. Of course you can safely use these numbers in the number input."\ ! "\n\n"\ ! "Insert help - insert argument names for some multiparameter functions "\ ! "directly on the input line."\ ! "\n\n"\ ! "Palm Num Prefs - follow the palm number preferences on the input exactly "\ ! "including the dot/comma/space between thousands. Normally the dot and "\ ! "comma are both recognized as a decimal point but if you select this "\ ! "option, only the one selected in number preferences will be recognized. "\ ! "This may be useful if you want paste into EasyCalc numbers from other "\ ! "applications." "$$BASIC HELP" = "Newest information is available at "\ ! "http://easycalc.sourceforge.net ."\ ! "\n\n"\ ! "EasyCalc now uses different algorithm for Reduce precision that "\ ! "should be better in most situations. The only exception is "\ ! "when you want to work with numbers like pi, where reducing "\ ! "precision could cause worse results (especially with goniometric "\ ! "functions). I recommend setting this feature on except cases when "\ ! "you work with goniometric functions in Radian mode."\ ! "\n\n"\ ! "For Visor Platinum users: it seems that these devices come with "\ ! "MathLib already burnt into their ROM, therefore there is no need "\ ! "to install it into RAM. If you have already installed it, "\ ! "you can delete it from Applications->Menu->Delete."\ ! "\n\n"\ ! "Please, read the INSTALL file if you feel that you can't find "\ ! "features (like graphs) you expected. EasyCalc is now distributed "\ ! "in several packages, each one having a special feature set."\ ! "\n\n"\ ! "Information for the newly added functions are in a separate file "\ ! "called specfuncs.pdf."\ ! "\n\n"\ ! "Multiparameter functions have their parameters separated by ':', "\ ! "e.g. ncr(6:3) "\ ! "\n\n"\ ! "Help for the calculator\n"\ ! "Some things you might find useful:\n"\ ! "Graffiti letter 'enter' is equivalent to the EXE key\n\n"\ ! "Typing the operators using graffiti area doesn't add 'ans' on the "\ ! "beginning of the line (usable only for '-3+4').\n\n"\ ! "You might want to enable auto-closing brackets in Preferences.\n"\ ! "You don't need to close the brackets at "\ ! "the end of the line, e.g. 'sin(3.5'.\n\n"\ ! "Defining a function: f()=\"x^2\"\nx is a parameter\n\n"\ ! "You can enter degrees the following way: 90°30'\n"\ ! "It is now possible to use mathematical language like 3pi+4e "\ ! "or 3sin(x)\n"\ ! "Computing in complex numbers is SLOW. Turn it on/off in preferences."\ ! "\n\n"\ ! "You can use units as M-mega, G-giga, T-terra, n-nano, f-femto etc. "\ ! "the same as you do on ordinary paper, e.g. 10G, 1/80T"\ ... [truncated message content] |
Update of /cvsroot/easycalc/PPCport/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31710 Removed Files: cmatrix.h complex.h integ.h mathem.h matrix.h meqstack.h segment.h slist.h specfun.h Log Message: 1.25a Compiling, linking, running, limited function set, with bugs --- integ.h DELETED --- --- cmatrix.h DELETED --- --- meqstack.h DELETED --- --- specfun.h DELETED --- --- matrix.h DELETED --- --- complex.h DELETED --- --- segment.h DELETED --- --- slist.h DELETED --- --- mathem.h DELETED --- |
From: Mapi B. <ma...@us...> - 2009-10-17 13:50:09
|
Update of /cvsroot/easycalc/PPCport/discarded In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31476 Removed Files: calc.cpp calc.h Log Message: 1.25a Compiling, linking, running, limited function set, with bugs --- calc.cpp DELETED --- --- calc.h DELETED --- |
From: Mapi B. <ma...@us...> - 2009-10-17 13:49:32
|
Update of /cvsroot/easycalc/PPCport/discarded In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31417 Modified Files: calc.rcp.in calcrsc.h result.cpp result.h Added Files: about.c about.h Log Message: 1.25a Compiling, linking, running, limited function set, with bugs --- NEW FILE: about.c --- /* * $Id: about.c,v 1.1 2009/10/17 13:49:23 mapibid Exp $ * * Copyright 2006 Ton van Overbeek * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * Summary * Resizable about and help form routines for EasyCalc. * * Author * Ton van Overbeek, to...@v-... * */ #include <PalmOS.h> #include "calcrsc.h" #ifdef SUPPORT_DIA #include "DIA.h" #endif static UInt16 returnFormID = frmBasic; static Char *emptyTitle = ""; static void updateScrollers(FormType *form, FieldType *fld) { UInt16 upix, downix; Boolean enableUp, enableDown; enableUp = FldScrollable(fld, winUp); enableDown = FldScrollable(fld, winDown); upix = FrmGetObjectIndex(form, abthlpUp); downix = FrmGetObjectIndex(form, abthlpDn); FrmUpdateScrollers(form, upix, downix, enableUp, enableDown); } static void helpScroll(FormType *form, WinDirectionType dir) { UInt16 linestoscroll; FieldType *fld; fld = FrmGetObjectPtr(form, FrmGetObjectIndex(form, abthlpText)); linestoscroll = FldGetVisibleLines(fld) - 1; FldScrollField(fld, linestoscroll, dir); updateScrollers(form, fld); } static void releaseResource(FormType *form) { FieldType *fld; MemHandle abthlpH, titleH; Char *title; fld = FrmGetObjectPtr(form, FrmGetObjectIndex(form, abthlpText)); abthlpH = FldGetTextHandle(fld); FldSetTextHandle(fld, 0); DmReleaseResource(abthlpH); if ((title = (Char *)FrmGetTitle(form))) { titleH = MemPtrRecoverHandle((MemPtr) title); FrmSetTitle(form, emptyTitle); MemHandleUnlock(titleH); DmReleaseResource(titleH); } } Boolean aboutEventHandler(EventPtr event) { Boolean handled = false; FormType *form = FrmGetActiveForm(); FieldType *fld; #ifdef SUPPORT_DIA if (ResizeHandleEvent(event)) { return true; } #endif switch (event->eType) { case frmOpenEvent: case frmUpdateEvent: FrmDrawForm(form); fld = FrmGetObjectPtr(form, FrmGetObjectIndex(form, abthlpText)); updateScrollers(form, fld); handled = true; break; case ctlSelectEvent: if (event->data.ctlEnter.controlID == abthlpOk) { FrmGotoForm(returnFormID); handled = true; } break; case frmCloseEvent: releaseResource(form); break; case ctlRepeatEvent: if (event->data.ctlRepeat.controlID == abthlpUp) { helpScroll(form, winUp); } else if (event->data.ctlRepeat.controlID == abthlpDn) { helpScroll(form, winDown); } break; case keyDownEvent: if (EvtKeydownIsVirtual(event)) { switch (event->data.keyDown.chr) { case vchrPageUp: case vchrRockerUp: helpScroll(form, winUp); break; case vchrPageDown: case vchrRockerDown: helpScroll(form, winDown); break; } } break; default: break; } return handled; } void doAbout(UInt16 aboutStringID) { MemHandle aboutH; FormType *form; FieldType *fld; aboutH = DmGetResource(strRsc, aboutStringID); form = FrmInitForm(frmAbout); fld = FrmGetObjectPtr(form, FrmGetObjectIndex(form, abthlpText)); FldSetTextHandle(fld, aboutH); FldSetInsertionPoint(fld, 0); returnFormID = FrmGetActiveFormID(); if (returnFormID == 0) returnFormID = frmBasic; FrmGotoForm(frmAbout); } void doHelp(UInt16 hlpTitleID, UInt16 hlpTextID) { MemHandle titleH, helpH; FormType *frm; FieldType *fld; titleH = DmGetResource(strRsc, hlpTitleID); helpH = DmGetResource(strRsc, hlpTextID); frm = FrmInitForm(frmHelp); FrmSetTitle(frm, MemHandleLock(titleH)); fld = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, abthlpText)); FldSetTextHandle(fld, helpH); FldSetInsertionPoint(fld, 0); returnFormID = FrmGetActiveFormID(); FrmGotoForm(frmHelp); } --- NEW FILE: about.h --- /* * $Id: about.h,v 1.1 2009/10/17 13:49:23 mapibid Exp $ * * Copyright (C) 2006 Ton van Overbeek * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * Summary * Resizable about and help form routines for EasyCalc. * * Author * Ton van Overbeek, to...@v-... * */ Boolean aboutEventHandler(EventPtr event); void doAbout(UInt16 aboutStringID); void doHelp(UInt16 hlpTitleID, UInt16 hlpTextID); |
Update of /cvsroot/easycalc/PPCport/core/mlib In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31293 Modified Files: calcDB.cpp calcDB.h defuns.h display.cpp display.h fp.cpp fp.h funcs.cpp funcs.h guess.cpp history.cpp history.h konvert.cpp konvert.h stack.cpp stack.h Added Files: bessels.cpp cmatrix.cpp cmatrix.h complex.cpp complex.h elliptic.cpp fl_num.cpp fl_num.h integ.cpp integ.h mathem.cpp mathem.h matrix.cpp matrix.h meqstack.cpp meqstack.h slist.cpp slist.h specfun.cpp specfun.h Log Message: 1.25a Compiling, linking, running, limited function set, with bugs --- NEW FILE: bessels.cpp --- /* * $Id: bessels.cpp,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000 Ondrej Palkovsky * This file Copyright (C) 2000 Rafael R. Sevilla * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact Ondrej at 'on...@pe...'. * You can contact me at 'di...@pa...'. * * Portions of this code are from the Cephes Math Library, Release 2.8 * Copyright (C) 1984, 1987, 1989, 2000 by Stephen L. Moshier */ #include "StdAfx.h" #include "compat/PalmOS.h" #include "compat/MathLib.h" #include "konvert.h" #include "funcs.h" #include "mathem.h" #include "stack.h" #include "core/prefs.h" #include "display.h" #include "specfun.h" static double p0[5] = { 1.0000000000e0, -0.1098628627e-2, 0.2734510407e-4, -0.2073370639e-5, 0.2093887211e-6 } ; static double q0[5] = { -0.1562499995e-1, 0.1430488765e-3, -0.6911147651e-5, 0.7621095161e-6, 0.9349451520e-7 }; static double p1[5] = { 1.0000000000e0, 0.1831050000e-2, -0.3516396496e-4, 0.2457520174e-5, -0.2403370190e-6 }; static double q1[5] = { 0.04687499995e0, -0.20026908730e-3, 0.84491990960e-5, -0.88228987000e-6, 0.10578741200e-6 }; #define TWOOVRPI 0.63661977236758134307 #define PIOVR4 0.78539816339744830962 #define THRPIOV4 2.35619449019234492885 /*********************************************************************** * * FUNCTION: besselj01 * * DESCRIPTION: Compute Bessel function of the first kind, order 0 or 1 * * PARAMETERS: n (either 0 or 1), x * * RETURN: J_0(x) or J_1(x) * ***********************************************************************/ static double besselj01(int n, double x) SPECFUN; static double besselj01(int n, double x) { double y, fact, pifact, ax, z, xx, rv; double *p, *q, *r, *s; static double r0[6] = { 57568490574.0, -13362590354.0, 651619640.7, -11214424.18, 77392.33017, -184.9052456 }; static double s0[6] = { 57568490411.0, 1029532985.0, 9494680.718, 59272.64853, 267.8532712, 1.0 }; static double r1[6] = { 72362614232.0, -7895059235.0, 242396853.1, -2972611.439, 15704.48260, -30.16036606 }; static double s1[6] = { 144725228442.0, 2300535178.0, 18583304.74, 99447.43394, 376.9991397, 1.0 }; if (n == 0) { p = p0; q = q0; r = r0; s = s0; fact = 1.0; pifact = PIOVR4; /* pi/4 */ } else { p = p1; q = q1; r = r1; s = s1; fact = x; pifact = THRPIOV4; /* 3*pi/4 */ } if (fabs(x) < 8) { y = x*x; return(fact*polevl(y, r, 6)/polevl(y, s, 6)); } ax = fabs(x); z = 8/ax; y = z*z; xx = ax - pifact; rv = sqrt(TWOOVRPI/ax)* (cos(xx)*polevl(y, p, 5) - z*sin(xx)*polevl(y, q, 5)); rv = (x < 0 && n == 1) ? -rv : rv; return(rv); } /*********************************************************************** * * FUNCTION: bessely01 * * DESCRIPTION: Compute Bessel function of the second kind, order 0 or 1 * * PARAMETERS: n (either 0 or 1), x * * RETURN: Y_0(x) or Y_1(x) * ***********************************************************************/ static double bessely01(int n, double x) SPECFUN; static double bessely01(int n, double x) { double y, fact, pifact, onovx, z, xx, rv; double *p, *q, *r, *s; int sdeg; static double r0[6] = { -2957821389.0, 7062834065.0, -512359803.6, 10879881.29, -86327.92757, 228.4622733 }; static double s0[6] = { 40076544269.0, 745249964.8, 7189466.438, 47447.26470, 226.1030244, 1.0 }; static double r1[6] = { -0.4900604943e13, 0.1275274390e13, -0.5153438139e11, 0.7349264551e9, -0.4237922726e7, 0.8511937935e4 }; static double s1[7] = { 0.2499580570e14, 0.4244419664e12, 0.3733650367e10, 0.2245904002e8, 0.1020426050e6, 0.3549632885e3, 1.0 }; if (n == 0) { p = p0; q = q0; r = r0; s = s0; fact = 1.0; sdeg = 6; pifact = PIOVR4; /* pi/4 */ onovx = 0; } else { p = p1; q = q1; r = r1; s = s1; fact = x; sdeg= 7; pifact = THRPIOV4; /* 3*pi/4 */ onovx = 1/x; } if (x < 8) { y = x*x; return(fact*polevl(y, r, 6)/polevl(y, s, sdeg) + TWOOVRPI*(besselj01(n, x)*log(x) - onovx)); } z = 8/x; y = z*z; xx = x - pifact; rv = sqrt(TWOOVRPI/x)* (sin(xx)*polevl(y, p, 5) + z*cos(xx)*polevl(y, q, 5)); return(rv); } /*********************************************************************** * * FUNCTION: besseljn * * DESCRIPTION: Compute Bessel function of * the first kind, order n * * PARAMETERS: n, x, j01 * * RETURN: J_n(x) * ***********************************************************************/ static double besseljn(int n, double x, double (*j01)(int n, double x)) SPECFUN; static double besseljn(int n, double x, double (*j01)(int n, double x)) { double pkm2, pkm1, pk, xk, r, ans; int k, sign; if( n < 0 ) { n = -n; if( (n & 1) == 0 ) /* -1**n */ sign = 1; else sign = -1; } else sign = 1; if( x < 0.0 ) { if( n & 1 ) sign = -sign; x = -x; } if( n == 0 ) return( sign * j01(0, x) ); if( n == 1 ) return( sign * j01(1, x) ); if( n == 2 ) return( sign * (2.0 * j01(1, x) / x - j01(0, x)) ); if( x < EPSILON ) return( 0.0 ); k = 53; pk = 2 * (n + k); ans = pk; xk = x * x; do { pk -= 2.0; ans = pk - (xk/ans); } while( --k > 0 ); ans = x/ans; /* backward recurrence */ pk = 1.0; pkm1 = 1.0/ans; k = n-1; r = 2 * k; do { pkm2 = (pkm1 * r - pk * x) / x; pk = pkm1; pkm1 = pkm2; r -= 2.0; } while( --k > 0 ); if( fabs(pk) > fabs(pkm1) ) ans = j01(1, x)/pk; else ans = j01(0, x)/pkm1; return( sign * ans ); } /*********************************************************************** * * FUNCTION: besselyn * * DESCRIPTION: Compute Bessel function of * the second kind, order n * * PARAMETERS: n, x, y01 * * RETURN: Y_n(x) * ***********************************************************************/ static double besselyn(int n, double x, double (*y01)(int n, double x)) SPECFUN; static double besselyn(int n, double x, double (*y01)(int n, double x)) { double an, anm1, anm2, r; int k, sign; if( n < 0 ) { n = -n; if( (n & 1) == 0 ) /* -1**n */ sign = 1; else sign = -1; } else sign = 1; if( n == 0 ) return( sign * y01(0, x) ); if( n == 1 ) return( sign * y01(1, x) ); /* forward recurrence on n */ anm2 = y01(0, x); anm1 = y01(1, x); k = 1; r = 2 * k; do { an = r * anm1 / x - anm2; anm2 = anm1; anm1 = an; r += 2.0; ++k; } while( k < n ); return( sign * an ); } /*********************************************************************** * * FUNCTION: besseli01 * * DESCRIPTION: Compute modified Bessel function of the first kind, * order 0 or 1 * * PARAMETERS: n (0 or 1 only), x * * RETURN: I_0(x) or I_1(x) * ***********************************************************************/ static double besseli01(int n, double x) SPECFUN; static double besseli01(int n, double x) { double y, ax, fact; double *p, *q; static double p0[7] = { 1.0, 3.5156229, 3.0899424, 1.2067492, 0.2659732, 0.360768e-1, 0.45813e-2 }; static double q0[9] = { 0.39894228, 0.1328592e-1, 0.225319e-2, -0.157565e-2, 0.916281e-2, -0.2057706e-1, 0.2635537e-1, -0.1647633e-1, 0.392377e-2 }; static double p1[7] = { 0.5, 0.87890594, 0.51498869, 0.15084934, 0.2658733e-1, 0.301532e-2, 0.32411e-3 }; static double q1[9] = { 0.39894228, -0.3988024e-1, -0.362018e-2, 0.163801e-2, -0.1031555e-1, 0.2282967e-1, -0.2895312e-1, 0.1787654e-1, -0.420059e-2 }; p = (n == 0) ? p0 : p1; q = (n == 0) ? q0 : q1; if (fabs(x) < 3.75) { fact = (n == 0) ? 1 : x; y = (x*x/14.0625); return(fact*polevl(y, p, 7)); } ax = fabs(x); y = 3.75/ax; return((exp(ax)/sqrt(ax))*polevl(y, q, 9)); } /*********************************************************************** * * FUNCTION: besselk01 * * DESCRIPTION: Compute modified Bessel function of the 2nd kind, * order 0 or 1. * * PARAMETERS: n (either 0 or 1 only), x * * RETURN: K_0(x) or K_1(x) * ***********************************************************************/ static double besselk01(int n, double x) SPECFUN; static double besselk01(int n, double x) { double y, fact; double *p, *q; double p0[7] = { -0.57721566, 0.42278420, 0.23069756, 0.3488590e-1, 0.262698e-2, 0.10750e-3, 0.74e-5 }; double q0[7] = { 1.25331414, -0.7832358e-1, 0.2189568e-1, -0.1062446e-1, 0.587872e-2, -0.251540e-2, 0.53208e-3 }; double p1[7] = { 1.0, 0.15443144, -0.67278579, -0.18156897, -0.1919402e-1, -0.110404e-2, -0.4686e-4 }; double q1[7] = { 1.25331414, 0.23498619, -0.3655620e-1, 0.1504268e-1, -0.780353e-2, 0.325614e-2, -0.68245e-3 }; int sign; if (n == 0) { p = p0; q = q0; sign = -1; fact = 1.0; } else { p = p1; q = q1; sign = 1; fact = 1.0/x; } if (x <= 2.0) { y = x*x/4.0; return((sign*log(x/2.0)*besseli01(n, x))+ fact*polevl(y, p, 7)); } y = 2.0/x; return((exp(-x)/sqrt(x))*polevl(y, q, 7)); } /*********************************************************************** * * FUNCTION: besselin * * DESCRIPTION: Compute modified Bessel function of the first kind, * order n * * PARAMETERS: n, x * * RETURN: I_n(x) * ***********************************************************************/ #define IACC 40 #define BIGNO 1e10 #define BIGNI 1e-10 static double besselin(int n, double x, double (*i01)(int n, double x)) SPECFUN; static double besselin(int n, double x, double (*i01)(int n, double x)) { double tox, bip, bi, bim, retval; int j, m; if (n < 0) n = -n; if (n == 0 || n == 1) return(i01(n, x)); if (x == 0) return(0); tox = 2.0/fabs(x); bip = 0.0; bi = 1.0; retval = 0.0; m = 2*(n+(int)(sqrt(IACC*n))); for (j=m; j>=1; j--) { bim = bip + j*tox*bi; bip = bi; bi = bim; if (fabs(bi) > BIGNO) { retval *= BIGNI; bi *= BIGNI; bip *= BIGNI; } if (j == n) retval = bip; } retval *= i01(0, x)/bi; if (x < 0 && (n & 1)) return(-retval); return(retval); } /*********************************************************************** * * FUNCTION: besselkn * * DESCRIPTION: Compute modified Bessel function of the second kind, * order n * * PARAMETERS: n, x * * RETURN: K_n(x) * ***********************************************************************/ static double besselkn(int n, double x, double (*k01)(int n, double x)) SPECFUN; static double besselkn(int n, double x, double (*k01)(int n, double x)) { double tox, bkm, bkp, bk; int j; if (n < 0) n = -n; if (n == 0 || n == 1) return(k01(n, x)); tox = 2.0/x; bkm = k01(0, x); bk = k01(1, x); for (j=1; j<n; j++) { bkp = bkm + j*tox*bk; bkm = bk; bk = bkp; } return(bk); } /*********************************************************************** * * FUNCTION: math_bessels * * DESCRIPTION: Compute Bessel and related functions * * PARAMETERS: On stack - 2 numbers * * RETURN: On stack - 1 number * ***********************************************************************/ CError math_bessels(Functype *func, CodeStack *stack) { double x, n, res; CError err; err = stack_get_val(stack, &x, real); if (err) return(err); switch (func->num) { case MATH_BESSELJ: case MATH_BESSELY: err = stack_get_val(stack, &n, real); if (err) return(err); /* integer bessels only */ if (!IS_ZERO(n - round(n)) || (IS_ZERO(x) && (func->num == MATH_BESSELY))) return(c_badarg); res = (func->num == MATH_BESSELJ) ? besseljn((int) n, x, besselj01) : besselyn((int) n, x, bessely01); break; case MATH_BESSELI: case MATH_BESSELK: err = stack_get_val(stack, &n, real); if (err) return(err); /* integer bessels only */ if (!IS_ZERO(n - round(n)) || (IS_ZERO(x) && (func->num == MATH_BESSELK))) return(c_badarg); res = (func->num == MATH_BESSELI) ? besselin((int) n, x, besseli01) : besselkn((int) n, x, besselk01); break; case MATH_AIRY: case MATH_BIRY: default: return(c_internal); } return stack_add_val(stack, &res, real); } --- NEW FILE: fl_num.h --- /* * Scientific Calculator for Palms. * Copyright (C) 2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ Int16 fl_num(TCHAR *input,double *cislo) MLIB; Index: guess.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/guess.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** guess.cpp 24 Sep 2009 21:16:50 -0000 1.1 --- guess.cpp 17 Oct 2009 13:48:34 -0000 1.2 *************** *** 28,32 **** //#include <StringMgr.h> ! #include "segment.h" #include "compat/MathLib.h" #include "stack.h" --- 28,32 ---- //#include <StringMgr.h> ! #include "compat/segment.h" #include "compat/MathLib.h" #include "stack.h" *************** *** 454,458 **** if (item.type == real) { ! result = (TCHAR *) MemPtrNew(MAX_FP_NUMBER+1); guessed = guess_real(item.u.realval,result); if (!guessed) { --- 454,458 ---- if (item.type == real) { ! result = (TCHAR *) MemPtrNew((MAX_FP_NUMBER+1)*sizeof(TCHAR)); guessed = guess_real(item.u.realval,result); if (!guessed) { *************** *** 463,467 **** } else if (item.type == complex) { ! result = (TCHAR *) MemPtrNew(MAX_FP_NUMBER*3); if (IS_ZERO(item.u.cplxval->imag)){ if (guess_real(item.u.cplxval->real,result)) --- 463,467 ---- } else if (item.type == complex) { ! result = (TCHAR *) MemPtrNew((MAX_FP_NUMBER*3)*sizeof(TCHAR)); if (IS_ZERO(item.u.cplxval->imag)){ if (guess_real(item.u.cplxval->real,result)) --- NEW FILE: specfun.h --- /* * $Id: specfun.h,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * This file Copyright (C) 2000 Rafael Sevilla * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'di...@pa...'. * */ #ifndef _SPECFUN_H #define _SPECFUN_H #include "compat/segment.h" CError math_gambeta(Functype *func, CodeStack *stack) SPECFUN; CError math_bessels(Functype *func, CodeStack *stack) SPECFUN; CError math_elliptic(Functype *func, CodeStack *stack) SPECFUN; CError math_hypergeo(Functype *func, CodeStack *stack) SPECFUN; CError math_orthpol(Functype *func, CodeStack *stack) SPECFUN; double polevl(double x, double *coef, int N ) SPECFUN; #define EPSILON 1e-10 #endif Index: calcDB.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/calcDB.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** calcDB.cpp 24 Sep 2009 21:16:50 -0000 1.4 --- calcDB.cpp 17 Oct 2009 13:48:34 -0000 1.5 *************** *** 22,27 **** * You can contact me at 'on...@pe...'. */ - - #include "stdafx.h" --- 22,25 ---- *************** *** 100,104 **** err = c_memory; DmReleaseRecord(gDB,recordNumber-1,true); ! return err; } } --- 98,102 ---- err = c_memory; DmReleaseRecord(gDB,recordNumber-1,true); ! return (err); } } *************** *** 109,117 **** MemHandleUnlock(myRecordMemHandle); DmReleaseRecord(gDB,recordNumber,true); /* Now the recordNumber contains real index */ ! } ! else err = c_memory; ! return err; } --- 107,114 ---- MemHandleUnlock(myRecordMemHandle); DmReleaseRecord(gDB,recordNumber,true); /* Now the recordNumber contains real index */ ! } else err = c_memory; ! return (err); } *************** *** 184,192 **** dbPackedStack *pstack; Int16 psize,rsize; ! TCHAR *ptr; CError err; pstack = stack_pack(stack,&psize); ! record = (dbPackedRecord *) MemPtrNew(sizeof(*record)+psize+StrLen(origtext)+1); if (!record) return c_memory; --- 181,190 ---- dbPackedStack *pstack; Int16 psize,rsize; ! byte *ptr; CError err; pstack = stack_pack(stack,&psize); ! rsize = sizeof(*record) + psize + (StrLen(origtext)+1) * sizeof(TCHAR); ! record = (dbPackedRecord *) MemPtrNew(rsize); if (!record) return c_memory; *************** *** 198,206 **** StrCopy(record->u.stack.header.param_name,parameter_name); ! // ptr = &record->u.stack.data; ! ptr = record->u.stack.data; ptr += record->u.stack.header.orig_offset; ! StrCopy(ptr,origtext); ! rsize = sizeof(*record)+psize+StrLen(origtext)+1; rsize -= sizeof(dbStackItem)>sizeof(dbPackedStack)?sizeof(dbStackItem):sizeof(dbPackedStack); err = db_create_record(record,rsize); --- 196,203 ---- StrCopy(record->u.stack.header.param_name,parameter_name); ! // ptr = (byte *) &(record->u.stack.data); ! ptr = (byte *) (record->u.stack.data); ptr += record->u.stack.header.orig_offset; ! StrCopy((TCHAR *) ptr, origtext); rsize -= sizeof(dbStackItem)>sizeof(dbPackedStack)?sizeof(dbStackItem):sizeof(dbPackedStack); err = db_create_record(record,rsize); *************** *** 377,381 **** && record->u.data[0].rpn.type == type)) { result->type[count] = record->type; ! result->list[count] = (TCHAR *) MemPtrNew(StrLen(record->name)+1); StrCopy(result->list[count],record->name); count++; --- 374,378 ---- && record->u.data[0].rpn.type == type)) { result->type[count] = record->type; ! result->list[count] = (TCHAR *) MemPtrNew((StrLen(record->name)+1)*sizeof(TCHAR)); StrCopy(result->list[count],record->name); count++; *************** *** 413,420 **** return c_badarg; } ! *dest = (TCHAR *) MemPtrNew(StrLen(&tmp->u.stack.data[tmp->u.stack.header.orig_offset])+1); ! StrCopy(*dest,&tmp->u.stack.data[tmp->u.stack.header.orig_offset]); if (param) ! StrCopy(param,tmp->u.stack.header.param_name); MemPtrFree(tmp); --- 410,420 ---- return c_badarg; } ! *dest = (TCHAR *) MemPtrNew((StrLen((TCHAR *) (tmp->u.stack.data + tmp->u.stack.header.orig_offset)) ! +1 ! )*sizeof(TCHAR) ! ); ! StrCopy(*dest, (TCHAR *) (tmp->u.stack.data + tmp->u.stack.header.orig_offset)); if (param) ! StrCopy(param, tmp->u.stack.header.param_name); MemPtrFree(tmp); --- NEW FILE: integ.cpp --- /* * $Id: integ.cpp,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, [...989 lines suppressed...] stack_delete(f1); stack_delete(f2); goto error; } result = integ_intersect(min,max,f1,f2,error,argarr); stack_delete(f1); stack_delete(f2); if (!finite(result)) { err = c_compimp; goto error; } err = stack_add_val(stack,&result,real); error: if (argarr) stack_delete(argarr); return err; } Index: konvert.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/konvert.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** konvert.h 24 Jun 2009 21:39:59 -0000 1.2 --- konvert.h 17 Oct 2009 13:48:34 -0000 1.3 *************** *** 27,31 **** #define _konvert_h_ ! #include "segment.h" #define MAX_FUNCNAME 10 --- 27,31 ---- #define _konvert_h_ ! #include "compat/segment.h" #define MAX_FUNCNAME 10 *************** *** 33,41 **** /* First function/variable character */ ! #define IS_FUNC_1LETTER(x) (((x)>='a' && (x)<='z') || (x)=='_' || (x)==(TCHAR)181 || \ ! ((x)>='G' && (x)<='Z')) /* Other characters, inside varname can be numbers */ ! #define IS_FUNC_LETTER(x) (IS_FUNC_1LETTER(x) || ((x)>='0' && (x)<='9') || \ ! ((x)>='A' && (x)<='Z')) typedef enum { --- 33,41 ---- /* First function/variable character */ ! #define IS_FUNC_1LETTER(x) (((x)>=_T('a') && (x)<=_T('z')) || (x)==_T('_') || (x)==(TCHAR)181 || \ ! ((x)>=_T('G') && (x)<=_T('Z'))) /* Other characters, inside varname can be numbers */ ! #define IS_FUNC_LETTER(x) (IS_FUNC_1LETTER(x) || ((x)>=_T('0') && (x)<=_T('9')) || \ ! ((x)>=_T('A') && (x)<=_T('Z'))) typedef enum { *************** *** 116,120 **** typedef struct { UInt16 size; ! Complex *item; }List; --- 116,120 ---- typedef struct { UInt16 size; ! Complex item[1]; }List; *************** *** 122,131 **** typedef struct { Int16 rows,cols; ! double *item; }Matrix; typedef struct { Int16 rows,cols; ! Complex *item; }CMatrix; --- 122,131 ---- typedef struct { Int16 rows,cols; ! double item[1]; }Matrix; typedef struct { Int16 rows,cols; ! Complex item[1]; }CMatrix; Index: stack.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/stack.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stack.h 24 Jun 2009 21:39:59 -0000 1.2 --- stack.h 17 Oct 2009 13:48:34 -0000 1.3 *************** *** 27,31 **** #include "calcDB.h" ! #include "segment.h" dbPackedStack * stack_pack(CodeStack *stack,Int16 *size) MLIB; --- 27,31 ---- #include "calcDB.h" ! #include "compat/segment.h" dbPackedStack * stack_pack(CodeStack *stack,Int16 *size) MLIB; Index: calcDB.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/calcDB.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** calcDB.h 24 Jun 2009 21:44:22 -0000 1.1 --- calcDB.h 17 Oct 2009 13:48:34 -0000 1.2 *************** *** 32,36 **** Int16 size; rpntype *type; ! TCHAR **list; /* Do not add anything here, it gets overwritten */ }dbList; --- 32,36 ---- Int16 size; rpntype *type; ! TCHAR *list[1]; /* Do not add anything here, it gets overwritten */ }dbList; *************** *** 45,54 **** Trpn rpn; UInt16 datasize; /* size of additional packed data */ ! TCHAR *data; }dbStackItem; typedef struct { dbStackHeader header; ! TCHAR *data; }dbPackedStack; --- 45,54 ---- Trpn rpn; UInt16 datasize; /* size of additional packed data */ ! byte data[1]; }dbStackItem; typedef struct { dbStackHeader header; ! byte data[1]; }dbPackedStack; --- NEW FILE: fl_num.cpp --- /* * $Id: fl_num.cpp,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #include "StdAfx.h" #include "compat/PalmOS.h" #include "compat/segment.h" #include "konvert.h" #include "display.h" #include "fp.h" #include "core/prefs.h" #ifdef PALMOS #define isdigit(x) ((x>=_T('0')) && (x<=_T('9'))) #endif /* Is a number, equal to /[0-9]+/ */ static Int16 is_ccbz(TCHAR *input,double *cislo) MLIB; static Int16 is_ccbz(TCHAR *input,double *cislo) { Int16 i,j; Int16 spaces = 0; /* Count to 'i' the length of a number */ for (i=0;;i++) { if (input[i]>=_T('0') && input[i]<=_T('9')) j = input[i]-_T('0'); else if (input[i]>=_T('A') && input[i]<=_T('F')) j = input[i] - _T('A') + 10; else if (calcPrefs.acceptOSPref && input[i] == flSpaceChar) { spaces++; continue; } else break; if (j>dispPrefs.base-1) break; } if (cislo) { *cislo=0.0; for (j=0;j<i;j++) { if (input[j] == flSpaceChar) continue; *cislo*=dispPrefs.base; *cislo+=input[j]<=_T('9')?input[j]-_T('0'):input[j]-_T('A')+10; } j= (Int16) (*cislo); } if (spaces == i) return 0; return i; } static Int16 has_expon(TCHAR *input,double *cislo) MLIB; static Int16 has_expon(TCHAR *input,double *cislo) { TCHAR *tmp=input; Int16 delka=0; Int16 i; if (*tmp==_T('E')) { Int16 negate=0; double expon; tmp++;delka++; if (*tmp==_T('-')) { negate=1; tmp++;delka++; } else if (*tmp==_T('+')) { tmp++;delka++; } if (!(i=is_ccbz(tmp,&expon))) return 0; delka+=i; /* Prevent excessive waiting */ if (expon>350.0) return 0; *cislo=1.0; if (!negate) for (i=0;i<expon;i++) *cislo*=10.0; else for (i=0;i<expon;i++) *cislo/=10.0; } return delka; } /* If floating number, return number of characters describing * the number */ Int16 fl_num(TCHAR *input,double *cislo) MLIB; Int16 fl_num(TCHAR *input,double *cislo) { TCHAR *tmp=input; double cele; double expon; Int16 i=0,j; double dfl; Int16 delka=0; if ((i=is_ccbz(tmp,&cele))) { tmp+=i; delka+=i; } else cele=0; if (calcPrefs.acceptOSPref && *tmp != flPointChar && delka==0) return 0; else if (!calcPrefs.acceptOSPref && *tmp != _T('.') && *tmp!=_T(',') && delka==0) return 0; else if (((calcPrefs.acceptOSPref && *tmp != flPointChar) || (!calcPrefs.acceptOSPref && *tmp!=_T('.') && *tmp!=_T(','))) && delka>0) { *cislo=cele; if ((i=has_expon(tmp,&expon))) { *cislo*=expon; delka+=i;tmp+=i; } /* If a space is a thousend delimiter, check that * there is not another number following a few spaces. * this would interpret '3 4' as '34' or '3*4' depending * on preferences if I didn't check here */ if (flSpaceChar == _T(' ') && *tmp == _T(' ')) { for (;*tmp == ' ';tmp++) ; if (*tmp >= _T('0') && *tmp <= _T('9')) /* space and number found */ return 0; } return delka; } tmp++;delka++; /* If we have floating point part */ if ((i=is_ccbz(tmp,NULL))) { delka+=i; dfl=1.0/(double)dispPrefs.base; for (j=0;j<i;j++) { if (calcPrefs.acceptOSPref && tmp[j] == flSpaceChar) continue; cele+=((double)(tmp[j]<=_T('9')?tmp[j]-_T('0'):tmp[j]-_T('A')+10))*dfl; dfl/=dispPrefs.base; } tmp+=i; } if (!delka) return 0; *cislo=cele; if ((i=has_expon(tmp,&expon))) { *cislo*=expon; delka+=i;tmp+=i; } /* If a space is a thousend delimiter, check that * there is not another number following a few spaces. * this would interpret '3 4' as '34' or '3*4' depending * on preferences if I didn't check here */ if (flSpaceChar == _T(' ') && *tmp == _T(' ')) { for (;*tmp == _T(' ');tmp++) ; if (*tmp >= _T('0') && *tmp <= _T('9')) /* space and number found */ return 0; } return delka; } --- NEW FILE: integ.h --- /* * $Id: integ.h,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #ifndef _INTEG_H_ #define _INTEG_H_ /* Precision for solving functions */ #define DEFAULT_ERROR (1E-8) #define DEFAULT_ROMBERG 6 #define MAX_ITER 2000 CError integ_fsolve(Functype *func,CodeStack *stack) NEWFUNC; CError integ_fsimps(Functype *func,CodeStack *stack) NEWFUNC; CError integ_fdydx(Functype *func,CodeStack *stack) NEWFUNC; double integ_simps(double min, double max,CodeStack *fcstack, double error,CodeStack *argarr) NEWFUNC; double integ_zero(double min, double max, double value, CodeStack *fcstack, double error,Int16 funcnum,CodeStack *argarr) NEWFUNC; double integ_derive1(double x,CodeStack *fcstack,double error, CodeStack *argarr) NEWFUNC; double integ_derive2(double x,CodeStack *fcstack,double error, CodeStack *argarr) NEWFUNC; double integ_romberg(double min,double max,CodeStack *fcstack,Int16 n, CodeStack *argarr) NEWFUNC; CError integ_fromberg(Functype *func,CodeStack *stack) NEWFUNC; double integ_intersect(double min,double max, CodeStack *f1, CodeStack *f2, double error,CodeStack *argarr) NEWFUNC; CError integ_fintersect(Functype *func,CodeStack *stack) NEWFUNC; #endif Index: funcs.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/funcs.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** funcs.cpp 24 Sep 2009 21:16:50 -0000 1.4 --- funcs.cpp 17 Oct 2009 13:48:34 -0000 1.5 *************** *** 53,82 **** struct { ! Trpn *argument; ! Int16 argcount; }func_arguments[MAX_RECURS*2]; Int16 func_argcount; const TCHAR *funcInterDef[] = { ! /* covariance */ ! _T("sum((x(1)-mean(x(1)))*(x(2)-mean(x(2))))/dim(x(1))"), [...1413 lines suppressed...] ! item = stack_pop(stack); ! ritem.allocsize = 0; ! ritem.type = litem; ! StrCopy(ritem.u.litemval.name,item.u.varname); ! ritem.u.litemval.row = arg1; ! ritem.u.litemval.col = arg2; ! stack_push(stack,ritem); ! rpn_delete(item); ! } else switch (type2){ ! case list: ! return list_item(func,stack); ! case matrix: ! return matrix_item(func,stack); ! case cmatrix: ! return cmatrix_item(func,stack); ! default: ! return c_badarg; ! } return c_noerror; } --- NEW FILE: cmatrix.h --- /* * $Id: cmatrix.h,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000,2001,2002 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #ifndef _CMATRIX_H_ #define _CMATRIX_H_ #define CMATRIX_INPUT 2101 #define CMATRIX_DET 2102 #define CMATRIX_ECHELON 2103 #define CMATRIX_IDENTITY 2104 #define CMATRIX_QRQ 2105 #define CMATRIX_QRR 2106 #define CMATRIX_QRS 2107 CError cmatrix_input(Functype *func,CodeStack *stack) MATFUNC; CMatrix * cmatrix_new(Int16 rows,Int16 cols) MATFUNC; CMatrix * cmatrix_dup(CMatrix *m) MATFUNC; void cmatrix_delete(CMatrix *m) MATFUNC; Matrix * cmatrix_to_matrix(CMatrix *cm) MATFUNC; CError cmatrix_oper(Functype *func,CodeStack *stack) MATFUNC; CMatrix * matrix_to_cmatrix(Matrix *m) MATFUNC; CError cmatrix_oper_cplx(Functype *func,CodeStack *stack) MATFUNC; CError cmatrix_func2(Functype *func,CodeStack *stack) MATFUNC; CError cmatrix_func(Functype *func,CodeStack *stack) MATFUNC; CError cmatrix_dim(Functype *func, CodeStack *stack) MATFUNC; CError cmatrix_item(Functype *func, CodeStack *stack) MATFUNC; #endif --- NEW FILE: mathem.cpp --- /* * $Id: mathem.cpp,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, [...1370 lines suppressed...] for(i=2; i < 65536 && i*i <= val; i++) { if (val % i == 0) { isprime = false; break; } } if (func->num == MATH_ISPRIME) { val = isprime ? 1 : 0; break; } else if (isprime) { break; } else if (func->num == MATH_NEXTPRIME) { val++; } else { val--; } } return stack_add_val(stack, &val, integer); } Index: stack.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/stack.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** stack.cpp 24 Sep 2009 21:16:50 -0000 1.4 --- stack.cpp 17 Oct 2009 13:48:34 -0000 1.5 *************** *** 321,325 **** return c_badarg; } ! tmp = (TCHAR *) MemPtrNew(StrLen(tmpitem.u.stringval)+1); StrCopy(tmp,tmpitem.u.stringval); *((TCHAR **)arg1)=tmp; --- 321,325 ---- return c_badarg; } ! tmp = (TCHAR *) MemPtrNew((StrLen(tmpitem.u.stringval)+1)*sizeof(TCHAR)); StrCopy(tmp,tmpitem.u.stringval); *((TCHAR **)arg1)=tmp; *************** *** 479,483 **** } } else if (reqtype == string) { ! value.allocsize = StrLen((TCHAR *)arg)+1; value.u.stringval = (TCHAR *) MemPtrNew(value.allocsize); StrCopy(value.u.stringval,(TCHAR *)arg); --- 479,483 ---- } } else if (reqtype == string) { ! value.allocsize = (StrLen((TCHAR *)arg)+1)*sizeof(TCHAR); value.u.stringval = (TCHAR *) MemPtrNew(value.allocsize); StrCopy(value.u.stringval,(TCHAR *)arg); --- NEW FILE: meqstack.h --- /* * $Id: meqstack.h,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #ifndef _MEQSTACK_H_ #define _MEQSTACK_H_ #include "konvert.h" typedef struct { Int16 allocated; Int16 count; Tmeq *array; }Tdynmeq; Int16 meq_push(Tdynmeq *array,Tmeq item); void meq_free(Tdynmeq *array); void meq_update_t_pcount(Tdynmeq *array,Int16 position,Int16 pcount); void meq_update_f_pcount(Tdynmeq *array,Int16 position,Int16 pcount); Tmeq meq_pop(Tdynmeq *array); Tmeq meq_last(Tdynmeq *array); Tmeq meq_fetch(Tdynmeq *array); Int16 meq_count(Tdynmeq *array); Tdynmeq *meq_new(void); #endif --- NEW FILE: specfun.cpp --- /* * $Id: specfun.cpp,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000 Ondrej Palkovsky * This file Copyright (C) 2000 Rafael R. Sevilla * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact Ondrej at 'on...@pe...'. * You can contact me at 'di...@pa...'. * */ #include "StdAfx.h" #include "compat/PalmOS.h" #include "compat/MathLib.h" #include "konvert.h" #include "funcs.h" #include "mathem.h" #include "stack.h" #include "core/prefs.h" #include "display.h" #include "specfun.h" extern double euler_gamma(double z); /* Arrays are indexed from 1, that's why the 0.0 in the beginning */ /* Coefficients of rational functions for ln(gamma) approxiamtion*/ static const double r1[] = {0.0, -2.66685511495E0, -2.44387534237E1, -2.19698958928E1, 1.11667541262E1, 3.13060547623E0, 6.07771387771E-1, 1.19400905721E1, 3.14690115749E1, 1.52346874070E1}; static const double r2[] = {0.0, -7.83359299449E1, -1.42046296688E2, 1.37519416416E2, 7.86994924154E1, 4.16438922228E0, 4.70668766060E1, 3.13399215894E2, 2.63505074721E2, 4.33400022514E1}; static const double r3[] = {0.0, -2.12159572323E5, 2.30661510616E5, 2.74647644705E4, -4.02621119975E4, -2.29660729780E3, -1.16328495004E5, -1.46025937511E5, -2.42357409629E4, -5.70691009324E2}; static const double r4[] = {0.0, 2.79195317918525E-1, 4.917317610505968E-1, 6.92910599291889E-2, 3.350343815022304E0, 6.012459259764103E0}; static const double alr2pi = 9.18938533204673E-1; static const double xlge = 5.10E6; /*********************************************************************** * * FUNCTION: aln_gamma * * DESCRIPTION: Compute ln(gamma(x)) using the AS 245 algortithm * * PARAMETERS: x * * RETURN: ln(gamma(x)) * ***********************************************************************/ static double aln_gamma(double x) SPECFUN; static double aln_gamma(double x) { double alngam,y,x1,x2; if (x >= 1E305) return NaN; if (x <= 0) return NaN; alngam = 0.0; /* Calculation for 0 < X < 0.5 and 0.5 <= X < 1.5 combined */ if (x < 1.5) { if (x < 0.5) { alngam = -log(x); y = x + 1.0; /* Test whether X < machine epsilon */ if (y == 1.0) return alngam; } else { alngam = 0.0; y = x; x = (x - 0.5) - 0.5; } alngam = alngam + x * ((((r1[5]*y + r1[4])*y + r1[3])*y + r1[2])*y + r1[1]) / ((((y+r1[9])*y + r1[8])*y + r1[7])*y+r1[6]); return alngam; } /* Calculation for 1.5 <= X < 4.0 */ if (x < 4.0) { y = (x - 1.0) - 1.0; alngam = y * ((((r2[5]*x + r2[4])*x + r2[3])*x + r2[2])*x + r2[1]) / ((((x + r2[9])*x + r2[8])*x + r2[7])*x + r2[6]); return alngam; } /* Calculation for 4.0 <= X < 12.0 */ if (x < 12.0) { alngam = ((((r3[5]*x + r3[4])*x + r3[3])*x + r3[2])*x + r3[1]) / ((((x + r3[9])*x + r3[8])*x + r3[7])*x + r3[6]); return alngam; } /* Calculation for X >= 12.0 */ y = log(x); alngam = x * (y - 1.0) - y/2.0 + alr2pi; if (x > xlge) return alngam; x1 = 1.0 / x; x2 = x1 * x1; alngam = alngam + x1 * ((r4[3]*x2 + r4[2])*x2 + r4[1]) / ((x2 + r4[5])*x2 + r4[4]); return alngam; } #define MAX_ITER 200 /*********************************************************************** * * FUNCTION: gser * * DESCRIPTION: Compute incomplete gamma function, power series * * PARAMETERS: a, x * * RETURN: P(a,x) * ***********************************************************************/ static double gser(double a, double x) SPECFUN; static double gser(double a, double x) { double gln, ap, sum, del; int n; gln = aln_gamma(a); if (x == 0) return(0); ap = a; sum = 1.0/a; del = sum; for (n=0; n<MAX_ITER; n++) { ap++; del*=x/ap; sum+=del; if (fabs(del < fabs(sum)*EPSILON)) break; } /* Screw it if the series failed to converge after the maximum number of iterations. We need to determine a way of signalling to the user that the iteration failed to converge--next version maybe. */ return(sum*exp(-x + a*log(x) - gln)); } /*********************************************************************** * * FUNCTION: gcf * * DESCRIPTION: Compute complementary incomplete gamma function, * continued fraction rep. * * PARAMETERS: a, x * * RETURN: Q(a,x) * ***********************************************************************/ static double gcf(double a, double x) SPECFUN; static double gcf(double a, double x) { double gln, g_old, g, a0, a1, b0, b1, fac, ana, anf; int n; gln = aln_gamma(a); g_old = 0; a0 = 1; a1 = x; b0 = 0; b1 = 1; fac = 1; g = 1; for (n=1; n<=MAX_ITER; n++) { ana = (double)n - a; a0 = (a1 + a0*ana)*fac; b0 = (b1 + b0*ana)*fac; anf = n*fac; a1 = x*a0+anf*a1; b1 = x*b0+anf*b1; if (a1 != 0.0) { fac = 1.0/a1; g = b1*fac; if (fabs((g-g_old)/g) < EPSILON) break; g_old = g; } } return(exp(-x + a*log(x) - gln)*g); } /*********************************************************************** * * FUNCTION: incgamma * * DESCRIPTION: Compute incomplete gamma function * * PARAMETERS: a, x * * RETURN: P(a,x) * ***********************************************************************/ static double incgamma(double a, double x) SPECFUN; static double incgamma(double a, double x) { if (x < a+1) return(gser(a, x)); return(1.0-gcf(a, x)); } /*********************************************************************** * * FUNCTION: erf * * DESCRIPTION: Compute error function * * PARAMETERS: x * * RETURN: erf(x) * ***********************************************************************/ static double erf(double x) SPECFUN; static double erf(double x) { if (x < 0) return(-incgamma(0.5, x*x)); return(incgamma(0.5, x*x)); } /*********************************************************************** * * FUNCTION: erf * * DESCRIPTION: Compute complementary error function * * PARAMETERS: x * * RETURN: erfc(x) * ***********************************************************************/ static double erfc(double x) SPECFUN; static double erfc(double x) { double xx; xx = x*x; if (x < 0) { if (xx < 1.5) return 1.0 + gser(0.5, xx); else return 2.0 - gcf(0.5, xx); } else { if (xx < 1.5) return 1.0 - gser(0.5, xx); else return gcf(0.5, xx); } } /*********************************************************************** * * FUNCTION: betacf * * DESCRIPTION: Compute incomplete beta function, continued fraction * * PARAMETERS: a, b, x * * RETURN: ibeta(a, b, x) * ***********************************************************************/ static double betacf(double a, double b, double x) SPECFUN; static double betacf(double a, double b, double x) { double am, bm, az, qab, qap, qam, bz, em, tem, ap, bp, d, app, bpp, aold; int m; am = bm = az = 1; qab = a+b; qap = a+1; qam = a-1; bz = 1-qab*x/qap; for (m=1; m<=MAX_ITER; m++) { em = m; tem = em + em; d = em*(b-m)*x/((qam+tem)*(a+tem)); ap = az + d*am; bp = bz + d*bm; d = -(a+em)*(qab+em)*x/((a+tem)*(qap+tem)); app = ap + d*az; bpp = bp + d*bz; aold = az; am = ap/bpp; bm = bp/bpp; az = app/bpp; bz = 1.0; if (fabs(az - aold) < EPSILON*fabs(az)) break; } return(az); } /*********************************************************************** * * FUNCTION: ibeta * * DESCRIPTION: Compute incomplete beta function * * PARAMETERS: a, b, x * * RETURN: ibeta(a, b, x) * ***********************************************************************/ static double incbeta(double a, double b, double x) SPECFUN; static double incbeta(double a, double b, double x) { double bt; bt = (x == 0 || x == 1) ? 0 : exp(aln_gamma(a+b) - aln_gamma(a) - aln_gamma(b) + a*log(x) + b*log(1-x)); if (x < (a+1)/(a+b+2)) /* use continued fraction directly */ return(bt*betacf(a, b, x)/a); /* use continued fraction after making symmetry transform */ return(1-bt*betacf(b, a, 1-x)/b); } /*********************************************************************** * * FUNCTION: math_gambeta * * DESCRIPTION: Compute Gamma, Beta, and related functions * * PARAMETERS: On stack - up to three numbers, depending on function * * RETURN: On stack - 1 number * ***********************************************************************/ CError math_gambeta(Functype *func, CodeStack *stack) { double z, w, v, res; CError err; err = stack_get_val(stack, &z, real); if (err) return(err); switch (func->num) { case MATH_BETA: err=stack_get_val(stack, &w, real); if (err) return(err); if (z < 0 || w < 0) return(c_badarg); v = z+w; res = exp(aln_gamma(z) + aln_gamma(w) - aln_gamma(z+w)); break; case MATH_IGAMMA: err=stack_get_val(stack, &w, real); if (err) return(err); if (z < 0 || w <= 0) return(c_badarg); res = incgamma(w, z); break; case MATH_ERF: res = erf(z); break; case MATH_ERFC: res = erfc(z); break; case MATH_IBETA: err = stack_get_val2(stack, &w, &v, real); if (err) return(err); if (z < 0 || z > 1 || w <= 0 || v <= 0) return(c_badarg); res = incbeta(w, v, z); break; default: return(c_internal); } return stack_add_val(stack, &res, real); } /*********************************************************************** * * FUNCTION: polevl * * DESCRIPTION: Evaluate a polynomial given an array of its coefficients * PARAMETERS: x, coeffs, degree N * * RETURN: value of polynomial at x * ***********************************************************************/ double polevl(double x, double *coef, int N ) { double p; int i; p = coef[N-1]; for (i=N-2; i>=0; i--) p = p*x + coef[i]; return(p); } Index: history.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/mlib/history.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** history.h 24 Jun 2009 21:39:59 -0000 1.2 --- history.h 17 Oct 2009 13:48:34 -0000 1.3 *************** *** 33,37 **** union { dbStackItem item; ! TCHAR *text; }u; }tHistory; --- 33,37 ---- union { dbStackItem item; ! TCHAR text[1]; }u; }tHistory; --- NEW FILE: matrix.h --- /* * $Id: matrix.h,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000,2001 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #ifndef _MATRIX_H_ #define _MATRIX_H_ #define MATRIX_MAX 50 #define MATRIX_INPUT 2001 #define MATRIX_DET 2002 #define MATRIX_ECHELON 2003 #define MATRIX_IDENTITY 2004 #define MATRIX_QRQ 2005 #define MATRIX_QRR 2006 #define MATRIX_QRS 2007 CError matrix_input(Functype *func,CodeStack *stack) MATFUNC; void matrix_delete(Matrix *m) MATFUNC; Matrix * matrix_new(Int16 rows,Int16 cols) MATFUNC; Matrix * matrix_dup(Matrix *m) MATFUNC; CError matrix_oper(Functype *func,CodeStack *stack) MATFUNC; CError matrix_oper_real(Functype *func,CodeStack *stack) MATFUNC; CError matrix_func(Functype *func,CodeStack *stack) MATFUNC; CError matrix_func2(Functype *func,CodeStack *stack) MATFUNC; CError matrix_item(Functype *func, CodeStack *stack) MATFUNC; CError matrix_dim(Functype *func, CodeStack *stack) MATFUNC; CError matrix_func3(Functype *func,CodeStack *stack) MATFUNC; #endif --- NEW FILE: elliptic.cpp --- /* * $Id: elliptic.cpp,v 1.1 2009/10/17 13:48:34 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000 Ondrej Palkovsky * This file Copyright (C) 2000 Rafael R. Sevilla * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact Ondrej at 'on...@pe...'. * You can contact me at 'di...@pa...'. * * Portions of this code are from the Cephes Math Library, Release 2.8 * Copyright (C) 1984, 1987, 1989, 2000 by Stephen L. Moshier */ #include "StdAfx.h" #include "compat/PalmOS.h" #include "compat/MathLib.h" #include "konvert.h" #include "funcs.h" #include "mathem.h" #include "stack.h" #include "core/prefs.h" #include "display.h" #include "specfun.h" #define PIO2 (M_PIl*0.5) #define C1 1.3862943611198906188E0 /*********************************************************************** * * FUNCTION: ellc1 * * DESCRIPTION: Compute complete elliptic integral of the first kind * * PARAMETERS: eccentricity m * * RETURN: K(m) * ***********************************************************************/ static double ellc1(double x) SPECFUN; static double ellc1(double x) { static double P[] = { 1.38629436111989062502E0, 9.65735902811690126535E-2, 3.08851465246711995998E-2, 1.49380448916805252718E-2, 8.79078273952743772254E-3, 6.18901033637687613229E-3, 6.87489687449949877925E-3, 9.85821379021226008714E-3, 7.97404013220415179367E-3, 2.28025724005875567385E-3, 1.37982864606273237150E-4 }; static double Q[] = { 4.99999999999999999821E-1, 1.24999999999870820058E-1, 7.03124996963957469739E-2, 4.88280347570998239232E-2, 3.73774314173823228969E-2, 3.01204715227604046988E-2, 2.39089602715924892727E-2, 1.54850516649762399335E-2, 5.94058303753167793257E-3, 2.94078955048598507511E-5, }; if (x > EPSILON) return(polevl(x, P, 10) - log(x)*polevl(x, Q, 10)); return(C1 - 0.5*log(x)); } /*********************************************************************** * * FUNCTION: elli1 * * DESCRIPTION: Compute incomplete elliptic integral of the first kind * * PARAMETERS: eccentricity m and modulus phi * * RETURN: F(m, phi) * ***********************************************************************/ static double elli1(double phi, double m) SPECFUN; static double elli1(double phi, double m) { double a, b, c, e, temp, t, K; int d, mod, sign, npio2; if( m == 0.0 ) return( phi ); a = 1.0 - m; if( a == 0.0 ) { return(log(tan((PIO2 + phi)/2.0))); } npio2 = (int) floor(phi/PIO2); if(npio2 & 1) npio2 += 1; if(npio2) { K = ellc1(a); phi = phi - npio2 * PIO2; } else K = 0.0; if( phi < 0.0 ) { phi = -phi; sign = -1; } else sign = 0; b = sqrt(a); t = tan( phi ); if( fabs(t) > 10.0 ) { /* Transform the amplitude */ e = 1.0/(b*t); /* ... but avoid multiple recursions. */ if( fabs(e) < 10.0 ) { e = atan(e); if(npio2 == 0) K = ellc1(a); temp = K - elli1(e, m); goto done; } } a = 1.0; c = sqrt(m); d = 1; mod = 0; while(fabs(c/a) > EPSILON) { temp = b/a; phi = phi + atan(t*temp) + mod * M_PIl; mod = (int) ((phi + PIO2)/M_PIl); t = t * ( 1.0 + temp )/( 1.0 - temp * t * t ); c = ( a - b )/2.0; temp = sqrt( a * b ); a = ( a + b )/2.0; b = temp; d += d; } temp = (atan(t) + mod * M_PIl)/(d * a); done: if( sign < 0 ) temp = -temp; temp += npio2 * K; return(temp); } /*********************************************************************** * * FUNCTION: ellc2 * * DESCRIPTION: Compute complete elliptic integral of the second kind * * PARAMETERS: eccentricity m * * RETURN: E(m) * ***********************************************************************/ static double ellc2(double m) SPECFUN; static double ellc2(double m) { static double P[] = { 1.00000000000000000299E0, 4.43147180560990850618E-1, 5.68051945617860553470E-2, 2.18317996015557253103E-2, 1.15688436810574127319E-2, 7.58395289413514708519E-3, 7.77395492516787092951E-3, 1.07350949056076193403E-2, 8.68786816565889628429E-3, 2.50888492163602060990E-3, 1.53552577301013293365E-4, }; static double Q[] = { 2.49999999999888314361E-1, 9.37499997197644278445E-2, 5.85936634471101055642E-2, 4.27180926518931511717E-2, 3.34833904888224918614E-2, 2.61769742454493659583E-2, 1.68862163993311317300E-2, 6.50609489976927491433E-3, 1.00962792679356715133E-3, 3.27954898576485872656E-5, }; if (m == 0) return(1.0); return(polevl(m, P, 10) - log(m)*(m*polevl(m, Q, 9))); } /*********************************************************************** * * FUNCTION: elli2 * * DESCRIPTION: Compute incomplete elliptic integral of the second kind * * PARAMETERS: eccentricity m and modulus phi * * RETURN: F(m, phi) * ***********************************************************************/ static double elli2(double phi, double m) SPECFUN; static double elli2(double phi, double m) { double a, b, c, e, temp; double lphi, t, E; int d, mod, npio2, sign; if( m == 0.0 ) return( phi ); lphi = phi; npio2 = (int) floor( lphi/PIO2 ); if( npio2 & 1 ) npio2 += 1; lphi = lphi - npio2 * PIO2; if( lphi < 0.0 ) { lphi = -lphi; sign = -1; } else { sign = 1; } a = 1.0 - m; E = ellc2(a); if( a == 0.0 ) { temp = sin(lphi); goto done; } t = tan(lphi); b = sqrt(a); if( fabs(t) > 10.0 ) { /* Transform the amplitude */ e = 1.0/(b*t); /* ... but avoid multiple recursions. */ if( fabs(e) < 10.0 ) { e = atan(e); temp = E + m * sin( lphi ) * sin( e ) - elli2( e, m ); goto done; } } c = sqrt(m); a = 1.0; d = 1; e = 0.0; mod = 0; while( fabs(c/a) > EPSILON ) { temp = b/a; lphi = lphi + atan(t*temp) + mod * M_PIl; mod = (int) ((lphi + PIO2)/M_PIl); t = t * ( 1.0 + temp )/( 1.0 - temp * t * t ); c = ( a - b )/... [truncated message content] |
From: Mapi B. <ma...@us...> - 2009-10-17 13:47:22
|
Update of /cvsroot/easycalc/PPCport/core In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31186 Modified Files: prefs.h Added Files: calc.cpp calc.h chkstack.cpp chkstack.h prefs.cpp Log Message: 1.25a Compiling, linking, running, limited function set, with bugs --- NEW FILE: calc.cpp --- /* * $Id: calc.cpp,v 1.1 2009/10/17 13:47:14 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000,2001 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. * * Antonio Fiol Bonnín" <Ant...@en...> submitted patches * for the financial part. * * 2003-05-19 - Arno Welzel - added code for Sony Clie support */ #include "stdafx.h" #include "compat/PalmOS.h" #include "system - UI/EasyCalc.h" #include "core/mlib/display.h" #include "core/mlib/calcDB.h" #include "core/mlib/fp.h" #include "core/mlib/history.h" #include "core/chkstack.h" #include "core/prefs.h" #ifdef GRAPHS_ENABLED #include "grprefs.h" // TODO #include "grsetup.h" // TODO #include "graph.h" // TODO #include "grtable.h" #endif /* GRAPH_ENABLED */ Err StartApplication (void) { #ifdef PALMOS /* Get version of PalmOS */ palmOS3 = calc_rom_greater(3,0); /* for stack check */ palmOS35 = calc_rom_greater(3,5); /* for color/grayscale support */ #endif /* Get stack boundaries */ initChkStack(); /* Initialize all modules */ if (mlib_init_mathlib()) return 1; /* This also opens DBs */ prefs_read_preferences(); fp_setup_flpoint(); #ifdef GRAPHS_ENABLED // TODO grpref_init(); #endif return 0; } void StopApplication (void) { /* close all modules */ // TODO result_destroy(); mlib_close_mathlib(); prefs_save_preferences(); db_close(); history_close(); #ifdef GRAPHS_ENABLED // TODO grpref_close(); #endif } --- NEW FILE: chkstack.h --- /* * $Id: chkstack.h,v 1.1 2009/10/17 13:47:14 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000,2001 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. * */ void initChkStack(void); Boolean chkStack(void); Index: prefs.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/prefs.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** prefs.h 24 Sep 2009 21:16:09 -0000 1.1 --- prefs.h 17 Oct 2009 13:47:14 -0000 1.2 *************** *** 26,30 **** #define _PREFS_H_ ! #include "segment.h" //#include "calcrsc.h" #include "konvert.h" --- 26,30 ---- #define _PREFS_H_ ! #include "compat/segment.h" //#include "calcrsc.h" #include "konvert.h" *************** *** 39,43 **** typedef struct { ! UInt16 form; /* last form */ UInt16 btnRow; /* Selected btnrow on scientific form */ UInt16 insertPos; /* last insert position */ --- 39,44 ---- typedef struct { ! int version; ! UInt16 skin; /* Last skin */ UInt16 btnRow; /* Selected btnrow on scientific form */ UInt16 insertPos; /* last insert position */ *************** *** 50,54 **** TdispPrefs dispPrefs; Boolean insertHelp; /* Insert help strings where appropriate */ ! Boolean acceptPalmPref; /* Accept Palm settings about number formatting */ Boolean reducePrecision; Boolean dispScien; --- 51,55 ---- TdispPrefs dispPrefs; Boolean insertHelp; /* Insert help strings where appropriate */ ! Boolean acceptOSPref; /* Accept OS settings about number formatting */ Boolean reducePrecision; Boolean dispScien; *************** *** 57,64 **** }tPrefs; ! void prefs_read_preferences() IFACE; ! void prefs_save_preferences() IFACE; ! //Boolean PreferencesHandleEvent(EventPtr event) IFACE; ! extern tPrefs calcPrefs; #endif --- 58,67 ---- }tPrefs; ! #ifndef _PREFS_C_ extern tPrefs calcPrefs; #endif + + void prefs_read_preferences (void); + void prefs_save_preferences (void); + + #endif --- NEW FILE: calc.h --- /* * $Id: calc.h,v 1.1 2009/10/17 13:47:14 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #ifndef _CALC_H_ #define _CALC_H_ Err StartApplication (void); void StopApplication (void); #endif --- NEW FILE: chkstack.cpp --- /* * $Id: chkstack.cpp,v 1.1 2009/10/17 13:47:14 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000,2001 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. * */ #include "StdAfx.h" #include "compat/PalmOS.h" #include "konvert.h" //#include "calc.h" //#include "calcrsc.h" #define MARGIN 800UL /* stack margin */ static UInt32 stackBeg = 0; static UInt32 stackEnd = 0; void initChkStack(void) { UInt16 dummy = 0; #ifndef PALMOS /* Limited 32K stack for Non PalmOS (for now) */ stackEnd = (UInt32)&dummy; /* dummy is at offset 0x7D */ stackBeg = stackEnd - 0x8000 + 0x7D; #else if (palmOS3) { SysGetStackInfo((MemPtr *)&stackBeg, (MemPtr *)&stackEnd); } else { /* Limited 2K stack for PalmOS 2.0 */ stackEnd = (UInt32)&dummy; /* dummy is at offset 0x7D */ stackBeg = stackEnd - 0x800 + 0x7D; } #endif } Boolean chkStack(void) { UInt32 stackaddr = (UInt32)&stackaddr; if (stackaddr > (stackBeg + MARGIN) && stackaddr < stackEnd) return false; else return true; } --- NEW FILE: prefs.cpp --- /* * $Id: prefs.cpp,v 1.1 2009/10/17 13:47:14 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #include "stdafx.h" #include "compat/PalmOS.h" //#include "calcrsc.h" #include "konvert.h" //#include "calc.h" #define _PREFS_C_ #include "prefs.h" #include "calcDB.h" #include "fp.h" //#include "about.h" #include "System - UI/EasyCalc.h" #ifdef SUPPORT_DIA #include "DIA.h" #endif tPrefs calcPrefs; void prefs_read_preferences (void) { read_state(); fp_set_prefs(calcPrefs.dispPrefs); } void prefs_save_preferences (void) { calcPrefs.dispPrefs = dispPrefs; save_state(); } |
From: Mapi B. <ma...@us...> - 2009-10-17 13:46:49
|
Update of /cvsroot/easycalc/PPCport/core In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30970 Modified Files: ansops.cpp ansops.h core_display.cpp core_display.h core_globals.cpp core_globals.h core_main.cpp core_main.h defmgr.cpp defmgr.h Main.cpp Main.h varmgr.cpp varmgr.h Log Message: 1.25a Compiling, linking, running, limited function set, with bugs Index: core_globals.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_globals.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** core_globals.h 24 Sep 2009 21:16:09 -0000 1.2 --- core_globals.h 17 Oct 2009 13:46:30 -0000 1.3 *************** *** 63,109 **** /* Key codes */ /*************/ ! #define NB_KEYS 37 ! #define KEY_SIGMA 1 ! #define KEY_INV 2 ! #define KEY_SQRT 3 ! #define KEY_LOG 4 ! #define KEY_LN 5 ! #define KEY_XEQ 6 ! #define KEY_STO 7 ! #define KEY_RCL 8 ! #define KEY_RDN 9 ! #define KEY_SIN 10 ! #define KEY_COS 11 ! #define KEY_TAN 12 ! #define KEY_ENTER 13 ! #define KEY_SWAP 14 ! #define KEY_CHS 15 ! #define KEY_E 16 ! #define KEY_BSP 17 ! #define KEY_UP 18 ! #define KEY_7 19 ! #define KEY_8 20 ! #define KEY_9 21 ! #define KEY_DIV 22 ! #define KEY_DOWN 23 ! #define KEY_4 24 ! #define KEY_5 25 ! #define KEY_6 26 ! #define KEY_MUL 27 ! #define KEY_SHIFT 28 ! #define KEY_1 29 ! #define KEY_2 30 ! #define KEY_3 31 ! #define KEY_SUB 32 ! #define KEY_EXIT 33 ! #define KEY_0 34 ! #define KEY_DOT 35 ! #define KEY_RUN 36 ! #define KEY_ADD 37 /*********************/ /* Annunciator codes */ /*********************/ ! #define NB_ANNUN 14 #define ANN_SHIFT 0 #define ANN_DEG 1 --- 63,81 ---- /* Key codes */ /*************/ ! #define NB_KEYS BUTTON_COUNT ! // Keep KEY_SHIFT the smallest one in list, just after KEY_NONE ! #define KEY_CLR -1 ! #define KEY_BCKSPC -2 ! #define KEY_EXE -3 ! #define KEY_DOT -4 ! #define KEY_SHIFT -5 ! #define KEY_NONE -6 ! //#define KEY_EXIT 33 ! //#define KEY_RUN 36 /*********************/ /* Annunciator codes */ /*********************/ ! #define NB_ANNUN 17 #define ANN_SHIFT 0 #define ANN_DEG 1 *************** *** 118,123 **** #define ANN_S3 10 #define ANN_SG 11 ! #define ANN_RESMENU 12 ! #define ANN_HSTMENU 13 /******************************/ --- 90,98 ---- #define ANN_S3 10 #define ANN_SG 11 ! #define ANN_VAR 12 ! #define ANN_UFCT 13 ! #define ANN_CFCT 14 ! #define ANN_RESMENU 15 ! #define ANN_HSTMENU 16 /******************************/ Index: Main.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/Main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Main.cpp 24 Sep 2009 21:16:09 -0000 1.1 --- Main.cpp 17 Oct 2009 13:46:30 -0000 1.2 *************** *** 221,226 **** {0,NULL,false} }; ! ! #define BUTTON_COUNT 149 --- 221,226 ---- {0,NULL,false} }; ! // Currently 149 entries, not counting the last one (NULL). ! // Don't forget to update BUTTON_COUNT in Main.h if this evolves ! *************** *** 250,260 **** CError main_input_exec (TCHAR *inp, Trpn *result) { CError err; - // FieldPtr pole; int inpsize; CodeStack *stack; ! if (*inp == '\0') return c_syntax; ! inpsize = (int) wcslen(inp); main_replace_enters(inp); --- 250,259 ---- CError main_input_exec (TCHAR *inp, Trpn *result) { CError err; int inpsize; CodeStack *stack; ! if (*inp == _T('\0')) return c_syntax; ! inpsize = (int) _tcslen(inp); main_replace_enters(inp); *************** *** 269,274 **** if (!err) { (*result) = stack_pop(stack); - err=set_ans_var(*result); - rpn_delete(*result); } stack_delete(stack); --- 268,271 ---- *************** *** 367,378 **** * ***********************************************************************/ ! static Boolean ! main_btnrow_click(Skin *skin, int btnid) IFACE; ! static Boolean ! main_btnrow_click(Skin *skin, int btnid) { ! if ((btnid < 1) || (btnid > BUTTON_COUNT)) return false; ! int index = btnid - 1; main_insert(skin, NULL, buttonString[index].string, --- 364,373 ---- * ***********************************************************************/ ! Boolean main_btnrow_click(Skin *skin, int btnid) IFACE; ! Boolean main_btnrow_click(Skin *skin, int btnid) { ! if ((btnid < 0) || (btnid >= BUTTON_COUNT)) return false; ! int index = btnid; main_insert(skin, NULL, buttonString[index].string, Index: core_display.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_display.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** core_display.h 24 Sep 2009 21:16:09 -0000 1.1 --- core_display.h 17 Oct 2009 13:46:30 -0000 1.2 *************** *** 60,63 **** --- 60,64 ---- void result_error(Skin *skin, void *hWnd_p, CError errcode) IFACE; TCHAR *print_error(CError err); + int input_exec (Skin *skin, void *hWnd_p); #endif Index: core_main.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_main.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** core_main.h 24 Sep 2009 21:16:09 -0000 1.1 --- core_main.h 17 Oct 2009 13:46:30 -0000 1.2 *************** *** 20,23 **** --- 20,24 ---- #include "EasyCalc.h" + #include "system - UI/Skin.h" *************** *** 39,43 **** int core_hex_menu() MAIN_SECT; int core_keydown(int key, int *enqueued, int *repeat) MAIN_SECT; ! int core_keyup() MAIN_SECT; /*******************/ --- 40,44 ---- int core_hex_menu() MAIN_SECT; int core_keydown(int key, int *enqueued, int *repeat) MAIN_SECT; ! int core_keyup(Skin *skin, void *hWnd_p) MAIN_SECT; /*******************/ Index: core_main.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** core_main.cpp 24 Sep 2009 21:16:09 -0000 1.1 --- core_main.cpp 17 Oct 2009 13:46:30 -0000 1.2 *************** *** 31,34 **** --- 31,36 ---- #include "core_tables.h" #include "core_display.h" + #include "core/Main.h" + #include "core/mlib/fp.h" #include <stdlib.h> *************** *** 252,263 **** } ! if (mode_interruptible != NULL) { ! /* We're in the middle of an interruptible function * (e.g., INVRT, PRP); queue up any keystrokes and invoke * the appropriate callback to keep the funtion moving along */ ! int error, keep_running; ! if (key != 0) { /* Enqueue... */ ! *enqueued = 1; if (key == KEY_EXIT || (mode_stoppable && !mode_shift && (key == KEY_RUN))) { --- 254,265 ---- } ! /* if (mode_interruptible != NULL) { ! */ /* We're in the middle of an interruptible function * (e.g., INVRT, PRP); queue up any keystrokes and invoke * the appropriate callback to keep the funtion moving along */ ! /* int error, keep_running; ! if (key != 0) { *//* Enqueue... */ ! /* *enqueued = 1; if (key == KEY_EXIT || (mode_stoppable && !mode_shift && (key == KEY_RUN))) { *************** *** 276,281 **** } error = mode_interruptible(0); ! if (error == ERR_INTERRUPTIBLE) /* Still not done */ ! return (1); mode_interruptible = NULL; keep_running = handle_error(error); --- 278,283 ---- } error = mode_interruptible(0); ! if (error == ERR_INTERRUPTIBLE) *//* Still not done */ ! /* return (1); mode_interruptible = NULL; keep_running = handle_error(error); *************** *** 296,303 **** if (mode_running && !mode_getkey) { ! /* We're running; queue up any keystrokes and invoke * continue_running() to keep the program moving along */ ! if (key != 0) { if (key == KEY_EXIT) { keybuf_tail = keybuf_head; --- 298,305 ---- if (mode_running && !mode_getkey) { ! */ /* We're running; queue up any keystrokes and invoke * continue_running() to keep the program moving along */ ! /* if (key != 0) { if (key == KEY_EXIT) { keybuf_tail = keybuf_head; *************** *** 307,312 **** return (0); } ! /* Enqueue... */ ! *enqueued = 1; if (!mode_shift && (key == KEY_RUN)) { keybuf_tail = keybuf_head; --- 309,314 ---- return (0); } ! */ /* Enqueue... */ ! /* *enqueued = 1; if (!mode_shift && (key == KEY_RUN)) { keybuf_tail = keybuf_head; *************** *** 328,336 **** else { if (mode_getkey) ! /* Technically, the program is still running, but we turn * off the 'running' annunciator so that the user has some * cue that they may now type. */ ! shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, false); else redisplay(); --- 330,338 ---- else { if (mode_getkey) ! */ /* Technically, the program is still running, but we turn * off the 'running' annunciator so that the user has some * cue that they may now type. */ ! /* shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, false); else redisplay(); *************** *** 338,350 **** } } /* If we get here, mode_running must be false. * or a program is running but hanging in GETKEY; */ ! if (keybuf_tail != keybuf_head) { ! /* We're not running, or a program is waiting in GETKEY; * feed queued-up keystroke to keydown() */ ! int oldshift = 0; int oldkey = keybuf[keybuf_tail]; if (oldkey < 0) { --- 340,353 ---- } } + */ /* If we get here, mode_running must be false. * or a program is running but hanging in GETKEY; */ ! /* if (keybuf_tail != keybuf_head) { ! */ /* We're not running, or a program is waiting in GETKEY; * feed queued-up keystroke to keydown() */ ! /* int oldshift = 0; int oldkey = keybuf[keybuf_tail]; if (oldkey < 0) { *************** *** 353,371 **** } keybuf_tail = (keybuf_tail + 1) & 15; ! /* If we're in GETKEY mode, the 'running' annunciator is off; * see the code circa 30 lines back. * We now turn it back on since program execution resumes. */ ! if (mode_getkey && mode_running) shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, true); ! /* Feed the dequeued key to the usual suspects */ ! #define keydown(a,b) ! keydown(oldshift, oldkey); core_keyup(); ! /* We've just de-queued a key; may have to enqueue * one as well, if the user is actually managing to * type while we're unwinding the keyboard buffer */ ! if (key != 0) { if (((keybuf_head + 1) & 15) != keybuf_tail) { if (mode_shift) --- 356,374 ---- } keybuf_tail = (keybuf_tail + 1) & 15; ! */ /* If we're in GETKEY mode, the 'running' annunciator is off; * see the code circa 30 lines back. * We now turn it back on since program execution resumes. */ ! /* if (mode_getkey && mode_running) shell_annunciators(ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, ANNVAL_UNCH, true); ! */ /* Feed the dequeued key to the usual suspects */ ! #define keydown(a,b) (repeating_key = b) ! /* keydown(oldshift, oldkey); core_keyup(); ! */ /* We've just de-queued a key; may have to enqueue * one as well, if the user is actually managing to * type while we're unwinding the keyboard buffer */ ! /* if (key != 0) { if (((keybuf_head + 1) & 15) != keybuf_tail) { if (mode_shift) *************** *** 378,386 **** return (mode_running || (keybuf_head != keybuf_tail)); } /* No program is running, or it is running but waiting for a * keystroke (GETKEY); handle any new keystroke that has just come in */ ! if (key != 0) { int shift = mode_shift; set_shift(false); --- 381,390 ---- return (mode_running || (keybuf_head != keybuf_tail)); } + */ /* No program is running, or it is running but waiting for a * keystroke (GETKEY); handle any new keystroke that has just come in */ ! if (key != KEY_NONE) { int shift = mode_shift; set_shift(false); *************** *** 414,419 **** * it has detected that there is a pending event. * ********************************************************************************/ ! int core_keyup() { ! int error = ERR_NONE; if ((pending_command == CMD_LINGER1) || (pending_command == CMD_LINGER2)) { --- 418,423 ---- * it has detected that there is a pending event. * ********************************************************************************/ ! int core_keyup(Skin *skin, void *hWnd_p) { ! /* int error = ERR_NONE; if ((pending_command == CMD_LINGER1) || (pending_command == CMD_LINGER2)) { *************** *** 430,434 **** if (pending_command == CMD_NONE) return (mode_running || (keybuf_head != keybuf_tail)); ! /* if (remove_program_catalog) { --- 434,438 ---- if (pending_command == CMD_NONE) return (mode_running || (keybuf_head != keybuf_tail)); ! */ /* if (remove_program_catalog) { *************** *** 529,533 **** if (!mode_getkey) redisplay(); ! */ return ((mode_running && !mode_getkey) || (keybuf_head != keybuf_tail)); } --- 533,555 ---- if (!mode_getkey) redisplay(); ! */ ! switch (repeating_key) { ! case KEY_EXE: ! input_exec(skin, hWnd_p); ! break; ! case KEY_CLR: ! skin->set_input_text(NULL, _T("")); ! result_set_text(skin, hWnd_p, _T(""), notype); ! break; ! case KEY_BCKSPC: ! skin->back_delete(NULL); ! break; ! case KEY_DOT: ! skin->insert_input_text(NULL, &flPointChar); ! break; ! default: ! main_btnrow_click(skin, repeating_key); ! } ! return ((mode_running && !mode_getkey) || (keybuf_head != keybuf_tail)); } Index: varmgr.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/varmgr.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** varmgr.h 24 Sep 2009 21:16:09 -0000 1.1 --- varmgr.h 17 Oct 2009 13:46:30 -0000 1.2 *************** *** 36,40 **** TCHAR *varmgr_action(int selection); void varmgr_listVar(Skin *skin, void *hWnd); ! void varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar); void varmgr_popup_builtin(Skin *skin, void *hWnd); TCHAR *varmgr_builtinAction(int selection); --- 36,40 ---- TCHAR *varmgr_action(int selection); void varmgr_listVar(Skin *skin, void *hWnd); ! void varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar, bool fromList); void varmgr_popup_builtin(Skin *skin, void *hWnd); TCHAR *varmgr_builtinAction(int selection); Index: varmgr.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/varmgr.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** varmgr.cpp 24 Sep 2009 21:16:09 -0000 1.1 --- varmgr.cpp 17 Oct 2009 13:46:30 -0000 1.2 *************** *** 156,160 **** text = print_error(err); } ! values[i] = (TCHAR *) MemPtrNew(StrLen(varlist->list[i])+StrLen(text)+10); StrCopy(values[i], varlist->list[i]); if (type==function) --- 156,160 ---- text = print_error(err); } ! values[i] = (TCHAR *) MemPtrNew((StrLen(varlist->list[i])+StrLen(text)+10)*sizeof(TCHAR)); StrCopy(values[i], varlist->list[i]); if (type==function) *************** *** 184,188 **** TCHAR *text; ! text = (TCHAR *) MemPtrNew(StrLen(varlist->list[selection])+1); StrCopy(text, varlist->list[selection]); --- 184,188 ---- TCHAR *text; ! text = (TCHAR *) MemPtrNew((StrLen(varlist->list[selection])+1)*sizeof(TCHAR)); StrCopy(text, varlist->list[selection]); *************** *** 208,213 **** * ***********************************************************************/ ! static void varmgr_save_variable(TCHAR *varname, void *hWnd_p) IFACE; ! static void varmgr_save_variable(TCHAR *varname, void *hWnd_p) { Trpn item; CError err; --- 208,213 ---- * ***********************************************************************/ ! static void varmgr_save_variable(TCHAR *varname, void *hWnd_p, bool fromList) IFACE; ! static void varmgr_save_variable(TCHAR *varname, void *hWnd_p, bool fromList) { Trpn item; CError err; *************** *** 218,222 **** } if (!varfunc_name_ok(varname,variable)) ! return; item = db_read_variable(_T("ans"),&err); --- 218,228 ---- } if (!varfunc_name_ok(varname,variable)) ! return; ! // If not coming from a drop down list, verify if variable ! // already exists, and if yes, ask for confirmation. ! if (!fromList ! && db_record_exists(varname) ! && FrmCustomAlert(altConfirmOverwrite, varname, NULL, NULL, hWnd_p)) ! return; item = db_read_variable(_T("ans"),&err); *************** *** 264,271 **** * ***********************************************************************/ ! void varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar) { db_delete_list(varlist); if (saveasvar) { ! varmgr_save_variable(text, hWnd_calc); } } --- 270,277 ---- * ***********************************************************************/ ! void varmgr_listVar_action(TCHAR *text, void *hWnd_calc, bool saveasvar, bool fromList) { db_delete_list(varlist); if (saveasvar) { ! varmgr_save_variable(text, hWnd_calc, fromList); } } *************** *** 306,310 **** TCHAR *text; ! text = (TCHAR *) MemPtrNew(StrLen(builtins[selection])+1); StrCopy(text, builtins[selection]); --- 312,316 ---- TCHAR *text; ! text = (TCHAR *) MemPtrNew((StrLen(builtins[selection])+1)*sizeof(TCHAR)); StrCopy(text, builtins[selection]); Index: defmgr.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/defmgr.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** defmgr.cpp 24 Sep 2009 21:16:09 -0000 1.1 --- defmgr.cpp 17 Oct 2009 13:46:30 -0000 1.2 *************** *** 71,75 **** if (varItems->type[itemNum] == function) { ! text = (TCHAR *) MemPtrNew(MAX_FUNCNAME+10); StrCopy(text, itemText[itemNum]); StrCat(text, _T("()")); --- 71,75 ---- if (varItems->type[itemNum] == function) { ! text = (TCHAR *) MemPtrNew((MAX_FUNCNAME+10)*sizeof(TCHAR)); StrCopy(text, itemText[itemNum]); StrCat(text, _T("()")); *************** *** 110,113 **** --- 110,114 ---- void def_init_varlist(Skin *skin, void *hWnd) IFACE; void def_init_varlist(Skin *skin, void *hWnd) { + skin->varDefReset(hWnd); varItems = db_get_list(notype); if (!varItems->size) { Index: Main.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/Main.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Main.h 24 Sep 2009 21:16:09 -0000 1.1 --- Main.h 17 Oct 2009 13:46:30 -0000 1.2 *************** *** 38,41 **** --- 38,44 ---- #include "Skin.h" + // Number of defined buttons in Main.cpp + #define BUTTON_COUNT 149 + #ifndef _MAIN_C_ extern const struct { *************** *** 46,49 **** --- 49,53 ---- //Boolean MainFormHandleEvent(EventPtr event); #include "core/mlib/konvert.h" + Boolean main_btnrow_click(Skin *skin, int btnid); CError main_input_exec (TCHAR *inp, Trpn *result); void main_insert(Skin *skin, void *hwnd_edit, const TCHAR *text, Boolean operatr, Boolean func, Index: core_display.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_display.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** core_display.cpp 24 Sep 2009 21:16:09 -0000 1.1 --- core_display.cpp 17 Oct 2009 13:46:30 -0000 1.2 *************** *** 688,694 **** spacing = 4; ! result = (TCHAR *) MemPtrNew(strlen((char *) text) * 2); // Using the strlen version instead of ! // _tcslen to get the number of bytes in ! // the string, and not the number of characters. k = 0; --- 688,692 ---- spacing = 4; ! result = (TCHAR *) MemPtrNew(_tcslen(text)*sizeof(TCHAR)*2); // Twice the number of bytes k = 0; *************** *** 798,802 **** TCHAR *res; ! res = (TCHAR *) MemPtrNew(MAX_RSCLEN); _tcsncpy (res, libLang->translate(strErrCodes[err]), MAX_RSCLEN-1); res[MAX_RSCLEN-1] = 0; --- 796,800 ---- TCHAR *res; ! res = (TCHAR *) MemPtrNew(MAX_RSCLEN*sizeof(TCHAR)); _tcsncpy (res, libLang->translate(strErrCodes[err]), MAX_RSCLEN-1); res[MAX_RSCLEN-1] = 0; *************** *** 875,878 **** --- 873,878 ---- if (!err) { result_set(skin, hWnd_p, result); + err=set_ans_var(result); + rpn_delete(result); skin->select_input_text(NULL); } else { Index: core_globals.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/core/core_globals.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** core_globals.cpp 22 Jun 2009 22:04:26 -0000 1.1 --- core_globals.cpp 17 Oct 2009 13:46:30 -0000 1.2 *************** *** 34,40 **** flags_struct flags; ! int pending_command; bool mode_shift; ! bool mode_running; int (*mode_interruptible)(int) = NULL; bool mode_stoppable; --- 34,40 ---- flags_struct flags; ! int pending_command = 0; bool mode_shift; ! bool mode_running = false; int (*mode_interruptible)(int) = NULL; bool mode_stoppable; |
From: Mapi B. <ma...@us...> - 2009-10-17 13:46:03
|
Update of /cvsroot/easycalc/PPCport/compat In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30861 Added Files: segment.h Log Message: 1.25a Compiling, linking, running, limited function set, with bugs --- NEW FILE: segment.h --- /* * $Id: segment.h,v 1.1 2009/10/17 13:45:50 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #ifndef _SEGMENT_H_ #define _SEGMENT_H_ #define MLIB_SECTION #define MLIB MLIB_SECTION #define BASEFUNC_SECTION #define BASEFUNC BASEFUNC_SECTION #define IFACE_SECTION #define IFACE IFACE_SECTION #define SPECFUN_SECTION #define SPECFUN SPECFUN_SECTION #define GRAPH_SECTION #define GRAPH GRAPH_SECTION #define NEWFUNC_SECTION #define NEWFUNC NEWFUNC_SECTION #define PARSER_SECTION #define PARSER PARSER_SECTION #define MATFUNC_SECTION #define MATFUNC MATFUNC_SECTION #endif |
From: Mapi B. <ma...@us...> - 2009-10-17 13:44:32
|
Update of /cvsroot/easycalc/PPCport/compat In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30679 Modified Files: DataManager.cpp DataManager.h dbutil.cpp Lang.cpp Lang.h MathLib.h MemoryManager.cpp MemoryManager.h PalmOS.cpp PalmOS.h Log Message: 1.25a Compiling, linking, running, limited function set, with bugs Index: Lang.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/Lang.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Lang.cpp 22 Jun 2009 21:57:16 -0000 1.1 --- Lang.cpp 17 Oct 2009 13:44:17 -0000 1.2 *************** *** 21,27 **** --- 21,44 ---- #include "StdAfx.h" #include "compat/Lang.h" + #include "winnls.h" #include <locale.h> #ifdef UNICODE + #ifdef WINCE + static TCHAR _tlocaleInfo[64]; + TCHAR *Lang::_tsetlocale (int category, const TCHAR *locale) { + char localeTmp[64]; + + wcstombs(localeTmp, locale, 64); + // This uses the current locale, which I didn't find how to set in Win CE + // mbstowcs(_tlocaleInfo, localeInfo, 64);MultiByteToWideChar(); + if (MultiByteToWideChar(codePage, MB_PRECOMPOSED, localeTmp, -1, _tlocaleInfo, 64) == 0) { + // Failed to convert to the target codepage + return (NULL); + } + return (_tlocaleInfo); + } + #else #define _tsetlocale _wsetlocale + #endif #else #define _tsetlocale setlocale *************** *** 39,44 **** --- 56,65 ---- langName.assign(name); // Try to set the locale with the provided string first. + #ifdef WINCE + { + #else if ((localeInfo = _tsetlocale(LC_ALL, name)) != NULL) { } else { // Not recognized by windows. + #endif // Map using the Palm EasyCalc PilRC names if (_tcscmp(name, _T("cs")) == 0) { *************** *** 369,372 **** --- 390,394 ---- // Set it to english by default. setLang(_T("en")); + defLang = curLang; // Remember it as default language } *************** *** 407,412 **** curLang = (Lang *) getLang(langName); ! TCHAR *localeInfo = _tsetlocale(LC_ALL, curLang->localeInfo); ! return (localeInfo == NULL); } --- 429,440 ---- curLang = (Lang *) getLang(langName); ! if (curLang != NULL) { ! #ifdef WINCE ! return (0); ! #else ! TCHAR *localeInfo = _tsetlocale(LC_ALL, curLang->localeInfo); ! return (localeInfo == NULL); ! #endif ! } else return (-1); } *************** *** 420,426 **** /******************************************************************************** * Translate a token with current language. * ********************************************************************************/ const TCHAR *LibLang::translate(TCHAR *token) { ! return (curLang->get(token)); } --- 448,464 ---- /******************************************************************************** * Translate a token with current language. * + * If not found, try the default one. * + * If not found, return initial string. * ********************************************************************************/ const TCHAR *LibLang::translate(TCHAR *token) { ! const TCHAR *text = curLang->get(token); ! if (text == NULL) { ! if (defLang != curLang) { ! text = defLang->get(token); ! } ! if (text == NULL) ! text = token; ! } ! return (text); } Index: MathLib.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/MathLib.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MathLib.h 5 Jul 2009 20:53:14 -0000 1.1 --- MathLib.h 17 Oct 2009 13:44:17 -0000 1.2 *************** *** 147,151 **** double trunc(double x); // Round x to nearest integral value not larger than x //UInt32 signbit(double x); // Return signbit of x's machine representation ! #define signbit(x) ((_fpclass(x) & (_FPCLASS_NINF | _FPCLASS_NN | _FPCLASS_ND | _FPCLASS_NZ) != 0) #endif // __MATHLIB_H__ --- 147,154 ---- double trunc(double x); // Round x to nearest integral value not larger than x //UInt32 signbit(double x); // Return signbit of x's machine representation ! // From OpenGroup specifications ! // http://www.opengroup.org/onlinepubs/9699919799/functions/signbit.html ! // Return non zero only if arg is negative. ! #define signbit(x) (((_fpclass(x) & (_FPCLASS_NINF | _FPCLASS_NN | _FPCLASS_ND | _FPCLASS_NZ)) != 0)) #endif // __MATHLIB_H__ Index: DataManager.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/DataManager.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DataManager.cpp 24 Sep 2009 21:15:27 -0000 1.3 --- DataManager.cpp 17 Oct 2009 13:44:17 -0000 1.4 *************** *** 1,7 **** --- 1,10 ---- #include "StdAfx.h" #include "compat/PalmOS.h" + #define _DATAMANAGER_C_ #include "DataManager.h" #include "defuns.h" + #define RECD_MAGIC 0x52454344 + DataManager::DataManager(void) { in_state = false; *************** *** 16,30 **** } ! DataManager::~DataManager(void) { ! if (head != NULL) { ! // Free all records in the DB ! DataRecord *temp; ! do { ! temp = head->next; ! MemHandleFree(head->h); ! delete head; ! head = temp; ! } while (temp != NULL); } if (sortArray != NULL) free(sortArray); if (name != NULL) free(name); --- 19,32 ---- } ! static void freeDR (DataRecord *dr) { ! if (dr != NULL) { ! freeDR(dr->next); ! delete dr; } + } + + DataManager::~DataManager(void) { + // Free all records in the DB + freeDR(head); if (sortArray != NULL) free(sortArray); if (name != NULL) free(name); *************** *** 88,91 **** --- 90,94 ---- size_t siz = num * sizeof(int); if (fwrite(&siz, sizeof(siz), 1, f) != 1) + return (-1); for (int i=0 ; i<num ; i++) { if (fwrite(&(sortArray[i]->num), sizeof(int), 1, f) != 1) *************** *** 143,148 **** for (int i=0 ; i<numRecords ; i++) { temp2 = new DataRecord; ! if (temp2->deSerialize(f) != 0) return (-1); // Remember its address by index listArray[temp2->num] = temp2; --- 146,153 ---- for (int i=0 ; i<numRecords ; i++) { temp2 = new DataRecord; ! if (temp2->deSerialize(f) != 0) { ! delete temp2; return (-1); + } // Remember its address by index listArray[temp2->num] = temp2; *************** *** 163,170 **** // if (fread(sortArray, siz, 1, f) != 1) // return (-1); ! sortArray = (DataRecord **) malloc(numRecords * sizeof(DataRecord **)); int index; for (int i=0 ; i<numRecords ; i++) { ! if (fwrite(&index, sizeof(int), 1, f) != 1) return (-1); // We got the record number, now convert it to its allocated --- 168,175 ---- // if (fread(sortArray, siz, 1, f) != 1) // return (-1); ! sortArray = (DataRecord **) malloc(numRecords * sizeof(DataRecord *)); int index; for (int i=0 ; i<numRecords ; i++) { ! if (fread(&index, sizeof(int), 1, f) != 1) return (-1); // We got the record number, now convert it to its allocated *************** *** 175,179 **** free (listArray); ! // Restore the previous file mode. _setmode(f, prev_mode); --- 180,184 ---- free (listArray); ! // Restore previous file mode. _setmode(f, prev_mode); *************** *** 181,186 **** } ! static DataManager *stateMgrDB = NULL; // This one comes from CalcDB.cpp ! static DataManager *stateMgrHistDB = NULL; // This one comes from EasyCalc.cpp void registerDmDatabase (UINT16 cardNo, const TCHAR *nameP, DataManager *dbId) { --- 186,191 ---- } ! DataManager *stateMgrDB = NULL; // This one comes from CalcDB.cpp ! DataManager *stateMgrHistDB = NULL; // This one comes from EasyCalc.cpp void registerDmDatabase (UINT16 cardNo, const TCHAR *nameP, DataManager *dbId) { *************** *** 205,209 **** UINT16 *versionP, UINT32 *crDateP, UINT32 *modDateP, UINT32 *bckUpDateP, UINT32 *modNumP, LocalID *appInfoIDP, LocalID *sortInfoIDP, ! UINT32 *typeP, UINT32 *creatorP) { int rc = -1; DataManager *db = (DataManager *) dbID; --- 210,214 ---- UINT16 *versionP, UINT32 *crDateP, UINT32 *modDateP, UINT32 *bckUpDateP, UINT32 *modNumP, LocalID *appInfoIDP, LocalID *sortInfoIDP, ! UINT32 *typeP, UINT32 *creatorP) { int rc = -1; DataManager *db = (DataManager *) dbID; *************** *** 220,224 **** int DmSetDatabaseInfo (UINT16 cardNo, LocalID dbID, const TCHAR *nameP, UINT16 *attributesP, UINT16 *versionP, UINT32 *crDateP, UINT32 *modDateP, UINT32 *bckUpDateP, ! UINT32 *modNumP, LocalID appInfoIDP, LocalID sortInfoIDP, UINT32 *typeP, UINT32 *creatorP) { if (dbID == (LocalID) stateMgrHistDB) { --- 225,229 ---- int DmSetDatabaseInfo (UINT16 cardNo, LocalID dbID, const TCHAR *nameP, UINT16 *attributesP, UINT16 *versionP, UINT32 *crDateP, UINT32 *modDateP, UINT32 *bckUpDateP, ! UINT32 *modNumP, LocalID *appInfoIDP, LocalID *sortInfoIDP, UINT32 *typeP, UINT32 *creatorP) { if (dbID == (LocalID) stateMgrHistDB) { *************** *** 232,236 **** } ! DmOpenRef DmOpenDatabase (UINT cardNo, LocalID dbID, UINT16 mode) { if (dbID == (LocalID) stateMgrHistDB) { return (stateMgrHistDB); --- 237,241 ---- } ! DmOpenRef DmOpenDatabase (UINT16 cardNo, LocalID dbID, UINT16 mode) { if (dbID == (LocalID) stateMgrHistDB) { return (stateMgrHistDB); *************** *** 249,268 **** int rc = 0; if (wcscmp (nameP, HISTORYDBNAME) == 0) { ! if (stateMgrHistDB == NULL) stateMgrHistDB = new DataManager; ! stateMgrHistDB->creator = creator; ! stateMgrHistDB->type = type; ! int l = _tcslen(nameP); ! stateMgrDB->name = (TCHAR *) malloc(2*l+1); ! _tcscpy (stateMgrDB->name, nameP); rc = 0; } else if (wcscmp (nameP, DBNAME) == 0) { ! if (stateMgrHistDB == NULL) stateMgrDB = new DataManager; ! stateMgrDB->creator = creator; ! stateMgrDB->type = type; ! int l = _tcslen(nameP); ! stateMgrDB->name = (TCHAR *) malloc(2*l+1); ! _tcscpy (stateMgrDB->name, nameP); rc = 0; } --- 254,275 ---- int rc = 0; if (wcscmp (nameP, HISTORYDBNAME) == 0) { ! if (stateMgrHistDB == NULL) { stateMgrHistDB = new DataManager; ! stateMgrHistDB->creator = creator; ! stateMgrHistDB->type = type; ! int l = _tcslen(nameP); ! stateMgrHistDB->name = (TCHAR *) malloc(2*(l+1)); ! _tcscpy (stateMgrHistDB->name, nameP); ! } rc = 0; } else if (wcscmp (nameP, DBNAME) == 0) { ! if (stateMgrHistDB == NULL) { stateMgrDB = new DataManager; ! stateMgrDB->creator = creator; ! stateMgrDB->type = type; ! int l = _tcslen(nameP); ! stateMgrDB->name = (TCHAR *) malloc(2*(l+1)); ! _tcscpy (stateMgrDB->name, nameP); ! } rc = 0; } *************** *** 270,274 **** } ! Err DmCloseDatabase (DmOpenRef dbP) { return (0); } --- 277,281 ---- } ! int DmCloseDatabase (DmOpenRef dbP) { return (0); } *************** *** 291,297 **** MemHandle p = NULL; if ((dbP == stateMgrHistDB) || (dbP == stateMgrDB)) { ! // Add 4 bytes, round up to next 4 bytes limit ! // char *p = (char *) malloc ((size+8) & 0xFFFFFFFC); ! if ((p = MemHandleNew((size+8) & 0xFFFFFFFC)) != NULL) { DataRecord *prec = NULL; DataRecord *temp = dbP->head; --- 298,302 ---- MemHandle p = NULL; if ((dbP == stateMgrHistDB) || (dbP == stateMgrDB)) { ! if ((p = MemHandleNew(size)) != NULL) { DataRecord *prec = NULL; DataRecord *temp = dbP->head; *************** *** 323,333 **** } if (prec == NULL) { // Insert at head ! temp = dbP->head = new DataRecord(size, p, dbP->head); } else { ! temp = prec->next = new DataRecord(size, p, temp); } ! // Put the metadata DataRecord address in the allocated memory ! *((UInt32 *) p->memPtr) = (UInt32) temp; ! // And update the new sortArray entry with the new DataRecord address, if needed if (dbP->sortArray != NULL) { dbP->sortArray[*atP] = temp; --- 328,338 ---- } if (prec == NULL) { // Insert at head ! temp = dbP->head = new DataRecord(p, dbP->head); } else { ! temp = prec->next = new DataRecord(p, temp); } ! // Sign the mem handle ! p->setOwner((void *) RECD_MAGIC); ! // And update the new sortArray entry with new DataRecord address, if needed if (dbP->sortArray != NULL) { dbP->sortArray[*atP] = temp; *************** *** 338,360 **** } ! MemHandle DmGetRecord (DmOpenRef dbP, UInt16 index) { ! MemHandle p = NULL; ! if ((dbP == stateMgrHistDB) || (dbP == stateMgrDB)) { ! DataRecord *temp = dbP->head; ! // Find the record ! if (dbP->sortArray == NULL) { // No sort array, no direct access ! if (index < dbP->numRecords) { ! for (int i=0 ; i<index ; i++) ! temp = temp->next; ! p = temp->h; ! } ! } else { // Direct access ! p = dbP->sortArray[(int)index]->h; ! } ! } ! return (p); } ! Err DmRemoveRecord (DmOpenRef dbP, UInt16 index) { if ((dbP == stateMgrHistDB) || (dbP == stateMgrDB)) { DataRecord *prec = NULL; --- 343,351 ---- } ! MemHandle DmGetRecord (DmOpenRef dbP, UINT16 index) { ! return (DmQueryRecord(dbP, index)); } ! int DmRemoveRecord (DmOpenRef dbP, UINT16 index) { if ((dbP == stateMgrHistDB) || (dbP == stateMgrDB)) { DataRecord *prec = NULL; *************** *** 363,367 **** return (-1); dbP->numRecords--; ! // Locate the record to delete if (dbP->sortArray == NULL) { // No sort array to maintain, and no direct access for (int i=0 ; (i<index)&&(temp!=NULL) ; i++) --- 354,358 ---- return (-1); dbP->numRecords--; ! // Locate record to delete if (dbP->sortArray == NULL) { // No sort array to maintain, and no direct access for (int i=0 ; (i<index)&&(temp!=NULL) ; i++) *************** *** 400,422 **** } ! Err DmWrite (void *recordP, UInt32 offset, const void *srcP, UInt32 bytes) { ! char *p = (char *) recordP; ! ! // Find the record to which this data belongs ! DataRecord *r = (DataRecord *) (* ((UInt32 *) (((UInt32) recordP) - 4))); ! if (r->magic != RECORD_MAGIC) return (-1); ! if (offset + bytes > r->size) return (-2); ! memcpy (p+offset, srcP, bytes); return (0); } ! MemHandle DmQueryRecord (DmOpenRef dbP, UInt16 index) { if ((dbP == stateMgrHistDB) || (dbP == stateMgrDB)) { DataRecord *temp = dbP->head; ! if (index >= dbP->numRecords) return (NULL); ! for (int i=0 ; (i<index) && (temp != NULL) ; i++) temp = temp->next; ! return (temp->h); } ! return (NULL); } --- 391,420 ---- } ! int DmWrite (void *recordP, UINT32 offset, const void *srcP, UINT32 bytes) { ! // Find record to which this data belongs ! MemHandle p = c_MemHandle::GetMemHandle(recordP); ! if (p == NULL) return (-1); ! if (((UInt32) (p->getOwner())) != RECD_MAGIC) return (-1); ! if (offset + bytes > p->getSize()) return (-2); ! memcpy (((byte *) (recordP))+offset, srcP, bytes); return (0); } ! MemHandle DmQueryRecord (DmOpenRef dbP, UINT16 index) { ! MemHandle p = NULL; if ((dbP == stateMgrHistDB) || (dbP == stateMgrDB)) { DataRecord *temp = dbP->head; ! // Find record ! if (dbP->sortArray == NULL) { // No sort array, no direct access ! if (index < dbP->numRecords) { ! for (int i=0 ; i<index ; i++) ! temp = temp->next; ! p = temp->h; ! } ! } else { // Direct access ! p = dbP->sortArray[(int)index]->h; ! } } ! return (p); } *************** *** 434,438 **** // First, initiate conditions on boundaries of the recurring algorithm if (compar(newRecord, ! sortArray[imax]->h->memPtr, other, NULL, // newRecordInfo, not used, so not implemented --- 432,436 ---- // First, initiate conditions on boundaries of the recurring algorithm if (compar(newRecord, ! sortArray[imax]->h->getMemAddr(), other, NULL, // newRecordInfo, not used, so not implemented *************** *** 444,448 **** } else if ((numRecords == 1) // First == last ! No need to redo the comparison. || (c = compar(newRecord, ! sortArray[0]->h->memPtr, other, NULL, // newRecordInfo, not used, so not implemented --- 442,446 ---- } else if ((numRecords == 1) // First == last ! No need to redo the comparison. || (c = compar(newRecord, ! sortArray[0]->h->getMemAddr(), other, NULL, // newRecordInfo, not used, so not implemented *************** *** 462,466 **** // And note: when numRecords == 2, imax is 1. && (compar(newRecord, ! sortArray[i]->h->memPtr, other, NULL, // newRecordInfo, not used, so not implemented --- 460,464 ---- // And note: when numRecords == 2, imax is 1. && (compar(newRecord, ! sortArray[i]->h->getMemAddr(), other, NULL, // newRecordInfo, not used, so not implemented *************** *** 479,483 **** i = (imax + imin) >> 1; c = compar(newRecord, ! sortArray[i]->h->memPtr, other, NULL, // newRecordInfo, not used, so not implemented --- 477,481 ---- i = (imax + imin) >> 1; c = compar(newRecord, ! sortArray[i]->h->getMemAddr(), other, NULL, // newRecordInfo, not used, so not implemented *************** *** 489,493 **** while ((i < numRecords) && (compar(newRecord, ! sortArray[i]->h->memPtr, other, NULL, // newRecordInfo, not used, so not implemented --- 487,491 ---- while ((i < numRecords) && (compar(newRecord, ! sortArray[i]->h->getMemAddr(), other, NULL, // newRecordInfo, not used, so not implemented *************** *** 526,530 **** UInt16 DmFindSortPosition (DmOpenRef dbP, void *newRecord, SortRecordInfoPtr newRecordInfo, ! DmComparF *compar, Int16 other) { int i = -1; if ((dbP == stateMgrHistDB) || (dbP == stateMgrDB)) { --- 524,528 ---- UInt16 DmFindSortPosition (DmOpenRef dbP, void *newRecord, SortRecordInfoPtr newRecordInfo, ! DmComparF *compar, INT16 other) { int i = -1; if ((dbP == stateMgrHistDB) || (dbP == stateMgrDB)) { *************** *** 570,586 **** } ! //Err DmReleaseRecord (DmOpenRef dbP, UInt16 index, Boolean dirty) { // return (0); //} DataRecord::DataRecord(void) { ! magic = RECORD_MAGIC; ! size = 0; h = NULL; next = NULL; } ! DataRecord::DataRecord(UINT32 s, MemHandle p, DataRecord *n) { ! size = s; h = p; next = n; --- 568,585 ---- } ! //int DmReleaseRecord (DmOpenRef dbP, UInt16 index, Boolean dirty) { // return (0); //} DataRecord::DataRecord(void) { ! magic = RECD_MAGIC; ! // size = 0; h = NULL; next = NULL; } ! DataRecord::DataRecord(/*UINT32 s, */MemHandle p, DataRecord *n) { ! magic = RECD_MAGIC; ! // size = s; h = p; next = n; *************** *** 588,591 **** --- 587,592 ---- DataRecord::~DataRecord(void) { + if (h != NULL) + MemHandleFree(h); } *************** *** 596,604 **** if (fwrite(&magic, sizeof(magic), 1, f) != 1) return (-1); ! if (fwrite(&size, sizeof(size), 1, f) != 1) ! return (-1); if (fwrite(&num, sizeof(num), 1, f) != 1) return (-1); ! if (h->serialize(f) != 0) return (-1); --- 597,607 ---- if (fwrite(&magic, sizeof(magic), 1, f) != 1) return (-1); ! // if (fwrite(&size, sizeof(size), 1, f) != 1) ! // return (-1); if (fwrite(&num, sizeof(num), 1, f) != 1) return (-1); ! if (fwrite(&h, sizeof(h), 1, f) != 1) ! return (-1); ! if ((h != NULL) && (h->serialize(f) != 0)) return (-1); *************** *** 612,621 **** if (fread(&magic, sizeof(magic), 1, f) != 1) return (-1); ! if (fread(&size, sizeof(size), 1, f) != 1) ! return (-1); if (fread(&num, sizeof(num), 1, f) != 1) return (-1); ! if (h->deSerialize(f) != 0) return (-1); return (0); --- 615,630 ---- if (fread(&magic, sizeof(magic), 1, f) != 1) return (-1); ! // if (fread(&size, sizeof(size), 1, f) != 1) ! // return (-1); if (fread(&num, sizeof(num), 1, f) != 1) return (-1); ! if (fread(&h, sizeof(h), 1, f) != 1) return (-1); + if (h != NULL) { + h = new c_MemHandle (); + if (h->deSerialize(f) != 0) { + return (-1); + } + } return (0); Index: PalmOS.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/PalmOS.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PalmOS.h 24 Sep 2009 21:15:27 -0000 1.5 --- PalmOS.h 17 Oct 2009 13:44:17 -0000 1.6 *************** *** 73,79 **** #define NaN (*((double *) nan)) ! #include <time.h> ! #define TimGetSeconds() ((UInt32) time(NULL)) ! void ErrFatalDisplayIf(int cond, TCHAR *msg); // Declared in Easycalc.cpp --- 73,77 ---- #define NaN (*((double *) nan)) ! UInt32 TimGetSeconds (void); void ErrFatalDisplayIf(int cond, TCHAR *msg); // Declared in Easycalc.cpp Index: PalmOS.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/PalmOS.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PalmOS.cpp 24 Sep 2009 21:15:27 -0000 1.1 --- PalmOS.cpp 17 Oct 2009 13:44:17 -0000 1.2 *************** *** 18,20 **** --- 18,36 ---- #include "StdAfx.h" + #include "compat/PalmOS.h" + unsigned long nan[2]={0xffffffff, 0x7fffffff}; + + UInt32 TimGetSeconds (void) { + SYSTEMTIME syst_time; + FILETIME file_time; + UInt32 t; + + GetSystemTime(&syst_time); + SystemTimeToFileTime(&syst_time, &file_time); + // We got the number of 100-nanosecond intervals since January 1, 1601 + // Convert to seconds since then. + // 1 s = 1000000 µs = 10000000 * 100 ns + t = (UInt32) (((ULARGE_INTEGER*) &file_time)->QuadPart / 10000000L); + return (t); + } Index: DataManager.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/DataManager.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DataManager.h 6 Aug 2009 21:41:01 -0000 1.3 --- DataManager.h 17 Oct 2009 13:44:17 -0000 1.4 *************** *** 10,18 **** #define dmHdrAttrBackup 2 - #define RECORD_MAGIC 0x52454344 class DataRecord { public: UInt32 magic; ! UInt32 size; int num; MemHandle h; --- 10,17 ---- #define dmHdrAttrBackup 2 class DataRecord { public: UInt32 magic; ! // UInt32 size; int num; MemHandle h; *************** *** 20,24 **** DataRecord(void); ! DataRecord(UINT32 s, MemHandle p, DataRecord *n); ~DataRecord(void); int serialize(FILE *f); --- 19,23 ---- DataRecord(void); ! DataRecord(/*UINT32 s, */MemHandle p, DataRecord *n); ~DataRecord(void); int serialize(FILE *f); *************** *** 62,86 **** LocalID DmFindDatabase (UINT16 cardNo, const TCHAR *nameP); ! Err DmDatabaseInfo (UInt16 cardNo, LocalID dbID, Char *nameP, UInt16 *attributesP, ! UInt16 *versionP, UInt32 *crDateP, UInt32 *modDateP, UInt32 *bckUpDateP, ! UInt32 *modNumP, LocalID appInfoIDP, LocalID sortInfoIDP, ! UInt32 *typeP, UInt32 *creatorP); ! Err DmSetDatabaseInfo (UInt16 cardNo, LocalID dbID, const Char *nameP, ! UInt16 *attributesP, UInt16 *versionP, UInt32 *crDateP, ! UInt32 *modDateP, UInt32 *bckUpDateP, UInt32 *modNumP, ! LocalID appInfoIDP, LocalID sortInfoIDP, UInt32 *typeP, ! UInt32 *creatorP); ! DmOpenRef DmOpenDatabase (UInt16 cardNo, LocalID dbID, UInt16 mode); ! Err DmGetLastErr (void); ! Err DmCreateDatabase (UInt16 cardNo, const Char *nameP, UInt32 creator, UInt32 type, Boolean resDB); ! Err DmCloseDatabase (DmOpenRef dbP); ! Err DmDeleteDatabase (UInt16 cardNo, LocalID dbID); UInt16 DmNumRecords (DmOpenRef dbP); ! MemHandle DmNewRecord (DmOpenRef dbP, UInt16 *atP, UInt32 size); ! MemHandle DmGetRecord (DmOpenRef dbP, UInt16 index); ! Err DmWrite (void *recordP, UInt32 offset, const void *srcP, UInt32 bytes); ! Err DmRemoveRecord (DmOpenRef dbP, UInt16 index); MemHandle DmQueryRecord (DmOpenRef dbP, UInt16 index); ! UInt16 DmFindSortPosition (DmOpenRef dbP, void *newRecord, SortRecordInfoPtr newRecordInfo, DmComparF *compar, Int16 other); --- 61,85 ---- LocalID DmFindDatabase (UINT16 cardNo, const TCHAR *nameP); ! int DmDatabaseInfo (UINT16 cardNo, LocalID dbID, TCHAR *nameP, UINT16 *attributesP, ! UINT16 *versionP, UINT32 *crDateP, UINT32 *modDateP, UINT32 *bckUpDateP, ! UINT32 *modNumP, LocalID *appInfoIDP, LocalID *sortInfoIDP, ! UINT32 *typeP, UINT32 *creatorP); ! int DmSetDatabaseInfo (UINT16 cardNo, LocalID dbID, const Char *nameP, ! UINT16 *attributesP, UINT16 *versionP, UINT32 *crDateP, ! UINT32 *modDateP, UINT32 *bckUpDateP, UINT32 *modNumP, ! LocalID *appInfoIDP, LocalID *sortInfoIDP, UINT32 *typeP, ! UINT32 *creatorP); ! DmOpenRef DmOpenDatabase (UINT16 cardNo, LocalID dbID, UINT16 mode); ! int DmGetLastErr (void); ! int DmCreateDatabase (UINT16 cardNo, const Char *nameP, UINT32 creator, UINT32 type, Boolean resDB); ! int DmCloseDatabase (DmOpenRef dbP); ! int DmDeleteDatabase (UINT16 cardNo, LocalID dbID); UInt16 DmNumRecords (DmOpenRef dbP); ! MemHandle DmNewRecord (DmOpenRef dbP, UINT16 *atP, UINT32 size); ! MemHandle DmGetRecord (DmOpenRef dbP, UINT16 index); ! int DmWrite (void *recordP, UINT32 offset, const void *srcP, UINT32 bytes); ! int DmRemoveRecord (DmOpenRef dbP, UINT16 index); MemHandle DmQueryRecord (DmOpenRef dbP, UInt16 index); ! UINT16 DmFindSortPosition (DmOpenRef dbP, void *newRecord, SortRecordInfoPtr newRecordInfo, DmComparF *compar, Int16 other); *************** *** 89,92 **** --- 88,95 ---- #define DmReleaseRecord(a,b,c) + #ifndef _DATAMANAGER_C_ + extern DataManager *stateMgrDB; + extern DataManager *stateMgrHistDB; + #endif #endif \ No newline at end of file Index: Lang.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/Lang.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Lang.h 22 Jun 2009 21:57:16 -0000 1.1 --- Lang.h 17 Oct 2009 13:44:17 -0000 1.2 *************** *** 39,42 **** --- 39,45 ---- Lang(const TCHAR *name); ~Lang(void); + #ifdef WINCE + TCHAR *_tsetlocale (int category, const TCHAR *locale); + #endif bool insert(const TCHAR *key, const TCHAR *value); const TCHAR *get(TCHAR *key); *************** *** 51,54 **** --- 54,58 ---- bool firstCalled; Lang *curLang; + Lang *defLang; TCHAR *wcstr; size_t allocLen; Index: MemoryManager.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/MemoryManager.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MemoryManager.h 6 Aug 2009 21:41:25 -0000 1.1 --- MemoryManager.h 17 Oct 2009 13:44:17 -0000 1.2 *************** *** 9,34 **** class c_MemHandle { ! public: ! // int size; ! void *memPtr; ! int lock; c_MemHandle(void); ~c_MemHandle(void); int serialize(FILE *f); int deSerialize(FILE *f); }; typedef c_MemHandle *MemHandle; #define MemPtrNew malloc #define MemPtrFree free - MemHandle MemHandleNew (UInt32 size); - Err MemHandleFree (MemHandle h); - MemPtr MemHandleLock (MemHandle h); - Err MemHandleUnlock (MemHandle h); - UInt32 MemHandleSize (MemHandle h); - Err MemHandleResize (MemHandle h, UInt32 newSize); - #endif \ No newline at end of file --- 9,50 ---- class c_MemHandle { ! protected: ! UInt32 magic; ! void *owner; ! UInt32 size; ! void *memPtr; ! int lockCnt; + public: c_MemHandle(void); ~c_MemHandle(void); int serialize(FILE *f); int deSerialize(FILE *f); + + static c_MemHandle *MemHandleNew (UInt32 size); + static Err MemHandleFree (c_MemHandle *h); + void setOwner (void *owner); + void *getOwner (void); + MemPtr lock (void); + MemPtr getMemAddr (void); + static c_MemHandle *GetMemHandle (MemPtr p); + Err unlock (void); + UInt32 getSize (void); + Err resize (UInt32 newSize); }; typedef c_MemHandle *MemHandle; + #ifndef _MEMORYMANAGER_C_ + #define MemHandleNew c_MemHandle::MemHandleNew + #define MemHandleFree c_MemHandle::MemHandleFree + #define MemHandleLock(h) ((h)->lock()) + #define MemHandleUnlock(h) ((h)->unlock()) + #define MemHandleSize(h) ((h)->getSize()) + #define MemHandleResize(h,ns) ((h)->resize(ns)) + #endif + #define MemPtrNew malloc #define MemPtrFree free #endif \ No newline at end of file Index: MemoryManager.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/compat/MemoryManager.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MemoryManager.cpp 6 Aug 2009 21:41:25 -0000 1.1 --- MemoryManager.cpp 17 Oct 2009 13:44:17 -0000 1.2 *************** *** 1,10 **** #include "StdAfx.h" #include "compat/PalmOS.h" #include "MemoryManager.h" c_MemHandle::c_MemHandle(void) { ! // size = 0; ! memPtr = NULL; ! lock = 0; } --- 1,16 ---- #include "StdAfx.h" + + #define _MEMORYMANAGER_C_ #include "compat/PalmOS.h" #include "MemoryManager.h" + #define MEMH_MAGIC 0x4D454D48 + c_MemHandle::c_MemHandle(void) { ! magic = MEMH_MAGIC; ! owner = NULL; ! size = 0; ! memPtr = NULL; ! lockCnt = 0; } *************** *** 18,27 **** ***********************************************************************/ int c_MemHandle::serialize(FILE *f) { ! // size = 0; if (fwrite(&memPtr, sizeof(memPtr), 1, f) != 1) return (-1); ! if (fwrite(&lock, sizeof(lock), 1, f) != 1) return (-1); ! if (memPtr != 0) { size_t siz = _msize(memPtr); if (fwrite(&siz, sizeof(siz), 1, f) != 1) --- 24,38 ---- ***********************************************************************/ int c_MemHandle::serialize(FILE *f) { ! if (fwrite(&magic, sizeof(magic), 1, f) != 1) ! return (-1); ! if (fwrite(&owner, sizeof(owner), 1, f) != 1) ! return (-1); ! if (fwrite(&size, sizeof(size), 1, f) != 1) ! return (-1); if (fwrite(&memPtr, sizeof(memPtr), 1, f) != 1) return (-1); ! if (fwrite(&lockCnt, sizeof(lockCnt), 1, f) != 1) return (-1); ! if (memPtr != NULL) { size_t siz = _msize(memPtr); if (fwrite(&siz, sizeof(siz), 1, f) != 1) *************** *** 38,47 **** ***********************************************************************/ int c_MemHandle::deSerialize(FILE *f) { ! // size = 0; if (fread(&memPtr, sizeof(memPtr), 1, f) != 1) return (-1); ! if (fread(&lock, sizeof(lock), 1, f) != 1) return (-1); ! if (memPtr != 0) { size_t siz; if (fread(&siz, sizeof(siz), 1, f) != 1) --- 49,63 ---- ***********************************************************************/ int c_MemHandle::deSerialize(FILE *f) { ! if (fread(&magic, sizeof(magic), 1, f) != 1) ! return (-1); ! if (fread(&owner, sizeof(owner), 1, f) != 1) ! return (-1); ! if (fread(&size, sizeof(size), 1, f) != 1) ! return (-1); if (fread(&memPtr, sizeof(memPtr), 1, f) != 1) return (-1); ! if (fread(&lockCnt, sizeof(lockCnt), 1, f) != 1) return (-1); ! if (memPtr != NULL) { size_t siz; if (fread(&siz, sizeof(siz), 1, f) != 1) *************** *** 50,53 **** --- 66,71 ---- if (fread(memPtr, siz, 1, f) != 1) return (-1); + // Re-establish proper link to this object at beginning of memPtr + *((UInt32 *) memPtr) = (UInt32) this; } *************** *** 55,63 **** } ! MemHandle MemHandleNew (UInt32 size) { MemHandle h = new c_MemHandle; if (h != NULL) { ! if ((h->memPtr = malloc(size)) != NULL) { ! // h->size = size; } else { delete h; --- 73,85 ---- } ! /* Static method */ ! MemHandle c_MemHandle::MemHandleNew (UInt32 size) { MemHandle h = new c_MemHandle; if (h != NULL) { ! // Add 4 bytes, round up to next 4 bytes limit ! if ((h->memPtr = malloc((size+7) & 0xFFFFFFFC)) != NULL) { ! // Put metadata MemHandle address in allocated memory ! *((UInt32 *) h->memPtr) = (UInt32) h; ! h->size = size; } else { delete h; *************** *** 68,97 **** } ! Err MemHandleFree (MemHandle h) { delete h; return (0); } ! MemPtr MemHandleLock (MemHandle h) { ! h->lock++; ! return (h->memPtr); } ! Err MemHandleUnlock (MemHandle h) { ! if (h->lock > 0) h->lock--; return (0); } ! UInt32 MemHandleSize (MemHandle h) { ! if (h->memPtr == NULL) return (0); ! else return (_msize(h->memPtr)); } ! Err MemHandleResize (MemHandle h, UInt32 newSize) { ! if (h->lock > 0) return (-1); ! h->memPtr = realloc(h->memPtr, newSize); ! if ((newSize != 0) && (h->memPtr == NULL)) ! return (-2); return (0); } --- 90,157 ---- } ! /* Static method */ ! Err c_MemHandle::MemHandleFree (MemHandle h) { delete h; return (0); } ! void c_MemHandle::setOwner (void *owner) { ! this->owner = owner; } ! void *c_MemHandle::getOwner (void) { ! return (this->owner); ! } ! ! MemPtr c_MemHandle::lock (void) { ! this->lockCnt++; ! // Skip metadata pointer ! return ((MemPtr) (((UInt32 *) (this->memPtr)) + 1)); ! } ! ! MemPtr c_MemHandle::getMemAddr (void) { ! return ((MemPtr) (((UInt32 *) (this->memPtr)) + 1)); ! } ! ! /* Static method */ ! MemHandle c_MemHandle::GetMemHandle (MemPtr p) { ! // Retrieve metadata pointer ! MemHandle h = (MemHandle) (*(((UInt32 *) p) - 1)); ! if (h->magic != MEMH_MAGIC) { ! h = NULL; ! } ! return (h); ! } ! ! Err c_MemHandle::unlock (void) { ! if (this->lockCnt > 0) this->lockCnt--; return (0); } ! UInt32 c_MemHandle::getSize (void) { ! return (this->size); } ! Err c_MemHandle::resize (UInt32 newSize) { ! if (this->lockCnt > 0) return (-1); ! if (this->size == newSize) // No resize to do ! return (0); ! if ((newSize == 0) && (this->memPtr)) { // Free existing allocated memory ! free(this->memPtr); ! this->memPtr = NULL; ! this->size = 0; ! } else { ! // Add 4 bytes, round up to next 4 bytes limit ! void *p = realloc(this->memPtr, (newSize+7) & 0xFFFFFFFC); ! if (p != NULL) { ! this->memPtr = p; ! // Put metadata MemHandle address in allocated memory ! *((UInt32 *) this->memPtr) = (UInt32) this; ! this->size = newSize; ! } else { ! return (-2); ! } ! } return (0); } |
From: Mapi B. <ma...@us...> - 2009-10-17 13:43:58
|
Update of /cvsroot/easycalc/PPCport In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30620 Modified Files: EasyCalc.vcproj Log Message: 1.25a Compiling, linking, running, limited function set, with bugs Index: EasyCalc.vcproj =================================================================== RCS file: /cvsroot/easycalc/PPCport/EasyCalc.vcproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EasyCalc.vcproj 24 Sep 2009 21:14:00 -0000 1.7 --- EasyCalc.vcproj 17 Oct 2009 13:43:46 -0000 1.8 *************** *** 70,76 **** --- 70,78 ---- <Tool Name="VCLinkerTool" + RegisterOutput="false" AdditionalOptions=" /subsystem:windowsce,5.01" OutputFile="$(OutDir)/EasyCalc.exe" LinkIncremental="2" + AdditionalLibraryDirectories="" DelayLoadDLLs="$(NOINHERIT)" GenerateDebugInformation="true" *************** *** 81,84 **** --- 83,87 ---- RandomizedBaseAddress="1" DataExecutionPrevention="0" + TargetMachine="0" /> <Tool *************** *** 444,447 **** --- 447,458 ---- </File> <File + RelativePath=".\core\calc.cpp" + > + </File> + <File + RelativePath=".\core\chkstack.cpp" + > + </File> + <File RelativePath=".\core\core_display.cpp" > *************** *** 464,467 **** --- 475,482 ---- </File> <File + RelativePath=".\core\prefs.cpp" + > + </File> + <File RelativePath=".\core\varmgr.cpp" > *************** *** 471,482 **** --- 486,517 ---- > <File + RelativePath=".\core\mlib\bessels.cpp" + > + </File> + <File RelativePath=".\core\mlib\calcDB.cpp" > </File> <File + RelativePath=".\core\mlib\cmatrix.cpp" + > + </File> + <File + RelativePath=".\core\mlib\complex.cpp" + > + </File> + <File RelativePath=".\core\mlib\display.cpp" > </File> <File + RelativePath=".\core\mlib\elliptic.cpp" + > + </File> + <File + RelativePath=".\core\mlib\fl_num.cpp" + > + </File> + <File RelativePath=".\core\mlib\fp.cpp" > *************** *** 495,502 **** --- 530,561 ---- </File> <File + RelativePath=".\core\mlib\integ.cpp" + > + </File> + <File RelativePath=".\core\mlib\konvert.cpp" > </File> <File + RelativePath=".\core\mlib\mathem.cpp" + > + </File> + <File + RelativePath=".\core\mlib\matrix.cpp" + > + </File> + <File + RelativePath=".\core\mlib\meqstack.cpp" + > + </File> + <File + RelativePath=".\core\mlib\slist.cpp" + > + </File> + <File + RelativePath=".\core\mlib\specfun.cpp" + > + </File> + <File RelativePath=".\core\mlib\stack.cpp" > *************** *** 543,550 **** > <File - RelativePath=".\chkstack.h" - > - </File> - <File RelativePath=".\core_tables.h" > --- 602,605 ---- *************** *** 558,601 **** > <File - RelativePath=".\include\cmatrix.h" - > - </File> - <File - RelativePath=".\include\complex.h" - > - </File> - <File RelativePath=".\include\dbutil.h" > </File> <File - RelativePath=".\include\integ.h" - > - </File> - <File - RelativePath=".\include\mathem.h" - > - </File> - <File - RelativePath=".\include\matrix.h" - > - </File> - <File - RelativePath=".\include\meqstack.h" - > - </File> - <File - RelativePath=".\include\segment.h" - > - </File> - <File - RelativePath=".\include\slist.h" - > - </File> - <File - RelativePath=".\include\specfun.h" - > - </File> - <File RelativePath=".\include\txtask.h" > --- 613,620 ---- *************** *** 661,664 **** --- 680,687 ---- > </File> + <File + RelativePath=".\compat\segment.h" + > + </File> </Filter> <Filter *************** *** 670,673 **** --- 693,704 ---- </File> <File + RelativePath=".\core\calc.h" + > + </File> + <File + RelativePath=".\core\chkstack.h" + > + </File> + <File RelativePath=".\core\core_display.h" > *************** *** 705,708 **** --- 736,747 ---- </File> <File + RelativePath=".\core\mlib\cmatrix.h" + > + </File> + <File + RelativePath=".\core\mlib\complex.h" + > + </File> + <File RelativePath=".\core\mlib\defuns.h" > *************** *** 713,716 **** --- 752,759 ---- </File> <File + RelativePath=".\core\mlib\fl_num.h" + > + </File> + <File RelativePath=".\core\mlib\fp.h" > *************** *** 725,732 **** --- 768,799 ---- </File> <File + RelativePath=".\core\mlib\integ.h" + > + </File> + <File RelativePath=".\core\mlib\konvert.h" > </File> <File + RelativePath=".\core\mlib\mathem.h" + > + </File> + <File + RelativePath=".\core\mlib\matrix.h" + > + </File> + <File + RelativePath=".\core\mlib\meqstack.h" + > + </File> + <File + RelativePath=".\core\mlib\slist.h" + > + </File> + <File + RelativePath=".\core\mlib\specfun.h" + > + </File> + <File RelativePath=".\core\mlib\stack.h" > |
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14983 Modified Files: EasyCalc.cpp EasyCalc.gif EasyCalc.h EasyCalc.layout EasyCalcppc.rc resourceppc.h Skin.cpp Skin.h Added Files: EasyCalcppc.aps Log Message: Subset of the code, compiling, but not yet linking Index: EasyCalc.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyCalc.h 22 Jun 2009 22:13:35 -0000 1.1 --- EasyCalc.h 24 Sep 2009 21:19:19 -0000 1.2 *************** *** 123,129 **** --- 123,152 ---- #define EASYCALC_VERSION 1 + /* Forms .. */ + #define varEntryForm 1 + #define defForm 2 + #define altAnsProblem 3 + #define altGuessNotFound 4 + #define altBadVariableName 5 + #define altConfirmDelete 6 + #define altConfirmOverwrite 7 + #define altCompute 8 + #define altBadParameter 9 + #define FrmAlert FrmPopupForm + int FrmPopupForm(int formNb, void *hWnd_p); + int FrmCustomAlert(int formNb, const TCHAR *s1, const TCHAR *s2, const TCHAR *s3, void *hWnd_p); + + #ifndef _EASYCALC_C_ + #include "compat/Lang.h" + extern LibLang *libLang; + #endif + + #include "compat/PalmOS.h" + #include "core/mlib/konvert.h" void shell_beeper(int frequency, int duration); void shell_annunciators(int skin, int shf, int angle_mode, int int_mode, int run) SHELL1_SECT; void shell_powerdown() SHELL1_SECT; + void alertErrorMessage(CError err); + void ErrFatalDisplayIf(int cond, TCHAR *msg); #endif --- NEW FILE: EasyCalcppc.aps --- (This appears to be a binary file; contents omitted.) Index: EasyCalc.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyCalc.cpp 22 Jun 2009 22:13:35 -0000 1.1 --- EasyCalc.cpp 24 Sep 2009 21:19:19 -0000 1.2 *************** *** 31,41 **** // #include "afxwin.h" #include "compat/PalmOS.h" #include "EasyCalc.h" #include "StateManager.h" #include "system - UI/Skin.h" #include "compat/Lang.h" ! #include "core_main.h" ! #include "core_display.h" #include "defuns.h" [...1889 lines suppressed...] ! } ! } ! return (res); ! } ! ! default: ! return (DefWindowProc(hDlg, message, wParam, lParam)); ! // return (FALSE); } *************** *** 1202,1204 **** core_keytimeout2(); timer = 0; ! } \ No newline at end of file --- 2601,2603 ---- core_keytimeout2(); timer = 0; ! } Index: Skin.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Skin.h 6 Aug 2009 21:42:56 -0000 1.3 --- Skin.h 24 Sep 2009 21:19:19 -0000 1.4 *************** *** 107,112 **** SkinMacro *macrolist; // Array of macros specified in the layout file SkinAnnunciator annunciators[NB_ANNUN]; // Array of annunciators - TCHAR resMenuDesc[SELECTION_COUNT][MAX_RSCLEN]; // Array of translated stings for the result - // actions menu. FILE *external_file; // Handle for external file, if not an internal file --- 107,110 ---- *************** *** 146,150 **** int gets(char *buf, int buflen); int make_dib(HDC hdc); - TCHAR *print_error(CError err); public: --- 144,147 ---- *************** *** 172,187 **** COLORREF getDisplayBgColor(); void create_input_area(HWND hwnd, HINSTANCE hinst); ! void select_input_text(); ! void insert_input_text(TCHAR *text); ! void set_input_text(TCHAR *text); TCHAR *get_input_text(); ! void print_result(HDC hdc, TCHAR *res_text); void print_result(HDC hdc); ! void print_resultpowInit(HDC hdc, TCHAR *res_text); void print_resultpowNext(bool smallf, TCHAR *res_piece, int len); TCHAR *get_result(); ! int resultActionsPopup(resSelection choices[], int length); void display_set_enabled(bool enable); - void alertErrorMessage(CError err); }; --- 169,192 ---- COLORREF getDisplayBgColor(); void create_input_area(HWND hwnd, HINSTANCE hinst); ! void select_input_text(void *hwnd); ! void select_input_text(void *hwnd, unsigned long start, unsigned long end); ! void get_select_text(void *hwnd, unsigned long *start, unsigned long *end); ! unsigned long get_insert_pos(void *hwnd); ! void set_insert_pos(void *hwnd, unsigned long pos); ! void insert_input_text(void *hwnd, const TCHAR *text); ! void set_input_text(void *hwnd, const TCHAR *text); TCHAR *get_input_text(); ! void print_result(void *hWnd_p, TCHAR *res_text); void print_result(HDC hdc); ! void print_resultpowInit(void *hdc, TCHAR *res_text); void print_resultpowNext(bool smallf, TCHAR *res_piece, int len); TCHAR *get_result(); ! void clipCopy_result(); ! void resultActionsPopup(resSelection choices[], int length, void *hWnd_p); ! void historyAddActionPopup(TCHAR *description, void *hWnd); ! void varSavePopup(TCHAR *choices[], int length, void *hWnd); ! void varMgrPopup(TCHAR *choices[], int length, void *hWnd); ! void varDefList(TCHAR *name, TCHAR *deftext, int itemNum, void *hWnd); void display_set_enabled(bool enable); }; Index: EasyCalcppc.rc =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalcppc.rc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyCalcppc.rc 22 Jun 2009 22:13:35 -0000 1.1 --- EasyCalcppc.rc 24 Sep 2009 21:19:19 -0000 1.2 *************** *** 17,25 **** ///////////////////////////////////////////////////////////////////////////// ! // English (U.S.) resources ! #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 ! LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 --- 17,25 ---- ///////////////////////////////////////////////////////////////////////////// ! // Neutral resources ! #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) #ifdef _WIN32 ! LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 *************** *** 27,70 **** ///////////////////////////////////////////////////////////////////////////// // ! // Icon // ! // Icon with lowest ID value placed first to ensure application icon ! // remains consistent on all systems. ! IDI_EASYCALC ICON "EasyCalc.ico" ///////////////////////////////////////////////////////////////////////////// // ! // Menu // ! IDR_MENU MENU BEGIN ! POPUP "File" BEGIN ! MENUITEM "Exit", IDM_FILE_EXIT END ! POPUP "Edit" BEGIN ! MENUITEM "Options", IDM_EDIT_OPTIONS END ! POPUP "Help" BEGIN ! MENUITEM "About EasyCalc...", IDM_HELP_ABOUT END - END ///////////////////////////////////////////////////////////////////////////// - // - // Accelerator - // - IDC_EASYCALC ACCELERATORS - BEGIN - "Q", IDM_FILE_EXIT, VIRTKEY, CONTROL, NOINVERT - "A", IDM_HELP_ABOUT, VIRTKEY, CONTROL, NOINVERT - END ///////////////////////////////////////////////////////////////////////////// --- 27,180 ---- ///////////////////////////////////////////////////////////////////////////// // ! // Dialog // ! IDD_OPT_GENERAL DIALOG 0, 0, 139, 181 ! STYLE DS_SETFONT | WS_POPUP | WS_CAPTION ! CAPTION "General" ! FONT 8, "System" ! BEGIN ! LTEXT "General",IDC_TITLE,4,3,63,8 ! CONTROL "Dynamic mouse",IDC_CHECK_MOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,42,83,10 ! END ! ! IDD_RES_MENU DIALOG 30, 10, 81, 108 ! STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP ! FONT 8, "MS Shell Dlg" ! BEGIN ! LISTBOX IDC_LIST_RESM,0,0,81,108,NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_DLGMODALFRAME ! END ! ! IDD_VARENTRY DIALOG 0, 0, 230, 79 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Save variable as" ! FONT 8, "MS Shell Dlg" ! BEGIN ! DEFPUSHBUTTON "OK",IDOK,7,58,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,173,58,50,14 ! COMBOBOX IDC_VARCOMBO,7,19,216,34,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! LTEXT "Name:",IDC_VARNAME,7,7,216,12 ! END ! ! IDD_EDITVAR DIALOG 0, 0, 230, 92 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Edit variable" ! FONT 8, "MS Shell Dlg" ! BEGIN ! DEFPUSHBUTTON "OK",IDOK,7,71,50,14 ! PUSHBUTTON "V",IDC_VAR,175,71,16,14 ! PUSHBUTTON "F",IDC_USERF,191,71,16,14 ! PUSHBUTTON "f",IDC_CALCF,207,71,16,14 ! LTEXT "Name:",IDC_VARNAME,7,9,25,8 ! EDITTEXT IDC_EDIT1,34,7,95,14,ES_AUTOHSCROLL ! EDITTEXT IDC_EDIT2,7,24,216,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL ! PUSHBUTTON "Cancel",IDCANCEL,61,71,50,14 ! END ! ! IDD_DATAMGR DIALOG 0, 0, 230, 231 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Data manager" ! FONT 8, "MS Shell Dlg" ! BEGIN ! DEFPUSHBUTTON "OK",IDOK,7,210,50,14 ! CONTROL "",IDC_DATALIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,216,196 ! PUSHBUTTON "New",IDC_NEW,63,210,50,14 ! PUSHBUTTON "Modify",IDC_MODIFY,118,210,50,14 ! PUSHBUTTON "Delete",IDC_DELETE,173,210,50,14 ! LISTBOX IDC_LIST_FV,63,190,50,20,NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_DLGMODALFRAME ! END ! ! IDD_EDITFCT DIALOG 0, 0, 230, 92 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU ! CAPTION "Edit function" ! FONT 8, "MS Shell Dlg" ! BEGIN ! DEFPUSHBUTTON "OK",IDOK,7,71,50,14 ! PUSHBUTTON "V",IDC_VAR,175,71,16,14 ! PUSHBUTTON "F",IDC_USERF,191,71,16,14 ! PUSHBUTTON "f",IDC_CALCF,207,71,16,14 ! LTEXT "Name:",IDC_VARNAME,7,9,25,8 ! EDITTEXT IDC_EDIT1,34,7,95,14,ES_AUTOHSCROLL ! EDITTEXT IDC_EDIT2,7,24,216,43,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL ! PUSHBUTTON "Cancel",IDCANCEL,61,71,50,14 ! LTEXT "Param:",IDC_PARAM,140,9,24,8 ! EDITTEXT IDC_EDIT3,169,7,54,14,ES_AUTOHSCROLL ! END ! ! IDD_LARGE_MENU DIALOG 30, 10, 144, 116 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP ! FONT 8, "MS Shell Dlg" ! BEGIN ! LISTBOX IDC_LIST_LARGE,0,0,144,116,LBS_DISABLENOSCROLL | NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_DLGMODALFRAME ! END ! ! IDD_SLIM_MENU DIALOG 30, 10, 72, 244 ! STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP ! FONT 8, "MS Shell Dlg" ! BEGIN ! LISTBOX IDC_LIST_SLIM,0,0,72,244,LBS_DISABLENOSCROLL | NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_DLGMODALFRAME ! END ! ///////////////////////////////////////////////////////////////////////////// // ! // DESIGNINFO // ! #ifdef APSTUDIO_INVOKED ! GUIDELINES DESIGNINFO BEGIN ! IDD_VARENTRY, DIALOG BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 223 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 72 END ! ! IDD_EDITVAR, DIALOG BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 223 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 85 END ! ! IDD_DATAMGR, DIALOG BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 223 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 224 END + IDD_EDITFCT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 223 + TOPMARGIN, 7 + BOTTOMMARGIN, 85 + END + + IDD_LARGE_MENU, DIALOG + BEGIN + RIGHTMARGIN, 81 + BOTTOMMARGIN, 108 + END + END + #endif // APSTUDIO_INVOKED + #endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////// + // English (U.S.) resources + + #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) + #ifdef _WIN32 + LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + #pragma code_page(1252) + #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// *************** *** 80,85 **** BEGIN ICON IDI_EASYCALC,IDC_STATIC_1,12,12,21,20,SS_REALSIZEIMAGE ! LTEXT "EasyCalc Version 1.25",IDC_STATIC_2,12,36,78,8,SS_NOPREFIX ! LTEXT "Copyright (C) 2008",IDC_STATIC_3,12,48,66,8 END --- 190,195 ---- BEGIN ICON IDI_EASYCALC,IDC_STATIC_1,12,12,21,20,SS_REALSIZEIMAGE ! LTEXT "EasyCalc Version 1.25 PPC",IDC_STATIC_2,12,36,100,8,SS_NOPREFIX ! LTEXT "Copyright (C) 2009",IDC_STATIC_3,12,48,66,8 END *************** *** 95,107 **** END - IDD_OPT_GENERAL DIALOG 0, 0, 139, 181 - STYLE DS_SETFONT | WS_POPUP | WS_CAPTION - CAPTION "General" - FONT 8, "System" - BEGIN - LTEXT "General",IDC_TITLE,4,3,63,8 - CONTROL "Dynamic mouse",IDC_CHECK_MOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,42,83,10 - END - IDD_OPT_SKINS DIALOG 0, 0, 139, 181 STYLE DS_SETFONT | WS_POPUP | WS_CAPTION --- 205,208 ---- *************** *** 146,149 **** --- 247,293 ---- + ///////////////////////////////////////////////////////////////////////////// + // + // Icon + // + + // Icon with lowest ID value placed first to ensure application icon + // remains consistent on all systems. + IDI_EASYCALC ICON "EasyCalc.ico" + + ///////////////////////////////////////////////////////////////////////////// + // + // Menu + // + + IDR_MENU MENU + BEGIN + POPUP "File" + BEGIN + MENUITEM "Exit", IDM_FILE_EXIT + END + POPUP "Edit" + BEGIN + MENUITEM "Options", IDM_EDIT_OPTIONS + END + POPUP "Help" + BEGIN + MENUITEM "About EasyCalc...", IDM_HELP_ABOUT + END + END + + + ///////////////////////////////////////////////////////////////////////////// + // + // Accelerator + // + + IDC_EASYCALC ACCELERATORS + BEGIN + "Q", IDM_FILE_EXIT, VIRTKEY, CONTROL, NOINVERT + "A", IDM_HELP_ABOUT, VIRTKEY, CONTROL, NOINVERT + END + + #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// *************** *** 203,233 **** ///////////////////////////////////////////////////////////////////////////// - // French (France) resources - - #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) - #ifdef _WIN32 - LANGUAGE LANG_FRENCH, SUBLANG_FRENCH - #pragma code_page(1252) - #endif //_WIN32 - - ///////////////////////////////////////////////////////////////////////////// - // - // Dialog - // - - IDD_RES_MENU DIALOG 30, 10, 82, 112 - STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_BORDER - FONT 8, "MS Shell Dlg" - BEGIN - DEFPUSHBUTTON "OK",IDOK,0,98,28,14 - PUSHBUTTON "Cancel",IDCANCEL,50,98,32,14 - LISTBOX IDC_LIST1,0,0,81,98,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP - END - - #endif // French (France) resources - ///////////////////////////////////////////////////////////////////////////// - - - ///////////////////////////////////////////////////////////////////////////// // Farsi resources --- 347,350 ---- Index: EasyCalc.layout =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.layout,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyCalc.layout 22 Jun 2009 22:13:35 -0000 1.1 --- EasyCalc.layout 24 Sep 2009 21:19:19 -0000 1.2 *************** *** 20,29 **** Annunciator: 12 226,6,6,7 15,268 15,275 # Graph indicator Annunciator: 13 226,26,7,7 127,268 127,275 # Result Menu indicator # Keys on the calculator gif: ! # num x1_sel,y1_sel,l_sel,h_sel (selection zone) x1_off,y1_off,l,h x1_on,y1_on ! Key: 1 6,70,32,22 11,75,22,12 11,74 ! Key: 2 45,70,32,22 50,75,22,12 50,74 ! Key: 3 84,70,32,22 89,75,22,12 89,74 Key: 4 123,70,32,22 128,75,22,12 128,74 Key: 5 162,70,32,22 167,75,22,12 167,74 --- 20,181 ---- Annunciator: 12 226,6,6,7 15,268 15,275 # Graph indicator Annunciator: 13 226,26,7,7 127,268 127,275 # Result Menu indicator + Annunciator: 14 226,34,7,7 133,268 133,275 # History Menu indicator # Keys on the calculator gif: ! # num[, shifted_num] x1_sel,y1_sel,l_sel,h_sel (selection zone) x1_off,y1_off,l,h x1_on,y1_on ! # with num and shifted_num as follows: ! # 1 -> 0,"0" ! # 2 -> 1,"1" ! # 3 -> 2,"2" ! # 4 -> 3,"3" ! # 5 -> 4,"4" ! # 6 -> 5,"5" ! # 7 -> 6,"6" ! # 8 -> 7,"7" ! # 9 -> 8,"8" ! # 10 -> 9,"9" ! # 11 -> A,"A" ! # 12 -> B,"B" ! # 13 -> C,"C" ! # 14 -> D,"D" ! # 15 -> E,"E" ! # 16 -> F,"F" ! # 17 -> And,"&" ! # 18 -> Or,"|" ! # 19 -> Xor,"^" ! # 20 -> Shl,"<<" ! # 21 -> Shr,">>" ! # 22 -> Plus,"+" ! # 23 -> Minus,"-" ! # 24 -> Neg,"-" ! # 25 -> Mult,"*" ! # 26 -> Divide,"/" ! # 27 -> Ans,"ans" ! # 28 -> OpBr,"" ! # 29 -> Pow,"^" ! # 30 -> Log,"log" ! # 31 -> Ln,"ln" ! # 32 -> Inv,"^(-1)" ! # 33 -> Sq1,"^(1/" ! # 34 -> Sqr,"^2" ! # 35 -> Sqrt,"sqrt" ! # 36 -> Sin,"sin" ! # 37 -> Cos,"cos" ! # 38 -> Tan,"tan" ! # 39 -> Exp,"exp" ! # 40 -> Fact,"fact" ! # 41 -> Pi,"pi" ! # 42 -> Degrees,"°" ! # 43 -> Minutes,"'" ! # 44 -> Magnitude,"abs" ! # 45 -> Angle,"angle" ! # 46 -> complex_i,"i" ! # 47 -> Coln,":" ! # 48 -> ClBr,")" ! # 49 -> EE,"E" ! # 50 -> asin ! # 51 -> acos ! # 52 -> atan ! # 53 -> sinh ! # 54 -> cosh ! # 55 -> tanh ! # 56 -> asinh ! # 57 -> acosh ! # 58 -> atanh ! # 59 -> log ! # 60 -> 10^ ! # 61 -> log2 ! # 62 -> 2^ ! # 63 -> fact ! # 64 -> ncr ! # 65 -> npr ! # 66 -> round ! # 67 -> trunc ! # 68 -> floor ! # 69 -> gamma ! # 70 -> beta ! # 71 -> rand ! # 72 -> rNorm ! # 73 -> real ! # 74 -> imag ! # 75 -> conj ! # 76 -> exp(i* ! # 77 -> fzero ! # 78 -> fvalue ! # 79 -> fmin ! # 80 -> fmax ! # 81 -> fd_dx // d/dx ! # 82 -> fromberg // integ ! # 83 -> fd2_dx // d2/dx ! # 84 -> ()=" ! # 85 -> " ! # 86 -> x ! # 87 -> list ! # 88 -> median ! # 89 -> mean ! # 90 -> sum ! # 91 -> lmin // min ! # 92 -> lmax // max ! # 93 -> prod ! # 94 -> variance ! # 95 -> stddev ! # 96 -> dim ! # 97 -> [ ! # 98 -> matrix ! # 99 -> identity ! # 100 -> det ! # 101 -> qrs ! # 102 -> rref ! # 103 -> qrq ! # 104 -> qrr ! # 105 -> [ // x[] ! # 106 -> ] ! # 107 -> qBinomial ! # 108 -> qBeta ! # 109 -> qChiSq ! # 110 -> qF ! # 111 -> qPoisson ! # 112 -> qStudentt ! # 113 -> qWeibull ! # 114 -> qNormal ! # 115 -> range ! # 116 -> rNorm ! # 117 -> find ! # 118 -> sample ! # 119 -> filter ! # 120 -> conv ! # 121 -> fft ! # 122 -> ifft ! # 123 -> prevprime ! # 124 -> isprime ! # 125 -> nextprime ! # 126 -> gcd ! # 127 -> lcm ! # 128 -> phi ! # 129 -> gcdex ! # 130 -> chinese ! # 131 -> modinv ! # 132 -> modpow ! # 133 -> factor ! # 134 -> besseli ! # 135 -> besselj ! # 136 -> besselk ! # 137 -> bessely ! # 138 -> ellc1 ! # 139 -> ellc2 ! # 140 -> elli1 ! # 141 -> elli2 ! # 142 -> euler ! # 143 -> cn ! # 144 -> dn ! # 145 -> sn ! # 146 -> igamma ! # 147 -> ibeta ! # 148 -> erf ! # 149 -> erfc ! # ! key: 1 6,70,32,22 11,75,22,12 11,74 ! key: 2 45,70,32,22 50,75,22,12 50,74 ! key: 3 84,70,32,22 89,75,22,12 89,74 Key: 4 123,70,32,22 128,75,22,12 128,74 Key: 5 162,70,32,22 167,75,22,12 167,74 Index: EasyCalc.gif =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/EasyCalc.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsxwvs51 and /tmp/cvsWqNTmU differ Index: resourceppc.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/resourceppc.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** resourceppc.h 22 Jun 2009 22:13:35 -0000 1.1 --- resourceppc.h 24 Sep 2009 21:19:19 -0000 1.2 *************** *** 15,18 **** --- 15,25 ---- #define IDD_OPT_SKINS 132 #define IDD_RES_MENU 134 + #define IDD_VARENTRY 137 + #define IDD_EDITVAR 138 + #define IDD_DATAMGR 139 + #define IDD_EDITFCT 140 + #define IDD_RES_MENU1 141 + #define IDD_LARGE_MENU 141 + #define IDD_SLIM_MENU 142 #define IDC_STATIC_1 201 #define IDC_STATIC_2 202 *************** *** 26,29 **** --- 33,53 ---- #define IDC_SKIN1 1022 #define IDC_LIST1 1023 + #define IDC_LIST_FV 1023 + #define IDC_LIST_RESM 1034 + #define IDC_VARCOMBO 1037 + #define IDC_DATALIST 1043 + #define IDC_NEW 1044 + #define IDC_MODIFY 1045 + #define IDC_DELETE 1046 + #define IDC_EDIT1 1047 + #define IDC_EDIT2 1048 + #define IDC_RCL 1053 + #define IDC_USERF 1054 + #define IDC_CALCF 1055 + #define IDC_PARAM 1056 + #define IDC_EDIT3 1057 + #define IDC_LIST_LARGE 1058 + #define IDC_LIST_SLIM 1059 + #define IDC_VAR 1060 #define ID_TEST_TEST 32771 #define ID_EDIT_CANCEL 32772 *************** *** 38,41 **** --- 62,66 ---- #define IDM_EDIT 40004 #define IDC_TITLE -1 + #define IDC_VARNAME -1 // Next default values for new objects *************** *** 44,50 **** #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 ! #define _APS_NEXT_RESOURCE_VALUE 135 #define _APS_NEXT_COMMAND_VALUE 32778 ! #define _APS_NEXT_CONTROL_VALUE 1034 #define _APS_NEXT_SYMED_VALUE 112 #endif --- 69,75 ---- #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 ! #define _APS_NEXT_RESOURCE_VALUE 138 #define _APS_NEXT_COMMAND_VALUE 32778 ! #define _APS_NEXT_CONTROL_VALUE 1061 #define _APS_NEXT_SYMED_VALUE 112 #endif Index: Skin.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Skin.cpp 6 Aug 2009 21:42:56 -0000 1.3 --- Skin.cpp 24 Sep 2009 21:19:19 -0000 1.4 *************** *** 25,31 **** #include <string.h> ! #include "compat\PalmOS.h" #include "Skin.h" #include "shell_loadimage.h" --- 25,33 ---- #include <string.h> ! #include "compat/PalmOS.h" ! #include "compat/Lang.h" #include "Skin.h" #include "shell_loadimage.h" + #include "core/core_display.h" *************** *** 38,41 **** --- 40,48 ---- /**********************************************************/ + /* Language objects, as manipulated by EasyCall.cpp. */ + /**********************************************************/ + extern LibLang *libLang; + + /**********************************************************/ /* Linked-in skins; defined in the skins.c, which in turn */ /* is generated by skin2c.c under control of skin2c.conf */ *************** *** 560,584 **** // TODO - handle memory allocation failure memset(disp_bitmap, 255, size); - - /***************************************/ - /* Load the language resource strings, */ - /* and pick the current ones. */ - /***************************************/ - // For now, all is stored here. Later, I will implement a mechanism - // to read from a text language file, which should be the concatenation - // of the .rcp language files from the original application, and able to - // read their syntax. - // To be done when taking care of multilangual support (need also to - // think about how to rename the resources from the windows resource file). - _tcsncpy(resMenuDesc[COPYRESULT], _T("Copy"), MAX_RSCLEN); - _tcsncpy(resMenuDesc[VARSAVEAS], _T("Save as"), MAX_RSCLEN); - _tcsncpy(resMenuDesc[DEFMGR], _T("DataMgr"), MAX_RSCLEN); - _tcsncpy(resMenuDesc[GUESSIT], _T("GuessIt"), MAX_RSCLEN); - _tcsncpy(resMenuDesc[TODEGREE], _T("->Degree"), MAX_RSCLEN); - _tcsncpy(resMenuDesc[TORADIAN], _T("->Radian"), MAX_RSCLEN); - _tcsncpy(resMenuDesc[TOGONIO], _T("->c()+isin()"), MAX_RSCLEN); - _tcsncpy(resMenuDesc[TOCIS], _T("->e^(ix)"), MAX_RSCLEN); - _tcsncpy(resMenuDesc[ENGDISPLAY], _T("EngDisplay"), MAX_RSCLEN); - _tcsncpy(resMenuDesc[TODEGREE2], _T("->Degree2"), MAX_RSCLEN); } --- 567,570 ---- *************** *** 953,957 **** // Special handling for the skin and menu annunciators, they are always visible or selected ! if ((which >= ANN_S1) && (which <= ANN_SG)) { state += 1; if (state > 2) state = 2; --- 939,943 ---- // Special handling for the skin and menu annunciators, they are always visible or selected ! if ((which >= ANN_S1) && (which <= ANN_HSTMENU)) { state += 1; if (state > 2) state = 2; *************** *** 1132,1140 **** * OS specific: create the result text zone in the display area. * ********************************************************************************/ ! void Skin::create_input_area(HWND hwnd_p, HINSTANCE hinst) { DWORD dwStyle = WS_VISIBLE | WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | ES_LEFT; hwndE = CreateWindow(_T("EDIT2"), NULL, dwStyle, display_loc.x, display_loc.y + 18, display_w, 30, ! hwnd_p, NULL, hinst, NULL); Edit_SetExtendedStyle(hwndE, 0xFFFFFFFF, Edit_GetExtendedStyle(hwndE) | ES_EX_FOCUSBORDERDISABLED); --- 1118,1126 ---- * OS specific: create the result text zone in the display area. * ********************************************************************************/ ! void Skin::create_input_area(HWND hWnd_p, HINSTANCE hinst) { DWORD dwStyle = WS_VISIBLE | WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | ES_LEFT; hwndE = CreateWindow(_T("EDIT2"), NULL, dwStyle, display_loc.x, display_loc.y + 18, display_w, 30, ! hWnd_p, NULL, hinst, NULL); Edit_SetExtendedStyle(hwndE, 0xFFFFFFFF, Edit_GetExtendedStyle(hwndE) | ES_EX_FOCUSBORDERDISABLED); *************** *** 1152,1157 **** TCHAR buf[100]; int nchar = GetClassName(hwndE, buf, 100); ! HDC hdc = GetDC(hwnd_p); ! print_result(hdc, buf); // return (hwndE); --- 1138,1142 ---- TCHAR buf[100]; int nchar = GetClassName(hwndE, buf, 100); ! print_result(hWnd_p, buf); // return (hwndE); *************** *** 1159,1180 **** /******************************************************************************** ! * OS specific: selects all the text in the input area Edit Control. * ********************************************************************************/ ! void Skin::select_input_text() { ! long res = SendMessage (hwndE, EM_SETSEL, (WPARAM) 0, (LPARAM) -1); } /******************************************************************************** ! * OS specific: inserts text in the input area Edit Control at the cursor. * ********************************************************************************/ ! void Skin::insert_input_text(TCHAR *text) { ! long res = SendMessage (hwndE, EM_REPLACESEL, (WPARAM) TRUE, (LPARAM) text); } /******************************************************************************** ! * OS specific: sets text in the input area Edit Control. * ********************************************************************************/ ! void Skin::set_input_text(TCHAR *text) { ! BOOL res = SetWindowText (hwndE, text); } --- 1144,1230 ---- /******************************************************************************** ! * OS specific: selects all the text in the Edit Control passed as parameter. * ! * If parameter is NULL, this is the input area Edit Control. * ********************************************************************************/ ! void Skin::select_input_text(void *hwnd) { ! HWND hwnd_edit = (HWND) hwnd; ! if (hwnd_edit == NULL) ! hwnd_edit = hwndE; ! long res = SendMessage (hwnd_edit, EM_SETSEL, (WPARAM) 0, (LPARAM) -1); ! res = SendMessage (hwnd_edit, EM_SCROLLCARET, (WPARAM) 0, (LPARAM) 0); } /******************************************************************************** ! * OS specific: selects some text in the the Edit Control passed as parameter. * ! * If parameter is NULL, this is the input area Edit Control. * ********************************************************************************/ ! void Skin::select_input_text(void *hwnd, unsigned long start, unsigned long end) { ! HWND hwnd_edit = (HWND) hwnd; ! if (hwnd_edit == NULL) ! hwnd_edit = hwndE; ! long res = SendMessage (hwnd_edit, EM_SETSEL, (WPARAM) start, (LPARAM) end); ! res = SendMessage (hwnd_edit, EM_SCROLLCARET, (WPARAM) 0, (LPARAM) 0); } /******************************************************************************** ! * OS specific: get boundaries of selected text in the Edit Control passed as * ! * parameter. * ! * If parameter is NULL, this is the input area Edit Control. * ********************************************************************************/ ! void Skin::get_select_text(void *hwnd, unsigned long *start, unsigned long *end) { ! HWND hwnd_edit = (HWND) hwnd; ! if (hwnd_edit == NULL) ! hwnd_edit = hwndE; ! long res = SendMessage (hwnd_edit, EM_GETSEL, (WPARAM) start, (LPARAM) end); ! } ! ! /******************************************************************************** ! * OS specific: get boundaries of selected text in the Edit Control passed as * ! * parameter. * ! * If parameter is NULL, this is the input area Edit Control. * ! ********************************************************************************/ ! unsigned long Skin::get_insert_pos(void *hwnd) { ! HWND hwnd_edit = (HWND) hwnd; ! if (hwnd_edit == NULL) ! hwnd_edit = hwndE; ! ! unsigned long pos; ! long res = SendMessage (hwnd_edit, EM_GETSEL, (WPARAM) &pos, (LPARAM) NULL); ! return (pos); ! } ! ! /******************************************************************************** ! * OS specific: set cursor position in the Edit Control passed as parameter. * ! * If parameter is NULL, this is the input area Edit Control. * ! ********************************************************************************/ ! void Skin::set_insert_pos(void *hwnd, unsigned long pos) { ! HWND hwnd_edit = (HWND) hwnd; ! if (hwnd_edit == NULL) ! hwnd_edit = hwndE; ! ! long res = SendMessage (hwnd_edit, EM_SETSEL, (WPARAM) pos, (LPARAM) pos); ! } ! ! /******************************************************************************** ! * OS specific: inserts text in the Edit Control passed as parameter, at the * ! * cursor (replacing selected text if any). * ! * If parameter is NULL, this is the input area Edit Control. * ! ********************************************************************************/ ! void Skin::insert_input_text(void *hwnd, const TCHAR *text) { ! HWND hwnd_edit = (HWND) hwnd; ! if (hwnd_edit == NULL) ! hwnd_edit = hwndE; ! long res = SendMessage (hwnd_edit, EM_REPLACESEL, (WPARAM) TRUE, (LPARAM) text); ! } ! ! /******************************************************************************** ! * OS specific: sets text in the Edit Control passed as parameter, replacing all* ! * If parameter is NULL, this is the input area Edit Control. * ! ********************************************************************************/ ! void Skin::set_input_text(void *hwnd, const TCHAR *text) { ! HWND hwnd_edit = (HWND) hwnd; ! if (hwnd_edit == NULL) ! hwnd_edit = hwndE; ! BOOL res = SetWindowText (hwnd_edit, text); } *************** *** 1190,1196 **** * OS specific: display the specified result text in the display area. * ********************************************************************************/ ! void Skin::print_result(HDC hdc, TCHAR *res_text) { // Save the text and call the main method _tcscpy (dispResult, res_text); print_result(hdc); } --- 1240,1247 ---- * OS specific: display the specified result text in the display area. * ********************************************************************************/ ! void Skin::print_result(void *hWnd_p, TCHAR *res_text) { // Save the text and call the main method _tcscpy (dispResult, res_text); + HDC hdc = GetDC((HWND) hWnd_p); print_result(hdc); } *************** *** 1223,1230 **** * OS specific: initialize the display of a result with power text. * ********************************************************************************/ ! void Skin::print_resultpowInit(HDC hdc, TCHAR *res_text) { _tcscpy (dispResult, res_text); // Keep the unformatted text in memory for buffer copy pow_pos = 0; ! pow_hdc = hdc; } --- 1274,1281 ---- * OS specific: initialize the display of a result with power text. * ********************************************************************************/ ! void Skin::print_resultpowInit(void *hWnd_p, TCHAR *res_text) { _tcscpy (dispResult, res_text); // Keep the unformatted text in memory for buffer copy pow_pos = 0; ! pow_hdc = GetDC((HWND) hWnd_p); } *************** *** 1240,1245 **** if (smallf) { // Set small colors and font ! oldFg = SetTextColor(hdc, display_fg); ! oldBg = SetBkMode(hdc, TRANSPARENT); // Clear out the lf structure to use when creating the font. memset(&lf, 0, sizeof(LOGFONT)); --- 1291,1296 ---- if (smallf) { // Set small colors and font ! oldFg = SetTextColor(pow_hdc, display_fg); ! oldBg = SetBkMode(pow_hdc, TRANSPARENT); // Clear out the lf structure to use when creating the font. memset(&lf, 0, sizeof(LOGFONT)); *************** *** 1248,1255 **** _tcscpy(lf.lfFaceName, _T("Tahoma")); hFontNew = CreateFontIndirect(&lf); ! oldFont = (HFONT)SelectObject(hdc, hFontNew); } else { // Set normal colors and font ! oldFg = SetTextColor(hdc, display_fg); ! oldBg = SetBkMode(hdc, TRANSPARENT); // Clear out the lf structure to use when creating the font. memset(&lf, 0, sizeof(LOGFONT)); --- 1299,1306 ---- _tcscpy(lf.lfFaceName, _T("Tahoma")); hFontNew = CreateFontIndirect(&lf); ! oldFont = (HFONT)SelectObject(pow_hdc, hFontNew); } else { // Set normal colors and font ! oldFg = SetTextColor(pow_hdc, display_fg); ! oldBg = SetBkMode(pow_hdc, TRANSPARENT); // Clear out the lf structure to use when creating the font. memset(&lf, 0, sizeof(LOGFONT)); *************** *** 1258,1262 **** _tcscpy(lf.lfFaceName, _T("Tahoma")); hFontNew = CreateFontIndirect(&lf); ! oldFont = (HFONT)SelectObject(hdc, hFontNew); } --- 1309,1313 ---- _tcscpy(lf.lfFaceName, _T("Tahoma")); hFontNew = CreateFontIndirect(&lf); ! oldFont = (HFONT)SelectObject(pow_hdc, hFontNew); } *************** *** 1288,1292 **** /******************************************************************************** ! * OS specific: get the result text from the display area. * ********************************************************************************/ TCHAR *Skin::get_result() { --- 1339,1343 ---- /******************************************************************************** ! * Get the result text from the display area. * ********************************************************************************/ TCHAR *Skin::get_result() { *************** *** 1295,1344 **** /******************************************************************************** ! * OS specific: displays the result actions menu and returns selection. * ! * (noListSelection is nothing is selected). * ********************************************************************************/ ! int Skin::resultActionsPopup(resSelection choices[], int length) { ! TCHAR *description[SELECTION_COUNT]; ! ListPtr list; ! int i; for (i=0 ; i<length ; i++) { ! description[i] = (TCHAR *) MemPtrNew(MAX_RSCLEN); ! SysStringByIndex(resMenuDesc+choices[i], ! description[i], ! MAX_RSCLEN-1); } - list = GetObjectPtr(calcResList); - LstSetListChoices(list,description,count); - LstSetHeight(list,count); - for (i=0 ; i<count ; i++) - MemPtrFree(description[i]); - - return (noListSelection); } /******************************************************************************** ! * Enable or disable screen repaints. * ********************************************************************************/ ! void Skin::display_set_enabled(bool enable) { ! display_enabled = enable; } /******************************************************************************** ! * Print a system error on screen. * ********************************************************************************/ ! TCHAR *print_error(CError err) { ! TCHAR *res; ! res = MemPtrNew(MAX_RSCLEN); ! SysStringByIndex(strErrCodes,err,res,MAX_RSCLEN-1); ! return (res); } ! void alertErrorMessage(CError err) { ! Char *txt; ! txt = print_error(err); ! FrmCustomAlert(altErrorMsg, txt, NULL, NULL); ! MemPtrFree(txt); ! } \ No newline at end of file --- 1346,1420 ---- /******************************************************************************** ! * OS specific: put result text from the display area to the clipboard. * ********************************************************************************/ ! void Skin::clipCopy_result() { ! if (*dispResult != 0) { ! // Get the clipboard and put data in there ! EmptyClipboard(); ! HGLOBAL h = GlobalAlloc(GMEM_MOVEABLE, strlen((char *) dispResult)+1); // Using classical form to get real size in bytes ! SetClipboardData(CF_UNICODETEXT ,h); ! } ! } ! ! /******************************************************************************** ! * OS specific: displays the result actions menu. * ! ********************************************************************************/ ! void Skin::resultActionsPopup(resSelection choices[], int length, void *hWnd) { ! const TCHAR *description; ! int i; for (i=0 ; i<length ; i++) { ! description = libLang->translate(resMenuDesc[choices[i]]); ! SendMessage((HWND) hWnd, LB_ADDSTRING, 0, (LPARAM) description); } } /******************************************************************************** ! * OS specific: displays the result actions menu. * ********************************************************************************/ ! void Skin::historyAddActionPopup(TCHAR *description, void *hWnd) { ! SendMessage((HWND) hWnd, LB_ADDSTRING, 0, (LPARAM) description); } /******************************************************************************** ! * OS specific: displays the varSave values menu. * ********************************************************************************/ ! void Skin::varSavePopup(TCHAR *choices[], int length, void *hWnd) { ! for (int i=0 ; i<length ; i++) { ! SendMessage((HWND) hWnd, CB_ADDSTRING, 0, (LPARAM) choices[i]); ! } ! } ! /******************************************************************************** ! * OS specific: displays the varMgr values menu. * ! ********************************************************************************/ ! void Skin::varMgrPopup(TCHAR *choices[], int length, void *hWnd) { ! for (int i=0 ; i<length ; i++) { ! SendMessage((HWND) hWnd, LB_ADDSTRING, 0, (LPARAM) choices[i]); ! } } ! /******************************************************************************** ! * OS specific: displays the varDef list of values. * ! ********************************************************************************/ ! void Skin::varDefList(TCHAR *name, TCHAR *deftext, int itemNum, void *hWnd) { ! LVITEM lvi; ! lvi.mask = LVIF_TEXT; ! lvi.iItem = itemNum; ! lvi.iSubItem = 0; ! lvi.pszText = name; ! int i = SendMessage((HWND) hWnd, LVM_INSERTITEM, 0, (LPARAM) &lvi); ! lvi.mask = LVIF_TEXT; ! lvi.iItem = i; ! lvi.iSubItem = 1; ! lvi.pszText = deftext; ! SendMessage((HWND) hWnd, LVM_SETITEM, 0, (LPARAM) &lvi); ! } ! ! /******************************************************************************** ! * Enable or disable screen repaints. * ! ********************************************************************************/ ! void Skin::display_set_enabled(bool enable) { ! display_enabled = enable; ! } |
From: Mapi B. <ma...@us...> - 2009-09-24 21:18:23
|
Update of /cvsroot/easycalc/PPCport/langs/merge In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14739 Modified Files: lang.rcp Log Message: Subset of the code, compiling, but not yet linking Index: lang.rcp =================================================================== RCS file: /cvsroot/easycalc/PPCport/langs/merge/lang.rcp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lang.rcp 22 Jun 2009 22:05:28 -0000 1.1 --- lang.rcp 24 Sep 2009 21:18:13 -0000 1.2 *************** *** 4,38 **** BEGIN ! "$$OK" = "OK" ! "$$CANCEL" = "Storno" /************************************************** * PREFERENCES (19) * **************************************************/ ! "$$PREFERENCES TITLE" = "Nastavení" [...8549 lines suppressed...] ! "fintersect(min:max:f1:f2[:error]) - finds intersection of functions "\ ! "f1 and f2" /**************************************************/ "$$SOLVERHELP" = "The Solver is a tool, that helps you store equations "\ "and formulas and compute results in a convinient way. "\ ! "Create a new worksheet or select existing one from the drop-down "\ ! "menu. When the worksheet is selected, you can type in either formula "\ ! "(e.g. pi*r^2) or equation (e.g. x^2=x+2). Then tap the 'Update' "\ ! "button and the list of variables gets updated. If you wrote in formula, "\ ! "set up the variables and tap button 'Calculate'. If you entered equation, "\ ! "select the variable you want to solve and press button 'Solve'.\n\n"\ ! "You may annotate the function and the variables. Press the 'Note' button "\ ! "and add a note. If you start a new line with a name of variable and colon "\ ! "(e.g. 't: Time'), the rest of the line is treated as a description of the "\ ! "variable and shown to you when you select the variable in the list.\n\n"\ ! "The equation solving internally uses fzero() function, you can modify the "\ ! "parameters by tapping the 'Options' button." END |