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: Ton v. O. <tvo...@us...> - 2007-09-07 19:23:52
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17:/tmp/cvs-serv6178 Modified Files: VERSION Log Message: Start version 1.26. Index: VERSION =================================================================== RCS file: /cvsroot/easycalc/easycalc/VERSION,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** VERSION 7 Sep 2007 18:24:40 -0000 1.4 --- VERSION 7 Sep 2007 19:23:48 -0000 1.5 *************** *** 1 **** ! 1.25 --- 1 ---- ! 1.26cvs |
From: Ton v. O. <tvo...@us...> - 2007-09-07 18:24:44
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17:/tmp/cvs-serv15380 Modified Files: VERSION makedistro Log Message: Update for release of 1.25. Index: makedistro =================================================================== RCS file: /cvsroot/easycalc/easycalc/makedistro,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** makedistro 13 Sep 2006 14:34:41 -0000 1.2 --- makedistro 7 Sep 2007 18:24:40 -0000 1.3 *************** *** 15,20 **** cd /tmp cvs -z3 -d:ext:tvo...@ea.../cvsroot/easycalc export -r $1 easycalc ! # Move the tutorial directory ! mv /tmp/easycalc/tutorial /tmp/EasyCalc-$VERSION # Create source package cd /tmp --- 15,20 ---- cd /tmp cvs -z3 -d:ext:tvo...@ea.../cvsroot/easycalc export -r $1 easycalc ! # Move the manual directory ! mv /tmp/easycalc/manual /tmp/EasyCalc-$VERSION # Create source package cd /tmp Index: VERSION =================================================================== RCS file: /cvsroot/easycalc/easycalc/VERSION,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** VERSION 13 Sep 2006 15:41:28 -0000 1.3 --- VERSION 7 Sep 2007 18:24:40 -0000 1.4 *************** *** 1 **** ! 1.25cvs --- 1 ---- ! 1.25 |
From: Ton v. O. <tvo...@us...> - 2007-09-07 18:15:41
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17:/tmp/cvs-serv11318 Modified Files: funcs.c Log Message: Add missing #ifdef SPECFUN_ENABLED to make EasyCalc compile and link for the small version. Index: funcs.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/funcs.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** funcs.c 31 May 2007 00:03:37 -0000 1.52 --- funcs.c 7 Sep 2007 18:15:18 -0000 1.53 *************** *** 245,249 **** err = stack_add_val(tstack,&row,integer); err = stack_add_val(tstack,&col,integer); ! if(!err){ if(tmp.type==list) --- 245,249 ---- err = stack_add_val(tstack,&row,integer); err = stack_add_val(tstack,&col,integer); ! #ifdef SPECFUN_ENABLED if(!err){ if(tmp.type==list) *************** *** 254,257 **** --- 254,258 ---- err = cmatrix_item(func,tstack); } + #endif if(!err) *dest = stack_pop(tstack); *************** *** 474,478 **** else if(row==col){ err = stack_get_val(tstack,&lst->item[col-1],complex); ! }else{ List *lst2; err = stack_get_val(tstack,&lst2,list); --- 475,481 ---- else if(row==col){ err = stack_get_val(tstack,&lst->item[col-1],complex); ! } ! #ifdef SPECFUN_ENABLED ! else{ List *lst2; err = stack_get_val(tstack,&lst2,list); *************** *** 488,491 **** --- 491,495 ---- } } + #endif if (!err) db_write_variable(item2.u.litemval.name,tmp); *************** *** 496,499 **** --- 500,504 ---- else if(col && row) err = stack_get_val(tstack,&MATRIX(m,row-1,col-1),real); + #ifdef SPECFUN_ENABLED else{ List *lst; *************** *** 521,524 **** --- 526,530 ---- } } + #endif if (!err) db_write_variable(item2.u.litemval.name,tmp); *************** *** 529,532 **** --- 535,539 ---- else if(col && row) err = stack_get_val(tstack,&MATRIX(m,row-1,col-1),complex); + #ifdef SPECFUN_ENABLED else{ List *lst; *************** *** 548,551 **** --- 555,559 ---- } } + #endif if (!err) db_write_variable(item2.u.litemval.name,tmp); |
Update of /cvsroot/easycalc/easycalc/tutorial/images In directory sc8-pr-cvs17:/tmp/cvs-serv6830/tutorial/images Removed Files: 3plus3.png 3sin_pi_over2.png color_grph1.png color_startup.png complex1.png complex2.png cplx.gif cplxxi.gif crowded_scn.png deg.gif degrees_exam.png fd_dx.png finance.gif financial.png fromberg.png function1.png function2.png fzero.png fzero_func.png gonmenu.gif gonres.gif graph.gif graphcbut.gif grcolor.gif grph_compute.png grpref.gif grsetup.gif grtable.gif grtrace.gif identity.png image006.gif image007.gif image008.gif image009.gif image018.gif image019.gif image026.gif image028.gif image030.gif image032.gif image044.gif image047.gif image048.gif image049.gif image053.gif image054.gif image055.gif image056.gif image065.gif image066.gif image068.gif image069.gif image070.gif image071.gif image072.gif image074.gif image079.gif image082.gif image083.gif image085.gif image086.gif image087.gif integer.gif integer.png inv1.png inv2.png mat3_4.png mat_calc1.png mat_calc2.png mat_calc_add.png matrix_ex1.png matrixsim1.gif matrixsim2.gif parametric.png polar1.png prefs.gif qrq_mat3_4.png qrq_mat3_4_a.png qrr_mat3_4.png qrr_mat3_4_a.png qrs2_2e.png qrs2_2e_soln.png rref.png scientific.gif secondbasic.gif solver1.png solver2.png solver3.png solver4.png startup.gif startup.png to_rad_done.png to_rad_drop.png transpos1.png transpos2.png Log Message: Removing obsolete tutorial. --- scientific.gif DELETED --- --- image072.gif DELETED --- --- image048.gif DELETED --- --- fzero.png DELETED --- --- image019.gif DELETED --- --- grph_compute.png DELETED --- --- grtrace.gif DELETED --- --- matrixsim1.gif DELETED --- --- solver3.png DELETED --- --- fromberg.png DELETED --- --- image068.gif DELETED --- --- image032.gif DELETED --- --- image055.gif DELETED --- --- transpos1.png DELETED --- --- cplxxi.gif DELETED --- --- graph.gif DELETED --- --- grtable.gif DELETED --- --- deg.gif DELETED --- --- image069.gif DELETED --- --- image047.gif DELETED --- --- integer.gif DELETED --- --- crowded_scn.png DELETED --- --- image049.gif DELETED --- --- grsetup.gif DELETED --- --- rref.png DELETED --- --- image007.gif DELETED --- --- image030.gif DELETED --- --- solver2.png DELETED --- --- image054.gif DELETED --- --- image085.gif DELETED --- --- parametric.png DELETED --- --- polar1.png DELETED --- --- graphcbut.gif DELETED --- --- image079.gif DELETED --- --- gonmenu.gif DELETED --- --- image071.gif DELETED --- --- image066.gif DELETED --- --- mat_calc2.png DELETED --- --- inv1.png DELETED --- --- inv2.png DELETED --- --- to_rad_drop.png DELETED --- --- image009.gif DELETED --- --- fd_dx.png DELETED --- --- image082.gif DELETED --- --- image006.gif DELETED --- --- cplx.gif DELETED --- --- qrs2_2e_soln.png DELETED --- --- image086.gif DELETED --- --- color_startup.png DELETED --- --- startup.png DELETED --- --- fzero_func.png DELETED --- --- image044.gif DELETED --- --- matrix_ex1.png DELETED --- --- complex1.png DELETED --- --- qrr_mat3_4_a.png DELETED --- --- image070.gif DELETED --- --- degrees_exam.png DELETED --- --- image028.gif DELETED --- --- qrq_mat3_4_a.png DELETED --- --- complex2.png DELETED --- --- prefs.gif DELETED --- --- to_rad_done.png DELETED --- --- color_grph1.png DELETED --- --- qrr_mat3_4.png DELETED --- --- image065.gif DELETED --- --- grcolor.gif DELETED --- --- finance.gif DELETED --- --- image087.gif DELETED --- --- image026.gif DELETED --- --- qrq_mat3_4.png DELETED --- --- startup.gif DELETED --- --- image018.gif DELETED --- --- integer.png DELETED --- --- image053.gif DELETED --- --- grpref.gif DELETED --- --- mat_calc1.png DELETED --- --- image056.gif DELETED --- --- transpos2.png DELETED --- --- image008.gif DELETED --- --- image083.gif DELETED --- --- gonres.gif DELETED --- --- 3plus3.png DELETED --- --- 3sin_pi_over2.png DELETED --- --- solver4.png DELETED --- --- mat_calc_add.png DELETED --- --- function2.png DELETED --- --- qrs2_2e.png DELETED --- --- function1.png DELETED --- --- image074.gif DELETED --- --- financial.png DELETED --- --- mat3_4.png DELETED --- --- secondbasic.gif DELETED --- --- matrixsim2.gif DELETED --- --- identity.png DELETED --- --- solver1.png DELETED --- |
From: Ton v. O. <tvo...@us...> - 2007-09-07 16:43:36
|
Update of /cvsroot/easycalc/easycalc/tutorial In directory sc8-pr-cvs17:/tmp/cvs-serv6830/tutorial Removed Files: tutorial.html Log Message: Removing obsolete tutorial. --- tutorial.html DELETED --- |
From: Ton v. O. <tvo...@us...> - 2007-09-03 02:10:58
|
Update of /cvsroot/easycalc/easycalc/manual In directory sc8-pr-cvs17:/tmp/cvs-serv16558 Modified Files: EasyCalcManual.pdb Log Message: Updated after update of manual.html. Index: EasyCalcManual.pdb =================================================================== RCS file: /cvsroot/easycalc/easycalc/manual/EasyCalcManual.pdb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsORYSds and /tmp/cvsXtMAm5 differ |
From: Ton v. O. <tvo...@us...> - 2007-09-03 02:07:24
|
Update of /cvsroot/easycalc/easycalc/manual In directory sc8-pr-cvs17:/tmp/cvs-serv14640 Modified Files: manual.html Log Message: Added description of GuessIt factoring integer numbers into prime factors. Ran page through W3C html validator. Fixed reported problems. Index: manual.html =================================================================== RCS file: /cvsroot/easycalc/easycalc/manual/manual.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** manual.html 2 Sep 2007 00:59:45 -0000 1.1 --- manual.html 3 Sep 2007 02:06:50 -0000 1.2 *************** *** 4,8 **** <head> <title>EasyCalc Manual</title> ! <style type="text/css"> body { --- 4,8 ---- <head> <title>EasyCalc Manual</title> ! <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" > <style type="text/css"> body { *************** *** 26,29 **** --- 26,30 ---- <h1>EasyCalc Manual</h1> <h2>for Version 1.25</h2> + <p> <IMG height="160" width="160" alt="Title 1" src="images/Title-1.png" border="1"> *************** *** 34,38 **** <IMG height="160" width="160" alt="Title 4" src="images/Title-4.png" border="1"> ! <br /> <br /> <A NAME="TOC"></A> --- 35,39 ---- <IMG height="160" width="160" alt="Title 4" src="images/Title-4.png" border="1"> ! </p> <br /> <A NAME="TOC"></A> *************** *** 225,229 **** entered.</p> ! <p>On the top line of the main screen:<br /> <ul> <li>'Dec'/'Oct'/'Bin'/'Hex' - Numeric display/input mode --- 226,230 ---- entered.</p> ! <p>On the top line of the main screen:</p> <ul> <li>'Dec'/'Oct'/'Bin'/'Hex' - Numeric display/input mode *************** *** 244,247 **** --- 245,249 ---- <li>'H' - history of the user entries, most recent at top. </ul> + <p> The 'Special' menu allows access to the Data Manager, Financial Manager, List Editor, Matrix Editor, and Solver.</p> *************** *** 337,341 **** executed at a time.</p> ! </p> <tt>ask("title"{:default value})</tt> - opens a dialog with the (optional) default entered. Returns the user input. --- 339,343 ---- executed at a time.</p> ! <p> <tt>ask("title"{:default value})</tt> - opens a dialog with the (optional) default entered. Returns the user input. *************** *** 364,368 **** <p>EasyCalc can rationalize a number to fractions, common square roots, and ! powers of e or pi.</p> <p>Examples:<br /> --- 366,371 ---- <p>EasyCalc can rationalize a number to fractions, common square roots, and ! powers of e or pi. If the number is integer it tries to write the number ! as prime factors</p> <p>Examples:<br /> *************** *** 375,379 **** ans> 0.485 714 286</tt><br /> 'M' ->GuessIt<br /> ! <tt>ans> 17/35</tt></p> <br /> <p> --- 378,388 ---- ans> 0.485 714 286</tt><br /> 'M' ->GuessIt<br /> ! <tt>ans> 17/35<br /> ! <br /> ! 533<br /> ! ans> 533</tt><br /> ! 'M' ->GuessIt<br /> ! <tt>ans> 13*41</tt> ! </p> <br /> <p> *************** *** 465,469 **** Set up the functions to graph by tapping 'S' (or 'Menu-> Graph-> Setup funcs'). <br /> ! <IMG width="160" heigth="160" alt="Setup Graphs" src="images/SetupGraphs.png" border="1"> <br /> --- 474,478 ---- Set up the functions to graph by tapping 'S' (or 'Menu-> Graph-> Setup funcs'). <br /> ! <IMG width="160" height="160" alt="Setup Graphs" src="images/SetupGraphs.png" border="1"> <br /> *************** *** 478,486 **** Change Graph Preferences by tapping 'P' (or 'Menu -> Graph -> Preferences').<br /> ! <IMG width="160" heigth="160" alt="Graph Preferences 1" src="images/GraphPreferences-1.png"> ! <IMG width="160" heigth="160" alt="Graph Preferences 2" src="images/GraphPreferences-2.png"> ! <IMG width="160" heigth="160" alt="Graph Preferences 3" src="images/GraphPreferences-3.png"><br /> Here you can setup the display area (min and max bounds, grid interval) and --- 487,495 ---- Change Graph Preferences by tapping 'P' (or 'Menu -> Graph -> Preferences').<br /> ! <IMG width="160" height="160" alt="Graph Preferences 1" src="images/GraphPreferences-1.png"> ! <IMG width="160" height="160" alt="Graph Preferences 2" src="images/GraphPreferences-2.png"> ! <IMG width="160" height="160" alt="Graph Preferences 3" src="images/GraphPreferences-3.png"><br /> Here you can setup the display area (min and max bounds, grid interval) and *************** *** 536,540 **** <H3>Zoom</H3> <p> ! '-' button - zoom out<br \> '+' button - zoom in. Tap '+' and then draw a zoom area on the graph. </p> --- 545,549 ---- <H3>Zoom</H3> <p> ! '-' button - zoom out<br /> '+' button - zoom in. Tap '+' and then draw a zoom area on the graph. </p> *************** *** 773,777 **** <H3>Mixed Scalar/List/Matrix Assignments</H3> <p> ! <tt>s=list[i]</tt> (or <tt>list{i:i]</tt>) returns the i-th element of a list<br /> <tt>l=list[i:k]</tt> (k != i) returns a list with the elements from i to k --- 782,786 ---- <H3>Mixed Scalar/List/Matrix Assignments</H3> <p> ! <tt>s=list[i]</tt> (or <tt>list[i:i]</tt>) returns the i-th element of a list<br /> <tt>l=list[i:k]</tt> (k != i) returns a list with the elements from i to k *************** *** 815,819 **** <H3>List Manipulations</H3> <p> ! <tt>sift(f:x)</tt> - drops all elements for which f returns zero<.br /> <tt>sift("x<9":list(2:9:3:10:1))<br /> ans> [2:3:1]<br /> --- 824,828 ---- <H3>List Manipulations</H3> <p> ! <tt>sift(f:x)</tt> - drops all elements for which f returns zero<br /> <tt>sift("x<9":list(2:9:3:10:1))<br /> ans> [2:3:1]<br /> *************** *** 1220,1224 **** EasyCalc uses the lngamma function. This permits the use of large numbers for the degrees of freedom of several of the ! probability functions.</br> The Upper-Tail Probability functions return 1 minus the Cumulative Distribution Function (CDF). You must compute '1-qFunction' to get the --- 1229,1233 ---- EasyCalc uses the lngamma function. This permits the use of large numbers for the degrees of freedom of several of the ! probability functions.<br /> The Upper-Tail Probability functions return 1 minus the Cumulative Distribution Function (CDF). You must compute '1-qFunction' to get the *************** *** 1404,1408 **** <p> <tt>gcd(a[:b:c:...])</tt> - greatest common divisor<br /> ! <tt>gcd(10:14:12)< br/> ans> 2</tt> </p> --- 1413,1417 ---- <p> <tt>gcd(a[:b:c:...])</tt> - greatest common divisor<br /> ! <tt>gcd(10:14:12)<br /> ans> 2</tt> </p> *************** *** 1419,1422 **** --- 1428,1432 ---- means gcd=2, lcm=70 and 14*-2+10*3=2 </p> + <p> <tt>modinv(a:b)</tt> - computes inverse of a modulo b, i.e. the number x with 0 <= x < b and (a * x) % b == 1<br /> *************** *** 1732,1737 **** <tt>x%y</tt> x modulo y (remainder)<br /> <tt>=</tt> variable/function assignment<br /> ! <tt>x<<n</tt> shift x left 'n' bits<br /> ! <tt>x>>n</tt> shift x right 'n' bits<br /> <tt>&</tt> bit-wise logical AND<br /> <tt>|</tt> bit-wise logical OR<br /> --- 1742,1747 ---- <tt>x%y</tt> x modulo y (remainder)<br /> <tt>=</tt> variable/function assignment<br /> ! <tt>x<<n</tt> shift x left 'n' bits<br /> ! <tt>x>>n</tt> shift x right 'n' bits<br /> <tt>&</tt> bit-wise logical AND<br /> <tt>|</tt> bit-wise logical OR<br /> *************** *** 1781,1784 **** --- 1791,1795 ---- <H3>Integer Functions</H3> + <p> <tt>factor(a)</tt> - return a list of prime factors of a.<br /> <tt>gcd(a[:b:c:...])</tt> - greatest common divisor.<br /> *************** *** 1791,1795 **** errors if a < c < 65536.<br /> <tt>phi(a)</tt> - computes the totient (Euler's phi function) of a.<br /> ! nese(a<sub>1</sub>:n<sub>1</sub>:a<sub>2</sub>:n<sub>2</sub>:[a<sub>3</sub>:n<sub>3</sub>:...])</tt> - computes the solution of the Chinese remainder theorem.<br /> <tt>isprime(a)</tt> - returns 1 if a is prime, 0 otherwise.<br /> --- 1802,1806 ---- errors if a < c < 65536.<br /> <tt>phi(a)</tt> - computes the totient (Euler's phi function) of a.<br /> ! <tt>chinese(a<sub>1</sub>:n<sub>1</sub>:a<sub>2</sub>:n<sub>2</sub>:[a<sub>3</sub>:n<sub>3</sub>:...])</tt> - computes the solution of the Chinese remainder theorem.<br /> <tt>isprime(a)</tt> - returns 1 if a is prime, 0 otherwise.<br /> *************** *** 1806,1810 **** acos(x)<br /> atan(x)<br /> ! atan2(y:x)</tt> = atan(y/x)</tt> </p> --- 1817,1821 ---- acos(x)<br /> atan(x)<br /> ! atan2(y:x)</tt> = atan(y/x) </p> *************** *** 2016,2020 **** <tt>unset(name)</tt> - clears function or variable 'name' from memory<br /> <tt>defparamn(x)</tt> - <strong>DO NOT USE</strong>. Sets the parameter name to ! something other than 'x'. Some functions (e.q. most of the q<something> statistical functions) are defined internally as strings using 'x' as the parameter name. They will not work if you change the parameter name !!! --- 2027,2031 ---- <tt>unset(name)</tt> - clears function or variable 'name' from memory<br /> <tt>defparamn(x)</tt> - <strong>DO NOT USE</strong>. Sets the parameter name to ! something other than 'x'. Some functions (e.q. most of the q<something> statistical functions) are defined internally as strings using 'x' as the parameter name. They will not work if you change the parameter name !!! |
Update of /cvsroot/easycalc/easycalc/manual/images In directory sc8-pr-cvs17:/tmp/cvs-serv31605/images Added Files: AskMyfact.png BasicMainScreen.png Carloan.png Complex-1.png Complex-2.png Complex-3.png F-d2dx.png F-romberg.png F-zero.png FftPrefSignal.png FftPrefSpectrum.png FftSetupSignal.png FftSetupSpectrum.png FftSignal.png FftSpectrum.png Function-f-1.png Function-f-2.png GraphComputingResult.png GraphPreferences-1.png GraphPreferences-2.png GraphPreferences-3.png GraphSpeed.png MPopupMenu.png MathLibalert.png Matrix-1.png Matrix-2.png Preferences.png Qrq-1.png Qrq-2.png Qrqqrr-1.png Qrqqrr-2.png Qrqqrr-3.png Qrr-1.png Qrr-2.png Qrr-3.png Rref-1.png Rref-2.png Rref-3.png RtopExample.png SetupGraphs.png Solver-1.png Solver-2.png Solver-3.png Solver-4.png Solver-5.png TableMode.png Title-1.png Title-2.png Title-3.png Title-4.png TracePolar.png Trig-DMS-1.png Trig-DMS-2.png Trig-DMS-3.png Log Message: Added new manual derived from <halliday at users.sourceforge.net> contribution and Ondrap's original tutuorial. Also a Plucker version. --- NEW FILE: SetupGraphs.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Qrr-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Qrr-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: GraphComputingResult.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Complex-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: FftSetupSpectrum.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: F-d2dx.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: GraphPreferences-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Qrqqrr-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: TableMode.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Trig-DMS-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Title-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Title-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: MPopupMenu.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: GraphPreferences-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Qrr-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: GraphPreferences-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Complex-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: MathLibalert.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: FftSignal.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Solver-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Title-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: FftSpectrum.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: FftSetupSignal.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: FftPrefSignal.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Complex-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: GraphSpeed.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Qrq-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Rref-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Qrqqrr-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Rref-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Function-f-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Matrix-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Matrix-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: TracePolar.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: FftPrefSpectrum.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: F-romberg.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Solver-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Preferences.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: AskMyfact.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Qrqqrr-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Solver-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Qrq-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: RtopExample.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Rref-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Solver-5.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Solver-4.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: F-zero.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Function-f-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Trig-DMS-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Title-4.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Trig-DMS-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Carloan.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: BasicMainScreen.png --- (This appears to be a binary file; contents omitted.) |
From: Ton v. O. <tvo...@us...> - 2007-09-02 00:59:52
|
Update of /cvsroot/easycalc/easycalc/manual In directory sc8-pr-cvs17:/tmp/cvs-serv31605 Added Files: EasyCalcManual.pdb manual.html Log Message: Added new manual derived from <halliday at users.sourceforge.net> contribution and Ondrap's original tutuorial. Also a Plucker version. --- NEW FILE: manual.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>EasyCalc Manual</title> <style type="text/css"> body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 0.9em; } tt { font-size: 1.2em; } pre { font-size: 1.2em; } blockquote.c4 {MARGIN-RIGHT: 0px} p.c3 {text-align: left} [...2235 lines suppressed...] </p> <p> Antonio Fiol Bonn_n (Antonio.FIOL at enst-bretagne.fr><br /> Added PYR support for the financial equations </p> <p> Koichi Takagi (halliday at users.sourceforge.net)<br /> Updated documentation </p> <p> For more information about the GNU General Public License: <a href="http://www.gnu.org/copyleft/gpl.html"> http://www.gnu.org/copyleft/gpl.html</a> </p> <p> For more information about the MathLib library: <a href="http://www.radiks.net/~rhuebner/mathlib.html"> http://www.radiks.net/~rhuebner/mathlib.html</a> </p><br /> <p> Back to <A href="#TOC">Contents</a> </p> --- NEW FILE: EasyCalcManual.pdb --- (This appears to be a binary file; contents omitted.) |
From: Ton v. O. <tvo...@us...> - 2007-09-02 00:56:23
|
Update of /cvsroot/easycalc/easycalc/manual/images In directory sc8-pr-cvs17:/tmp/cvs-serv30851/images Log Message: Directory /cvsroot/easycalc/easycalc/manual/images added to the repository |
From: Ton v. O. <tvo...@us...> - 2007-09-02 00:54:58
|
Update of /cvsroot/easycalc/easycalc/manual In directory sc8-pr-cvs17:/tmp/cvs-serv30089/manual Log Message: Directory /cvsroot/easycalc/easycalc/manual added to the repository |
From: Ton v. O. <tvo...@us...> - 2007-08-31 00:59:04
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17:/tmp/cvs-serv27414 Modified Files: prefs.c Log Message: Set the default "Reduce precision" preference to false. Index: prefs.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/prefs.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** prefs.c 16 Oct 2006 18:58:37 -0000 1.17 --- prefs.c 31 Aug 2007 00:58:18 -0000 1.18 *************** *** 61,65 **** calcPrefs.dispPrefs.decPoints = 9; calcPrefs.dispPrefs.stripZeros = true; ! calcPrefs.reducePrecision = true; calcPrefs.dispPrefs.base = disp_decimal; calcPrefs.dispPrefs.mode = disp_normal; --- 61,65 ---- calcPrefs.dispPrefs.decPoints = 9; calcPrefs.dispPrefs.stripZeros = true; ! calcPrefs.reducePrecision = false; calcPrefs.dispPrefs.base = disp_decimal; calcPrefs.dispPrefs.mode = disp_normal; |
From: Ton v. O. <tvo...@us...> - 2007-08-27 18:35:26
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17:/tmp/cvs-serv13350 Modified Files: grcalc.c Log Message: Bug fix: Also draw the tracing cross lines at the result of the intersect function. Draw result cross before displaying the result alert. Index: grcalc.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grcalc.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** grcalc.c 12 Sep 2006 19:40:55 -0000 1.19 --- grcalc.c 25 Aug 2007 17:58:14 -0000 1.20 *************** *** 296,321 **** display better values */ /* Save the result as 'graphres' variable */ ! db_save_real("graphres",result); /* Round the result with respect to computing error */ result /= 1E-5; result = round(result) * 1E-5; ! text = display_real(result); ! ! /* Fetch description of a function */ ! SysStringByIndex(strGrcDescription,grFuncType, ! acdescr,MAX_RSCLEN-1); ! FrmCustomAlert(altComputeResult,acdescr,text,NULL); ! MemPtrFree(text); /* Set the cross to result where applicable */ switch (grFuncType) { case cp_zero: case cp_min: case cp_max: case cp_value: ! grtaps_track_manual(result,track_set); break; } } else FrmAlert(altCompute); --- 296,322 ---- display better values */ /* Save the result as 'graphres' variable */ ! db_save_real("graphres", result); /* Round the result with respect to computing error */ result /= 1E-5; result = round(result) * 1E-5; ! /* Set the cross to result where applicable */ switch (grFuncType) { + case cp_intersect: case cp_zero: case cp_min: case cp_max: case cp_value: ! grtaps_track_manual(result, track_set); break; } + text = display_real(result); + /* Fetch description of a function */ + SysStringByIndex(strGrcDescription, grFuncType, + acdescr, MAX_RSCLEN - 1); + FrmCustomAlert(altComputeResult, acdescr, text, NULL); + MemPtrFree(text); } else FrmAlert(altCompute); |
From: Ton v. O. <tvo...@us...> - 2007-08-22 19:39:05
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17:/tmp/cvs-serv2636/mlib Modified Files: stack.c Log Message: One more fix for proper signed integer arithmetic. Index: stack.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/stack.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** stack.c 22 Aug 2007 19:24:03 -0000 1.39 --- stack.c 22 Aug 2007 19:38:54 -0000 1.40 *************** *** 339,360 **** cplxarg = (Complex *) arg1; cplxarg->imag = 0.0; ! if (tmpitem.type==complex) *cplxarg = *(tmpitem.u.cplxval); ! else if (tmpitem.type==real) cplxarg->real = tmpitem.u.realval; ! else if (tmpitem.type==integer) ! cplxarg->real = tmpitem.u.intval; else err = c_badarg; } else if (reqtype == real) { ! if (tmpitem.type==real) ! *((double *)arg1)=tmpitem.u.realval; ! else if (tmpitem.type==integer) ! *((double *)arg1)=tmpitem.u.intval; ! else if (tmpitem.type==complex) { if (IS_ZERO(tmpitem.u.cplxval->imag)) ! *((double *)arg1)=tmpitem.u.cplxval->real; else ! err=c_badarg; } else err = c_badarg; --- 339,360 ---- cplxarg = (Complex *) arg1; cplxarg->imag = 0.0; ! if (tmpitem.type == complex) *cplxarg = *(tmpitem.u.cplxval); ! else if (tmpitem.type == real) cplxarg->real = tmpitem.u.realval; ! else if (tmpitem.type == integer) ! cplxarg->real = (Int32)tmpitem.u.intval; else err = c_badarg; } else if (reqtype == real) { ! if (tmpitem.type == real) ! *((double *)arg1) = tmpitem.u.realval; ! else if (tmpitem.type == integer) ! *((double *)arg1) = (Int32)tmpitem.u.intval; ! else if (tmpitem.type == complex) { if (IS_ZERO(tmpitem.u.cplxval->imag)) ! *((double *)arg1) = tmpitem.u.cplxval->real; else ! err = c_badarg; } else err = c_badarg; *************** *** 376,380 **** realarg = tmpitem.u.realval; if (-2147483648.0 <= realarg && realarg <= 2147483647.0) { ! *((Int32 *)arg1)= tmpitem.u.realval; } else --- 376,380 ---- realarg = tmpitem.u.realval; if (-2147483648.0 <= realarg && realarg <= 2147483647.0) { ! *((Int32 *)arg1) = tmpitem.u.realval; } else |
From: Ton v. O. <tvo...@us...> - 2007-08-22 19:24:11
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17:/tmp/cvs-serv26690/mlib Modified Files: display.c mathem.c stack.c Log Message: Make integer arithmetic signed. Previously all integer arithmetic was done with unsigned integers. With the 'Force integer nums' preference selected -5/2 now results in -2 instead of 2,147,483,645. When 'Force integer nums' is selected integers are displayed signed in decimal and unsigned in hex/octal/binary. With 'Force integer nums' not selected the int() function now works. int(-5.9) = -5 and int(5.9) = 5. Previously these examples resulted in syntax errror. Index: display.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/display.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** display.c 12 Sep 2006 19:40:56 -0000 1.11 --- display.c 22 Aug 2007 19:24:03 -0000 1.12 *************** *** 96,108 **** } ! char * ! display_integer(UInt32 number,Tbase mode) { Int16 base; ! Int16 i,j; ! char *result,tmp; ! ! result = MemPtrNew(33); /* 32 bits + '\0' */ ! switch (mode) { case disp_binary: --- 96,110 ---- } ! Char * ! display_integer(UInt32 number, Tbase mode) { Int16 base; ! Int16 i, j; ! Int32 signednum; ! Char *result, *result1, tmp; ! ! result = MemPtrNew(33); /* 32 bits + '\0' */ ! result1 = result; /* result1 points to digits after possible '-' sign */ ! switch (mode) { case disp_binary: *************** *** 117,140 **** case disp_decimal: default: base=10; break; } ! for (i=0;number;i++,number/=base) ! if ((number % base)<10) ! result[i]='0'+(number % base); ! else ! result[i]='A'+(number % base) - 10; ! ! result[i]='\0'; ! /* Revert the string */ ! for (j=0,i--;j<i;j++,i--) { ! tmp=result[i]; ! result[i]=result[j]; ! result[j]=tmp; } ! ! if (StrLen(result)==0) ! StrCopy(result,"0"); ! return result; } --- 119,149 ---- case disp_decimal: default: + /* for decimal display signed number */ + if ((signednum = number) < 0) { + number = -number; + *result = '-'; + result1 = result + 1; + } base=10; break; } ! ! for (i=0; number; i++, number /= base) ! if ((number % base) < 10) ! result1[i]='0'+(number % base); ! else ! result1[i]='A'+(number % base) - 10; ! ! result1[i]='\0'; ! /* Reverse the string */ ! for (j = 0, i--; j < i; j++, i--) { ! tmp = result1[i]; ! result1[i] = result1[j]; ! result1[j] = tmp; } ! ! if (StrLen(result) == 0) ! StrCopy(result,"0"); ! return result; } Index: mathem.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/mathem.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** mathem.c 27 May 2007 01:34:09 -0000 1.36 --- mathem.c 22 Aug 2007 19:24:03 -0000 1.37 *************** *** 253,300 **** int_oper(Functype *func,CodeStack *stack) { ! UInt32 arg1,arg2; ! UInt32 tmp; ! UInt32 result; CError err; ! if ((err=stack_get_val2(stack,&arg1,&arg2,integer))) ! return err; switch (func->num) { case FUNC_PLUS: ! result=arg1+arg2; break; case FUNC_MINUS: ! result=arg1-arg2; break; case FUNC_DIVIDE: if (!arg2) ! return c_divbyzero; ! result=arg1/arg2; break; case FUNC_MOD: if (!arg2) ! return c_divbyzero; result = arg1 % arg2; break; case FUNC_MULTIPLY: ! result=arg1*arg2; break; case FUNC_POWER: ! if (arg2==0) { ! result=1; break; } ! if (arg2>300) /* The user might have entered a negative number */ ! return c_badarg; ! ! tmp=arg1; while (--arg2) ! tmp*=arg1; ! result=tmp; break; default: return c_badfunc; } ! return stack_add_val(stack,&result,integer); } --- 253,299 ---- int_oper(Functype *func,CodeStack *stack) { ! Int32 arg1, arg2; ! Int32 tmp; ! Int32 result; CError err; ! if ((err = stack_get_val2(stack, &arg1, &arg2, integer))) ! return err; switch (func->num) { case FUNC_PLUS: ! result = arg1 + arg2; break; case FUNC_MINUS: ! result = arg1 - arg2; break; case FUNC_DIVIDE: if (!arg2) ! return c_divbyzero; ! result = arg1 / arg2; break; case FUNC_MOD: if (!arg2) ! return c_divbyzero; result = arg1 % arg2; break; case FUNC_MULTIPLY: ! result = arg1 * arg2; break; case FUNC_POWER: ! if (arg2 == 0) { ! result = 1; break; } ! if (arg2 < 0) ! return c_badarg; ! tmp = arg1; while (--arg2) ! tmp *= arg1; ! result = tmp; break; default: return c_badfunc; } ! return stack_add_val(stack, &result, integer); } Index: stack.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/stack.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** stack.c 25 Jul 2007 01:19:41 -0000 1.38 --- stack.c 22 Aug 2007 19:24:03 -0000 1.39 *************** *** 231,235 **** stack_get_val(CodeStack *stack,void *arg1,rpntype reqtype) { - UInt32 intarg; double realarg = 0.0; Complex *cplxarg; --- 231,234 ---- *************** *** 284,288 **** return c_noerror; } ! if (reqtype == list) { if (tmpitem.type != list) { --- 283,287 ---- return c_noerror; } ! if (reqtype == list) { if (tmpitem.type != list) { *************** *** 315,319 **** if (reqtype==string) { char *tmp; ! if (tmpitem.type!=string) { rpn_delete(tmpitem); --- 314,318 ---- if (reqtype==string) { char *tmp; ! if (tmpitem.type!=string) { rpn_delete(tmpitem); *************** *** 329,340 **** /* Now follows numeric types */ ! if (tmpitem.type!=integer && ! tmpitem.type!=real && ! tmpitem.type!=complex) { rpn_delete(tmpitem); return c_badarg; } ! ! if (reqtype==complex) { cplxarg = (Complex *) arg1; cplxarg->imag = 0.0; --- 328,340 ---- /* Now follows numeric types */ ! ! if (tmpitem.type != integer && ! tmpitem.type != real && ! tmpitem.type != complex) { rpn_delete(tmpitem); return c_badarg; } ! ! if (reqtype == complex) { cplxarg = (Complex *) arg1; cplxarg->imag = 0.0; *************** *** 347,351 **** else err = c_badarg; ! } else if (reqtype==real) { if (tmpitem.type==real) *((double *)arg1)=tmpitem.u.realval; --- 347,351 ---- else err = c_badarg; ! } else if (reqtype == real) { if (tmpitem.type==real) *((double *)arg1)=tmpitem.u.realval; *************** *** 359,370 **** } else err = c_badarg; ! } else if (reqtype==integer) { switch (tmpitem.type) { case integer: ! *((UInt32 *)arg1)=tmpitem.u.intval; break; case complex: if (IS_ZERO(tmpitem.u.cplxval->imag)) ! realarg = tmpitem.u.cplxval->real; else { err = c_badarg; --- 359,370 ---- } else err = c_badarg; ! } else if (reqtype == integer) { switch (tmpitem.type) { case integer: ! *((UInt32 *)arg1) = tmpitem.u.intval; break; case complex: if (IS_ZERO(tmpitem.u.cplxval->imag)) ! realarg = tmpitem.u.cplxval->real; else { err = c_badarg; *************** *** 373,386 **** /* PASS THROUGH, generates warning*/ case real: ! if (tmpitem.type==real) ! realarg = tmpitem.u.realval; ! if (realarg<=4294967296.0 && ! realarg>=0.0 ) { ! if (IS_ZERO(round(realarg)-realarg)) { ! intarg=(double)tmpitem.u.realval; ! *((UInt32 *)arg1)=intarg; ! } ! else ! err = c_badarg; } else --- 373,380 ---- /* PASS THROUGH, generates warning*/ case real: ! if (tmpitem.type == real) ! realarg = tmpitem.u.realval; ! if (-2147483648.0 <= realarg && realarg <= 2147483647.0) { ! *((Int32 *)arg1)= tmpitem.u.realval; } else *************** *** 393,397 **** else err=c_badarg; ! rpn_delete(tmpitem); return err; --- 387,391 ---- else err=c_badarg; ! rpn_delete(tmpitem); return err; |
From: Ton v. O. <tvo...@us...> - 2007-08-17 20:03:01
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17:/tmp/cvs-serv10768/mlib Modified Files: fp.c Log Message: Fix bug in fp_print_g_double (big endian vs little endian). Index: fp.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/fp.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** fp.c 10 Aug 2007 18:54:06 -0000 1.15 --- fp.c 17 Aug 2007 20:02:52 -0000 1.16 *************** *** 445,449 **** /* Check for NaN, +Inf, -Inf, 0 */ fcd.d = value; ! if ((fcd.ul[1] & 0x7ff00000) == 0x7ff00000) { if (fcd.fdb.manH == 0 && fcd.fdb.manL == 0) { if (fcd.fdb.sign) --- 445,449 ---- /* Check for NaN, +Inf, -Inf, 0 */ fcd.d = value; ! if ((fcd.ul[0] & 0x7ff00000) == 0x7ff00000) { if (fcd.fdb.manH == 0 && fcd.fdb.manL == 0) { if (fcd.fdb.sign) |
From: Ton v. O. <tvo...@us...> - 2007-08-10 18:54:37
|
Update of /cvsroot/easycalc/easycalc/include In directory sc8-pr-cvs17:/tmp/cvs-serv6682/include Modified Files: fp.h Log Message: New function fp_print_g_double which behaves similar to %g format. Use it for numbers on the graph screen and on the graph preferences form instead of fp_print_double. Index: fp.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/include/fp.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** fp.h 12 Sep 2006 19:40:55 -0000 1.5 --- fp.h 10 Aug 2007 18:54:06 -0000 1.6 *************** *** 27,31 **** void fp_setup_flpoint(void) PARSER; ! void fp_print_double(char *strP,double value) PARSER; void fp_set_base(Tbase base) PARSER; TdispPrefs fp_set_prefs(TdispPrefs prefs) PARSER; --- 27,32 ---- void fp_setup_flpoint(void) PARSER; ! void fp_print_double(char *strP, double value) PARSER; ! void fp_print_g_double(char *s, double value, Int16 prec) PARSER; void fp_set_base(Tbase base) PARSER; TdispPrefs fp_set_prefs(TdispPrefs prefs) PARSER; |
From: Ton v. O. <tvo...@us...> - 2007-08-10 18:54:37
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17:/tmp/cvs-serv6682 Modified Files: grprefs.c grtaps.c Log Message: New function fp_print_g_double which behaves similar to %g format. Use it for numbers on the graph screen and on the graph preferences form instead of fp_print_double. Index: grtaps.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grtaps.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** grtaps.c 29 Jul 2007 01:31:18 -0000 1.31 --- grtaps.c 10 Aug 2007 18:54:06 -0000 1.32 *************** *** 54,58 **** static double oldrealx = NaN; static double oldrealy = NaN; ! static const TdispPrefs grNumPrefs = { 5, true, disp_normal, disp_decimal, false, false}; /*********************************************************************** --- 54,58 ---- static double oldrealx = NaN; static double oldrealy = NaN; ! //static const TdispPrefs grNumPrefs = { 5, true, disp_normal, disp_decimal, false, false}; /*********************************************************************** *************** *** 388,392 **** { char text[MAX_FP_NUMBER+10]; ! TdispPrefs oldprefs; Char *numtxt; Coord txtwidth; --- 388,392 ---- { char text[MAX_FP_NUMBER+10]; ! // TdispPrefs oldprefs; Char *numtxt; Coord txtwidth; *************** *** 396,405 **** #endif ! oldprefs = fp_set_prefs(grNumPrefs); StrCopy(text,name); numtxt = text + StrLen(text); if (finite(value)) { ! fp_print_double(numtxt, value); txtwidth = FntCharsWidth(text, StrLen(text)); if (align == align_center) { --- 396,405 ---- #endif ! // oldprefs = fp_set_prefs(grNumPrefs); StrCopy(text,name); numtxt = text + StrLen(text); if (finite(value)) { ! fp_print_g_double(numtxt, value, 4); txtwidth = FntCharsWidth(text, StrLen(text)); if (align == align_center) { *************** *** 416,420 **** } ! fp_set_prefs(oldprefs); } --- 416,420 ---- } ! // fp_set_prefs(oldprefs); } Index: grprefs.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grprefs.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** grprefs.c 28 Dec 2006 03:16:17 -0000 1.27 --- grprefs.c 10 Aug 2007 18:54:06 -0000 1.28 *************** *** 325,332 **** char *text; ! text = display_real(newval); ! FldDelete(pole,0,FldGetTextLength(pole)); ! FldInsert(pole,text,StrLen(text)); MemPtrFree(text); } --- 325,333 ---- char *text; ! text = MemPtrNew(15); ! fp_print_g_double(text, newval, 5); ! FldDelete(pole, 0, FldGetTextLength(pole)); ! FldInsert(pole, text, StrLen(text)); MemPtrFree(text); } |
From: Ton v. O. <tvo...@us...> - 2007-08-10 18:54:37
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17:/tmp/cvs-serv6682/mlib Modified Files: fp.c Log Message: New function fp_print_g_double which behaves similar to %g format. Use it for numbers on the graph screen and on the graph preferences form instead of fp_print_double. Index: fp.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/fp.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** fp.c 25 Jul 2007 01:19:41 -0000 1.14 --- fp.c 10 Aug 2007 18:54:06 -0000 1.15 *************** *** 227,254 **** } ! if( value < 0.0 ) { *strP++ = '-'; value = -value; } ! ipart = trunc(value); ! value -= ipart; /* recover frac part */ ! for (limit = 1.0,i=myfrac; i> 0;i--) { value *= BASE; limit *= BASE; } ! value += 0.5; ! if( value >= limit ) { ! fpart = 0.0; /* overflowed */ ipart++; ! } ! else ! fpart = value; ! cvt_fltoa(strP,ipart); ! ! if (myfrac || !dispPrefs.stripZeros) { cvt_fltoa(str,fpart); strP += StrLen(strP); --- 227,254 ---- } ! if( value < 0.0 ) { *strP++ = '-'; value = -value; } ! ipart = trunc(value); ! value -= ipart; /* recover frac part */ ! for (limit = 1.0,i=myfrac; i> 0;i--) { value *= BASE; limit *= BASE; } ! value += 0.5; ! if( value >= limit ) { ! fpart = 0.0; /* overflowed */ ipart++; ! } ! else ! fpart = value; ! cvt_fltoa(strP,ipart); ! ! if (myfrac || !dispPrefs.stripZeros) { cvt_fltoa(str,fpart); strP += StrLen(strP); *************** *** 271,278 **** *strP++ = flPointChar; for(i=StrLen(str); i<myfrac;i++ ) ! *strP++ = '0'; /* need some padding at the beginning */ ! StrCopy(strP,str); /* and now the value */ } ! } } --- 271,278 ---- *strP++ = flPointChar; for(i=StrLen(str); i<myfrac;i++ ) ! *strP++ = '0'; /* need some padding at the beginning */ ! StrCopy(strP,str); /* and now the value */ } ! } } *************** *** 297,301 **** } else ! StrPrintF(str,"*%d^%d",(Int16)dispPrefs.base,expon); } --- 297,301 ---- } else ! StrPrintF(str, "*%d^%d",(Int16)dispPrefs.base, expon); } *************** *** 394,395 **** --- 394,555 ---- } } + + /*********************************************************************** + * + * FUNCTION: fp_print_g_double + * + * DESCRIPTION: Formats double numbers for output on the graph screen + * using a Fortran like %g format. + * The code is derived from the printDouble function in lispme: + * http://www.lispme.de/lispme/gcc/tech.html#fpio + * + * PARAMETERS: s - output string + * value - value to be formatted + * + * RETURN: nothing + * + ***********************************************************************/ + + /* Conversion constants */ + static double pow1[] = { + 1e256, 1e128, 1e064, + 1e032, 1e016, 1e008, + 1e004, 1e002, 1e001 + }; + + static double pow2[] = { + 1e-256, 1e-128, 1e-064, + 1e-032, 1e-016, 1e-008, + 1e-004, 1e-002, 1e-001 + }; + + void fp_print_g_double(Char *s, double value, Int16 prec) PARSER; + void + fp_print_g_double(Char *s, double value, Int16 prec) + { + FlpCompDouble fcd; + double round_factor; + short e, e1, i; + double *pd, *pd1; + char sign = '\0'; + short dec = 0; + + /* Check for reasonable value of prec. IEEE double. IEEE double + * precision has about 16 significant decimal digits */ + if (prec < 0 || prec > 16) prec = 7; + + /* Initialize round_factor */ + round_factor = 0.5; + for (i = 0; i < prec; i++) round_factor /= 10.0; + + /* Check for NaN, +Inf, -Inf, 0 */ + fcd.d = value; + if ((fcd.ul[1] & 0x7ff00000) == 0x7ff00000) { + if (fcd.fdb.manH == 0 && fcd.fdb.manL == 0) { + if (fcd.fdb.sign) + StrCopy(s, "-Inf"); + else + StrCopy(s, "Inf"); + } + else { + StrCopy(s, "NaN"); + } + return; + } + if (FlpIsZero(fcd)) { + StrCopy(s, "0"); + return; + } + + /* Make positive and store sign */ + if (FlpGetSign(fcd)) { + *s++ = '-'; + FlpSetPositive(fcd); + value = fcd.d; + } + + /* Compute round_factor */ + if ((unsigned) fcd.fdb.exp < 0x3ff) { + /* round_factor for value < 1.0 */ + for (e = 1, e1 = 256, pd = pow1, pd1 = pow2; e1; + e1 >>= 1, ++pd, ++pd1) { + if (*pd1 > fcd.d) { + e += e1; + fcd.d *= *pd; + round_factor *= *pd1; + } + } + } + else { + /* round_factor for value >= 1.0 */ + for (e = 0, e1 = 256, pd = pow1, pd1 = pow2; e1; + e1 >>= 1, ++pd, ++pd1) { + if (*pd <= fcd.d) { + e += e1; + fcd.d *= *pd1; + round_factor *= *pd; + } + } + round_factor *= 10.0; + } + fcd.d = value + round_factor; + + if ((unsigned) fcd.fdb.exp < 0x3ff) { + /* Build negative exponent */ + for (e = 1, e1 = 256, pd = pow1, pd1 = pow2; e1; + e1 >>= 1, ++pd, ++pd1) { + if (*pd1 > fcd.d) { + e += e1; + fcd.d = fcd.d * *pd; + } + } + fcd.d = fcd.d * 10.0; + /* Do not print exponent for the -0.xxxx case */ + if (e <= 1) { + *s++ = '0'; + *s++ = '.'; + dec = -1; + } + else + sign = '-'; + } + else { + /* Build positive exponent */ + for (e = 0, e1 = 256, pd = pow1, pd1 = pow2; e1; + e1 >>= 1, ++pd, ++pd1) { + if (*pd <= fcd.d) { + e += e1; + fcd.d = fcd.d * *pd1; + } + } + if (e < prec) + dec = e; + else + sign = '+'; + } + + /* Extract decimal digits of mantissa */ + for (i = 0; i < prec; ++i, --dec) { + Int32 d = fcd.d; + *s++ = d + '0'; + if (!dec) + *s++ = '.'; + fcd.d = fcd.d - (double)d; + fcd.d = fcd.d * 10.0; + } + + /* Remove trailing zeros and decimal point */ + while (s[-1] == '0') + *--s = '\0'; + if (s[-1] == '.') + *--s = '\0'; + + /* Append exponent */ + if (sign) { + *s++ = 'E'; + *s++ = sign; + StrIToA(s, e); + } + else + *s = '\0'; + } |
From: Ton v. O. <tvo...@us...> - 2007-07-29 01:31:22
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17:/tmp/cvs-serv6707 Modified Files: graph.c grtaps.c grtaps.h Log Message: Change drawing of axes labels: y-axis labels are drawn to the right of the y-axis, but clipped by the graph gadget. x-axis labels are drawn just below the x-axis, but clipped by the graph gadget. Also the labels do not interfere with the tracking information. Index: graph.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.c,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** graph.c 26 May 2007 14:52:10 -0000 1.58 --- graph.c 29 Jul 2007 01:31:18 -0000 1.59 *************** *** 472,476 **** for (tmpy=ystart;tmpy < graphPrefs.ymax;tmpy+=yscale) { y = graph_ygr2scr(tmpy); ! clie_drawline(x,y,x,y); } } --- 472,483 ---- for (tmpy=ystart;tmpy < graphPrefs.ymax;tmpy+=yscale) { y = graph_ygr2scr(tmpy); ! if (gHrMode != hrNone) { ! /* Draw crosses in hi res ... */ ! clie_drawline(x,y-1,x,y+1); ! clie_drawline(x-1,y,x+1,y); ! } ! else ! /* otherwise just dots */ ! clie_drawline(x,y,x,y); } } *************** *** 487,491 **** RectangleType natbounds; // bounds in native coordinates RectangleType clip; // clip rectangle in standard coordinates ! Coord x, y; #ifdef SUPPORT_DIA Coord dx, dy; --- 494,498 ---- RectangleType natbounds; // bounds in native coordinates RectangleType clip; // clip rectangle in standard coordinates ! Coord x, y, xstd, ystd; #ifdef SUPPORT_DIA Coord dx, dy; *************** *** 518,564 **** graph_setcolor(-1); clie_eraserectangle(&natbounds,0); if (graphPrefs.grEnable[6]) { /* axes drawing enabled */ /* y axis */ - x = graph_xgr2scr(0.0); if (x>ScrPrefs.xmin && x<ScrPrefs.xmax) clie_drawline(x,ScrPrefs.ymax,x,ScrPrefs.ymin); /* x axis */ - y = graph_ygr2scr(0.0); if (y>ScrPrefs.ymax && y<ScrPrefs.ymin) clie_drawline(ScrPrefs.xmin,y,ScrPrefs.xmax,y); } graph_unsetcolor(); /* Draw axes labels */ if (graphPrefs.grEnable[6] && graphPrefs.grEnable[8]) { /* axes and labels enabled */ ! Coord dy1 = HanderaCoord(-11); ! Coord dy2 = HanderaCoord(-1); ! Coord dy3 = HanderaCoord(-10); ! Coord dy4 = HanderaCoord(-1); ! grtaps_print_val("ymin:",graphPrefs.ymin, ! stdbounds.topLeft.x + stdbounds.extent.x/2, ! stdbounds.topLeft.y + stdbounds.extent.y + dy1, ! align_center); ! grtaps_print_val("ymax:",graphPrefs.ymax, ! stdbounds.topLeft.x + stdbounds.extent.x/2, ! stdbounds.topLeft.y + dy2, align_center); ! grtaps_print_val("xmin:",graphPrefs.xmin, stdbounds.topLeft.x, ! stdbounds.topLeft.y + stdbounds.extent.y/2 + dy3, align_left); ! grtaps_print_val("xmax:",graphPrefs.xmax, stdbounds.topLeft.x + stdbounds.extent.x, - stdbounds.topLeft.y + stdbounds.extent.y/2 + dy4, align_right); } - - /* Only (re)draw grid when whole graph gadget is inside the - clip rectangle */ - WinGetClip(&clip); - if (graphPrefs.grEnable[7] /* grid drawing enabled */ && - clip.topLeft.y <= stdbounds.topLeft.y && - clip.topLeft.y + clip.extent.y >= stdbounds.topLeft.y + stdbounds.extent.y) - graph_grid(&natbounds); } --- 525,598 ---- graph_setcolor(-1); clie_eraserectangle(&natbounds,0); + + /* Only (re)draw grid when whole graph gadget is inside the + clip rectangle */ + WinGetClip(&clip); + if (graphPrefs.grEnable[7] /* grid drawing enabled */ && + clip.topLeft.y <= stdbounds.topLeft.y && + clip.topLeft.y + clip.extent.y >= stdbounds.topLeft.y + stdbounds.extent.y) + graph_grid(&natbounds); + + /* Draw axes */ + x = graph_xgr2scr(0.0); + y = graph_ygr2scr(0.0); if (graphPrefs.grEnable[6]) { /* axes drawing enabled */ /* y axis */ if (x>ScrPrefs.xmin && x<ScrPrefs.xmax) clie_drawline(x,ScrPrefs.ymax,x,ScrPrefs.ymin); /* x axis */ if (y>ScrPrefs.ymax && y<ScrPrefs.ymin) clie_drawline(ScrPrefs.xmin,y,ScrPrefs.xmax,y); } + graph_unsetcolor(); /* Draw axes labels */ + if (gHrMode == hrPalm) { + UInt16 save = WinSetCoordinateSystem(kCoordinatesNative); + xstd = WinUnscaleCoord(x, true); + ystd = WinUnscaleCoord(y, true); + WinSetCoordinateSystem(save); + } + else { + xstd = x / gSonyFactor; + ystd = y / gSonyFactor; + } if (graphPrefs.grEnable[6] && graphPrefs.grEnable[8]) { /* axes and labels enabled */ ! Coord dy1 = HanderaCoord(1); ! Coord dy10 = HanderaCoord(10); ! Coord dy15 = HanderaCoord(15); ! Coord dy26 = HanderaCoord(26); ! grtaps_print_val("y>",graphPrefs.ymin, ! xstd + 1, ! stdbounds.topLeft.y + stdbounds.extent.y - dy10, stdbounds.topLeft.x, ! stdbounds.topLeft.x + stdbounds.extent.x, align_left); ! grtaps_print_val("y<",graphPrefs.ymax, ! xstd + 1, ! stdbounds.topLeft.y - dy1, ! stdbounds.topLeft.x, ! stdbounds.topLeft.x + stdbounds.extent.x, ! align_left); ! ystd -= dy1; ! if (ystd < stdbounds.topLeft.y + dy15) ! ystd = stdbounds.topLeft.y + dy15; ! if (ystd > stdbounds.topLeft.y + stdbounds.extent.y - dy26) ! ystd = stdbounds.topLeft.y + stdbounds.extent.y - dy26; ! grtaps_print_val("x>",graphPrefs.xmin, ! stdbounds.topLeft.x + dy1, ! ystd, ! stdbounds.topLeft.x, ! stdbounds.topLeft.x + stdbounds.extent.x, ! align_left); ! grtaps_print_val("x<",graphPrefs.xmax, ! stdbounds.topLeft.x + stdbounds.extent.x, ! ystd, ! stdbounds.topLeft.x, stdbounds.topLeft.x + stdbounds.extent.x, align_right); } } Index: grtaps.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grtaps.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** grtaps.c 10 Nov 2006 04:12:56 -0000 1.30 --- grtaps.c 29 Jul 2007 01:31:18 -0000 1.31 *************** *** 377,380 **** --- 377,381 ---- * value - number to be drawn * x,y - coordinates + * xmin,xmax - keep text between xmin and xmax * align - alignment w.r.t. coordinates * *************** *** 383,391 **** ***********************************************************************/ void ! grtaps_print_val(char *name, double value, Coord x, Coord y, Ttxtalign align) { char text[MAX_FP_NUMBER+10]; TdispPrefs oldprefs; Char *numtxt; #ifdef SUPPORT_DIA --- 384,394 ---- ***********************************************************************/ void ! grtaps_print_val(char *name, double value, Coord x, Coord y, Coord xmin, Coord xmax, ! Ttxtalign align) { char text[MAX_FP_NUMBER+10]; TdispPrefs oldprefs; Char *numtxt; + Coord txtwidth; #ifdef SUPPORT_DIA *************** *** 399,408 **** if (finite(value)) { fp_print_double(numtxt, value); if (align == align_center) { ! x -= FntCharsWidth(text, StrLen(text)) / 2; } else if (align == align_right) { ! x -= FntCharsWidth(text, StrLen(text)); } WinInvertChars(text, StrLen(text), x, y); } --- 402,416 ---- if (finite(value)) { fp_print_double(numtxt, value); + txtwidth = FntCharsWidth(text, StrLen(text)); if (align == align_center) { ! x -= txtwidth / 2; } else if (align == align_right) { ! x -= txtwidth; } + if (x < xmin) + x = xmin; + if ((x + txtwidth) > xmax) + x = xmax - txtwidth; WinInvertChars(text, StrLen(text), x, y); } *************** *** 435,442 **** dy += HanderaCoord(7); grtaps_print_val("r:", r, bounds->topLeft.x + dx1, ! bounds->topLeft.y + bounds->extent.y - dy, align_left); grtaps_print_val("fi:", angle, bounds->topLeft.x + bounds->extent.x, ! bounds->topLeft.y + bounds->extent.y - dy, align_right); } --- 443,456 ---- dy += HanderaCoord(7); grtaps_print_val("r:", r, bounds->topLeft.x + dx1, ! bounds->topLeft.y + bounds->extent.y - dy, ! bounds->topLeft.x, ! bounds->topLeft.x + bounds->extent.x, ! align_left); grtaps_print_val("fi:", angle, bounds->topLeft.x + bounds->extent.x, ! bounds->topLeft.y + bounds->extent.y - dy, ! bounds->topLeft.x, ! bounds->topLeft.x + bounds->extent.x, ! align_right); } *************** *** 451,455 **** dy += HanderaCoord(7); grtaps_print_val("T:", t, bounds->topLeft.x + dx1, ! bounds->topLeft.y + bounds->extent.y - dy, align_left); } --- 465,472 ---- dy += HanderaCoord(7); grtaps_print_val("T:", t, bounds->topLeft.x + dx1, ! bounds->topLeft.y + bounds->extent.y - dy, ! bounds->topLeft.x, ! bounds->topLeft.x + bounds->extent.x, ! align_left); } *************** *** 466,473 **** if (graphPrefs.grEnable[8]) y += dy7; ! grtaps_print_val("x:", realx, bounds->topLeft.x + dx1, y, align_left); ! grtaps_print_val("y:", realy, bounds->topLeft.x + bounds->extent.x, ! y, align_right); } --- 483,495 ---- if (graphPrefs.grEnable[8]) y += dy7; ! grtaps_print_val("x:", realx, bounds->topLeft.x + dx1, y, ! bounds->topLeft.x, ! bounds->topLeft.x + bounds->extent.x, ! align_left); ! grtaps_print_val("y:", realy, bounds->topLeft.x + bounds->extent.x, y, ! bounds->topLeft.x, ! bounds->topLeft.x + bounds->extent.x, ! align_right); } Index: grtaps.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/grtaps.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** grtaps.h 10 Nov 2006 04:12:56 -0000 1.7 --- grtaps.h 29 Jul 2007 01:31:18 -0000 1.8 *************** *** 42,46 **** Boolean grtaps_track_but(void) GRAPH; void grtaps_print_val(char *name, double value, ! Coord x, Coord y, Ttxtalign align) GRAPH; void grtaps_track_manual(double value,TtrackAction action) GRAPH; void grtaps_track_pause(void) GRAPH; --- 42,46 ---- Boolean grtaps_track_but(void) GRAPH; void grtaps_print_val(char *name, double value, ! Coord x, Coord y, Coord xmin, Coord xmax, Ttxtalign align) GRAPH; void grtaps_track_manual(double value,TtrackAction action) GRAPH; void grtaps_track_pause(void) GRAPH; |
From: Ton v. O. <tvo...@us...> - 2007-07-29 01:28:42
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17:/tmp/cvs-serv6241 Modified Files: clie.c Log Message: Fix bug in clie_cliprectangle for Palm hires. Index: clie.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/clie.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** clie.c 12 Sep 2006 19:40:55 -0000 1.7 --- clie.c 29 Jul 2007 01:28:37 -0000 1.8 *************** *** 192,195 **** --- 192,197 ---- void clie_cliprectangle(RectangleType *rP) { + UInt16 save; + #ifdef SONY_SDK if(gHrMode == hrSony) *************** *** 197,200 **** --- 199,208 ---- else #endif + if (gHrMode == hrPalm) { + save = WinSetCoordinateSystem(kCoordinatesNative); + WinClipRectangle(rP); + WinSetCoordinateSystem(save); + } + else WinClipRectangle(rP); } |
Update of /cvsroot/easycalc/easycalc/langs In directory sc8-pr-cvs17:/tmp/cvs-serv29009 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: Update copyright message in About form. Index: it.rcp =================================================================== RCS file: /cvsroot/easycalc/easycalc/langs/it.rcp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** it.rcp 22 Sep 2006 20:05:14 -0000 1.18 --- it.rcp 28 Jul 2007 02:52:13 -0000 1.19 *************** *** 353,357 **** /*** 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 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ "This program is free software; you can redistribute it and/or modify "\ --- 353,357 ---- /*** 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 "\ Index: en.rcp =================================================================== RCS file: /cvsroot/easycalc/easycalc/langs/en.rcp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** en.rcp 22 Sep 2006 20:05:14 -0000 1.49 --- en.rcp 28 Jul 2007 02:52:13 -0000 1.50 *************** *** 340,344 **** "$$GNU NOTICE" = "The Scientific Calculator for PalmOS.\n"\ ! "Copyright (C) 1999-2003, 2006 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ "This program is free software; you can redistribute it and/or modify "\ --- 340,344 ---- "$$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 "\ Index: ru_koi8.rcp =================================================================== RCS file: /cvsroot/easycalc/easycalc/langs/ru_koi8.rcp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ru_koi8.rcp 28 Dec 2006 03:18:49 -0000 1.16 --- ru_koi8.rcp 28 Jul 2007 02:52:13 -0000 1.17 *************** *** 340,344 **** "$$GNU NOTICE" = "The Scientific Calculator for PalmOS.\n"\ ! "Copyright (C) 1999-2003, 2006 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ "This program is free software; you can redistribute it and/or modify "\ --- 340,344 ---- "$$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 "\ Index: cs.rcp =================================================================== RCS file: /cvsroot/easycalc/easycalc/langs/cs.rcp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** cs.rcp 22 Sep 2006 20:05:14 -0000 1.30 --- cs.rcp 28 Jul 2007 02:52:13 -0000 1.31 *************** *** 336,340 **** "$$GNU NOTICE" = "The Scientific Calculator for PalmOS.\n"\ ! "Copyright (C) 1999-2003, 2006 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ "This program is free software; you can redistribute it and/or modify "\ --- 336,340 ---- "$$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 "\ Index: pt.rcp =================================================================== RCS file: /cvsroot/easycalc/easycalc/langs/pt.rcp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pt.rcp 22 Sep 2006 20:05:14 -0000 1.17 --- pt.rcp 28 Jul 2007 02:52:13 -0000 1.18 *************** *** 354,358 **** "$$GNU NOTICE" = "A Calculadora Científica para PalmOS.\n"\ ! "Copyright (C) 1999-2003, 2006 Ondrej Palkovsky\n"\ "http://easycalc.sourceforge.net\n\n"\ " Portuguese Resources - Carlos Irapuan Lube de Menezes \n"\ --- 354,358 ---- "$$GNU NOTICE" = "A Calculadora Científica para PalmOS.\n"\ ! "Copyright (C) 1999-2003, 2006, 2007 Ondrej Palkovsky\n"\ "http://easycalc.sourceforge.net\n\n"\ " Portuguese Resources - Carlos Irapuan Lube de Menezes \n"\ Index: ru_win.rcp =================================================================== RCS file: /cvsroot/easycalc/easycalc/langs/ru_win.rcp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ru_win.rcp 28 Dec 2006 03:18:49 -0000 1.15 --- ru_win.rcp 28 Jul 2007 02:52:13 -0000 1.16 *************** *** 345,349 **** "$$GNU NOTICE" = "The Scientific Calculator for PalmOS.\n"\ ! "Copyright (C) 1999-2003, 2006 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ "This program is free software; you can redistribute it and/or modify "\ --- 345,349 ---- "$$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 "\ Index: ja.rcp =================================================================== RCS file: /cvsroot/easycalc/easycalc/langs/ja.rcp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ja.rcp 22 Sep 2006 20:05:14 -0000 1.7 --- ja.rcp 28 Jul 2007 02:52:13 -0000 1.8 *************** *** 348,352 **** "$$GNU NOTICE" = "The Scientific Calculator for PalmOS.\n"\ "ú{êóFYo...@po...\n"\ ! "Copyright (C) 1999-2003, 2006 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ "This program is free software; you can redistribute it and/or modify "\ --- 348,352 ---- "$$GNU NOTICE" = "The Scientific Calculator for PalmOS.\n"\ "ú{êóFYo...@po...\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 "\ Index: fr.rcp =================================================================== RCS file: /cvsroot/easycalc/easycalc/langs/fr.rcp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** fr.rcp 22 Sep 2006 20:05:14 -0000 1.19 --- fr.rcp 28 Jul 2007 02:52:13 -0000 1.20 *************** *** 360,364 **** "$$GNU NOTICE" = "La calculatrice scientifique pour PalmOS\n"\ ! "Copyright (C) 1999-2003, 2006 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ " Traduction française par Daniel Lemire, Ph.D. \n"\ --- 360,364 ---- "$$GNU NOTICE" = "La calculatrice scientifique pour PalmOS\n"\ ! "Copyright (C) 1999-2003, 2006, 2007 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ " Traduction française par Daniel Lemire, Ph.D. \n"\ Index: sp.rcp =================================================================== RCS file: /cvsroot/easycalc/easycalc/langs/sp.rcp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** sp.rcp 20 Oct 2006 16:33:28 -0000 1.43 --- sp.rcp 28 Jul 2007 02:52:13 -0000 1.44 *************** *** 355,359 **** "$$GNU NOTICE" = "La Calculadora Científica para PalmOS\n"\ ! "Copyright (C) 1999-2003, 2006 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ "Este programa es software libre; puede redistribuirlo y/o modificarlo "\ --- 355,359 ---- "$$GNU NOTICE" = "La Calculadora Científica para PalmOS\n"\ ! "Copyright (C) 1999-2003, 2006, 2007 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ "Este programa es software libre; puede redistribuirlo y/o modificarlo "\ Index: de.rcp =================================================================== RCS file: /cvsroot/easycalc/easycalc/langs/de.rcp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** de.rcp 22 Sep 2006 20:05:14 -0000 1.43 --- de.rcp 28 Jul 2007 02:52:13 -0000 1.44 *************** *** 352,356 **** /* get official German GNU license if you want to have translated text here ! */ "$$GNU NOTICE" = "Der Wissenschaftliche Taschenrechner für PalmOS.\n"\ ! "Copyright (C) 1999-2003, 2006 Ondrej Palkovsky.\n"\ "http://easycalc.sourceforge.net\n\n"\ "This program is free software; you can redistribute it and/or modify "\ --- 352,356 ---- /* get official German GNU license if you want to have translated text here ! */ "$$GNU NOTICE" = "Der Wissenschaftliche Taschenrechner für 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 "\ |
From: Ton v. O. <tvo...@us...> - 2007-07-25 01:19:54
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17:/tmp/cvs-serv815 Modified Files: fp.c stack.c Log Message: Only use "reduce precision" in calculations, *not* in display. Index: stack.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/stack.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** stack.c 29 May 2007 15:19:13 -0000 1.37 --- stack.c 25 Jul 2007 01:19:41 -0000 1.38 *************** *** 438,447 **** reduce_precision(double value) { ! double m,l; l = round(ROUND_OFFSET - log10(value)); if (finite(l) && l > 2.0) { ! m = pow(10.0,l); ! value = round(m*value)/m; } return value; --- 438,447 ---- reduce_precision(double value) { ! double m, l; l = round(ROUND_OFFSET - log10(value)); if (finite(l) && l > 2.0) { ! m = pow(10.0, l); ! value = round(m * value) / m; } return value; Index: fp.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/fp.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** fp.c 12 Sep 2006 19:40:56 -0000 1.13 --- fp.c 25 Jul 2007 01:19:41 -0000 1.14 *************** *** 42,49 **** static double SCI_LIMIT_MAX; /* Above this number show it as xEy */ static double SCI_LIMIT_MIN; /* Under this number show as xE-y */ ! static double DISP_MIN_LIMIT = 1E-15; /* Show numbers as sin(pi) as 1E-16, ! it's 0 */ ! static double DISP_MAX_LIMIT = 1E300; /* Don't show bigger numbers, it ! * makes problems */ static double BASE = 10.0; char flPointChar = '.'; --- 42,49 ---- static double SCI_LIMIT_MAX; /* Above this number show it as xEy */ static double SCI_LIMIT_MIN; /* Under this number show as xE-y */ ! //static double DISP_MIN_LIMIT = 1E-15; /* Show numbers as sin(pi) as 1E-16, ! // it's 0 */ ! //static double DISP_MAX_LIMIT = 1E300; /* Don't show bigger numbers, it ! // * makes problems */ static double BASE = 10.0; char flPointChar = '.'; *************** *** 54,58 **** * 9.999999987E-10 */ ! static double REDUCE_PREC = 1E-6; #define REDUCE_TO 6 --- 54,58 ---- * 9.999999987E-10 */ ! //static double REDUCE_PREC = 1E-6; #define REDUCE_TO 6 *************** *** 118,123 **** // REDUCE_PREC = 1E-6; // } else { ! DISP_MIN_LIMIT = 1E-100; ! REDUCE_PREC = 1E-90; // } } --- 118,123 ---- // REDUCE_PREC = 1E-6; // } else { ! // DISP_MIN_LIMIT = 1E-100; ! // REDUCE_PREC = 1E-90; // } } *************** *** 253,257 **** cvt_fltoa(str,fpart); strP += StrLen(strP); ! if (dispPrefs.stripZeros) { /* remove trailing 0's */ --- 253,264 ---- cvt_fltoa(str,fpart); strP += StrLen(strP); ! ! if (!dispPrefs.stripZeros && fpart < 1.0) { ! *strP++ = flPointChar; ! for (i = 0; i < myfrac; i++) { ! *strP++ = '0'; ! } ! *strP = '\0'; ! } if (dispPrefs.stripZeros) { /* remove trailing 0's */ *************** *** 318,330 **** fp_print(strP,value,dispPrefs.decPoints); } ! else if (fabs(value)>DISP_MAX_LIMIT) { ! StrCopy(strP,"It's too big"); ! } ! else if (fabs(value)<DISP_MIN_LIMIT) { ! /* Don't show too small numbers */ ! fp_print(strP,0,dispPrefs.decPoints); ! if (dispPrefs.mode!=disp_normal) ! fp_print_exp(strP+StrLen(strP),0); ! } else if (fabs(value)>=1 && dispPrefs.mode==disp_eng) { /* Engineer mode selected */ --- 325,337 ---- fp_print(strP,value,dispPrefs.decPoints); } ! // else if (fabs(value)>DISP_MAX_LIMIT) { ! // StrCopy(strP,"It's too big"); ! // } ! // else if (fabs(value)<DISP_MIN_LIMIT) { ! // /* Don't show too small numbers */ ! // fp_print(strP,0,dispPrefs.decPoints); ! // if (dispPrefs.mode!=disp_normal) ! // fp_print_exp(strP+StrLen(strP),0); ! // } else if (fabs(value)>=1 && dispPrefs.mode==disp_eng) { /* Engineer mode selected */ |
From: Jorge G. <cl...@us...> - 2007-05-31 14:56:37
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17:/tmp/cvs-serv19827 Modified Files: slist.c Log Message: fixed bug Index: slist.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/slist.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** slist.c 31 May 2007 00:03:37 -0000 1.37 --- slist.c 31 May 2007 14:56:31 -0000 1.38 *************** *** 739,753 **** UInt32 ini,end; ! if (func->paramcount != 3) return c_badargcount; - err = stack_get_val(stack, &end, integer); - if (err) - return err; - err = stack_get_val(stack, &ini, integer); if (err) return err; err = stack_get_val(stack, &lst, list); if (err) --- 739,756 ---- UInt32 ini,end; ! if (func->paramcount == 3){ ! err = stack_get_val(stack, &end, integer); ! if (err) ! return err; ! }else if (func->paramcount != 2) return c_badargcount; err = stack_get_val(stack, &ini, integer); if (err) return err; + if (func->paramcount == 2) + end=ini; + err = stack_get_val(stack, &lst, list); if (err) |
From: Jorge G. <cl...@us...> - 2007-05-31 00:03:43
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17:/tmp/cvs-serv21040 Modified Files: cmatrix.c funcs.c matrix.c slist.c Log Message: improved list and matrix use referring: -------------- - list[i] (or list[i:i]) returns the i-th element of a list - list[i:k] (k!=i) returns a list with the elements from i to k of a list - matrix[m:n] returns the element of the m-th row and n-th column of matrix - matrix[m:.] (or matrix[m:0]) returns a list with the m-th row of a matrix - matrix[.:n] (or matrix[0:n]) returns a list with the n-th column of a matrix assignmet: -------------- - list[i]=val (or list[i:i]=val) assigns a value to the i-th element of a list andd returns the list - list[i:k]=list2 (k!=i) assigns the elements of a list2 to the elements from i to k of a list and returns the list - matrix[m:n]=val assigns a value to the (m,n) element of matrix and returns the matrix - matrix[m:.]=list (or matrix[m:0]=list) assignts the elements of a list to the m-th row of a matrix and returns the matrix - matrix[.:n]=list (or matrix[m:0]=list) assignts the elements of a list to the n-th column of a matrix and returns the matrix Index: cmatrix.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/cmatrix.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** cmatrix.c 28 Sep 2006 13:24:20 -0000 1.28 --- cmatrix.c 31 May 2007 00:03:37 -0000 1.29 *************** *** 1221,1239 **** cmatrix_item(Functype *func, CodeStack *stack) { - UInt32 row,col; CError err; - Complex result; CMatrix *m; ! if (func->paramcount == 3){ ! err = stack_get_val(stack, &col, integer); ! if (err) ! return err; ! } ! else{ ! if (func->paramcount != 2) ! return c_badargcount; ! col=1; ! } err = stack_get_val(stack, &row, integer); --- 1221,1234 ---- cmatrix_item(Functype *func, CodeStack *stack) { CError err; CMatrix *m; + UInt32 row,col; ! if (func->paramcount != 3) ! return c_badargcount; ! ! err = stack_get_val(stack, &col, integer); ! if (err) ! return err; err = stack_get_val(stack, &row, integer); *************** *** 1245,1274 **** return err; ! if (col > m->cols || row > m->rows || col == 0 || row == 0){ cmatrix_delete(m); return c_baddim; } ! if (func->paramcount == 2){ ! List *lresult; ! int i; ! ! lresult = list_new(m->cols); ! if(!lresult){ ! cmatrix_delete(m); ! return c_memory; ! } ! ! for(i=0;i<m->cols;i++){ ! lresult->item[i] = MATRIX(m,row-1,i); ! } ! err = stack_add_val(stack,&lresult,list); ! list_delete(lresult); ! } else{ ! result = MATRIX(m,row-1,col-1); ! err = stack_add_val(stack, &result, complex); } ! cmatrix_delete(m); return err; --- 1240,1274 ---- return err; ! if ( row > m->rows || col > m->cols || (col == 0 && row==0)){ cmatrix_delete(m); return c_baddim; } ! if(col && row) ! err = stack_add_val(stack,&MATRIX(m,row-1,col-1),complex); else{ ! Int16 i; ! List *lst; ! if(row==0){ ! lst=list_new(m->rows); ! if(!lst){ ! cmatrix_delete(m); ! return c_memory; ! } ! for(i=0;i<m->rows;i++) ! lst->item[i]=MATRIX(m,i,col-1); ! }else{ ! lst=list_new(m->cols); ! if(!lst){ ! cmatrix_delete(m); ! return c_memory; ! } ! for(i=0;i<m->cols;i++) ! lst->item[i]=MATRIX(m,row-1,i); ! } ! err = stack_add_val(stack,&lst,list); ! list_delete(lst); } ! cmatrix_delete(m); return err; Index: slist.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/slist.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** slist.c 28 Sep 2006 13:36:31 -0000 1.36 --- slist.c 31 May 2007 00:03:37 -0000 1.37 *************** *** 735,758 **** list_item(Functype *func, CodeStack *stack) { - List *lst; CError err; ! UInt32 intarg; ! Complex result; ! err = stack_get_val(stack,&intarg,integer); ! if (err) return err; ! err = stack_get_val(stack,&lst,list); ! if (err) return err; ! if (intarg == 0 || intarg > lst->size){ list_delete(lst); return c_baddim; } ! ! result = lst->item[intarg-1]; ! err = stack_add_val(stack,&result,complex); list_delete(lst); --- 735,781 ---- list_item(Functype *func, CodeStack *stack) { CError err; ! List *lst; ! UInt32 ini,end; ! if (func->paramcount != 3) ! return c_badargcount; ! ! err = stack_get_val(stack, &end, integer); ! if (err) return err; ! err = stack_get_val(stack, &ini, integer); ! if (err) ! return err; ! ! err = stack_get_val(stack, &lst, list); ! if (err) return err; ! if ( ini==0 || end == 0 || ini > lst->size || end > lst->size){ list_delete(lst); return c_baddim; } ! ! if(ini==end){ ! if (lst->item[end-1].imag == 0.0) ! err = stack_add_val(stack,&lst->item[end-1].real,real); ! else ! err = stack_add_val(stack,&lst->item[end-1],complex); ! }else{ ! Int16 i,dif=end-ini; ! List *lst2=list_new(abs(dif)+1); ! if(!lst2){ ! list_delete(lst); ! return c_memory; ! } ! for(i=0;i<lst2->size;i++){ ! lst2->item[i]=lst->item[ini-1]; ! ini+=sgn(dif); ! } ! err = stack_add_val(stack,&lst2,list); ! list_delete(lst2); ! } list_delete(lst); Index: matrix.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/matrix.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** matrix.c 28 Sep 2006 13:24:20 -0000 1.32 --- matrix.c 31 May 2007 00:03:37 -0000 1.33 *************** *** 889,907 **** matrix_item(Functype *func, CodeStack *stack) { - UInt32 row,col; CError err; - double result; Matrix *m; ! if (func->paramcount == 3){ ! err = stack_get_val(stack, &col, integer); ! if (err) ! return err; ! } ! else{ ! if (func->paramcount != 2) ! return c_badargcount; ! col=1; ! } err = stack_get_val(stack, &row, integer); --- 889,902 ---- matrix_item(Functype *func, CodeStack *stack) { CError err; Matrix *m; + UInt32 row,col; ! if (func->paramcount != 3) ! return c_badargcount; ! ! err = stack_get_val(stack, &col, integer); ! if (err) ! return err; err = stack_get_val(stack, &row, integer); *************** *** 913,943 **** return err; ! if (col > m->cols || row > m->rows || col == 0 || row == 0){ matrix_delete(m); return c_baddim; } ! if (func->paramcount == 2){ ! List *lresult; ! int i; ! ! lresult = list_new(m->cols); ! if(!lresult){ ! matrix_delete(m); ! return c_memory; ! } ! ! for(i=0;i<m->cols;i++){ ! lresult->item[i].real = MATRIX(m,row-1,i); ! lresult->item[i].imag = 0.0; ! } ! err = stack_add_val(stack,&lresult,list); ! list_delete(lresult); ! } else{ ! result = MATRIX(m,row-1,col-1); ! err = stack_add_val(stack, &result, real); } ! matrix_delete(m); return err; --- 908,946 ---- return err; ! if ( row > m->rows || col > m->cols || (col == 0 && row==0)){ matrix_delete(m); return c_baddim; } ! if(col && row) ! err = stack_add_val(stack,&MATRIX(m,row-1,col-1),real); else{ ! Int16 i; ! List *lst; ! if(row==0){ ! lst=list_new(m->rows); ! if(!lst){ ! matrix_delete(m); ! return c_memory; ! } ! for(i=0;i<m->rows;i++){ ! lst->item[i].real=MATRIX(m,i,col-1); ! lst->item[i].imag=0.0; ! } ! }else{ ! lst=list_new(m->cols); ! if(!lst){ ! matrix_delete(m); ! return c_memory; ! } ! for(i=0;i<m->cols;i++){ ! lst->item[i].real=MATRIX(m,row-1,i); ! lst->item[i].imag=0.0; ! } ! } ! err = stack_add_val(stack,&lst,list); ! list_delete(lst); } ! matrix_delete(m); return err; Index: funcs.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/funcs.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** funcs.c 4 Oct 2006 00:39:17 -0000 1.51 --- funcs.c 31 May 2007 00:03:37 -0000 1.52 *************** *** 222,273 **** } else if (source.type == litem) { CodeStack *tstack; ! Int16 col = source.u.litemval.col; ! Int16 row = source.u.litemval.row; ! tmp = db_read_variable(source.u.litemval.name,&err); if (err) return err; ! tstack = stack_new(1); ! ! if (tmp.type == list) { ! List *lst = tmp.u.listval; ! ! if (row != 0) ! err = c_badargcount; ! else if (col == 0 || col > lst->size) ! err = c_badarg; ! else { ! if (lst->item[col-1].imag == 0.0) ! err = stack_add_val(tstack,&lst->item[col-1].real,real); ! else ! err = stack_add_val(tstack,&lst->item[col-1],complex); ! if (!err) ! *dest = stack_pop(tstack); ! } ! } else if (tmp.type == matrix) { ! Matrix *m = tmp.u.matrixval; ! ! if (row == 0 || col == 0 || ! row > m->rows || col > m->cols) ! err = c_baddim; ! else { ! err = stack_add_val(tstack,&MATRIX(m,row-1,col-1),real); ! if (!err) ! *dest = stack_pop(tstack); ! } ! } else if (tmp.type == cmatrix) { ! CMatrix *m = tmp.u.cmatrixval; ! ! if (row == 0 || col == 0 || ! row > m->rows || col > m->cols) ! err = c_baddim; ! else { ! err = stack_add_val(tstack,&MATRIX(m,row-1,col-1),complex); ! if (!err) ! *dest = stack_pop(tstack); ! } ! } else err = c_badarg; stack_delete(tstack); rpn_delete(tmp); --- 222,261 ---- } else if (source.type == litem) { CodeStack *tstack; ! Functype *func=MemPtrNew(sizeof(*func)); ! UInt32 row=source.u.litemval.row; ! UInt32 col=source.u.litemval.col; ! tmp = db_read_variable(source.u.litemval.name,&err); if (err) return err; ! ! func->paramcount=3; ! tstack = stack_new(3); ! ! if(tmp.type==list) ! err = stack_add_val(tstack,&tmp.u.listval,list); ! else if(tmp.type==matrix) ! err = stack_add_val(tstack,&tmp.u.matrixval,matrix); ! else if(tmp.type==cmatrix) ! err = stack_add_val(tstack,&tmp.u.cmatrixval,cmatrix); ! else err = c_badarg; + + if(!err) + err = stack_add_val(tstack,&row,integer); + err = stack_add_val(tstack,&col,integer); + + if(!err){ + if(tmp.type==list) + err = list_item(func,tstack); + else if(tmp.type==matrix) + err = matrix_item(func,tstack); + else + err = cmatrix_item(func,tstack); + } + if(!err) + *dest = stack_pop(tstack); + MemPtrFree(func); stack_delete(tstack); rpn_delete(tmp); *************** *** 474,524 **** Int16 col = item2.u.litemval.col; CodeStack *tstack; ! tstack = stack_new(1); stack_push(tstack,item1); ! tmp = db_read_variable(item2.u.litemval.name,&err); if (!err) { if (tmp.type == list) { List *lst = tmp.u.listval; ! if (row != 0 || col == 0 || col > lst->size) err = c_baddim; ! else { err = stack_get_val(tstack,&lst->item[col-1],complex); ! if (!err) ! db_write_variable(item2.u.litemval.name,tmp); } } else if (tmp.type == matrix) { Matrix *m = tmp.u.matrixval; ! if (row == 0 || col == 0 || ! col > m->cols || row > m->rows) err = c_baddim; ! else { ! err = stack_get_val(tstack,&MATRIX(m,row-1,col-1), ! real); ! if (!err) ! db_write_variable(item2.u.litemval.name,tmp); } } else if (tmp.type == cmatrix) { CMatrix *m = tmp.u.cmatrixval; ! if (row == 0 || col == 0 || ! col > m->cols || row > m->rows) err = c_baddim; ! else { ! err = stack_get_val(tstack,&MATRIX(m,row-1,col-1), ! complex); ! if (!err) ! db_write_variable(item2.u.litemval.name,tmp); } } else err = c_badarg; ! rpn_delete(tmp); } stack_delete(tstack); ! ! if (!err) ! stack_push(stack,item2); ! else ! rpn_delete(item2); return err; } else if (item2.type == variable) { --- 462,563 ---- Int16 col = item2.u.litemval.col; CodeStack *tstack; ! tstack = stack_new(1); stack_push(tstack,item1); ! tmp = db_read_variable(item2.u.litemval.name,&err); if (!err) { if (tmp.type == list) { List *lst = tmp.u.listval; ! if ( row==0 || col == 0 || row > lst->size || col > lst->size) err = c_baddim; ! else if(row==col){ err = stack_get_val(tstack,&lst->item[col-1],complex); ! }else{ ! List *lst2; ! err = stack_get_val(tstack,&lst2,list); ! if(!err){ ! Int16 i,dif=col-row; ! if(lst2->size != abs(dif)+1) ! err = c_baddim; ! else for(i=0;i<lst2->size;i++){ ! lst->item[row-1]=lst2->item[i]; ! row+=sgn(dif); ! } ! list_delete(lst2); ! } } + if (!err) + db_write_variable(item2.u.litemval.name,tmp); } else if (tmp.type == matrix) { Matrix *m = tmp.u.matrixval; ! if ( row > m->rows || col > m->cols || (col == 0 && row==0)) err = c_baddim; ! else if(col && row) ! err = stack_get_val(tstack,&MATRIX(m,row-1,col-1),real); ! else{ ! List *lst; ! err = stack_get_val(tstack,&lst,list); ! if(!err){ ! Int16 i; ! if(row==0){ ! if(lst->size != m->rows) ! err = c_baddim; ! for(i=0;(!err && i<m->rows);i++){ ! if(!IS_ZERO(lst->item[i].imag)) ! err = c_badarg; ! MATRIX(m,i,col-1)=lst->item[i].real; ! } ! }else{ ! if(lst->size != m->cols) ! err = c_baddim; ! for(i=0;(!err && i<m->cols);i++){ ! if(!IS_ZERO(lst->item[i].imag)) ! err = c_badarg; ! MATRIX(m,row-1,i)=lst->item[i].real; ! } ! } ! list_delete(lst); ! } } + if (!err) + db_write_variable(item2.u.litemval.name,tmp); } else if (tmp.type == cmatrix) { CMatrix *m = tmp.u.cmatrixval; ! if ( row > m->rows || col > m->cols || (col == 0 && row==0)) err = c_baddim; ! else if(col && row) ! err = stack_get_val(tstack,&MATRIX(m,row-1,col-1),complex); ! else{ ! List *lst; ! err = stack_get_val(tstack,&lst,list); ! if(!err){ ! Int16 i; ! if(row==0){ ! if(lst->size != m->rows) ! err = c_baddim; ! else for(i=0;i<m->rows;i++) ! MATRIX(m,i,col-1)=lst->item[i]; ! }else{ ! if(lst->size != m->cols) ! err = c_baddim; ! else for(i=0;i<m->cols;i++) ! MATRIX(m,row-1,i)=lst->item[i]; ! } ! list_delete(lst); ! } } + if (!err) + db_write_variable(item2.u.litemval.name,tmp); } else err = c_badarg; ! if(!err) ! /* Return all the list/matrix, not only the element(s) */ ! stack_push(stack,tmp); ! else ! rpn_delete(tmp); } stack_delete(tstack); ! rpn_delete(item2); return err; } else if (item2.type == variable) { *************** *** 1042,1069 **** func_item(Functype *func, CodeStack *stack) { ! rpntype type; CError err; ! if (func->paramcount == 2) ! err = stack_item_type(stack,&type,1); ! else if (func->paramcount == 3) ! err = stack_item_type(stack,&type,2); else err = c_badargcount; if (err) return err; ! ! switch (type){ ! 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; } ! } #else /* Not specfun enabled */ CError --- 1081,1135 ---- func_item(Functype *func, CodeStack *stack) { ! rpntype type1,type2; CError err; ! err = stack_item_type(stack,&type2,(func->paramcount-1)); ! if (err) ! return err; ! ! if (func->paramcount==2 && type2==list) ! err = stack_item_type_nr(stack,&type1,1); ! else if (func->paramcount==3) ! err = stack_item_type_nr(stack,&type1,2); else err = c_badargcount; if (err) return err; ! ! if (type1 == variable) { ! UInt32 arg1=0,arg2=0; ! Trpn item,ritem; ! ! err = stack_get_val(stack,&arg2,integer); ! if (err) ! return err; ! if (func->paramcount == 3) { ! err = stack_get_val(stack,&arg1,integer); ! if (err) ! return err; ! }else ! arg1=arg2; ! ! 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; } + #else /* Not specfun enabled */ CError |