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
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5308 Modified Files: calc.c calc.rcp.in calcrsc.h graph.c graph.rcp.in grprefs.c grsetup.c grsetup.h prefs.c Log Message: Try to make UI elements more consistent: Use selectortriggers (dotted border) for pop-up lists and buttons (solid border) for toggles (e.g. Rad/Deg/Grd) and actions. Remove grayscale color selection form. Use system Pick Color dialog for both grayscale and color devices. Remove color selection button on graph form (grayscale only). Add color selection buttons for functions, axes, grid and background to graph setup form. Index: calc.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.rcp.in,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** calc.rcp.in 1 Oct 2006 22:42:05 -0000 1.110 --- calc.rcp.in 16 Oct 2006 18:58:37 -0000 1.111 *************** *** 287,293 **** FIELD ID varEditParam AT (120 15 30 12) EDITABLE UNDERLINED MAXCHARS 10 NONUSABLE ! BUTTON "Rcl" ID varListButton AT (102 58 15 12) NOFRAME ! BUTTON "F" ID varFuncListButton AT (PREVRIGHT PREVTOP 15 12) NOFRAME ! BUTTON "f" ID varBuiltinListButton AT (PREVRIGHT PREVTOP 15 12) NOFRAME LIST "" ID varList AT (30 10 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 --- 287,293 ---- FIELD ID varEditParam AT (120 15 30 12) EDITABLE UNDERLINED MAXCHARS 10 NONUSABLE ! SELECTORTRIGGER "Rcl" ID varListButton AT (102 58 15 11) ! SELECTORTRIGGER "F" ID varFuncListButton AT (PREVRIGHT+1 PREVTOP 9 11) ! SELECTORTRIGGER "f" ID varBuiltinListButton AT (PREVRIGHT+1 PREVTOP 9 11) LIST "" ID varList AT (30 10 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 *************** *** 413,490 **** MENUID tdMenu BEGIN ! TITLE "$$INTEGER" ! ! PUSHBUTTON "B" ID btnBasic AT (106 1 10 12) GROUP 1 ! PUSHBUTTON "S" ID btnScientific AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "I" ID btnInteger AT (PREVRIGHT+1 1 10 12) GROUP 1 #ifdef GRAPHS_ENABLED ! PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 #endif - - GADGET ID resultGadget AT (5 16 138 16) - FIELD ID tdInput AT (0 32 145 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE - - POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) ! BUTTON "M" ID calcResPopupBut AT (148 15 13 12) NOFRAME ! LIST "" ID calcResList AT (70 20 70 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID calcResPopup calcResList ! ! BUTTON "Rcl" ID varListButton AT (75 1 15 12) NOFRAME ! BUTTON "F" ID varFuncListButton AT (PREVRIGHT 1 15 12) NOFRAME ! BUTTON "f" ID varBuiltinListButton AT (150 1 10 12) NOFRAME ! ! LIST "" ID varList AT (30 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID varListPopup varList ! ! LIST "" ID histList AT (25 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID histListPopup histList ! LIST "" ID varBuiltinList AT (80 20 65 132) NONUSABLE DISABLED VISIBLEITEMS 12 ! BUTTON "Clr" ID btnMainClear AT (134 60 22 14) ! BUTTON "/" ID btnMainDivide AT (PREVLEFT 75 22 14) FONT 1 ! BUTTON "*" ID btnMainMult AT (PREVLEFT 90 22 14) FONT 1 ! BUTTON "-" ID btnMainMinus AT (PREVLEFT 105 22 14) FONT 1 ! BUTTON "+" ID btnMainPlus AT (PREVLEFT 120 22 14) FONT 1 ! //FORMBITMAP AT (134 137) BITMAP bmpExe USABLE ! BUTTON "EXE" ID tdDoit AT (135 138 20 20) FONT 1 BOLDFRAME ! BUTTON "7" ID btnMain7 AT (55 60 20 15) ! BUTTON "8" ID btnMain8 AT (80 60 20 15) ! BUTTON "9" ID btnMain9 AT (105 60 20 15) ! BUTTON "4" ID btnMain4 AT (55 80 20 15) ! BUTTON "5" ID btnMain5 AT (80 80 20 15) ! BUTTON "6" ID btnMain6 AT (105 80 20 15) ! BUTTON "1" ID btnMain1 AT (55 100 20 15) ! BUTTON "2" ID btnMain2 AT (80 100 20 15) ! BUTTON "3" ID btnMain3 AT (105 100 20 15) ! BUTTON "0" ID btnMain0 AT (55 120 20 15) ! BUTTON "&" ID btnMainAnd AT (80 120 20 15) ! BUTTON "|" ID btnMainOr AT (105 120 20 15) ! BUTTON "¥" ID btnMainXor AT (55 140 20 15) ! BUTTON "<<" ID btnMainShl AT (80 140 20 15) ! BUTTON ">>" ID btnMainShr AT (105 140 20 15) ! BUTTON "A" ID btnMainA AT (5 60 20 15) ! BUTTON "B" ID btnMainB AT (30 60 20 15) ! BUTTON "C" ID btnMainC AT (5 80 20 15) ! BUTTON "D" ID btnMainD AT (30 80 20 15) ! BUTTON "E" ID btnMainE AT (5 100 20 15) ! BUTTON "F" ID btnMainF AT (30 100 20 15) ! ! PUSHBUTTON "Bin" ID tdIntBin AT (5 120 20 15) GROUP 3 ! PUSHBUTTON "Oct" ID tdIntOct AT (30 120 20 15) GROUP 3 ! PUSHBUTTON "Dec" ID tdIntDec AT (5 140 20 15) GROUP 3 ! PUSHBUTTON "Hex" ID tdIntHex AT (30 140 20 15) GROUP 3 ! GRAFFITISTATEINDICATOR AT (149 47) END --- 413,489 ---- MENUID tdMenu BEGIN ! TITLE "$$INTEGER" ! ! SELECTORTRIGGER "Rcl" ID varListButton AT (76 1 15 11) ! SELECTORTRIGGER "F" ID varFuncListButton AT (PREVRIGHT+1 1 9 11) ! SELECTORTRIGGER "f" ID varBuiltinListButton AT (PREVRIGHT+1 1 9 11) ! ! LIST "" ID varList AT (30 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID varListPopup varList ! ! LIST "" ID varBuiltinList AT (80 20 65 132) NONUSABLE DISABLED VISIBLEITEMS 12 ! POPUPLIST ID varBuiltinListPopup varBuiltinList ! ! PUSHBUTTON "B" ID btnBasic AT (116 1 10 12) GROUP 1 ! PUSHBUTTON "S" ID btnScientific AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "I" ID btnInteger AT (PREVRIGHT+1 1 10 12) GROUP 1 #ifdef GRAPHS_ENABLED ! PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 #endif ! GADGET ID resultGadget AT (5 16 137 16) ! FIELD ID tdInput AT (1 32 136 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE ! GRAFFITISTATEINDICATOR AT (138 37) ! SELECTORTRIGGER "M" ID calcResPopupBut AT (148 17 11 10) ! LIST "" ID calcResList AT (70 20 70 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID calcResPopup calcResList ! SELECTORTRIGGER "H" ID btnHistory AT (148 32 11 10) ! LIST "" ID histList AT (25 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID histListPopup histList ! BUTTON "Clr" ID btnMainClear AT (134 60 22 14) ! BUTTON "/" ID btnMainDivide AT (PREVLEFT 75 22 14) FONT 1 ! BUTTON "*" ID btnMainMult AT (PREVLEFT 90 22 14) FONT 1 ! BUTTON "-" ID btnMainMinus AT (PREVLEFT 105 22 14) FONT 1 ! BUTTON "+" ID btnMainPlus AT (PREVLEFT 120 22 14) FONT 1 ! //FORMBITMAP AT (134 137) BITMAP bmpExe USABLE ! BUTTON "EXE" ID tdDoit AT (135 138 20 20) FONT 1 BOLDFRAME ! ! BUTTON "7" ID btnMain7 AT (55 60 20 15) ! BUTTON "8" ID btnMain8 AT (80 60 20 15) ! BUTTON "9" ID btnMain9 AT (105 60 20 15) ! BUTTON "4" ID btnMain4 AT (55 80 20 15) ! BUTTON "5" ID btnMain5 AT (80 80 20 15) ! BUTTON "6" ID btnMain6 AT (105 80 20 15) ! BUTTON "1" ID btnMain1 AT (55 100 20 15) ! BUTTON "2" ID btnMain2 AT (80 100 20 15) ! BUTTON "3" ID btnMain3 AT (105 100 20 15) ! BUTTON "0" ID btnMain0 AT (55 120 20 15) ! BUTTON "&" ID btnMainAnd AT (80 120 20 15) ! BUTTON "|" ID btnMainOr AT (105 120 20 15) ! BUTTON "¥" ID btnMainXor AT (55 140 20 15) ! BUTTON "<<" ID btnMainShl AT (80 140 20 15) ! BUTTON ">>" ID btnMainShr AT (105 140 20 15) ! BUTTON "A" ID btnMainA AT (5 60 20 15) ! BUTTON "B" ID btnMainB AT (30 60 20 15) ! BUTTON "C" ID btnMainC AT (5 80 20 15) ! BUTTON "D" ID btnMainD AT (30 80 20 15) ! BUTTON "E" ID btnMainE AT (5 100 20 15) ! BUTTON "F" ID btnMainF AT (30 100 20 15) ! PUSHBUTTON "Bin" ID tdIntBin AT (5 120 20 15) GROUP 3 ! PUSHBUTTON "Oct" ID tdIntOct AT (30 120 20 15) GROUP 3 ! PUSHBUTTON "Dec" ID tdIntDec AT (5 140 20 15) GROUP 3 ! PUSHBUTTON "Hex" ID tdIntHex AT (30 140 20 15) GROUP 3 END *************** *** 492,602 **** MENUID tdMenu BEGIN ! TITLE "$$SCIENTIFIC" ! ! PUSHBUTTON "B" ID btnBasic AT (106 1 10 12) GROUP 1 ! PUSHBUTTON "S" ID btnScientific AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "I" ID btnInteger AT (PREVRIGHT+1 1 10 12) GROUP 1 #ifdef GRAPHS_ENABLED ! PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 #endif ! GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (0 32 145 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE ! ! POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) ! BUTTON "M" ID calcResPopupBut AT (148 15 13 12) NOFRAME ! LIST "" ID calcResList AT (70 20 70 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID calcResPopup calcResList ! BUTTON " " ID btnRadixMode AT (37 1 16 12) NOFRAME ! BUTTON " " ID btnPrefMode AT (57 1 15 12) NOFRAME ! BUTTON "Rcl" ID varListButton AT (PREVRIGHT+3 1 15 12) NOFRAME ! BUTTON "F" ID varFuncListButton AT (PREVRIGHT 1 15 12) NOFRAME ! BUTTON "f" ID varBuiltinListButton AT (150 1 10 12) NOFRAME ! ! LIST "" ID varList AT (30 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID varListPopup varList ! ! LIST "" ID histList AT (25 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID histListPopup histList ! ! LIST "" ID varBuiltinList AT (80 20 65 132) NONUSABLE DISABLED VISIBLEITEMS 12 ! POPUPLIST ID varBuiltinListPopup varBuiltinList ! BUTTON "S" ID btnMainSel AT (148 36 13 11) NOFRAME ! BUTTON "Clr" ID btnMainClear AT (134 60 22 14) ! BUTTON "/" ID btnMainDivide AT (PREVLEFT 75 22 14) FONT 1 ! BUTTON "*" ID btnMainMult AT (PREVLEFT 90 22 14) FONT 1 ! BUTTON "-" ID btnMainMinus AT (PREVLEFT 105 22 14) FONT 1 ! BUTTON "+" ID btnMainPlus AT (PREVLEFT 120 22 14) FONT 1 ! //FORMBITMAP AT (134 137) BITMAP bmpExe USABLE ! BUTTON "EXE" ID tdDoit AT (135 138 20 20) FONT 1 BOLDFRAME ! BUTTON "7" ID btnMain7 AT (75 60 18 17) ! BUTTON "8" ID btnMain8 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "9" ID btnMain9 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! ! BUTTON "4" ID btnMain4 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "5" ID btnMain5 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "6" ID btnMain6 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! ! BUTTON "1" ID btnMain1 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "2" ID btnMain2 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "3" ID btnMain3 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! ! BUTTON "0" ID btnMain0 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "." ID btnMainDot AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "Exp" ID btnMainEE AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "ANS" ID btnMainAns AT (75 PREVBOTTOM+2 PREVWIDTH 12) ! BUTTON "(" ID btnMainOpBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON ")" ID btnMainClBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! REPEATBUTTON "<-" ID btnMainBksp AT (75 PREVBOTTOM+2 PREVWIDTH PREVHEIGHT) ! REPEATBUTTON "" ID btnMainDel AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! //FORMBITMAP AT (PREVLEFT+4 PREVTOP+2) BITMAP bmpLdel USABLE ! REPEATBUTTON "->" ID btnMainFwsp AT (113 PREVTOP 18 12) ! BUTTON "" ID btnMainS1 AT (2 60 20 15) NONUSABLE ! BUTTON "" ID btnMainS4 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS7 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS10 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS13 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS2 AT (PREVRIGHT+4 60 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS5 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS8 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS11 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS14 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS3 AT (PREVRIGHT+4 60 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS6 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS9 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS12 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS15 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW1 AT (2 60 32 15) NONUSABLE ! BUTTON "" ID btnMainW3 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW5 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW7 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW9 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW2 AT (PREVRIGHT+4 60 32 15) NONUSABLE ! BUTTON "" ID btnMainW4 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW6 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW8 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW10 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE #ifdef SPECFUN_ENABLED ! LIST "$$TRIGONOMETRICS" "$$EXPONENTIAL" "$$COMBINATORICS" "$$COMPLEX" "$$FUNCTION SOLVING" "$$LIST FUNCTIONS" "$$MATRIX FUNCTIONS" "$$UPPER TAIL PROBAB" "$$SIGNAL PROCESSING" "$$DISCRETE MATH" "$$SPECIAL FUNCTIONS" "$$SPECIAL FUNCTIONS2" ID lstMainBtnRow AT (55 25 89 44) NONUSABLE VISIBLEITEMS 12 DISABLED #else ! LIST "$$TRIGONOMETRICS" "$$EXPONENTIAL" "$$COMBINATORICS" "$$COMPLEX" ID lstMainBtnRow AT (55 25 89 44) NONUSABLE VISIBLEITEMS 4 DISABLED #endif ! POPUPLIST ID popMainBtnRow lstMainBtnRow ! ! GRAFFITISTATEINDICATOR AT (149 47) END --- 491,599 ---- MENUID tdMenu BEGIN ! TITLE "$$SCIENTIFIC" ! ! BUTTON " " ID btnRadixMode AT (35 1 18 12) RECTFRAME ! BUTTON " " ID btnPrefMode AT (56 1 17 12) RECTFRAME ! ! SELECTORTRIGGER "Rcl" ID varListButton AT (PREVRIGHT+4 1 15 11) ! SELECTORTRIGGER "F" ID varFuncListButton AT (PREVRIGHT+1 1 9 11) ! SELECTORTRIGGER "f" ID varBuiltinListButton AT (PREVRIGHT+1 1 9 11) ! ! LIST "" ID varList AT (30 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID varListPopup varList ! ! LIST "" ID varBuiltinList AT (80 20 65 132) NONUSABLE DISABLED VISIBLEITEMS 12 ! POPUPLIST ID varBuiltinListPopup varBuiltinList ! ! PUSHBUTTON "B" ID btnBasic AT (116 1 10 12) GROUP 1 ! PUSHBUTTON "S" ID btnScientific AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "I" ID btnInteger AT (PREVRIGHT+1 1 10 12) GROUP 1 #ifdef GRAPHS_ENABLED ! PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 #endif ! GADGET ID resultGadget AT (5 16 137 16) ! FIELD ID tdInput AT (1 32 136 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE ! GRAFFITISTATEINDICATOR AT (138 37) ! SELECTORTRIGGER "M" ID calcResPopupBut AT (148 17 11 10) ! LIST "" ID calcResList AT (70 20 70 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID calcResPopup calcResList ! SELECTORTRIGGER "H" ID btnHistory AT (148 32 11 10) ! LIST "" ID histList AT (25 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID histListPopup histList ! SELECTORTRIGGER "S" ID btnMainSel AT (148 43 11 10) ! BUTTON "Clr" ID btnMainClear AT (134 60 22 14) ! BUTTON "/" ID btnMainDivide AT (PREVLEFT 75 22 14) FONT 1 ! BUTTON "*" ID btnMainMult AT (PREVLEFT 90 22 14) FONT 1 ! BUTTON "-" ID btnMainMinus AT (PREVLEFT 105 22 14) FONT 1 ! BUTTON "+" ID btnMainPlus AT (PREVLEFT 120 22 14) FONT 1 ! //FORMBITMAP AT (134 137) BITMAP bmpExe USABLE ! BUTTON "EXE" ID tdDoit AT (135 138 20 20) FONT 1 BOLDFRAME ! BUTTON "7" ID btnMain7 AT (75 60 18 17) ! BUTTON "8" ID btnMain8 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "9" ID btnMain9 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! ! BUTTON "4" ID btnMain4 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "5" ID btnMain5 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "6" ID btnMain6 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! ! BUTTON "1" ID btnMain1 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "2" ID btnMain2 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "3" ID btnMain3 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "0" ID btnMain0 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "." ID btnMainDot AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "Exp" ID btnMainEE AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "ans" ID btnMainAns AT (75 PREVBOTTOM+2 PREVWIDTH 12) ! BUTTON "(" ID btnMainOpBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON ")" ID btnMainClBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! REPEATBUTTON "<-" ID btnMainBksp AT (75 PREVBOTTOM+2 PREVWIDTH PREVHEIGHT) ! REPEATBUTTON "" ID btnMainDel AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! //FORMBITMAP AT (PREVLEFT+4 PREVTOP+2) BITMAP bmpLdel USABLE ! REPEATBUTTON "->" ID btnMainFwsp AT (113 PREVTOP 18 12) ! BUTTON "" ID btnMainS1 AT (2 60 20 15) NONUSABLE ! BUTTON "" ID btnMainS4 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS7 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS10 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS13 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS2 AT (PREVRIGHT+4 60 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS5 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS8 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS11 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS14 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS3 AT (PREVRIGHT+4 60 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS6 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS9 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS12 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainS15 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW1 AT (2 60 32 15) NONUSABLE ! BUTTON "" ID btnMainW3 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW5 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW7 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW9 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW2 AT (PREVRIGHT+4 60 32 15) NONUSABLE ! BUTTON "" ID btnMainW4 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW6 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW8 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE ! BUTTON "" ID btnMainW10 AT (PREVLEFT PREVBOTTOM+5 PREVWIDTH PREVHEIGHT) NONUSABLE #ifdef SPECFUN_ENABLED ! LIST "$$TRIGONOMETRICS" "$$EXPONENTIAL" "$$COMBINATORICS" "$$COMPLEX" "$$FUNCTION SOLVING" "$$LIST FUNCTIONS" "$$MATRIX FUNCTIONS" "$$UPPER TAIL PROBAB" "$$SIGNAL PROCESSING" "$$DISCRETE MATH" "$$SPECIAL FUNCTIONS" "$$SPECIAL FUNCTIONS2" ID lstMainBtnRow AT (55 25 89 44) NONUSABLE VISIBLEITEMS 12 DISABLED #else ! LIST "$$TRIGONOMETRICS" "$$EXPONENTIAL" "$$COMBINATORICS" "$$COMPLEX" ID lstMainBtnRow AT (55 25 89 44) NONUSABLE VISIBLEITEMS 4 DISABLED #endif ! POPUPLIST ID popMainBtnRow lstMainBtnRow END *************** *** 605,708 **** MENUID tdMenu BEGIN ! TITLE "$$BASIC" ! ! PUSHBUTTON "B" ID btnBasic AT (106 1 10 12) GROUP 1 ! PUSHBUTTON "S" ID btnScientific AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "I" ID btnInteger AT (PREVRIGHT+1 1 10 12) GROUP 1 #ifdef GRAPHS_ENABLED ! PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 #endif ! GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (0 32 145 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE ! ! POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) ! ! BUTTON "M" ID calcResPopupBut AT (148 15 13 12) NOFRAME ! LIST "" ID calcResList AT (70 20 70 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID calcResPopup calcResList ! BUTTON " " ID btnRadixMode AT (37 1 16 12) NOFRAME ! BUTTON " " ID btnPrefMode AT (57 1 15 12) NOFRAME ! BUTTON "Rcl" ID varListButton AT (PREVRIGHT+3 1 15 12) NOFRAME ! BUTTON "F" ID varFuncListButton AT (PREVRIGHT 1 15 12) NOFRAME ! BUTTON "f" ID varBuiltinListButton AT (150 1 10 12) NOFRAME ! ! LIST "" ID varList AT (30 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID varListPopup varList ! ! LIST "" ID histList AT (25 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID histListPopup histList ! ! LIST "" ID varBuiltinList AT (80 20 65 132) NONUSABLE DISABLED VISIBLEITEMS 12 ! POPUPLIST ID varBuiltinListPopup varBuiltinList ! BUTTON "log" ID btnMainLog AT (5 60 20 14) ! BUTTON "ln" ID btnMainLn AT (PREVRIGHT+3 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "" ID btnMainExp AT (PREVRIGHT+3 PREVTOP PREVWIDTH PREVHEIGHT) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpExpon USABLE ! BUTTON "sin" ID btnMainSin AT (5 77 20 14) ! BUTTON "cos" ID btnMainCos AT (PREVRIGHT+3 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "tan" ID btnMainTan AT (PREVRIGHT+3 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "" ID btnMainSqr AT (5 94 20 14) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpSquare USABLE ! BUTTON "" ID btnMainSqrt AT (28 94 20 14) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpSquareRoot USABLE ! BUTTON "x!" ID btnMainFact AT (51 94 20 14) ! BUTTON "" ID btnMainInv AT (5 111 20 14) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpInverse USABLE ! BUTTON "" ID btnMainPow AT (28 111 20 14) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpPower USABLE ! BUTTON "" ID btnMainSq1 AT (51 111 20 14) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpRootX USABLE ! BUTTON "pi" ID btnMainPi AT (5 128 20 14) ! BUTTON "°" btnMainDeg AT (PREVRIGHT+3 128 8 14) ! BUTTON "'" ID btnMainMin AT (PREVRIGHT+4 128 8 14) ! BUTTON "(-)" ID btnMainNeg AT (PREVRIGHT+3 128 20 14) ! BUTTON "abs" ID btnMainMagn AT (5 145 20 14) ! BUTTON "Ang" ID btnMainAngl AT (PREVRIGHT+3 145 20 14) ! BUTTON "i" ID btnMain_i AT (PREVRIGHT+3 145 8 14) ! BUTTON ":" ID btnMainColn AT (PREVRIGHT+4 145 8 14) ! ! BUTTON "Clr" ID btnMainClear AT (134 60 22 14) ! BUTTON "/" ID btnMainDivide AT (134 75 22 14) FONT 1 ! BUTTON "*" ID btnMainMult AT (134 90 22 14) FONT 1 ! BUTTON "-" ID btnMainMinus AT (134 105 22 14) FONT 1 ! BUTTON "+" ID btnMainPlus AT (134 120 22 14) FONT 1 ! BUTTON "EXE" ID tdDoit AT (135 138 20 20) FONT 1 BOLDFRAME ! //FORMBITMAP AT (134 137) BITMAP bmpExe USABLE ! BUTTON "7" ID btnMain7 AT (75 60 18 17) ! BUTTON "8" ID btnMain8 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "9" ID btnMain9 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! ! BUTTON "4" ID btnMain4 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "5" ID btnMain5 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "6" ID btnMain6 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! ! BUTTON "1" ID btnMain1 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "2" ID btnMain2 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "3" ID btnMain3 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! ! BUTTON "0" ID btnMain0 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "." ID btnMainDot AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "Exp" ID btnMainEE AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "ANS" ID btnMainAns AT (75 PREVBOTTOM+2 PREVWIDTH 12) ! BUTTON "(" ID btnMainOpBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON ")" ID btnMainClBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! REPEATBUTTON "<-" ID btnMainBksp AT (75 PREVBOTTOM+2 PREVWIDTH PREVHEIGHT) ! REPEATBUTTON "" ID btnMainDel AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! //FORMBITMAP AT (PREVLEFT+4 PREVTOP+2) BITMAP bmpLdel USABLE ! REPEATBUTTON "->" ID btnMainFwsp AT (113 PREVTOP 18 12) ! GRAFFITISTATEINDICATOR AT (149 47) END --- 602,703 ---- MENUID tdMenu BEGIN ! TITLE "$$BASIC" ! ! BUTTON " " ID btnRadixMode AT (35 1 18 12) RECTFRAME ! BUTTON " " ID btnPrefMode AT (56 1 17 12) RECTFRAME ! ! SELECTORTRIGGER "Rcl" ID varListButton AT (PREVRIGHT+4 1 15 11) ! SELECTORTRIGGER "F" ID varFuncListButton AT (PREVRIGHT+1 1 9 11) ! SELECTORTRIGGER "f" ID varBuiltinListButton AT (PREVRIGHT+1 1 9 11) ! ! LIST "" ID varList AT (30 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID varListPopup varList ! ! LIST "" ID varBuiltinList AT (80 20 65 132) NONUSABLE DISABLED VISIBLEITEMS 12 ! POPUPLIST ID varBuiltinListPopup varBuiltinList ! ! PUSHBUTTON "B" ID btnBasic AT (116 1 10 12) GROUP 1 ! PUSHBUTTON "S" ID btnScientific AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "I" ID btnInteger AT (PREVRIGHT+1 1 10 12) GROUP 1 #ifdef GRAPHS_ENABLED ! PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 #endif ! GADGET ID resultGadget AT (5 16 137 16) ! FIELD ID tdInput AT (1 32 136 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE ! GRAFFITISTATEINDICATOR AT (138 37) ! ! SELECTORTRIGGER "M" ID calcResPopupBut AT (148 17 11 10) ! LIST "" ID calcResList AT (70 20 70 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID calcResPopup calcResList ! SELECTORTRIGGER "H" ID btnHistory AT (148 32 11 10) ! LIST "" ID histList AT (25 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID histListPopup histList ! BUTTON "log" ID btnMainLog AT (5 60 20 14) ! BUTTON "ln" ID btnMainLn AT (PREVRIGHT+3 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "" ID btnMainExp AT (PREVRIGHT+3 PREVTOP PREVWIDTH PREVHEIGHT) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpExpon USABLE ! BUTTON "sin" ID btnMainSin AT (5 77 20 14) ! BUTTON "cos" ID btnMainCos AT (PREVRIGHT+3 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "tan" ID btnMainTan AT (PREVRIGHT+3 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "" ID btnMainSqr AT (5 94 20 14) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpSquare USABLE ! BUTTON "" ID btnMainSqrt AT (28 94 20 14) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpSquareRoot USABLE ! BUTTON "x!" ID btnMainFact AT (51 94 20 14) ! BUTTON "" ID btnMainInv AT (5 111 20 14) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpInverse USABLE ! BUTTON "" ID btnMainPow AT (28 111 20 14) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpPower USABLE ! BUTTON "" ID btnMainSq1 AT (51 111 20 14) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpRootX USABLE ! BUTTON "pi" ID btnMainPi AT (5 128 20 14) ! BUTTON "°" btnMainDeg AT (PREVRIGHT+3 128 8 14) ! BUTTON "'" ID btnMainMin AT (PREVRIGHT+4 128 8 14) ! BUTTON "(-)" ID btnMainNeg AT (PREVRIGHT+3 128 20 14) ! BUTTON "abs" ID btnMainMagn AT (5 145 20 14) ! BUTTON "Ang" ID btnMainAngl AT (PREVRIGHT+3 145 20 14) ! BUTTON "i" ID btnMain_i AT (PREVRIGHT+3 145 8 14) ! BUTTON ":" ID btnMainColn AT (PREVRIGHT+4 145 8 14) ! BUTTON "Clr" ID btnMainClear AT (134 60 22 14) ! BUTTON "/" ID btnMainDivide AT (134 75 22 14) FONT 1 ! BUTTON "*" ID btnMainMult AT (134 90 22 14) FONT 1 ! BUTTON "-" ID btnMainMinus AT (134 105 22 14) FONT 1 ! BUTTON "+" ID btnMainPlus AT (134 120 22 14) FONT 1 ! BUTTON "EXE" ID tdDoit AT (135 138 20 20) FONT 1 BOLDFRAME ! //FORMBITMAP AT (134 137) BITMAP bmpExe USABLE ! BUTTON "7" ID btnMain7 AT (75 60 18 17) ! BUTTON "8" ID btnMain8 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "9" ID btnMain9 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! ! BUTTON "4" ID btnMain4 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "5" ID btnMain5 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "6" ID btnMain6 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! ! BUTTON "1" ID btnMain1 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "2" ID btnMain2 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "3" ID btnMain3 AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "0" ID btnMain0 AT (75 PREVBOTTOM+1 PREVWIDTH PREVHEIGHT) ! BUTTON "." ID btnMainDot AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "Exp" ID btnMainEE AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON "ans" ID btnMainAns AT (75 PREVBOTTOM+2 PREVWIDTH 12) ! BUTTON "(" ID btnMainOpBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! BUTTON ")" ID btnMainClBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! REPEATBUTTON "<-" ID btnMainBksp AT (75 PREVBOTTOM+2 PREVWIDTH PREVHEIGHT) ! REPEATBUTTON "" ID btnMainDel AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT) ! //FORMBITMAP AT (PREVLEFT+4 PREVTOP+2) BITMAP bmpLdel USABLE ! REPEATBUTTON "->" ID btnMainFwsp AT (113 PREVTOP 18 12) END *************** *** 710,781 **** MENUID tdMenu BEGIN ! TITLE "$$BASIC" ! ! PUSHBUTTON "B" ID btnBasic AT (106 1 10 12) GROUP 1 ! PUSHBUTTON "S" ID btnScientific AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "I" ID btnInteger AT (PREVRIGHT+1 1 10 12) GROUP 1 #ifdef GRAPHS_ENABLED ! PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 #endif ! GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (0 32 145 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE ! ! POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) ! BUTTON "M" ID calcResPopupBut AT (148 15 13 12) NOFRAME ! LIST "" ID calcResList AT (70 20 70 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID calcResPopup calcResList ! BUTTON " " ID btnRadixMode AT (37 1 16 12) NOFRAME ! BUTTON " " ID btnPrefMode AT (57 1 15 12) NOFRAME ! BUTTON "Rcl" ID varListButton AT (PREVRIGHT+3 1 15 12) NOFRAME ! BUTTON "F" ID varFuncListButton AT (PREVRIGHT 1 15 12) NOFRAME ! BUTTON "f" ID varBuiltinListButton AT (150 1 10 12) NOFRAME ! ! LIST "" ID varList AT (30 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID varListPopup varList ! ! LIST "" ID histList AT (25 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID histListPopup histList ! ! LIST "" ID varBuiltinList AT (80 20 65 132) NONUSABLE DISABLED VISIBLEITEMS 12 ! POPUPLIST ID varBuiltinListPopup varBuiltinList ! BUTTON "C" ID btnMainClear AT (5 60 20 15) ! BUTTON "ANS" ID btnMainAns AT (30 60 20 15) ! BUTTON "(" ID btnMainOpBr AT (5 80 20 15) ! BUTTON ")" ID btnMainClBr AT (30 80 20 15) ! BUTTON "EE" ID btnMainEE AT (5 100 20 15) ! BUTTON "" ID btnMainPow AT (30 100 20 15) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpPower USABLE ! BUTTON "ln" ID btnMainLn AT (5 120 20 15) ! BUTTON "" ID btnMainSq1 AT (30 120 20 15) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpRootX USABLE ! BUTTON "" ID btnMainSqr AT (5 140 20 15) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpSquare USABLE ! BUTTON "" ID btnMainSqrt AT (30 140 20 15) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpSquareRoot USABLE ! BUTTON "7" ID btnMain7 AT (55 60 20 20) FONT 1 ! BUTTON "8" ID btnMain8 AT (80 60 20 20) FONT 1 ! BUTTON "9" ID btnMain9 AT (105 60 20 20) FONT 1 ! BUTTON "4" ID btnMain4 AT (55 85 20 20) FONT 1 ! BUTTON "5" ID btnMain5 AT (80 85 20 20) FONT 1 ! BUTTON "6" ID btnMain6 AT (105 85 20 20) FONT 1 ! BUTTON "1" ID btnMain1 AT (55 110 20 20) FONT 1 ! BUTTON "2" ID btnMain2 AT (80 110 20 20) FONT 1 ! BUTTON "3" ID btnMain3 AT (105 110 20 20) FONT 1 ! BUTTON "0" ID btnMain0 AT (55 135 20 20) FONT 1 ! BUTTON "." ID btnMainDot AT (80 135 20 20) FONT 1 ! BUTTON "EXE" ID tdDoit AT (105 135 20 20) FONT 1 BOLDFRAME ! ! BUTTON "+" ID btnMainPlus AT (130 120 20 15) FONT 1 ! BUTTON "-" ID btnMainMinus AT (130 100 20 15) FONT 1 ! BUTTON "*" ID btnMainMult AT (130 80 20 15) FONT 1 ! BUTTON "/" ID btnMainDivide AT (130 60 20 15) FONT 1 ! ! GRAFFITISTATEINDICATOR AT (140 150) END --- 705,774 ---- MENUID tdMenu BEGIN ! TITLE "$$BASIC" ! ! BUTTON " " ID btnRadixMode AT (35 1 18 12) RECTFRAME ! BUTTON " " ID btnPrefMode AT (56 1 17 12) RECTFRAME ! ! SELECTORTRIGGER "Rcl" ID varListButton AT (PREVRIGHT+4 1 15 11) ! SELECTORTRIGGER "F" ID varFuncListButton AT (PREVRIGHT+1 1 9 11) ! SELECTORTRIGGER "f" ID varBuiltinListButton AT (PREVRIGHT+1 1 9 11) ! ! LIST "" ID varList AT (30 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID varListPopup varList ! ! LIST "" ID varBuiltinList AT (80 20 65 132) NONUSABLE DISABLED VISIBLEITEMS 12 ! POPUPLIST ID varBuiltinListPopup varBuiltinList ! ! PUSHBUTTON "B" ID btnBasic AT (116 1 10 12) GROUP 1 ! PUSHBUTTON "S" ID btnScientific AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "I" ID btnInteger AT (PREVRIGHT+1 1 10 12) GROUP 1 #ifdef GRAPHS_ENABLED ! PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 #endif ! GADGET ID resultGadget AT (5 16 137 16) ! FIELD ID tdInput AT (1 32 136 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE ! GRAFFITISTATEINDICATOR AT (138 37) ! SELECTORTRIGGER "M" ID calcResPopupBut AT (148 17 11 10) ! LIST "" ID calcResList AT (70 20 70 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID calcResPopup calcResList ! SELECTORTRIGGER "H" ID btnHistory AT (148 32 11 10) ! LIST "" ID histList AT (25 20 110 20) NONUSABLE DISABLED VISIBLEITEMS 2 ! POPUPLIST ID histListPopup histList ! BUTTON "Clr" ID btnMainClear AT (5 60 20 15) ! BUTTON "ans" ID btnMainAns AT (30 60 20 15) ! BUTTON "(" ID btnMainOpBr AT (5 80 20 15) ! BUTTON ")" ID btnMainClBr AT (30 80 20 15) ! BUTTON "Exp" ID btnMainEE AT (5 100 20 15) ! BUTTON "" ID btnMainPow AT (30 100 20 15) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpPower USABLE ! BUTTON "ln" ID btnMainLn AT (5 120 20 15) ! BUTTON "" ID btnMainSq1 AT (30 120 20 15) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpRootX USABLE ! BUTTON "" ID btnMainSqr AT (5 140 20 15) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpSquare USABLE ! BUTTON "" ID btnMainSqrt AT (30 140 20 15) ! //FORMBITMAP AT (PREVLEFT+1 PREVTOP+1) BITMAP bmpSquareRoot USABLE ! BUTTON "7" ID btnMain7 AT (55 60 20 20) ! BUTTON "8" ID btnMain8 AT (80 60 20 20) ! BUTTON "9" ID btnMain9 AT (105 60 20 20) ! BUTTON "4" ID btnMain4 AT (55 85 20 20) ! BUTTON "5" ID btnMain5 AT (80 85 20 20) ! BUTTON "6" ID btnMain6 AT (105 85 20 20) ! BUTTON "1" ID btnMain1 AT (55 110 20 20) ! BUTTON "2" ID btnMain2 AT (80 110 20 20) ! BUTTON "3" ID btnMain3 AT (105 110 20 20) ! BUTTON "0" ID btnMain0 AT (55 135 20 20) ! BUTTON "." ID btnMainDot AT (80 135 20 20) ! BUTTON "EXE" ID tdDoit AT (105 135 20 20) FONT 1 BOLDFRAME + BUTTON "+" ID btnMainPlus AT (130 120 20 15) FONT 1 + BUTTON "-" ID btnMainMinus AT (130 100 20 15) FONT 1 + BUTTON "*" ID btnMainMult AT (130 80 20 15) FONT 1 + BUTTON "/" ID btnMainDivide AT (130 60 20 15) FONT 1 END Index: calc.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** calc.c 1 Oct 2006 22:40:27 -0000 1.35 --- calc.c 16 Oct 2006 18:58:37 -0000 1.36 *************** *** 414,420 **** FrmSetEventHandler(frm,GraphPrefsHandleEvent); break; - case grColorForm: - FrmSetEventHandler(frm,GraphColorHandleEvent); - break; case grTableForm: FrmSetEventHandler(frm,GraphTableHandleEvent); --- 414,417 ---- Index: calcrsc.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/calcrsc.h,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** calcrsc.h 10 Oct 2006 00:58:36 -0000 1.61 --- calcrsc.h 16 Oct 2006 18:58:37 -0000 1.62 *************** *** 305,313 **** #define lstGraphSpeed 4113 - #define btnGraphColor 4120 - #define grColorForm 4121 - #define grColorElem 4122 - #define grColorPopup 4123 - #define graphMenu 4200 #define btnGraphPref 4201 --- 305,308 ---- *************** *** 335,339 **** #define ckbGrPrefLogX 4219 #define ckbGrPrefLogY 4220 - #define ckbGrPrefGrid 4221 #define grPrefLabel1u 4222 #define grPrefLabel2u 4223 --- 330,333 ---- *************** *** 376,379 **** --- 370,386 ---- #define grType5 4515 #define grType6 4516 + #define grColor1 4517 + #define grColor2 4518 + #define grColor3 4519 + #define grColor4 4520 + #define grColor5 4521 + #define grColor6 4522 + #define grBgnd 4523 + #define grAxes 4524 + #define grGrid 4525 + #define grBgndLbl 4526 + #define ckbGrAxes 4527 + #define ckbGrGrid 4528 + #define grColorElem 4529 #define grTableForm 4600 Index: grsetup.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grsetup.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** grsetup.c 10 Oct 2006 00:58:36 -0000 1.27 --- grsetup.c 16 Oct 2006 18:58:37 -0000 1.28 *************** *** 41,47 **** #endif - static Boolean kk; - static Int16 colors[10]; - static Int16 firstVisible = 0; static Int16 selectedRow; --- 41,44 ---- *************** *** 278,288 **** if (palmOS35) WinPushDrawState(); ! if (colorDisplay) { ! if (graphPrefs.functype==graph_param) ! WinSetTextColor(graphColors[(row+firstVisible)/2]); ! else ! WinSetTextColor(graphColors[row+firstVisible]); ! } ! if (grayDisplay) { if (graphPrefs.functype==graph_param) WinSetTextColor(graphPrefs.colors[(row+firstVisible)/2]); --- 275,279 ---- if (palmOS35) WinPushDrawState(); ! if (grayDisplay || colorDisplay) { if (graphPrefs.functype==graph_param) WinSetTextColor(graphPrefs.colors[(row+firstVisible)/2]); *************** *** 292,298 **** x = bounds->topLeft.x+bounds->extent.x-FntCharsWidth(text,StrLen(text))-2; WinDrawChars(text,StrLen(text),x,bounds->topLeft.y); - if (palmOS35) ! WinPopDrawState(); } --- 283,288 ---- x = bounds->topLeft.x+bounds->extent.x-FntCharsWidth(text,StrLen(text))-2; WinDrawChars(text,StrLen(text),x,bounds->topLeft.y); if (palmOS35) ! WinPopDrawState(); } *************** *** 323,327 **** table = GetObjectPtr(grSetupTable); rows = TblGetNumberOfRows(table); ! for (i=0;i<rows;i++) { TblSetRowHeight(table,i,height); --- 313,317 ---- table = GetObjectPtr(grSetupTable); rows = TblGetNumberOfRows(table); ! for (i=0;i<rows;i++) { TblSetRowHeight(table,i,height); *************** *** 331,351 **** TblSetColumnUsable(table,0,true); TblSetColumnUsable(table,1,true); ! TblSetCustomDrawProcedure(table,0,grsetup_tbl_name); TblSetCustomDrawProcedure(table,1,grsetup_tbl_contents); ! /* We will effectively remember the last state of graph_param */ /* because others do not have scrolling table */ if (graphPrefs.functype != graph_param) firstVisible = 0; ! ! /* Setup the up/down pointers & grType buttons*/ if (graphPrefs.functype == graph_param) { FrmShowObject(frm,FrmGetObjectIndex(frm,grSetupDown)); FrmShowObject(frm,FrmGetObjectIndex(frm,grSetupUp)); ! }else{ ! FrmShowObject(frm,FrmGetObjectIndex(frm,grType2)); ! FrmShowObject(frm,FrmGetObjectIndex(frm,grType4)); ! FrmShowObject(frm,FrmGetObjectIndex(frm,grType6)); } } --- 321,350 ---- TblSetColumnUsable(table,0,true); TblSetColumnUsable(table,1,true); ! TblSetCustomDrawProcedure(table,0,grsetup_tbl_name); TblSetCustomDrawProcedure(table,1,grsetup_tbl_contents); ! /* We will effectively remember the last state of graph_param */ /* because others do not have scrolling table */ if (graphPrefs.functype != graph_param) firstVisible = 0; ! ! CtlSetValue(GetObjectPtr(ckbGrGrid), graphPrefs.grid); ! ! /* Setup the up/down pointers, grType and grColor buttons*/ ! if (grayDisplay || colorDisplay) { ! for (i = grColor1; i <= grBgndLbl; i++) ! FrmShowObject(frm, FrmGetObjectIndex(frm, i)); ! } if (graphPrefs.functype == graph_param) { FrmShowObject(frm,FrmGetObjectIndex(frm,grSetupDown)); FrmShowObject(frm,FrmGetObjectIndex(frm,grSetupUp)); ! if (grayDisplay || colorDisplay) { ! for (i = grColor2; i <= grColor6; i += 2) ! FrmHideObject(frm, FrmGetObjectIndex(frm, i)); ! } ! } else { ! for (i = grType2; i <= grType6; i += 2) ! FrmShowObject(frm, FrmGetObjectIndex(frm, i)); } } *************** *** 576,587 **** graph_setcolor(-1); WinEraseRectangle(&bounds, 0); - WinDrawRectangleFrame(roundFrame, &bounds); graph_unsetcolor(); x = bounds.topLeft.x; y = bounds.topLeft.y + bounds.extent.y - 1; ! x1 = x + HanderaCoord(3); ! x2 = x + HanderaCoord(6); ! x3 = x + HanderaCoord(9); y1 = y - HanderaCoord(1); y2 = y - HanderaCoord(3); --- 575,585 ---- graph_setcolor(-1); WinEraseRectangle(&bounds, 0); graph_unsetcolor(); x = bounds.topLeft.x; y = bounds.topLeft.y + bounds.extent.y - 1; ! x1 = x + HanderaCoord(1); ! x2 = x + HanderaCoord(3); ! x3 = x + HanderaCoord(5); y1 = y - HanderaCoord(1); y2 = y - HanderaCoord(3); *************** *** 608,611 **** --- 606,626 ---- break; } + if (grayDisplay || colorDisplay) { + /* Paint the line color button */ + FrmGetObjectBounds(frm, FrmGetObjectIndex(frm,grColor1+i), &bounds); + WinDrawRectangle(&bounds, 0); + } + graph_unsetcolor(); + } + } + for (i=0; i<3; i++) { + if (grayDisplay || colorDisplay) { + graph_setcolor(i < 2 ? -1 : -2); + FrmGetObjectBounds(frm, FrmGetObjectIndex(frm,grBgnd+i), &bounds); + if (i == 0 ) { + WinEraseRectangle(&bounds, 0); + } else { + WinDrawRectangle(&bounds, 0); + } graph_unsetcolor(); } *************** *** 680,685 **** switch (controlId) { case grSetupDone: FrmReturnToForm(0); ! FrmUpdateForm(frmGraph,frmUpdateVars); handled = true; break; --- 695,701 ---- switch (controlId) { case grSetupDone: + graphPrefs.grid = CtlGetValue(GetObjectPtr(ckbGrGrid)); FrmReturnToForm(0); ! FrmUpdateForm(frmGraph, frmUpdateVars); handled = true; break; *************** *** 695,724 **** break; case grType1: if(graphPrefs.functype == graph_param) ! row=firstVisible/2; ! else row=0; break; case grType2: ! row=1; break; case grType3: ! if(graphPrefs.functype == graph_param) ! row=firstVisible/2+1; ! else row=2; break; case grType4: ! row=3; break; case grType5: ! if(graphPrefs.functype == graph_param) ! row=firstVisible/2+2; ! else row=4; break; case grType6: ! row=5; break; } ! if(!handled){ graphPrefs.grType[row]++; if(graphPrefs.grType[row]>2) --- 711,754 ---- break; case grType1: + case grColor1: if(graphPrefs.functype == graph_param) ! row = firstVisible / 2; ! else ! row = 0; break; case grType2: ! case grColor2: ! row = 1; break; case grType3: ! case grColor3: ! if (graphPrefs.functype == graph_param) ! row = firstVisible / 2 + 1; ! else ! row = 2; break; case grType4: ! case grColor4: ! row = 3; break; case grType5: ! case grColor5: ! if (graphPrefs.functype == graph_param) ! row = firstVisible / 2 + 2; ! else ! row = 4; break; case grType6: ! case grColor6: ! row = 5; ! break; ! case grBgnd: ! case grAxes: ! case grGrid: ! row = controlId - grColor1; break; } ! if (controlId >= grType1 && controlId <= grType6) { graphPrefs.grType[row]++; if(graphPrefs.grType[row]>2) *************** *** 727,730 **** --- 757,776 ---- handled=true; } + else if (controlId >= grColor1 && controlId <= grGrid) { + IndexedColorType col = graphPrefs.colors[row]; + RGBColorType rgb; + Char *picktitle; + + picktitle = MemPtrNew(MAX_RSCLEN); + SysStringByIndex(grColorElem, row, picktitle, MAX_RSCLEN); + if (UIPickColor(&col, (colorDisplay? &rgb : NULL), + UIPickColorStartPalette, picktitle, NULL)) { + graphPrefs.colors[row] = col; + } + FrmDrawForm(frm); + draw_grType(frm); + MemPtrFree(picktitle); + handled = true; + } break; *************** *** 752,847 **** return handled; } - - static void - draw_palette(void) - { - Int8 i,j; - Int8 c=0; - - RectangleType bounds; - - ListPtr list=GetObjectPtr(grColorElem); - - Int16 x,y; - Boolean pressed; - - EvtGetPen(&x,&y,&pressed); - if (kk && x>6 && x<6+144 && y>20 && y<20+36) - colors[LstGetSelection(list)]=WinGetPixel(x,y); - else kk=true; - - WinPushDrawState(); - for(i=0;i<2;i++) - for(j=0;j<8;j++) { - WinSetForeColor(c); - RctSetRectangle(&bounds,6+j*18,20+i*18,18,18); - WinDrawRectangle(&bounds,0); - if (c==colors[LstGetSelection(list)]){ - if (c<8) WinSetForeColor(15); else WinSetForeColor(0); - bounds.topLeft.x += 2; - bounds.topLeft.y += 2; - bounds.extent.x -= 4; - bounds.extent.y -= 4; - WinDrawRectangleFrame(roundFrame,&bounds); - } - c++; - }; - WinPopDrawState(); - RctSetRectangle(&bounds,6,20,144,36); - WinDrawRectangleFrame(roundFrame,&bounds); - } - - /*********************************************************************** - * - * FUNCTION: GraphColorHandleEvent - * - ***********************************************************************/ - Boolean - GraphColorHandleEvent(EventPtr event) - { - Boolean handled = false; - FormPtr frm=FrmGetActiveForm(); - Int16 controlId, i; - - ListPtr list=GetObjectPtr(grColorElem); - - #ifdef SUPPORT_DIA - if (ResizeHandleEvent(event)) { - return true; - } - #endif - switch (event->eType) { - case keyDownEvent: - handled = true; - break; - case ctlSelectEvent: - controlId=event->data.ctlSelect.controlID; - switch (controlId) { - case grSetupDone: - colors[9]=LstGetSelection(list); - for(i=0;i<10;i++) graphPrefs.colors[i]=colors[i]; - FrmReturnToForm(0); - FrmUpdateForm(frmGraph,frmUpdateVars); - handled = true; - break; - case btnGrcSelCancel: - FrmReturnToForm(0); - handled = true; - break; - } - case popSelectEvent: - kk=false; - break; - case penUpEvent: - draw_palette(); - break; - case frmOpenEvent: - FrmDrawForm(frm); - for(i=0;i<10;i++) colors[i]=graphPrefs.colors[i]; - LstSetSelection(list,colors[9]); - CtlSetLabel(GetObjectPtr(grColorPopup),LstGetSelectionText(list,LstGetSelection(list))); - handled=true; - break; - } - return handled; - } --- 798,799 ---- Index: prefs.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/prefs.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** prefs.c 12 Sep 2006 19:40:55 -0000 1.16 --- prefs.c 16 Oct 2006 18:58:37 -0000 1.17 *************** *** 69,76 **** calcPrefs.dispScien = false; - #if 0 - FrmAlert(altAbout); - FrmHelp(hlpMain2); - #endif dispPrefs = calcPrefs.dispPrefs; /* db_recompile needs dispPrefs */ db_recompile_all(); --- 69,72 ---- Index: grsetup.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/grsetup.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** grsetup.h 12 Sep 2006 19:40:55 -0000 1.6 --- grsetup.h 16 Oct 2006 18:58:37 -0000 1.7 *************** *** 28,32 **** char * grsetup_get_fname(Int16 row) IFACE; const char * grsetup_fn_descr(Int16 i) IFACE; - Boolean GraphColorHandleEvent(EventPtr event) IFACE; Boolean GraphSetupHandleEvent(EventPtr event); Int16 grsetup_fn_descr_arr(char **descr, Int16 *nums); --- 28,31 ---- Index: graph.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** graph.c 10 Oct 2006 00:58:36 -0000 1.50 --- graph.c 16 Oct 2006 18:58:37 -0000 1.51 *************** *** 91,116 **** WinPushDrawState(); ! if (grayDisplay){ ! if (funcnum == -1){ ! WinSetBackColor(graphPrefs.colors[6]); /* fondo */ ! WinSetForeColor(graphPrefs.colors[7]); /* ejes */ ! } ! else if (funcnum == -2) WinSetForeColor(graphPrefs.colors[8]); /* Grid */ ! else WinSetForeColor(graphPrefs.colors[funcnum]); /* Graph color */ ! } ! ! if (colorDisplay) { ! RGBColorType rgb; ! ! rgb.r=rgb.g=rgb.b=255; /* White */ ! WinSetBackColor(WinRGBToIndex(&rgb)); if (funcnum == -1) { ! rgb.r=rgb.g=rgb.b=0; /* Black */ ! WinSetForeColor(WinRGBToIndex(&rgb)); ! } else if (funcnum == -2) { /* Grid */ ! rgb.r=rgb.g=rgb.b=128; ! WinSetForeColor(WinRGBToIndex(&rgb)); ! } else /* Graph color */ ! WinSetForeColor(graphColors[funcnum]); } } --- 91,103 ---- WinPushDrawState(); ! if (grayDisplay || colorDisplay) { if (funcnum == -1) { ! WinSetBackColor(graphPrefs.colors[6]); /* background */ ! WinSetForeColor(graphPrefs.colors[7]); /* axis */ ! } ! else if (funcnum == -2) ! WinSetForeColor(graphPrefs.colors[8]); /* grid */ ! else ! WinSetForeColor(graphPrefs.colors[funcnum]); /* graph */ } } *************** *** 149,154 **** graph_is_onscreen(double x,double y) { - // if (!finite(x) || !finite(y)) - // return false; if (x>=graphPrefs.xmin && x<=graphPrefs.xmax && y>=graphPrefs.ymin && y<=graphPrefs.ymax) --- 136,139 ---- *************** *** 475,494 **** WinResetClip(); - if(grayDisplay){ - Int8 i; - UInt16 btnindex; - - btnindex = FrmGetObjectIndex(frm,btnGraphColor); - FrmShowObject(frm, btnindex); - WinPushDrawState(); - i=graphPrefs.colors[9]; - /* RctSetRectangle(&bounds,148,146,8,8); */ - FrmGetObjectBounds(frm, btnindex, &bounds); - WinSetForeColor(graphPrefs.colors[i]); - WinDrawRectangle(&bounds,0); - WinPopDrawState(); - WinDrawRectangleFrame(roundFrame,&bounds); - } - /* Check, if the bounds are correct */ gadget_bounds(frm, graphId, &bounds); --- 460,463 ---- *************** *** 963,969 **** graph_select_speed(); break; - case btnGraphColor: - FrmPopupForm(grColorForm); - break; case btnGraphCalc: grcalc_control(); --- 932,935 ---- *************** *** 984,991 **** else grtaps_track_start(); ! } else {/* User unchecked the button */ ! grtaps_track_pause(); ! /* Cancel the numeric input, if there was any*/ ! grcalc_init(); } graph_draw_resume(); --- 950,956 ---- else grtaps_track_start(); ! } else { ! /* User unchecked the button */ ! FrmUpdateForm(frmGraph, frmUpdateVars); } graph_draw_resume(); *************** *** 1110,1116 **** FrmPopupForm(grTableForm); break; - case btnGraphColor: - FrmPopupForm(grColorForm); - break; case btnGraphSetup: FrmPopupForm(grSetupForm); --- 1075,1078 ---- Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** graph.rcp.in 10 Oct 2006 00:58:36 -0000 1.34 --- graph.rcp.in 16 Oct 2006 18:58:37 -0000 1.35 *************** *** 34,57 **** END ! FORM ID grSetupForm AT (2 55 156 103) MODAL HELPID hlpGrSetup BEGIN TITLE "$$SETUP GRAPHS" ! TABLE ID grSetupTable AT (5 15 132 70) ROWS 6 COLUMNS 2 COLUMNWIDTHS 20 112 ! BUTTON " " ID grType1 AT (139 17 13 7) NOFRAME ! BUTTON " " ID grType2 AT (139 28 13 7) NOFRAME NONUSABLE ! BUTTON " " ID grType3 AT (139 39 13 7) NOFRAME ! BUTTON " " ID grType4 AT (139 50 13 7) NOFRAME NONUSABLE ! BUTTON " " ID grType5 AT (139 61 13 7) NOFRAME ! BUTTON " " ID grType6 AT (139 72 13 7) NOFRAME NONUSABLE ! BUTTON "$$DONE" ID grSetupDone AT (5 88 40 12) ! BUTTON "\001" ID grSetupUp AT (140 84 12 8) FONT 5 NONUSABLE NOFRAME ! BUTTON "\002" ID grSetupDown AT (140 92 12 8) FONT 5 NONUSABLE NOFRAME ! LIST "" ID grSetupList AT (1 1 50 10) VISIBLEITEMS 10 NONUSABLE DISABLED POPUPLIST ID grSetupPopup grSetupList END --- 34,70 ---- END ! FORM ID grSetupForm AT (2 43 156 115) MODAL HELPID hlpGrSetup BEGIN TITLE "$$SETUP GRAPHS" + + BUTTON " " ID grAxes AT (3 16 6 6) RECTFRAME NONUSABLE + CHECKBOX "Axes" ID ckbGrAxes AT (10 13 AUTO AUTO) + BUTTON " " ID grGrid AT (63 16 6 6) RECTFRAME NONUSABLE + CHECKBOX "Grid" ID ckbGrGrid AT (70 13 AUTO AUTO) + BUTTON " " ID grBgnd AT (121 16 6 6) RECTFRAME NONUSABLE + LABEL "Bgnd" ID grBgndLbl AT (135 13) NONUSABLE ! TABLE ID grSetupTable AT (5 27 132 70) ROWS 6 COLUMNS 2 COLUMNWIDTHS 20 112 ! BUTTON " " ID grType1 AT (139 29 7 7) RECTFRAME ! BUTTON " " ID grColor1 AT (PREVRIGHT+1 PREVTOP 7 7) RECTFRAME NONUSABLE ! BUTTON " " ID grType2 AT (139 40 7 7) RECTFRAME NONUSABLE ! BUTTON " " ID grColor2 AT (PREVRIGHT+1 PREVTOP 7 7) RECTFRAME NONUSABLE ! BUTTON " " ID grType3 AT (139 51 7 7) RECTFRAME ! BUTTON " " ID grColor3 AT (PREVRIGHT+1 PREVTOP 7 7) RECTFRAME NONUSABLE ! BUTTON " " ID grType4 AT (139 62 7 7) RECTFRAME NONUSABLE ! BUTTON " " ID grColor4 AT (PREVRIGHT+1 PREVTOP 7 7) RECTFRAME NONUSABLE ! BUTTON " " ID grType5 AT (139 73 7 7) RECTFRAME ! BUTTON " " ID grColor5 AT (PREVRIGHT+1 PREVTOP 7 7) RECTFRAME NONUSABLE ! BUTTON " " ID grType6 AT (139 84 7 7) RECTFRAME NONUSABLE ! BUTTON " " ID grColor6 AT (PREVRIGHT+1 PREVTOP 7 7) RECTFRAME NONUSABLE ! BUTTON "$$DONE" ID grSetupDone AT (5 100 40 12) ! BUTTON "\001" ID grSetupUp AT (140 98 12 8) FONT 5 NONUSABLE NOFRAME ! BUTTON "\002" ID grSetupDown AT (140 106 12 8) FONT 5 NONUSABLE NOFRAME ! LIST "" ID grSetupList AT (1 1 62 10) VISIBLEITEMS 10 NONUSABLE DISABLED POPUPLIST ID grSetupPopup grSetupList END *************** *** 99,153 **** CHECKBOX "Log X" ckbGrPrefLogX AT (PREVLEFT+13 PREVBOTTOM+16 AUTO AUTO) CHECKBOX "Log Y" ckbGrPrefLogY AT (PREVLEFT PREVBOTTOM AUTO AUTO) - CHECKBOX "Grid" ckbGrPrefGrid AT (PREVLEFT PREVBOTTOM AUTO AUTO) GRAFFITISTATEINDICATOR AT (143 PREVBOTTOM+2) END ! FORM ID grColorForm AT (2 80 156 78) ! MODAL ! BEGIN ! TITLE "$$GRAPH COLORS" ! ! BUTTON "$$DONE" ID grSetupDone AT (5 63 40 12) ! BUTTON "$$CANCEL" ID btnGrcSelCancel AT (PREVRIGHT+5 PREVTOP AUTO 12) ! ! POPUPTRIGGER "" ID grColorPopup AT (110 63 20 12) LEFTANCHOR ! LIST "fun1" "fun2" "fun3" "fun4" "fun5" "fun6" "$$BACKGRND" "$$AXIS" "$$GRID" ID grColorElem AT (PREVLEFT+3 40 32 0) VISIBLEITEMS 9 NONUSABLE ! POPUPLIST ID grColorPopup grColorElem ! ! END FORM ID frmGraph AT (0 0 160 160) MENUID graphMenu BEGIN ! TITLE "$$GRAPH" ! ! PUSHBUTTON "B" ID btnBasic AT (106 1 10 12) GROUP 1 ! PUSHBUTTON "S" ID btnScientific AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "I" ID btnInteger AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! ! GADGET ID graphGadget AT (2 17 140+1 140+1) ! ! PUSHBUTTON "+" ID btnGraphZoomIn AT (147 90 10 12) ! BUTTON "-" ID btnGraphZoomOut AT (147 105 10 12) ! BUTTON " " ID btnPrefMode AT (57 1 15 12) NOFRAME ! BUTTON "P" ID btnGraphPref AT (PREVRIGHT+3 1 15 12) NOFRAME ! BUTTON "S" ID btnGraphSetup AT (PREVRIGHT 1 15 12) NOFRAME ! PUSHBUTTON "T" ID btnGraphTrack AT (147 50 10 12) ! BUTTON "$$GO" ID btnGraphTrackGoto AT (145 69 14 12) NONUSABLE ! LIST "" ID graphTrackList AT (120 50 30 50) NONUSABLE DISABLED VISIBLEITEMS 3 ! POPUPLIST ID graphTrackPopup graphTrackList ! BUTTON "C " ID btnGraphCalc AT (144 20 16 18) NOFRAME ! LIST "$$GRZERO" "$$GRVALUE" "$$GRMIN" "$$GRMAX" "$$GRDDX" "d2/dx" "$$GRINTEG" "$$GRINTERSECT" ID lstGraphCalcFunc AT (100 20 55 50) NONUSABLE DISABLED VISIBLEITEMS 8 ! POPUPLIST AUTOID lstGraphCalcFunc ! LIST "dy/dx" "dy/dt" "dx/dt" ID lstGraphCalcParam AT (PREVLEFT PREVTOP PREVWIDTH PREVHEIGHT) NONUSABLE DISABLED VISIBLEITEMS 3 ! POPUPLIST AUTOID lstGraphCalcParam ! LIST "dr/dfi" ID lstGraphCalcPolar AT (PREVLEFT PREVTOP PREVWIDTH PREVHEIGHT) NONUSABLE DISABLED VISIBLEITEMS 1 ! POPUPLIST AUTOID lstGraphCalcPolar ! BUTTON "Sp" ID btnGraphSpeed AT (144 120 16 18) NOFRAME ! LIST "1x" "2x" "4x" "7x" lstGraphSpeed AT (140 100 15 44) VISIBLEITEMS 4 NONUSABLE DISABLED ! BUTTON "" ID btnGraphColor AT (148 146 8 8) NOFRAME NONUSABLE END --- 112,158 ---- CHECKBOX "Log X" ckbGrPrefLogX AT (PREVLEFT+13 PREVBOTTOM+16 AUTO AUTO) CHECKBOX "Log Y" ckbGrPrefLogY AT (PREVLEFT PREVBOTTOM AUTO AUTO) GRAFFITISTATEINDICATOR AT (143 PREVBOTTOM+2) END ! STRINGTABLE grColorElem "Pick color for " "fun1" "fun2" "fun3" "fun4" "fun5" "fun6" "$$BACKGRND" "$$AXIS" "$$GRID" FORM ID frmGraph AT (0 0 160 160) MENUID graphMenu BEGIN ! TITLE "$$GRAPH" ! BUTTON " " ID btnPrefMode AT (56 1 17 12) RECTFRAME ! SELECTORTRIGGER "P" ID btnGraphPref AT (PREVRIGHT+11 1 10 11) ! SELECTORTRIGGER "S" ID btnGraphSetup AT (PREVRIGHT+1 1 10 11) ! ! PUSHBUTTON "B" ID btnBasic AT (116 1 10 12) GROUP 1 ! PUSHBUTTON "S" ID btnScientific AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "I" ID btnInteger AT (PREVRIGHT+1 1 10 12) GROUP 1 ! PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! ! GADGET ID graphGadget AT (1 16 140+2 140+3) ! ! SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) ! LIST "$$GRZERO" "$$GRVALUE" "$$GRMIN" "$$GRMAX" "$$GRDDX" "d2/dx" "$$GRINTEG" "$$GRINTERSECT" ID lstGraphCalcFunc AT (100 22 55 50) NONUSABLE DISABLED VISIBLEITEMS 8 ! POPUPLIST AUTOID lstGraphCalcFunc ! LIST "dy/dx" "dy/dt" "dx/dt" ID lstGraphCalcParam AT (PREVLEFT PREVTOP PREVWIDTH PREVHEIGHT) NONUSABLE DISABLED VISIBLEITEMS 3 ! POPUPLIST AUTOID lstGraphCalcParam ! LIST "dr/dfi" ID lstGraphCalcPolar AT (PREVLEFT PREVTOP PREVWIDTH PREVHEIGHT) NONUSABLE DISABLED VISIBLEITEMS 1 ! POPUPLIST AUTOID lstGraphCalcPolar ! ! PUSHBUTTON "T" ID btnGraphTrack AT (147 50 10 12) ! LIST "" ID graphTrackList AT (120 50 30 50) NONUSABLE DISABLED VISIBLEITEMS 3 ! POPUPLIST ID graphTrackPopup graphTrackList ! BUTTON "$$GO" ID btnGraphTrackGoto AT (145 65 14 12) NONUSABLE ! ! PUSHBUTTON "+" ID btnGraphZoomIn AT (147 90 10 12) ! ! BUTTON "-" ID btnGraphZoomOut AT (147 105 10 12) ! ! SELE... [truncated message content] |
From: Jorge G. <cl...@us...> - 2006-10-11 17:09:15
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv17673 Modified Files: grtaps.c Log Message: Tracking polar graphs, x & y show the rectangular coordinates of the function (instead of the pen) Index: grtaps.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grtaps.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** grtaps.c 10 Oct 2006 00:58:36 -0000 1.28 --- grtaps.c 11 Oct 2006 17:09:11 -0000 1.29 *************** *** 624,629 **** func_get_value(stack,angle_usr,&r,NULL); ! dx = graph_xgr2scr(r*cos(angle_rad)); ! dy = graph_ygr2scr(r*sin(angle_rad)); if (!finite(angle_rad) || !RctPtInRectangle(dx,dy,bounds)) { dy = -1; --- 624,631 ---- func_get_value(stack,angle_usr,&r,NULL); ! realx = r*cos(angle_rad); ! realy = r*sin(angle_rad); ! dx = graph_xgr2scr(realx); ! dy = graph_ygr2scr(realy); if (!finite(angle_rad) || !RctPtInRectangle(dx,dy,bounds)) { dy = -1; |
From: Ton v. O. <tvo...@us...> - 2006-10-10 00:58:43
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5225 Modified Files: calcrsc.h graph.c graph.rcp.in grprefs.c grsetup.c grtaps.c main.c main.h Log Message: For polar graphs now the Deg/Rad/Grd setting is respected and used when tracking graphs and in the graph preferences form. Internally all computations are (still) done in radians. Conversion from/to user angle units is done for input/output. Changed graph preferences form layout to accomodate the angle unit for polar graphs. Eliminated duplication between trigmode and trigmodeg. Index: main.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/main.c,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** main.c 23 Sep 2006 23:40:30 -0000 1.69 --- main.c 10 Oct 2006 00:58:36 -0000 1.70 *************** *** 49,52 **** --- 49,53 ---- #include "history.h" #include "memo.h" + #define _MAIN_C_ #include "main.h" Index: calcrsc.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/calcrsc.h,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** calcrsc.h 22 Sep 2006 20:04:20 -0000 1.60 --- calcrsc.h 10 Oct 2006 00:58:36 -0000 1.61 *************** *** 336,339 **** --- 336,342 ---- #define ckbGrPrefLogY 4220 #define ckbGrPrefGrid 4221 + #define grPrefLabel1u 4222 + #define grPrefLabel2u 4223 + #define grPrefLabel3u 4224 #define varList 4300 Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** graph.rcp.in 5 Oct 2006 15:15:44 -0000 1.33 --- graph.rcp.in 10 Oct 2006 00:58:36 -0000 1.34 *************** *** 62,103 **** HELPID hlpGrPref BEGIN ! TITLE "$$GRAPH PREFERENCES" ! BUTTON "$$OK" ID prefOK AT (5 140 40 12) ! BUTTON "$$CANCEL" ID prefCancel AT (PREVRIGHT+5 PREVTOP AUTO 12) ! LABEL "xmin:" AUTOID AT (5 14) ! FIELD ID grPrefXmin AT (35 PREVTOP 60 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! LABEL "xmax:" AUTOID AT (5 PREVTOP+14) ! FIELD ID grPrefXmax AT (35 PREVTOP 60 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! LABEL "xscale:" AUTOID AT (5 PREVTOP+14) ! FIELD ID grPrefXscale AT (35 PREVTOP 60 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! LABEL "ymin:" AUTOID AT (5 PREVTOP+14) ! FIELD ID grPrefYmin AT (35 PREVTOP 60 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! LABEL "ymax:" AUTOID AT (5 PREVTOP+14) ! FIELD ID grPrefYmax AT (35 PREVTOP 60 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! LABEL "yscale:" AUTOID AT (5 PREVTOP+14) ! FIELD ID grPrefYscale AT (35 PREVTOP 60 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! ! LABEL " " grPrefLabel1 AT (3 PREVTOP+14) NONUSABLE ! FIELD ID grPrefField1 AT (35 PREVTOP 60 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 NONUSABLE ! LABEL " " grPrefLabel2 AT (3 PREVTOP+14) NONUSABLE ! FIELD ID grPrefField2 AT (35 PREVTOP 60 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 NONUSABLE ! LABEL " " grPrefLabel3 AT (3 PREVTOP+14) NONUSABLE ! FIELD ID grPrefField3 AT (35 PREVTOP 60 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 NONUSABLE ! ! BUTTON "$$DEFAULT" ID grPrefDefault AT (100 20 50 12) ! BUTTON "$$TRIGONO" ID grPrefTrig AT (100 35 50 12) ! ! PUSHBUTTON "$$FUNCMODE" ID grPrefFunc AT (98 55 56 12) GROUP 1 ! PUSHBUTTON "$$POLARMODE" ID grPrefPol AT (PREVLEFT PREVBOTTOM+1 PREVWIDTH 12) GROUP 1 ! PUSHBUTTON "$$PARAMMODE" ID grPrefPar AT (PREVLEFT PREVBOTTOM+1 PREVWIDTH 12) GROUP 1 ! CHECKBOX "Log X" ckbGrPrefLogX AT (PREVLEFT+7 PREVBOTTOM+5 AUTO AUTO) ! CHECKBOX "Log Y" ckbGrPrefLogY AT (PREVLEFT PREVBOTTOM+2 AUTO AUTO) ! CHECKBOX "Grid" ckbGrPrefGrid AT (PREVLEFT PREVBOTTOM+7 AUTO AUTO) ! GRAFFITISTATEINDICATOR AT (143 PREVBOTTOM+2) END --- 62,105 ---- HELPID hlpGrPref BEGIN ! TITLE "$$GRAPH PREFERENCES" ! BUTTON "$$OK" ID prefOK AT (5 140 40 12) ! BUTTON "$$CANCEL" ID prefCancel AT (PREVRIGHT+5 PREVTOP AUTO 12) ! LABEL "xmin:" AUTOID AT (3 14) ! FIELD ID grPrefXmin AT (33 PREVTOP 57 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! LABEL "xmax:" AUTOID AT (3 PREVTOP+14) ! FIELD ID grPrefXmax AT (33 PREVTOP 57 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! LABEL "xscale:" AUTOID AT (3 PREVTOP+14) ! FIELD ID grPrefXscale AT (33 PREVTOP 57 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! LABEL "ymin:" AUTOID AT (3 PREVTOP+14) ! FIELD ID grPrefYmin AT (33 PREVTOP 57 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! LABEL "ymax:" AUTOID AT (3 PREVTOP+14) ! FIELD ID grPrefYmax AT (33 PREVTOP 57 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! LABEL "yscale:" AUTOID AT (3 PREVTOP+14) ! FIELD ID grPrefYscale AT (33 PREVTOP 57 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 USABLE ! ! LABEL " " grPrefLabel1 AT (3 PREVTOP+14) NONUSABLE ! FIELD ID grPrefField1 AT (33 PREVTOP 57 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 NONUSABLE ! LABEL "Rad" grPrefLabel1u AT (PREVRIGHT PREVTOP) NONUSABLE ! LABEL " " grPrefLabel2 AT (3 PREVTOP+14) NONUSABLE ! FIELD ID grPrefField2 AT (33 PREVTOP 57 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 NONUSABLE ! LABEL "Rad" grPrefLabel2u AT (PREVRIGHT PREVTOP) NONUSABLE ! LABEL " " grPrefLabel3 AT (3 PREVTOP+14) NONUSABLE ! FIELD ID grPrefField3 AT (33 PREVTOP 57 12) EDITABLE UNDERLINED SINGLELINE MAXCHARS 20 NONUSABLE ! LABEL "Rad" grPrefLabel3u AT (PREVRIGHT PREVTOP) NONUSABLE ! BUTTON "$$DEFAULT" ID grPrefDefault AT (100 20 50 12) ! BUTTON "$$TRIGONO" ID grPrefTrig AT (100 35 50 12) ! ! PUSHBUTTON "$$FUNCMODE" ID grPrefFunc AT (100 55 54 12) GROUP 1 ! PUSHBUTTON "$$POLARMODE" ID grPrefPol AT (PREVLEFT PREVBOTTOM+1 PREVWIDTH 12) GROUP 1 ! PUSHBUTTON "$$PARAMMODE" ID grPrefPar AT (PREVLEFT PREVBOTTOM+1 PREVWIDTH 12) GROUP 1 ! CHECKBOX "Log X" ckbGrPrefLogX AT (PREVLEFT+13 PREVBOTTOM+16 AUTO AUTO) ! CHECKBOX "Log Y" ckbGrPrefLogY AT (PREVLEFT PREVBOTTOM AUTO AUTO) ! CHECKBOX "Grid" ckbGrPrefGrid AT (PREVLEFT PREVBOTTOM AUTO AUTO) ! GRAFFITISTATEINDICATOR AT (143 PREVBOTTOM+2) END Index: grsetup.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grsetup.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** grsetup.c 6 Oct 2006 14:57:02 -0000 1.26 --- grsetup.c 10 Oct 2006 00:58:36 -0000 1.27 *************** *** 62,70 **** { if (graphPrefs.functype == graph_func) ! return "x"; else if (graphPrefs.functype == graph_polar) ! return "t"; else /* Parametric */ ! return "t"; } --- 62,70 ---- { if (graphPrefs.functype == graph_func) ! return "x"; else if (graphPrefs.functype == graph_polar) ! return "t"; else /* Parametric */ ! return "t"; } *************** *** 96,100 **** count++; } else if (graphPrefs.functype != graph_param && ! StrLen(grsetup_get_fname(i))) { descr[count] = (char *)grsetup_fn_descr(i); nums[count] = i; --- 96,100 ---- count++; } else if (graphPrefs.functype != graph_param && ! StrLen(grsetup_get_fname(i))) { descr[count] = (char *)grsetup_fn_descr(i); nums[count] = i; *************** *** 123,131 **** { if (graphPrefs.functype == graph_func) ! return tblFuncs[i]; else if (graphPrefs.functype == graph_polar) ! return tblPols[i]; else ! return tblPars[i]; } --- 123,131 ---- { if (graphPrefs.functype == graph_func) ! return tblFuncs[i]; else if (graphPrefs.functype == graph_polar) ! return tblPols[i]; else ! return tblPars[i]; } *************** *** 189,198 **** { switch (graphPrefs.functype) { ! case graph_func: return graphPrefs.funcFunc[row]; ! case graph_polar: return graphPrefs.funcPol[row]; ! case graph_param: ! default: return graphPrefs.funcPar[row/2][row%2]; } --- 189,198 ---- { switch (graphPrefs.functype) { ! case graph_func: return graphPrefs.funcFunc[row]; ! case graph_polar: return graphPrefs.funcPol[row]; ! case graph_param: ! default: return graphPrefs.funcPar[row/2][row%2]; } Index: main.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/main.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** main.h 12 Sep 2006 19:40:55 -0000 1.3 --- main.h 10 Oct 2006 00:58:36 -0000 1.4 *************** *** 29,32 **** --- 29,38 ---- #define BUTTON_COUNT 15 + #ifndef _MAIN_C_ + extern const struct { + const char *trigtext; + } trigmode[]; + #endif + Boolean MainFormHandleEvent(EventPtr event); void main_insert(UInt16 fieldid,const char *text,Boolean operator,Boolean func, Index: graph.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** graph.c 7 Oct 2006 20:37:36 -0000 1.49 --- graph.c 10 Oct 2006 00:58:36 -0000 1.50 *************** *** 54,57 **** --- 54,58 ---- #include "varmgr.h" #include "grcalc.h" + #include "main.h" #ifdef SUPPORT_DIA *************** *** 68,79 **** }graphState; - const struct { - const char *trigtext; - } trigmodeg[] ={ - {"Deg"}, - {"Rad"}, - {"Grd"} - }; - TscrPrefs ScrPrefs; --- 69,72 ---- *************** *** 580,588 **** if (!graphCurves[fnum].stack1) return false; ! func_get_value(graphCurves[fnum].stack1,param,&r,NULL); if (!finite(r)) return false; ! *x = r*cos(math_user_to_rad(param)); ! *y = r*sin(math_user_to_rad(param)); return true; --- 573,582 ---- if (!graphCurves[fnum].stack1) return false; ! func_get_value(graphCurves[fnum].stack1, ! math_rad_to_user(param),&r,NULL); if (!finite(r)) return false; ! *x = r*cos(param); ! *y = r*sin(param); return true; *************** *** 963,967 **** } calcPrefs.trigo_mode = trig; ! CtlSetLabel(GetObjectPtr(btnPrefMode),trigmodeg[trig].trigtext); FrmUpdateForm(frmGraph,frmUpdateVars); break; --- 957,961 ---- } calcPrefs.trigo_mode = trig; ! CtlSetLabel(GetObjectPtr(btnPrefMode),trigmode[trig].trigtext); FrmUpdateForm(frmGraph,frmUpdateVars); break; *************** *** 999,1002 **** --- 993,998 ---- case btnGraphTrackGoto: position = grtaps_track_last_value(); + if (graphPrefs.functype == graph_polar) + position = math_rad_to_user(position); if (varmgr_get_double(&position,"Jump to position")) { grtaps_track_manual(position,track_set); *************** *** 1019,1023 **** trig = calcPrefs.trigo_mode; CtlSetLabel(GetObjectPtr(btnPrefMode), ! trigmodeg[trig].trigtext); graph_draw_start(); grtaps_track_reset(graphState.start); --- 1015,1019 ---- trig = calcPrefs.trigo_mode; CtlSetLabel(GetObjectPtr(btnPrefMode), ! trigmode[trig].trigtext); graph_draw_start(); grtaps_track_reset(graphState.start); *************** *** 1030,1075 **** handled = true; if (CtlGetValue(GetObjectPtr(btnGraphTrack)) && ! !(event->data.keyDown.modifiers & poweredOnKeyMask)) ! switch (event->data.keyDown.chr) { ! case vchrHard3: ! grtaps_track_manual(graphState.step*5,track_add); ! handled = true; ! break; ! case vchrPageUp: ! grtaps_track_manual(graphState.step,track_add); ! break; ! case vchrPageDown: ! grtaps_track_manual(-graphState.step,track_add); ! break; ! case vchrHard2: ! grtaps_track_manual(-graphState.step*5,track_add); ! handled = true; ! break; ! case '0': ! case '1': ! case '2': ! case '3': ! case '4': ! case '5': ! case '6': ! case '7': ! case '8': ! case '9': ! case '.': ! case ',': ! case '-': ! /* Automatically popup a 'Goto' window when ! * number pressed ! */ ! if (CtlGetValue(GetObjectPtr(btnGraphTrack))) { ! EvtAddEventToQueue(event); ! if (varmgr_get_double(&position,"Jump to position")) ! grtaps_track_manual(position,track_set); ! } ! break; ! default: ! handled = false; ! break; ! } break; case frmCloseEvent: --- 1026,1075 ---- handled = true; if (CtlGetValue(GetObjectPtr(btnGraphTrack)) && ! !(event->data.keyDown.modifiers & poweredOnKeyMask)) { ! double step = graphState.step; ! ! if (graphPrefs.functype == graph_polar) ! step = math_rad_to_user(step); ! ! switch (event->data.keyDown.chr) { ! case vchrHard3: ! grtaps_track_manual(step*5,track_add); ! break; ! case vchrPageUp: ! grtaps_track_manual(step,track_add); ! break; ! case vchrPageDown: ! grtaps_track_manual(-step,track_add); ! break; ! case vchrHard2: ! grtaps_track_manual(-step*5,track_add); ! break; ! case '0': ! case '1': ! case '2': ! case '3': ! case '4': ! case '5': ! case '6': ! case '7': ! case '8': ! case '9': ! case '.': ! case ',': ! case '-': ! /* Automatically popup a 'Goto' window when ! * number pressed ! */ ! if (CtlGetValue(GetObjectPtr(btnGraphTrack))) { ! EvtAddEventToQueue(event); ! if (varmgr_get_double(&position,"Jump to position")) ! grtaps_track_manual(position,track_set); ! } ! break; ! default: ! handled = false; ! break; ! } ! } break; case frmCloseEvent: *************** *** 1088,1092 **** CtlSetValue(GetObjectPtr(btnGraph),1); trig = calcPrefs.trigo_mode; ! CtlSetLabel(GetObjectPtr(btnPrefMode),trigmodeg[trig].trigtext); graph_init_cache(); graph_draw_start(); --- 1088,1092 ---- CtlSetValue(GetObjectPtr(btnGraph),1); trig = calcPrefs.trigo_mode; ! CtlSetLabel(GetObjectPtr(btnPrefMode),trigmode[trig].trigtext); graph_init_cache(); graph_draw_start(); Index: grtaps.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grtaps.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** grtaps.c 7 Oct 2006 20:37:36 -0000 1.27 --- grtaps.c 10 Oct 2006 00:58:36 -0000 1.28 *************** *** 519,525 **** grtaps_track_manual(double value,TtrackAction action) { ! double realx,realy,r; RectangleType bounds; ! if (action==track_reset) { lastParam = value; --- 519,529 ---- grtaps_track_manual(double value,TtrackAction action) { ! double realx, realy, r; RectangleType bounds; ! ! if (graphPrefs.functype == graph_polar) { ! value = math_user_to_rad(value); ! } ! if (action==track_reset) { lastParam = value; *************** *** 536,542 **** if (action != track_redraw) ! grtaps_cross(crossX,crossY,&bounds); ! graph_get_vals(trackSelected,lastParam,&realx,&realy); crossX = finite(realx) ? graph_xgr2scr(realx) : -1; crossY = finite(realy) ? graph_ygr2scr(realy) : -1; --- 540,546 ---- if (action != track_redraw) ! grtaps_cross(crossX, crossY, &bounds); ! graph_get_vals(trackSelected, lastParam, &realx, &realy); crossX = finite(realx) ? graph_xgr2scr(realx) : -1; crossY = finite(realy) ? graph_ygr2scr(realy) : -1; *************** *** 547,558 **** || crossY > bounds.topLeft.y + bounds.extent.y) crossY = -1; ! grtaps_cross(crossX,crossY,&bounds); ! grtaps_print_coords(realx,realy,&bounds); if (graphPrefs.functype == graph_param) ! grtaps_print_param(lastParam,&bounds); else if (graphPrefs.functype == graph_polar) { ! func_get_value(graphCurves[trackSelected].stack1, ! lastParam,&r,NULL); ! grtaps_print_pol(r,lastParam,&bounds); } } --- 551,563 ---- || crossY > bounds.topLeft.y + bounds.extent.y) crossY = -1; ! grtaps_cross(crossX, crossY, &bounds); ! grtaps_print_coords(realx, realy, &bounds); if (graphPrefs.functype == graph_param) ! grtaps_print_param(lastParam, &bounds); else if (graphPrefs.functype == graph_polar) { ! // func_get_value(graphCurves[trackSelected].stack1, ! // lastParam,&r,NULL); ! r = sqrt(realx * realx + realy * realy); ! grtaps_print_pol(r, math_rad_to_user(lastParam), &bounds); } } *************** *** 640,644 **** if (RctPtInRectangle(x, y, bounds)) { ! lastParam = angle_usr; return true; } --- 645,649 ---- if (RctPtInRectangle(x, y, bounds)) { ! lastParam = angle_rad; return true; } Index: grprefs.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grprefs.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** grprefs.c 12 Sep 2006 19:40:55 -0000 1.22 --- grprefs.c 10 Oct 2006 00:58:36 -0000 1.23 *************** *** 35,38 **** --- 35,39 ---- #include "mathem.h" #include "fp.h" + #include "main.h" #ifdef SUPPORT_DIA *************** *** 100,105 **** graphPrefs.yscale = 1.0; graphPrefs.fimin = 0.0; ! graphPrefs.fimax = 2*M_PIl; ! graphPrefs.fistep = 0.08; graphPrefs.tmin = 0.0; graphPrefs.tmax = 10.0; --- 101,106 ---- graphPrefs.yscale = 1.0; graphPrefs.fimin = 0.0; ! graphPrefs.fimax = M_PIl*2.0; ! graphPrefs.fistep = M_PIl*0.02; graphPrefs.tmin = 0.0; graphPrefs.tmax = 10.0; *************** *** 263,285 **** if (CtlGetValue(GetObjectPtr(grPrefFunc))) ! functype = graph_func; else { if (grpref_comp_field(grPrefField1,&t1)) ! return 0; if (grpref_comp_field(grPrefField2,&t2)) ! return 0; if (grpref_comp_field(grPrefField3,&t3)) ! return 0; if (CtlGetValue(GetObjectPtr(grPrefPol))) { ! if (t1>t2 || (t2-t1)/t3 > 10000 || t3<=0) /* check that min<max and step is reasonable */ ! return 0; ! graphPrefs.fimin = t1; ! graphPrefs.fimax = t2; ! graphPrefs.fistep = t3; functype = graph_polar; } else { if (t1>t2 || (t2-t1)/t3 > 10000 || t3 <= 0) /* check that min<max and step is reasonable */ ! return 0; graphPrefs.tmin = t1; graphPrefs.tmax = t2; --- 264,286 ---- if (CtlGetValue(GetObjectPtr(grPrefFunc))) ! functype = graph_func; else { if (grpref_comp_field(grPrefField1,&t1)) ! return 0; if (grpref_comp_field(grPrefField2,&t2)) ! return 0; if (grpref_comp_field(grPrefField3,&t3)) ! return 0; if (CtlGetValue(GetObjectPtr(grPrefPol))) { ! if (t1>t2 || (t2-t1)/t3 > 10000 || t3 <= 0) /* check that min<max and step is reasonable */ ! return 0; ! graphPrefs.fimin = math_user_to_rad(t1); ! graphPrefs.fimax = math_user_to_rad(t2); ! graphPrefs.fistep = math_user_to_rad(t3); functype = graph_polar; } else { if (t1>t2 || (t2-t1)/t3 > 10000 || t3 <= 0) /* check that min<max and step is reasonable */ ! return 0; graphPrefs.tmin = t1; graphPrefs.tmax = t2; *************** *** 289,295 **** } graphPrefs.functype = functype; ! graphPrefs.xmin=xmin;graphPrefs.xmax=xmax; ! graphPrefs.ymin=ymin;graphPrefs.ymax=ymax; ! graphPrefs.xscale=xscale;graphPrefs.yscale=yscale; graphPrefs.logx = CtlGetValue(GetObjectPtr(ckbGrPrefLogX)); graphPrefs.logy = CtlGetValue(GetObjectPtr(ckbGrPrefLogY)); --- 290,296 ---- } graphPrefs.functype = functype; ! graphPrefs.xmin=xmin; graphPrefs.xmax=xmax; ! graphPrefs.ymin=ymin; graphPrefs.ymax=ymax; ! graphPrefs.xscale = xscale;graphPrefs.yscale = yscale; graphPrefs.logx = CtlGetValue(GetObjectPtr(ckbGrPrefLogX)); graphPrefs.logy = CtlGetValue(GetObjectPtr(ckbGrPrefLogY)); *************** *** 354,369 **** * functions * ! * PARAMETERS: None * * RETURN: None * ***********************************************************************/ ! static void grpref_show_fields(void) IFACE; static void ! grpref_show_fields(void) { ! FormPtr frm; ! ! frm = FrmGetActiveForm(); FrmShowObject(frm,FrmGetObjectIndex(frm,grPrefLabel1)); FrmShowObject(frm,FrmGetObjectIndex(frm,grPrefLabel2)); --- 355,369 ---- * functions * ! * PARAMETERS: ftyp - function type. * * RETURN: None * ***********************************************************************/ ! static void grpref_show_fields(Tfunctype ftyp) IFACE; static void ! grpref_show_fields(Tfunctype ftyp) { ! FormPtr frm = FrmGetActiveForm(); ! FrmShowObject(frm,FrmGetObjectIndex(frm,grPrefLabel1)); FrmShowObject(frm,FrmGetObjectIndex(frm,grPrefLabel2)); *************** *** 372,375 **** --- 372,385 ---- FrmShowObject(frm,FrmGetObjectIndex(frm,grPrefField2)); FrmShowObject(frm,FrmGetObjectIndex(frm,grPrefField3)); + if (ftyp == graph_polar) { + const Char *unittxt = trigmode[calcPrefs.trigo_mode].trigtext; + + FrmCopyLabel(frm,grPrefLabel1u,unittxt); + FrmCopyLabel(frm,grPrefLabel2u,unittxt); + FrmCopyLabel(frm,grPrefLabel3u,unittxt); + FrmShowObject(frm,FrmGetObjectIndex(frm,grPrefLabel1u)); + FrmShowObject(frm,FrmGetObjectIndex(frm,grPrefLabel2u)); + FrmShowObject(frm,FrmGetObjectIndex(frm,grPrefLabel3u)); + } } *************** *** 389,395 **** grpref_hide_fields(void) { ! FormPtr frm; ! ! frm = FrmGetActiveForm(); FrmHideObject(frm,FrmGetObjectIndex(frm,grPrefLabel1)); FrmHideObject(frm,FrmGetObjectIndex(frm,grPrefLabel2)); --- 399,404 ---- grpref_hide_fields(void) { ! FormPtr frm = FrmGetActiveForm(); ! FrmHideObject(frm,FrmGetObjectIndex(frm,grPrefLabel1)); FrmHideObject(frm,FrmGetObjectIndex(frm,grPrefLabel2)); *************** *** 398,401 **** --- 407,413 ---- FrmHideObject(frm,FrmGetObjectIndex(frm,grPrefField2)); FrmHideObject(frm,FrmGetObjectIndex(frm,grPrefField3)); + FrmHideObject(frm,FrmGetObjectIndex(frm,grPrefLabel1u)); + FrmHideObject(frm,FrmGetObjectIndex(frm,grPrefLabel2u)); + FrmHideObject(frm,FrmGetObjectIndex(frm,grPrefLabel3u)); } *************** *** 416,419 **** --- 428,432 ---- { FormPtr frm = FrmGetActiveForm(); + FrmCopyLabel(frm,grPrefLabel1,txt1); FrmCopyLabel(frm,grPrefLabel2,txt2); *************** *** 437,444 **** { grpref_set_names("t-min:","t-max:","t-step:"); ! grpref_set_field(grPrefField1,graphPrefs.fimin); ! grpref_set_field(grPrefField2,graphPrefs.fimax); ! grpref_set_field(grPrefField3,graphPrefs.fistep); ! grpref_show_fields(); } --- 450,457 ---- { grpref_set_names("t-min:","t-max:","t-step:"); ! grpref_set_field(grPrefField1,math_rad_to_user(graphPrefs.fimin)); ! grpref_set_field(grPrefField2,math_rad_to_user(graphPrefs.fimax)); ! grpref_set_field(grPrefField3,math_rad_to_user(graphPrefs.fistep)); ! grpref_show_fields(graph_polar); } *************** *** 462,466 **** grpref_set_field(grPrefField2,graphPrefs.tmax); grpref_set_field(grPrefField3,graphPrefs.tstep); ! grpref_show_fields(); } --- 475,479 ---- grpref_set_field(grPrefField2,graphPrefs.tmax); grpref_set_field(grPrefField3,graphPrefs.tstep); ! grpref_show_fields(graph_param); } *************** *** 497,501 **** break; case frmOpenEvent: ! frm=FrmGetActiveForm(); oldprefs = fp_set_prefs(grDPrefs); --- 510,514 ---- break; case frmOpenEvent: ! frm = FrmGetActiveForm(); oldprefs = fp_set_prefs(grDPrefs); *************** *** 549,555 **** grpref_hide_fields(); if (controlID==grPrefPol) ! grpref_pol_setup(); else if (controlID==grPrefPar) ! grpref_par_setup(); handled = true; break; --- 562,568 ---- grpref_hide_fields(); if (controlID==grPrefPol) ! grpref_pol_setup(); else if (controlID==grPrefPar) ! grpref_par_setup(); handled = true; break; *************** *** 561,564 **** --- 574,587 ---- grpref_set_field(grPrefXscale,1.0); grpref_set_field(grPrefYscale,1.0); + if (CtlGetValue(GetObjectPtr(grPrefPol))) { + grpref_set_field(grPrefField1,0.0); + grpref_set_field(grPrefField2,math_rad_to_user(2.0*M_PIl)); + grpref_set_field(grPrefField3,math_rad_to_user(0.02*M_PIl)); + } + else if (CtlGetValue(GetObjectPtr(grPrefPar))) { + grpref_set_field(grPrefField1,0.0); + grpref_set_field(grPrefField2,10.0); + grpref_set_field(grPrefField3,0.1); + } handled=true; break; *************** *** 579,583 **** } else ! FrmAlert(altGraphBadVal); handled=true; break; --- 602,606 ---- } else ! FrmAlert(altGraphBadVal); handled=true; break; |
From: Ton v. O. <tvo...@us...> - 2006-10-10 00:58:40
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5225/mlib Modified Files: mathem.c Log Message: For polar graphs now the Deg/Rad/Grd setting is respected and used when tracking graphs and in the graph preferences form. Internally all computations are (still) done in radians. Conversion from/to user angle units is done for input/output. Changed graph preferences form layout to accomodate the angle unit for polar graphs. Eliminated duplication between trigmode and trigmodeg. Index: mathem.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/mathem.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** mathem.c 12 Sep 2006 19:40:56 -0000 1.34 --- mathem.c 10 Oct 2006 00:58:36 -0000 1.35 *************** *** 97,103 **** { if (calcPrefs.trigo_mode==degree) ! return (angle * (M_PIl/180)); else if (calcPrefs.trigo_mode==grad) ! return (angle * (M_PIl/200)); else return angle; --- 97,103 ---- { if (calcPrefs.trigo_mode==degree) ! return (angle * M_PIl / 180.0); else if (calcPrefs.trigo_mode==grad) ! return (angle * M_PIl / 200.0); else return angle; *************** *** 119,125 **** { if (calcPrefs.trigo_mode==degree) ! return angle * (360/(2*M_PIl)); else if (calcPrefs.trigo_mode==grad) ! return angle * (400/(2*M_PIl)); else return angle; --- 119,125 ---- { if (calcPrefs.trigo_mode==degree) ! return (angle * 180.0 / M_PIl); else if (calcPrefs.trigo_mode==grad) ! return (angle * 200.0 / M_PIl); else return angle; |
From: Ton v. O. <tvo...@us...> - 2006-10-09 19:09:29
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv30082 Modified Files: lstedit.c Log Message: Bug fix: List Editor was crashing due to freeing the wrong list. Index: lstedit.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/lstedit.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** lstedit.c 12 Sep 2006 19:40:55 -0000 1.16 --- lstedit.c 9 Oct 2006 19:09:14 -0000 1.17 *************** *** 845,849 **** for (i=row;i<loadedList[col-1]->size;i++) lst->item[i+1] = loadedList[col-1]->item[i]; - /* list_delete(loadedList[col-1]); */ oldlst = loadedList[col-1]; loadedList[col-1] = lst; --- 845,848 ---- *************** *** 855,859 **** } else ! list_delete(loadedList[col-1]); lstedit_upd_maxlines(); --- 854,858 ---- } else ! list_delete(oldlst); lstedit_upd_maxlines(); |
From: Ton v. O. <tvo...@us...> - 2006-10-07 20:37:42
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv10208 Modified Files: graph.c grtaps.c Log Message: Use user setting (Rad/Deg/Grd) for the angle parameter when plotting and tracking polar graphs. Index: graph.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.c,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** graph.c 12 Sep 2006 19:40:55 -0000 1.48 --- graph.c 7 Oct 2006 20:37:36 -0000 1.49 *************** *** 583,588 **** if (!finite(r)) return false; ! *x = r*cos(param); ! *y = r*sin(param); return true; --- 583,588 ---- if (!finite(r)) return false; ! *x = r*cos(math_user_to_rad(param)); ! *y = r*sin(math_user_to_rad(param)); return true; Index: grtaps.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grtaps.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** grtaps.c 29 Sep 2006 01:56:41 -0000 1.26 --- grtaps.c 7 Oct 2006 20:37:36 -0000 1.27 *************** *** 578,582 **** { double realx,realy; ! double angle,r; Coord oldx,oldy,dx,dy; CodeStack *stack; --- 578,584 ---- { double realx,realy; ! double r; ! double angle_rad; /* angle in radians */ ! double angle_usr; /* angle in user units: rad/deg/grad */ Coord oldx,oldy,dx,dy; CodeStack *stack; *************** *** 588,592 **** oldx = oldy = -1; ! realx = realy = r = angle = NaN; do { EvtGetPen(&x,&y,&penDown); --- 590,594 ---- oldx = oldy = -1; ! realx = realy = r = angle_rad = angle_usr = NaN; do { EvtGetPen(&x,&y,&penDown); *************** *** 604,622 **** realx = graph_xscr2gr(x); realy = graph_yscr2gr(y); ! angle = NaN; r = hypot(realx,realy); if (r!=0.0) { if (realx>=0.0 && realy>=0.0) ! angle = asin(realy/r); else if (realx<=0.0) ! angle = M_PIl - asin(realy/r); else ! angle = 2*M_PIl + asin(realy/r); ! func_get_value(stack,angle,&r,NULL); ! dx = graph_xgr2scr(r*cos(angle)); ! dy = graph_ygr2scr(r*sin(angle)); ! if (!finite(angle) || !RctPtInRectangle(dx,dy,bounds)) { dy = -1; dx = -1; --- 606,625 ---- realx = graph_xscr2gr(x); realy = graph_yscr2gr(y); ! angle_rad = angle_usr = NaN; r = hypot(realx,realy); if (r!=0.0) { if (realx>=0.0 && realy>=0.0) ! angle_rad = asin(realy/r); else if (realx<=0.0) ! angle_rad = M_PIl - asin(realy/r); else ! angle_rad = 2*M_PIl + asin(realy/r); ! angle_usr = math_rad_to_user(angle_rad); ! func_get_value(stack,angle_usr,&r,NULL); ! dx = graph_xgr2scr(r*cos(angle_rad)); ! dy = graph_ygr2scr(r*sin(angle_rad)); ! if (!finite(angle_rad) || !RctPtInRectangle(dx,dy,bounds)) { dy = -1; dx = -1; *************** *** 630,641 **** grtaps_cross(crossX,crossY,bounds); grtaps_print_coords(realx,realy,bounds); ! grtaps_print_pol(r,angle,bounds); oldx = x;oldy = y; crossX = dx;crossY=dy; } ! }while(penDown); if (RctPtInRectangle(x, y, bounds)) { ! lastParam = angle; return true; } --- 633,644 ---- grtaps_cross(crossX,crossY,bounds); grtaps_print_coords(realx,realy,bounds); ! grtaps_print_pol(r,angle_usr,bounds); oldx = x;oldy = y; crossX = dx;crossY=dy; } ! } while(penDown); if (RctPtInRectangle(x, y, bounds)) { ! lastParam = angle_usr; return true; } |
From: Jorge G. <cl...@us...> - 2006-10-06 14:57:09
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv27900 Modified Files: grsetup.c Log Message: linestyle buttons with BackColor and FrameColor (for grayscale) Index: grsetup.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grsetup.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** grsetup.c 5 Oct 2006 15:15:44 -0000 1.25 --- grsetup.c 6 Oct 2006 14:57:02 -0000 1.26 *************** *** 574,579 **** --- 574,581 ---- if (graphPrefs.functype != graph_param || i % 2 == 0) { FrmGetObjectBounds(frm, FrmGetObjectIndex(frm,grType1+i), &bounds); + graph_setcolor(-1); WinEraseRectangle(&bounds, 0); WinDrawRectangleFrame(roundFrame, &bounds); + graph_unsetcolor(); x = bounds.topLeft.x; |
From: Ton v. O. <tvo...@us...> - 2006-10-05 15:15:59
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv13607 Modified Files: graph.rcp.in grsetup.c Log Message: Change linestyle selection in graph setup form to use buttons with a frame and always draw the linestyle inside the button with thick (=lowres) lines. People did not notice the linestyle selection, especially in HiRes. Index: grsetup.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grsetup.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** grsetup.c 27 Sep 2006 09:43:09 -0000 1.24 --- grsetup.c 5 Oct 2006 15:15:44 -0000 1.25 *************** *** 563,624 **** #endif ! static void ! draw_grType(FormType *frm) IFACE; static void draw_grType(FormType *frm) { Int8 i,k; ! Coord x, y; RectangleType bounds; ! for(i=0;i<6;i++){ ! FrmGetObjectBounds(frm, FrmGetObjectIndex(frm,grType1+i), &bounds); ! WinEraseRectangle(&bounds, 0); ! x = bounds.topLeft.x; ! y = bounds.topLeft.y + bounds.extent.y - 1; ! if(graphPrefs.functype!=graph_param || i%2==0){ ! ! Coord x1=x+HanderaCoord(3),x2=x+HanderaCoord(6),x3=x+HanderaCoord(9); ! Coord y1=y-HanderaCoord(2),y2=y-HanderaCoord(4),y3=y-HanderaCoord(6); ! ! if(graphPrefs.functype==graph_param){ ! k=(firstVisible+i)/2; ! }else k=i; ! #ifdef SONY_SDK ! if(gHrMode == hrSony) { ! x1*=2; x2*=2; x3*=2; ! y1*=2; y2*=2; y3*=2; ! } ! else ! #endif ! if(gHrMode == hrPalm) { ! UInt16 save = WinSetCoordinateSystem(kCoordinatesNative); ! x1 = WinScaleCoord(x1, true); ! y1 = WinScaleCoord(y1, true); ! x2 = WinScaleCoord(x2, true); ! y2 = WinScaleCoord(y2, true); ! x3 = WinScaleCoord(x3, true); ! y3 = WinScaleCoord(y3, true); ! WinSetCoordinateSystem(save); ! } ! graph_setcolor(k); ! switch (graphPrefs.grType[k]) { ! case 0: ! clie_drawpixel(x1,y1); ! clie_drawpixel(x2,y2); ! clie_drawpixel(x3,y3); ! break; ! case 2: ! clie_drawpixel(x1,y1); ! clie_drawline(x2,y1,x2,y2); ! clie_drawline(x3,y1,x3,y3); ! break; ! default: ! clie_drawline(x1,y1,x3,y3); ! break; } - graph_unsetcolor(); - } } } --- 563,611 ---- #endif ! static void draw_grType(FormType *frm) IFACE; static void draw_grType(FormType *frm) { Int8 i,k; ! Coord x, y, x1, x2, x3, y1, y2, y3; RectangleType bounds; ! for (i=0; i<6; i++) { ! if (graphPrefs.functype != graph_param || i % 2 == 0) { ! FrmGetObjectBounds(frm, FrmGetObjectIndex(frm,grType1+i), &bounds); ! WinEraseRectangle(&bounds, 0); ! WinDrawRectangleFrame(roundFrame, &bounds); ! x = bounds.topLeft.x; ! y = bounds.topLeft.y + bounds.extent.y - 1; ! x1 = x + HanderaCoord(3); ! x2 = x + HanderaCoord(6); ! x3 = x + HanderaCoord(9); ! y1 = y - HanderaCoord(1); ! y2 = y - HanderaCoord(3); ! y3 = y - HanderaCoord(5); ! if (graphPrefs.functype == graph_param) { ! k = (firstVisible + i) / 2; ! } ! else ! k = i; ! graph_setcolor(k); ! switch (graphPrefs.grType[k]) { ! case 0: ! WinDrawLine(x1, y2, x1, y2); ! WinDrawLine(x2 ,y2, x2, y2); ! WinDrawLine(x3, y2, x3, y2); ! break; ! case 2: ! WinDrawLine(x1, y1, x1, y1); ! WinDrawLine(x2, y1, x2, y2); ! WinDrawLine(x3, y1, x3, y3); ! break; ! default: ! WinDrawLine(x1, y2, x3, y2); ! break; ! } ! graph_unsetcolor(); } } } Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** graph.rcp.in 27 Sep 2006 09:42:41 -0000 1.32 --- graph.rcp.in 5 Oct 2006 15:15:44 -0000 1.33 *************** *** 40,51 **** TITLE "$$SETUP GRAPHS" ! TABLE ID grSetupTable AT (5 15 130 70) ROWS 6 COLUMNS 2 COLUMNWIDTHS 20 110 ! BUTTON " " ID grType1 AT (139 16 13 9) NOFRAME ! BUTTON " " ID grType2 AT (139 27 13 9) NOFRAME NONUSABLE ! BUTTON " " ID grType3 AT (139 38 13 9) NOFRAME ! BUTTON " " ID grType4 AT (139 49 13 9) NOFRAME NONUSABLE ! BUTTON " " ID grType5 AT (139 60 13 9) NOFRAME ! BUTTON " " ID grType6 AT (139 71 13 9) NOFRAME NONUSABLE BUTTON "$$DONE" ID grSetupDone AT (5 88 40 12) --- 40,51 ---- TITLE "$$SETUP GRAPHS" ! TABLE ID grSetupTable AT (5 15 132 70) ROWS 6 COLUMNS 2 COLUMNWIDTHS 20 112 ! BUTTON " " ID grType1 AT (139 17 13 7) NOFRAME ! BUTTON " " ID grType2 AT (139 28 13 7) NOFRAME NONUSABLE ! BUTTON " " ID grType3 AT (139 39 13 7) NOFRAME ! BUTTON " " ID grType4 AT (139 50 13 7) NOFRAME NONUSABLE ! BUTTON " " ID grType5 AT (139 61 13 7) NOFRAME ! BUTTON " " ID grType6 AT (139 72 13 7) NOFRAME NONUSABLE BUTTON "$$DONE" ID grSetupDone AT (5 88 40 12) |
From: Ton v. O. <tvo...@us...> - 2006-10-04 00:39:34
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv8755 Modified Files: calc.def chkstack.c Log Message: Introduce lazy evaluation of the 'if' statement. This makes recursive function definitions possible. Introduce check against stack overflow. Increase stack from the default 4K to 8K for PalmOS >= 3.0. Index: calc.def =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.def,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** calc.def 23 May 2006 22:59:54 -0000 1.6 --- calc.def 4 Oct 2006 00:39:17 -0000 1.7 *************** *** 1,2 **** ! application { "EasyCalc" OpCl } multiple code { "mlib" "basefunc" "iface" "specfun" "graph" "newfunc" "parser" "matfunc" } --- 1,2 ---- ! application { "EasyCalc" OpCl stack=0x2000 } multiple code { "mlib" "basefunc" "iface" "specfun" "graph" "newfunc" "parser" "matfunc" } Index: chkstack.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/chkstack.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** chkstack.c 1 Oct 2006 22:38:12 -0000 1.1 --- chkstack.c 4 Oct 2006 00:39:17 -0000 1.2 *************** *** 29,33 **** #include "calcrsc.h" ! #define MARGIN 700UL /* 700 bytes stack margin */ static UInt32 stackBeg = 0; --- 29,33 ---- #include "calcrsc.h" ! #define MARGIN 800UL /* stack margin */ static UInt32 stackBeg = 0; |
From: Ton v. O. <tvo...@us...> - 2006-10-04 00:39:26
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv8755/mlib Modified Files: funcs.c konvert.c Log Message: Introduce lazy evaluation of the 'if' statement. This makes recursive function definitions possible. Introduce check against stack overflow. Increase stack from the default 4K to 8K for PalmOS >= 3.0. Index: konvert.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/konvert.c,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** konvert.c 1 Oct 2006 22:43:36 -0000 1.66 --- konvert.c 4 Oct 2006 00:39:17 -0000 1.67 *************** *** 562,565 **** --- 562,635 ---- } + static Int16 handleIfArguments(char *buf, Int16 priority, CError *err) PARSER; + static Int16 + handleIfArguments(char *buf, Int16 priority, CError *err) + { + Char *ptr; + Int16 prmcnt1 = 1; + Int16 level = 0; + Int16 count = 0; + Int16 i; + Char lastchar; + UInt16 len; + Tmeq item; + Char *text; + static Char sepchar[2] = { ':', ')' }; + + /* We compile the condition argument as ususal. The true and false + * false arguments are stored as strings. They are compiled and + * executed later in func_if(). This allows 'lazy evaluation' of + * the if statement and recursion. + * Now it is possible to define recursive functions, e.g. the factorial + * can be defined as: mf()="if(x>1:mf(x-1)*x:1)". + * Of course we need a check against stack overflow now. See file + * chkstack.c */ + + for (ptr = buf; *ptr && (*ptr != ':' || level > 0); ptr++, count++) { + if (*ptr == '(') level++; + if (*ptr == ')' && level > 0) level--; + } + /* Now we have the condition argument, process it as normal */ + lastchar = *ptr; *ptr = '\0'; + if (!konvert_to_meq(buf, priority, &prmcnt1, ')', err)) + return 0; + *ptr = lastchar; + if (*ptr) + ptr++; count++; + + for (i = 0; i < 2; i++) { + /* Isolate the true (i=0) or false (i=1) argument */ + for (buf = ptr; *ptr && (*ptr != sepchar[i] || level > 0); + ptr++, count++) { + if (*ptr == '(') level++; + if (*ptr == ')' && level > 0) level--; + } + /* Push the true/false argument on the meq stack as a string */ + lastchar = *ptr; *ptr = '\0'; + len = StrLen(buf); + if (!len) { + *err = c_syntax; + return 0; + } + text = MemPtrNew(len + 1); + if (!text) { + *err = c_memory; + return 0; + } + StrCopy(text, buf); + text[len] = '\0'; + item.priority = priority; + item.rpn.type = string; + item.rpn.u.stringval = text; + item.rpn.allocsize = len + 1; + meq_push(meqstack, item); + *ptr = lastchar; + if (lastchar) + ptr++; count++; + } + + return count; + } + static Int16 try_func(char *buf,Int16 priority,CError *err) *************** *** 607,611 **** prmcnt1 = item.rpn.u.funcval.paramcount; i = meq_push(meqstack,item); ! if (!(tmp=konvert_to_meq(buf,priority+1, &prmcnt1,')',err))) return 0; --- 677,685 ---- prmcnt1 = item.rpn.u.funcval.paramcount; i = meq_push(meqstack,item); ! if (StrCompare("if", fname) == 0) { ! if (!(tmp = handleIfArguments(buf, priority + 1, err))) ! return 0; ! } ! else if (!(tmp=konvert_to_meq(buf,priority+1, &prmcnt1,')',err))) return 0; *************** *** 779,783 **** Int16 tmp; Int16 length=0; ! Int16 param_encountred = 1; Int16 (*try_num)(char *,Int16,CError *); Tmeq item; --- 853,857 ---- Int16 tmp; Int16 length=0; ! Int16 param_encountered = 1; Int16 (*try_num)(char *,Int16,CError *); Tmeq item; *************** *** 865,870 **** length++; if (*param_count == 0) ! *param_count = param_encountred; ! else if (param_encountred != *param_count) return 0; /* Bad parameter count */ return length; --- 939,944 ---- length++; if (*param_count == 0) ! *param_count = param_encountered; ! else if (param_encountered != *param_count) return 0; /* Bad parameter count */ return length; *************** *** 879,883 **** /* Next parameter */ else if (*buf==':') { ! param_encountred++; buf++; length++; --- 953,957 ---- /* Next parameter */ else if (*buf==':') { ! param_encountered++; buf++; length++; Index: funcs.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/funcs.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** funcs.c 22 Sep 2006 15:06:33 -0000 1.50 --- funcs.c 4 Oct 2006 00:39:17 -0000 1.51 *************** *** 658,662 **** { CError err; ! Trpn argtrue, argfalse; UInt32 value; --- 658,662 ---- { CError err; ! Trpn arg, argtrue, argfalse; UInt32 value; *************** *** 670,679 **** } if (value) { - stack_push(stack,argtrue); rpn_delete(argfalse); } else { - stack_push(stack,argfalse); rpn_delete(argtrue); } return c_noerror; } --- 670,692 ---- } if (value) { rpn_delete(argfalse); + arg = argtrue; } else { rpn_delete(argtrue); + arg = argfalse; } + if (arg.type == string) { + CodeStack *tmp = text_to_stack(arg.u.stringval,&err); + rpn_delete(arg); + if (!err) + err = stack_compute(tmp); + if (!err) + arg=stack_pop(tmp); + if (tmp) + stack_delete(tmp); + if (err) + return err; + } + stack_push(stack,arg); return c_noerror; } |
From: Ton v. O. <tvo...@us...> - 2006-10-01 22:43:44
|
Update of /cvsroot/easycalc/easycalc/include In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv8881/include Modified Files: konvert.h Log Message: New error c_stacklow. Add stack usage checks to konvert.c. Index: konvert.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/include/konvert.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** konvert.h 12 Sep 2006 19:40:55 -0000 1.21 --- konvert.h 1 Oct 2006 22:43:36 -0000 1.22 *************** *** 83,87 **** c_singular, c_interrupted, ! c_memory }CError; --- 83,88 ---- c_singular, c_interrupted, ! c_memory, ! c_stacklow }CError; |
From: Ton v. O. <tvo...@us...> - 2006-10-01 22:43:43
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv8881/mlib Modified Files: konvert.c Log Message: New error c_stacklow. Add stack usage checks to konvert.c. Index: konvert.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/konvert.c,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** konvert.c 25 Sep 2006 20:49:05 -0000 1.65 --- konvert.c 1 Oct 2006 22:43:36 -0000 1.66 *************** *** 42,45 **** --- 42,46 ---- #include "txtask.h" #include "cmatrix.h" + #include "chkstack.h" #ifdef SPECFUN_ENABLED *************** *** 325,338 **** static Int16 konvert_to_meq(char *buf,Int16 priority,Int16 *param_count, ! char cbracket); Int16 fl_num(char *input,double *cislo) MLIB; static Int16 ! try_real_num(char *buf,Int16 priority) { double t1; Int16 res; Tmeq item; ! if (!(res=fl_num(buf,&t1))) return 0; --- 326,346 ---- static Int16 konvert_to_meq(char *buf,Int16 priority,Int16 *param_count, ! char cbracket, CError *err) PARSER; Int16 fl_num(char *input,double *cislo) MLIB; + static Int16 try_real_num(char *buf,Int16 priority,CError *err) PARSER; static Int16 ! try_real_num(char *buf,Int16 priority,CError *err) { double t1; Int16 res; Tmeq item; ! ! *err = c_noerror; ! if (chkStack()) { ! *err = c_stacklow; ! return 0; ! } ! if (!(res=fl_num(buf,&t1))) return 0; *************** *** 345,350 **** } static Int16 ! try_degree(char *buf,Int16 priority) { Int16 length=0; --- 353,359 ---- } + static Int16 try_degree(char *buf,Int16 priority,CError *err) PARSER; static Int16 ! try_degree(char *buf,Int16 priority,CError *err) { Int16 length=0; *************** *** 353,359 **** Int16 negate=0; Tmeq item; ! if (calcPrefs.trigo_mode!=degree || dispPrefs.base!=disp_decimal) ! return 0; item.rpn.type=real; --- 362,374 ---- Int16 negate=0; Tmeq item; ! ! *err = c_noerror; ! if (chkStack()) { ! *err = c_stacklow; ! return 0; ! } ! if (calcPrefs.trigo_mode!=degree || dispPrefs.base!=disp_decimal) ! return 0; item.rpn.type=real; *************** *** 408,417 **** } static Int16 ! try_int_num(char *buf,Int16 priority) { Int16 length=0; Tmeq item; ! item.rpn.type=integer; item.rpn.allocsize = 0; --- 423,439 ---- } + static Int16 try_int_num(char *buf,Int16 priority,CError *err) PARSER; static Int16 ! try_int_num(char *buf,Int16 priority,CError *err) { Int16 length=0; Tmeq item; ! ! *err = c_noerror; ! if (chkStack()) { ! *err = c_stacklow; ! return 0; ! } ! item.rpn.type=integer; item.rpn.allocsize = 0; *************** *** 447,453 **** item.rpn.u.intval*=16; if (*buf>='0' && *buf<='9') ! item.rpn.u.intval+=*buf-'0'; else ! item.rpn.u.intval+=*buf-'A'+10; buf++; } --- 469,475 ---- item.rpn.u.intval*=16; if (*buf>='0' && *buf<='9') ! item.rpn.u.intval+=*buf-'0'; else ! item.rpn.u.intval+=*buf-'A'+10; buf++; } *************** *** 475,485 **** } static Int16 ! try_op(char *buf,Int16 priority) { Int16 retval=0; Int16 i=0; Tmeq item; ! item.priority=priority; for (;def_ops[i].name;i++) { --- 497,514 ---- } + static Int16 try_op(char *buf,Int16 priority,CError *err) PARSER; static Int16 ! try_op(char *buf,Int16 priority,CError *err) { Int16 retval=0; Int16 i=0; Tmeq item; ! ! *err = c_noerror; ! if (chkStack()) { ! *err = c_stacklow; ! return 0; ! } ! item.priority=priority; for (;def_ops[i].name;i++) { *************** *** 509,512 **** --- 538,542 ---- Int16 prmcnt1 = 1; /* Temp variable for parameter to konvert_to_meq*/ Tmeq item; + CError err; if (buf[0] != '[') *************** *** 523,527 **** i = meq_push(meqstack,item); if (!(tmp=konvert_to_meq(buf,priority+1, ! &prmcnt1,']'))) return 0; meq_update_f_pcount(meqstack,i,prmcnt1); --- 553,557 ---- i = meq_push(meqstack,item); if (!(tmp=konvert_to_meq(buf,priority+1, ! &prmcnt1,']',&err))) return 0; meq_update_f_pcount(meqstack,i,prmcnt1); *************** *** 533,537 **** static Int16 ! try_func(char *buf,Int16 priority) { Int16 length=0; --- 563,567 ---- static Int16 ! try_func(char *buf,Int16 priority,CError *err) { Int16 length=0; *************** *** 540,549 **** char fname[MAX_FUNCNAME+1]; Tmeq item; ! if (*buf=='(') { /* Only parentheses */ length++; buf++; ! if (!(tmp=konvert_to_meq(buf,priority,&prmcnt1,')'))) ! return 0; return length+tmp; } --- 570,585 ---- char fname[MAX_FUNCNAME+1]; Tmeq item; ! ! *err = c_noerror; ! if (chkStack()) { ! *err = c_stacklow; ! return 0; ! } ! if (*buf=='(') { /* Only parentheses */ length++; buf++; ! if (!(tmp=konvert_to_meq(buf,priority,&prmcnt1,')',err))) ! return 0; return length+tmp; } *************** *** 560,564 **** fname[length]='\0'; if (*buf!='(') /* Not a function */ ! return 0; length++;buf++; --- 596,600 ---- fname[length]='\0'; if (*buf!='(') /* Not a function */ ! return 0; length++;buf++; *************** *** 572,576 **** i = meq_push(meqstack,item); if (!(tmp=konvert_to_meq(buf,priority+1, ! &prmcnt1,')'))) return 0; meq_update_f_pcount(meqstack,i,prmcnt1); --- 608,612 ---- i = meq_push(meqstack,item); if (!(tmp=konvert_to_meq(buf,priority+1, ! &prmcnt1,')',err))) return 0; meq_update_f_pcount(meqstack,i,prmcnt1); *************** *** 585,589 **** i = meq_push(meqstack,item); if (!(tmp=konvert_to_meq(buf,priority+1, ! &prmcnt1,')'))) return 0; meq_update_f_pcount(meqstack,i,prmcnt1); --- 621,625 ---- i = meq_push(meqstack,item); if (!(tmp=konvert_to_meq(buf,priority+1, ! &prmcnt1,')',err))) return 0; meq_update_f_pcount(meqstack,i,prmcnt1); *************** *** 609,613 **** i = meq_push(meqstack,item); if (!(tmp=konvert_to_meq(buf,priority+1, ! &prmcnt1,')'))) return 0; // item.rpn.u.textfunc.paramcount = 0; --- 645,649 ---- i = meq_push(meqstack,item); if (!(tmp=konvert_to_meq(buf,priority+1, ! &prmcnt1,')',err))) return 0; // item.rpn.u.textfunc.paramcount = 0; *************** *** 617,628 **** } static Int16 ! try_variable(char *buf,Int16 priority) { Int16 length=0; Tmeq item; if (!IS_FUNC_1LETTER(*buf)) ! return 0; item.priority=priority; --- 653,671 ---- } + static Int16 try_variable(char *buf,Int16 priority,CError *err) PARSER; static Int16 ! try_variable(char *buf,Int16 priority,CError *err) { Int16 length=0; Tmeq item; + *err = c_noerror; + if (chkStack()) { + *err = c_stacklow; + return 0; + } + if (!IS_FUNC_1LETTER(*buf)) ! return 0; item.priority=priority; *************** *** 632,636 **** } if (*buf=='(' || IS_FUNC_LETTER(*buf)) ! return 0; /* It is not a function, and it is smaller then MAX_FUNCNAME */ item.rpn.u.varname[length]='\0'; --- 675,679 ---- } if (*buf=='(' || IS_FUNC_LETTER(*buf)) ! return 0; /* It is not a function, and it is smaller then MAX_FUNCNAME */ item.rpn.u.varname[length]='\0'; *************** *** 654,659 **** * slash: "....\\...." */ static Int16 ! try_string(char *buf,Int16 priority) { char *text; --- 697,703 ---- * slash: "....\\...." */ + static Int16 try_string(char *buf,Int16 priority,CError *err) PARSER; static Int16 ! try_string(char *buf,Int16 priority,CError *err) { char *text; *************** *** 661,667 **** Int16 slashcount=0; Tmeq item; ! if (*buf!='"') ! return 0; buf++; text=MemPtrNew(MAX_INPUT_LENGTH+1); --- 705,717 ---- Int16 slashcount=0; Tmeq item; ! ! *err = c_noerror; ! if (chkStack()) { ! *err = c_stacklow; ! return 0; ! } ! if (*buf!='"') ! return 0; buf++; text=MemPtrNew(MAX_INPUT_LENGTH+1); *************** *** 724,740 **** #define EAT_SPACE for (;*buf == ' ';buf++,length++); static Int16 ! konvert_to_meq(char *buf,Int16 priority,Int16 *param_count, ! char cbracket) { Int16 tmp; Int16 length=0; Int16 param_encountred = 1; ! Int16 (*try_num)(char *,Int16); Tmeq item; if (dispPrefs.forceInteger) ! try_num=try_int_num; else ! try_num=try_real_num; /* We should allow an empty beginning */ --- 774,796 ---- #define EAT_SPACE for (;*buf == ' ';buf++,length++); static Int16 ! konvert_to_meq(char *buf,Int16 priority,Int16 *param_count, char cbracket, ! CError *err) { Int16 tmp; Int16 length=0; Int16 param_encountred = 1; ! Int16 (*try_num)(char *,Int16,CError *); Tmeq item; + *err = c_noerror; + if (chkStack()) { + *err = c_stacklow; + return 0; + } + if (dispPrefs.forceInteger) ! try_num=try_int_num; else ! try_num=try_real_num; /* We should allow an empty beginning */ *************** *** 761,779 **** /* try_degree must be BEFORE try_num, because otherwise * the degree form wouldn't be recognized */ ! if ((tmp=try_degree(buf,priority+3)) || ! (tmp=try_num(buf,priority+3)) || ! (tmp=try_func(buf,priority+3)) || ! (tmp=try_variable(buf,priority+3)) || ! (tmp=try_string(buf,priority+3)) || ! (tmp=try_shortlist(buf,priority+3))) { buf+=tmp; length+=tmp; } ! else ! return 0; /* Syntax error */ /* Time for postfix operator */ if (*buf == '\'') { ! try_op("\2",priority+1); buf+=1; length+=1; --- 817,836 ---- /* try_degree must be BEFORE try_num, because otherwise * the degree form wouldn't be recognized */ ! if ((tmp=try_degree(buf,priority+3,err)) || ! (!*err && (tmp=try_num(buf,priority+3,err))) || ! (!*err && (tmp=try_func(buf,priority+3,err))) || ! (!*err && (tmp=try_variable(buf,priority+3,err))) || ! (!*err && (tmp=try_string(buf,priority+3,err))) || ! (!*err && (tmp=try_shortlist(buf,priority+3)))) { buf+=tmp; length+=tmp; } ! else { ! return 0; /* Syntax error or stack low */ ! } /* Time for postfix operator */ if (*buf == '\'') { ! try_op("\2",priority+1,err); buf+=1; length+=1; *************** *** 782,786 **** Int16 pos; ! try_op("\3",priority+1); /* Remember the position of the command, so that * we can update parameter count when it is known --- 839,843 ---- Int16 pos; ! try_op("\3",priority+1,err); /* Remember the position of the command, so that * we can update parameter count when it is known *************** *** 792,796 **** length+=1; if (!(tmp = konvert_to_meq(buf,priority+3,&ptrcount, ! ']'))) return 0; /* Update the parameter count of the calling function */ --- 849,853 ---- length+=1; if (!(tmp = konvert_to_meq(buf,priority+3,&ptrcount, ! ']',err))) return 0; /* Update the parameter count of the calling function */ *************** *** 816,820 **** EAT_SPACE; ! if ((tmp=try_op(buf,priority+1))) { buf+=tmp; length+=tmp; --- 873,877 ---- EAT_SPACE; ! if ((tmp=try_op(buf,priority+1,err))) { buf+=tmp; length+=tmp; *************** *** 834,838 **** /* This is for syntax like '3x'=>'3*x' and 3(3+4)*/ else if (IS_FUNC_LETTER(*buf) || *buf=='(') { ! try_op("\1",priority+1); /* Special high-priority '*' */ } else if (*buf==';' && priority==0) { --- 891,895 ---- /* This is for syntax like '3x'=>'3*x' and 3(3+4)*/ else if (IS_FUNC_LETTER(*buf) || *buf=='(') { ! try_op("\1",priority+1,err); /* Special high-priority '*' */ } else if (*buf==';' && priority==0) { *************** *** 874,877 **** --- 931,935 ---- * meq */ + static void meq_prioritize(void) PARSER; static void meq_prioritize(void) *************** *** 886,903 **** /* Prioritize from operators everything, that has * pri>pri_of_the_operator */ ! for (i=0;i<meqcount;i++) ! if (meq[i].rpn.type==oper && meq[i].operpri>0) { ! /* Prioritize backwards */ ! for (j=i-1;j>=0 && meq[j].priority>meq[i].priority;j--) ! meq[j].priority+=meq[i].operpri; ! /* Prioritize forwards */ ! for (j=i+1;j<meqcount && meq[j].priority>meq[i].priority;j++) ! meq[j].priority+=meq[i].operpri; ! } /* Prioritize the particular operators*/ for (i=0;i<meqcount;i++) { if (meq[i].rpn.type==oper) ! meq[i].priority+=meq[i].operpri; } /* Prioritize forward +1 for evalRight operators (handle 2^3^4) --- 944,962 ---- /* Prioritize from operators everything, that has * pri>pri_of_the_operator */ ! for (i=0;i<meqcount;i++) { ! if (meq[i].rpn.type==oper && meq[i].operpri>0) { ! /* Prioritize backwards */ ! for (j=i-1;j>=0 && meq[j].priority>meq[i].priority;j--) ! meq[j].priority+=meq[i].operpri; ! /* Prioritize forwards */ ! for (j=i+1;j<meqcount && meq[j].priority>meq[i].priority;j++) ! meq[j].priority+=meq[i].operpri; ! } ! } /* Prioritize the particular operators*/ for (i=0;i<meqcount;i++) { if (meq[i].rpn.type==oper) ! meq[i].priority+=meq[i].operpri; } /* Prioritize forward +1 for evalRight operators (handle 2^3^4) *************** *** 908,918 **** for (i=0;i<meqcount;i++) { if (meq[i].rpn.type==oper && meq[i].evalRight) ! for (j=i+1;j<meqcount && meq[j].priority>=meq[i].priority;j++) ! meq[j].priority++; } /* Convert operators to ordinary function */ for (i=0;i<meqcount;i++) { if (meq[i].rpn.type==oper) ! meq[i].rpn.type=function; } } --- 967,977 ---- for (i=0;i<meqcount;i++) { if (meq[i].rpn.type==oper && meq[i].evalRight) ! for (j=i+1;j<meqcount && meq[j].priority>=meq[i].priority;j++) ! meq[j].priority++; } /* Convert operators to ordinary function */ for (i=0;i<meqcount;i++) { if (meq[i].rpn.type==oper) ! meq[i].rpn.type=function; } } *************** *** 935,938 **** --- 994,998 ---- * rpn, rpncount - global array, resulting rpn */ + static CodeStack *konvert_to_rpn(void) PARSER; static CodeStack * konvert_to_rpn(void) *************** *** 989,996 **** prmcount = 1; ! if (!konvert_to_meq(buf,0,&prmcount,')')) { /* Free the alocated variables */ meq_free(meqstack); ! *err = c_syntax; return NULL; } --- 1049,1057 ---- prmcount = 1; ! if (!konvert_to_meq(buf,0,&prmcount,')',err)) { /* Free the alocated variables */ meq_free(meqstack); ! if (*err == c_noerror) ! *err = c_syntax; return NULL; } |
From: Ton v. O. <tvo...@us...> - 2006-10-01 22:42:09
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv8499 Modified Files: calc.rcp.in Log Message: Extend input field to left margin. New error message "Stack low". Index: calc.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.rcp.in,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** calc.rcp.in 23 Sep 2006 20:57:33 -0000 1.109 --- calc.rcp.in 1 Oct 2006 22:42:05 -0000 1.110 *************** *** 423,427 **** GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (5 32 140 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) --- 423,427 ---- GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (0 32 145 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) *************** *** 502,506 **** GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (5 32 140 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) --- 502,506 ---- GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (0 32 145 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) *************** *** 615,619 **** GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (5 32 140 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) --- 615,619 ---- GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (0 32 145 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) *************** *** 720,724 **** GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (5 32 140 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) --- 720,724 ---- GADGET ID resultGadget AT (5 16 138 16) ! FIELD ID tdInput AT (0 32 145 25) EDITABLE MULTIPLELINES UNDERLINED MAXCHARS MAX_INPUT_LENGTH USABLE POPUPTRIGGER "" ID btnHistory AT (147 25 15 AUTO) *************** *** 1004,1008 **** STRINGTABLE strMenuDescription "" "$$MNCOPY" "$$MNSAVE AS" "$$MNDATAMGR" "$$MNGUESSIT" "$$MNDEGREE" "$$MNRADIAN" "$$MNGON" "$$MNCIS" "$$ENGDISPL" "$$MNDEGREE2" ! STRINGTABLE strErrCodes "" "$$ERRNO ERROR" "$$ERRSYNTAX ERROR" "$$ERRBAD FUNCTION" "$$ERRMISSING ARGUMENT" "$$ERRBAD ARGUMENT TYPE" "$$ERRINTERNAL ERROR" "$$ERRBAD MODE SELECTED" "$$ERRNO RESULT" "$$ERRDIVISION BY 0" "$$ERRNO SUCH VARIABLE" "$$ERRBAD RESULT" "$$ERRTOO DEEP RECURSION" "$$ERRIMPOSSIBLE CALCULATION" "$$ERROUT OF RANGE" "$$ERRBAD ARG COUNT" "$$ERRBAD DIMENSION" "$$ERRSINGULAR" "$$ERRINTERRUPTED" "Not enough memory" #ifdef OS5HIRES --- 1004,1008 ---- STRINGTABLE strMenuDescription "" "$$MNCOPY" "$$MNSAVE AS" "$$MNDATAMGR" "$$MNGUESSIT" "$$MNDEGREE" "$$MNRADIAN" "$$MNGON" "$$MNCIS" "$$ENGDISPL" "$$MNDEGREE2" ! STRINGTABLE strErrCodes "" "$$ERRNO ERROR" "$$ERRSYNTAX ERROR" "$$ERRBAD FUNCTION" "$$ERRMISSING ARGUMENT" "$$ERRBAD ARGUMENT TYPE" "$$ERRINTERNAL ERROR" "$$ERRBAD MODE SELECTED" "$$ERRNO RESULT" "$$ERRDIVISION BY 0" "$$ERRNO SUCH VARIABLE" "$$ERRBAD RESULT" "$$ERRTOO DEEP RECURSION" "$$ERRIMPOSSIBLE CALCULATION" "$$ERROUT OF RANGE" "$$ERRBAD ARG COUNT" "$$ERRBAD DIMENSION" "$$ERRSINGULAR" "$$ERRINTERRUPTED" "Not enough memory" "Stack low" #ifdef OS5HIRES |
From: Ton v. O. <tvo...@us...> - 2006-10-01 22:40:32
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv7322 Modified Files: calc.c calc.h Log Message: (Re)Introduce global palmOS3 for stack usage check. SysGetStackInfo (used in initChkStack()) does not exist in PalmOS2. Index: calc.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** calc.c 18 Sep 2006 17:54:17 -0000 1.34 --- calc.c 1 Oct 2006 22:40:27 -0000 1.35 *************** *** 56,59 **** --- 56,60 ---- #include "lstedit.h" #include "mtxedit.h" + #include "chkstack.h" #ifdef SPECFUN_ENABLED *************** *** 72,75 **** --- 73,77 ---- #endif + Boolean palmOS3=false; Boolean palmOS35=false; Boolean handera=false; *************** *** 219,223 **** /* Get version of PalmOS */ ! palmOS35 = calc_rom_greater(3,5); /* Are we on a Handera ? */ --- 221,229 ---- /* Get version of PalmOS */ ! palmOS3 = calc_rom_greater(3,0); /* for stack check */ ! palmOS35 = calc_rom_greater(3,5); /* for color/grayscale support */ ! ! /* Get stack boundaries */ ! initChkStack(); /* Are we on a Handera ? */ Index: calc.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** calc.h 12 Sep 2006 19:40:55 -0000 1.10 --- calc.h 1 Oct 2006 22:40:27 -0000 1.11 *************** *** 37,40 **** --- 37,41 ---- void gadget_bounds(FormType *frm, Int16 gadget, RectangleType *bounds); + extern Boolean palmOS3; extern Boolean palmOS35; extern Boolean handera; |
From: Ton v. O. <tvo...@us...> - 2006-10-01 22:38:22
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv6946 Modified Files: Makefile.in Added Files: chkstack.c chkstack.h Log Message: New files chkstack.c and chkstack.h for checking stack usage. --- NEW FILE: chkstack.h --- /* * $Id: chkstack.h,v 1.1 2006/10/01 22:38:12 tvoverbe 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: Makefile.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/Makefile.in,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Makefile.in 6 Sep 2006 01:11:58 -0000 1.34 --- Makefile.in 1 Oct 2006 22:38:12 -0000 1.35 *************** *** 36,40 **** ROFILE = $(TARGET).ro ! CALC_OBJS = calc.o about.o clie.o clie-util.o \ mlib/calcDB.o mlib/fl_num.o mlib/fp.o mlib/funcs.o \ mlib/guess.o mlib/konvert.o mlib/mathem.o mlib/stack.o prefs.o \ --- 36,40 ---- ROFILE = $(TARGET).ro ! CALC_OBJS = calc.o about.o clie.o clie-util.o chkstack.o \ mlib/calcDB.o mlib/fl_num.o mlib/fp.o mlib/funcs.o \ mlib/guess.o mlib/konvert.o mlib/mathem.o mlib/stack.o prefs.o \ --- NEW FILE: chkstack.c --- /* * $Id: chkstack.c,v 1.1 2006/10/01 22:38:12 tvoverbe 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 <PalmOS.h> #include "konvert.h" #include "calc.h" #include "calcrsc.h" #define MARGIN 700UL /* 700 bytes stack margin */ static UInt32 stackBeg = 0; static UInt32 stackEnd = 0; void initChkStack(void) { UInt16 dummy = 0; 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; } } Boolean chkStack(void) { UInt32 stackaddr = (UInt32)&stackaddr; if (stackaddr > (stackBeg + MARGIN) && stackaddr < stackEnd) return false; else return true; } |
From: Ton v. O. <tvo...@us...> - 2006-10-01 02:15:52
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv29761 Modified Files: meqstack.c Log Message: White space edit. Index: meqstack.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/meqstack.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** meqstack.c 12 Sep 2006 19:40:56 -0000 1.4 --- meqstack.c 1 Oct 2006 02:15:45 -0000 1.5 *************** *** 25,30 **** #include <PalmOS.h> #include <string.h> - - #include "stack.h" #include "meqstack.h" --- 25,28 ---- *************** *** 74,78 **** { Tmeq *tmp; ! if (array->count == array->allocated) { if (array->array == NULL) { --- 72,76 ---- { Tmeq *tmp; ! if (array->count == array->allocated) { if (array->array == NULL) { |
From: Ton v. O. <tvo...@us...> - 2006-09-29 01:56:50
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv3410 Modified Files: grtaps.c Log Message: Improve parametric tracking when tracking parametric graphs of lists (x=list index, y=list value). Now works correctly when tracking with the stylus and when tracking with hardware buttons. Index: grtaps.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grtaps.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** grtaps.c 13 Sep 2006 13:17:57 -0000 1.25 --- grtaps.c 29 Sep 2006 01:56:41 -0000 1.26 *************** *** 537,561 **** if (action != track_redraw) grtaps_cross(crossX,crossY,&bounds); ! if (graph_get_vals(trackSelected,lastParam,&realx,&realy)) { ! crossX = graph_xgr2scr(realx); ! crossY = graph_ygr2scr(realy); ! if (crossX < bounds.topLeft.x ! || crossX > bounds.topLeft.x + bounds.extent.x) ! crossX = -1; ! if (crossY < bounds.topLeft.y ! || crossY > bounds.topLeft.y + bounds.extent.y) ! crossY = -1; ! grtaps_cross(crossX,crossY,&bounds); ! grtaps_print_coords(realx,realy,&bounds); ! if (graphPrefs.functype == graph_param) ! grtaps_print_param(lastParam,&bounds); ! else if (graphPrefs.functype == graph_polar) { ! func_get_value(graphCurves[trackSelected].stack1, ! lastParam,&r,NULL); ! grtaps_print_pol(r,lastParam,&bounds); ! } } - else - crossX = crossY = -1; } } --- 537,559 ---- if (action != track_redraw) grtaps_cross(crossX,crossY,&bounds); ! ! graph_get_vals(trackSelected,lastParam,&realx,&realy); ! crossX = finite(realx) ? graph_xgr2scr(realx) : -1; ! crossY = finite(realy) ? graph_ygr2scr(realy) : -1; ! if (crossX < bounds.topLeft.x ! || crossX > bounds.topLeft.x + bounds.extent.x) ! crossX = -1; ! if (crossY < bounds.topLeft.y ! || crossY > bounds.topLeft.y + bounds.extent.y) ! crossY = -1; ! grtaps_cross(crossX,crossY,&bounds); ! grtaps_print_coords(realx,realy,&bounds); ! if (graphPrefs.functype == graph_param) ! grtaps_print_param(lastParam,&bounds); ! else if (graphPrefs.functype == graph_polar) { ! func_get_value(graphCurves[trackSelected].stack1, ! lastParam,&r,NULL); ! grtaps_print_pol(r,lastParam,&bounds); } } } *************** *** 692,696 **** } if (oldx != x && RctPtInRectangle(x, y, bounds)) { ! param = graphPrefs.tmin + (double)(x - bounds->topLeft.x) * x2param; if (finite(param)) { func_get_value(stack1, param, &realx, NULL); --- 690,696 ---- } if (oldx != x && RctPtInRectangle(x, y, bounds)) { ! param = (double)(x - bounds->topLeft.x) * x2param; ! param = graphPrefs.tmin ! + round(param / graphPrefs.tstep) * graphPrefs.tstep; if (finite(param)) { func_get_value(stack1, param, &realx, NULL); |
From: Ton v. O. <tvo...@us...> - 2006-09-28 13:36:41
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv29295 Modified Files: slist.c Log Message: Replaced calls to stack_get_val2() with two calls to stack_get_val() and changed the clean-up in case of error to avoid memory leaks in the original code. Index: slist.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/slist.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** slist.c 25 Sep 2006 23:59:45 -0000 1.35 --- slist.c 28 Sep 2006 13:36:31 -0000 1.36 *************** *** 463,469 **** char *result; ! err = stack_get_val2(stack,&lstx,&lsty,list); if (err) return err; if (!list_real(lstx) || !list_real(lsty) || --- 463,474 ---- char *result; ! err = stack_get_val(stack,&lsty,list); if (err) return err; + err = stack_get_val(stack,&lstx,list); + if (err) { + list_delete(lsty); + return err; + } if (!list_real(lstx) || !list_real(lsty) || *************** *** 871,878 **** return err; ! err = stack_get_val2(stack,&b,&a,list); ! if (err){ list_delete(x); ! return err;} /* the first A coefficient can´t be 0 */ --- 876,890 ---- return err; ! err = stack_get_val(stack,&a,list); ! if (err) { list_delete(x); ! return err; ! } ! err = stack_get_val(stack,&b,list); ! if (err) { ! list_delete(x); ! list_delete(a); ! return err; ! } /* the first A coefficient can´t be 0 */ *************** *** 1021,1028 **** CError err; ! err = stack_get_val2(stack,&lst1,&lst2,list); if (err) return err; ! switch (func->num) { --- 1033,1044 ---- CError err; ! err = stack_get_val(stack,&lst2,list); if (err) return err; ! err = stack_get_val(stack,&lst1,list); ! if (err) { ! list_delete(lst2); ! return err; ! } switch (func->num) { *************** *** 1113,1121 **** return c_syntax; ! for(k=1;k<func->paramcount;k++){ ! err = stack_get_val2(stack,&lst1,&lst2,list); if (err) return err; m=lst1->size; --- 1129,1142 ---- return c_syntax; ! for(k=1;k<func->paramcount && !err;k++){ ! err = stack_get_val(stack,&lst2,list); if (err) return err; + err = stack_get_val(stack,&lst1,list); + if (err) { + list_delete(lst2); + return err; + } m=lst1->size; |
From: Ton v. O. <tvo...@us...> - 2006-09-28 13:24:30
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv24513 Modified Files: cmatrix.c integ.c matrix.c Log Message: Replace call to stack_get_val2() with two calls to stack_get_val in order to make the clean-up in case of error easier to see in the code. Index: cmatrix.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/cmatrix.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** cmatrix.c 27 Sep 2006 13:36:19 -0000 1.27 --- cmatrix.c 28 Sep 2006 13:24:20 -0000 1.28 *************** *** 928,940 **** { CError err; ! CMatrix *a = NULL; ! CMatrix *b = NULL; ! CMatrix *m,*q; Int16 i,j; ! err = stack_get_val2(stack,&a,&b,cmatrix); if (err) { ! if (a) cmatrix_delete(a); ! if (b) cmatrix_delete(b); return err; } --- 928,940 ---- { CError err; ! CMatrix *a,*b,*m,*q; Int16 i,j; ! err = stack_get_val(stack,&b,cmatrix); ! if (err) ! return err; ! err = stack_get_val(stack,&a,cmatrix); if (err) { ! cmatrix_delete(b); return err; } *************** *** 991,995 **** err = stack_add_val(stack,&m,cmatrix); cmatrix_delete(m); ! return err; } --- 991,995 ---- err = stack_add_val(stack,&m,cmatrix); cmatrix_delete(m); ! return err; } Index: integ.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/integ.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** integ.c 27 Sep 2006 13:36:19 -0000 1.22 --- integ.c 28 Sep 2006 13:24:20 -0000 1.23 *************** *** 979,984 **** double error = DEFAULT_ERROR; double result; ! CodeStack *f1 = NULL; ! CodeStack *f2 = NULL; CError err; CodeStack *argarr = NULL; --- 979,983 ---- double error = DEFAULT_ERROR; double result; ! CodeStack *f1,*f2; CError err; CodeStack *argarr = NULL; *************** *** 998,1004 **** return c_badargcount; ! if ((err=stack_get_val2(stack,&f1,&f2,function))) { ! if (f1) stack_delete(f1); ! if (f2) stack_delete(f2); goto error; } --- 997,1006 ---- return c_badargcount; ! err=stack_get_val(stack,&f2,function); ! if (err) ! goto error; ! err=stack_get_val(stack,&f1,function); ! if (err) { ! stack_delete(f2); goto error; } Index: matrix.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/matrix.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** matrix.c 27 Sep 2006 13:36:19 -0000 1.31 --- matrix.c 28 Sep 2006 13:24:20 -0000 1.32 *************** *** 1014,1026 **** { CError err; ! Matrix *a = NULL; ! Matrix *b = NULL; ! Matrix *m,*q; Int16 i,j; ! err = stack_get_val2(stack,&a,&b,matrix); if (err) { ! if (a) matrix_delete(a); ! if (b) matrix_delete(b); return err; } --- 1014,1026 ---- { CError err; ! Matrix *a,*b,*m,*q; Int16 i,j; ! err = stack_get_val(stack,&b,matrix); ! if (err) ! return err; ! err = stack_get_val(stack,&a,matrix); if (err) { ! matrix_delete(b); return err; } |
From: Ton v. O. <tvo...@us...> - 2006-09-27 13:36:28
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv27033 Modified Files: cmatrix.c integ.c matrix.c Log Message: Avoid possible memory leaks in using stack_get_val2(). Index: cmatrix.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/cmatrix.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** cmatrix.c 22 Sep 2006 17:59:53 -0000 1.26 --- cmatrix.c 27 Sep 2006 13:36:19 -0000 1.27 *************** *** 928,937 **** { CError err; ! CMatrix *a,*b,*m,*q; Int16 i,j; err = stack_get_val2(stack,&a,&b,cmatrix); ! if (err) return err; switch (func->num) { --- 928,942 ---- { CError err; ! CMatrix *a = NULL; ! CMatrix *b = NULL; ! CMatrix *m,*q; Int16 i,j; err = stack_get_val2(stack,&a,&b,cmatrix); ! if (err) { ! if (a) cmatrix_delete(a); ! if (b) cmatrix_delete(b); return err; + } switch (func->num) { *************** *** 1268,1270 **** cmatrix_delete(m); return err; ! } \ No newline at end of file --- 1273,1275 ---- cmatrix_delete(m); return err; ! } Index: integ.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/integ.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** integ.c 12 Sep 2006 19:40:56 -0000 1.21 --- integ.c 27 Sep 2006 13:36:19 -0000 1.22 *************** *** 979,983 **** double error = DEFAULT_ERROR; double result; ! CodeStack *f1, *f2; CError err; CodeStack *argarr = NULL; --- 979,984 ---- double error = DEFAULT_ERROR; double result; ! CodeStack *f1 = NULL; ! CodeStack *f2 = NULL; CError err; CodeStack *argarr = NULL; *************** *** 997,1002 **** return c_badargcount; ! if ((err=stack_get_val2(stack,&f1,&f2,function))) goto error; if ((err=stack_get_val2(stack,&min,&max,real))) { stack_delete(f1); --- 998,1006 ---- return c_badargcount; ! if ((err=stack_get_val2(stack,&f1,&f2,function))) { ! if (f1) stack_delete(f1); ! if (f2) stack_delete(f2); goto error; + } if ((err=stack_get_val2(stack,&min,&max,real))) { stack_delete(f1); Index: matrix.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/matrix.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** matrix.c 22 Sep 2006 17:59:53 -0000 1.30 --- matrix.c 27 Sep 2006 13:36:19 -0000 1.31 *************** *** 1014,1023 **** { CError err; ! Matrix *a,*b,*m,*q; Int16 i,j; err = stack_get_val2(stack,&a,&b,matrix); ! if (err) return err; switch (func->num) { --- 1014,1028 ---- { CError err; ! Matrix *a = NULL; ! Matrix *b = NULL; ! Matrix *m,*q; Int16 i,j; err = stack_get_val2(stack,&a,&b,matrix); ! if (err) { ! if (a) matrix_delete(a); ! if (b) matrix_delete(b); return err; + } switch (func->num) { |
From: Jorge G. <cl...@us...> - 2006-09-27 09:43:12
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv31991 Modified Files: grsetup.c Log Message: increased graphtype buttons area Index: grsetup.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grsetup.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** grsetup.c 23 Sep 2006 21:52:03 -0000 1.23 --- grsetup.c 27 Sep 2006 09:43:09 -0000 1.24 *************** *** 579,584 **** if(graphPrefs.functype!=graph_param || i%2==0){ ! Coord x1=x,x2=x+HanderaCoord(3),x3=x+HanderaCoord(6); ! Coord y1=y,y2=y-HanderaCoord(2),y3=y-HanderaCoord(4); if(graphPrefs.functype==graph_param){ --- 579,584 ---- if(graphPrefs.functype!=graph_param || i%2==0){ ! Coord x1=x+HanderaCoord(3),x2=x+HanderaCoord(6),x3=x+HanderaCoord(9); ! Coord y1=y-HanderaCoord(2),y2=y-HanderaCoord(4),y3=y-HanderaCoord(6); if(graphPrefs.functype==graph_param){ |
From: Jorge G. <cl...@us...> - 2006-09-27 09:42:46
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv31611 Modified Files: graph.rcp.in Log Message: increased graphtype buttons area Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** graph.rcp.in 22 Sep 2006 20:04:37 -0000 1.31 --- graph.rcp.in 27 Sep 2006 09:42:41 -0000 1.32 *************** *** 42,51 **** TABLE ID grSetupTable AT (5 15 130 70) ROWS 6 COLUMNS 2 COLUMNWIDTHS 20 110 ! BUTTON "" ID grType1 AT (142 18 7 5) NOFRAME ! BUTTON "" ID grType2 AT (142 29 7 5) NOFRAME NONUSABLE ! BUTTON "" ID grType3 AT (142 40 7 5) NOFRAME ! BUTTON "" ID grType4 AT (142 51 7 5) NOFRAME NONUSABLE ! BUTTON "" ID grType5 AT (142 62 7 5) NOFRAME ! BUTTON "" ID grType6 AT (142 73 7 5) NOFRAME NONUSABLE BUTTON "$$DONE" ID grSetupDone AT (5 88 40 12) --- 42,51 ---- TABLE ID grSetupTable AT (5 15 130 70) ROWS 6 COLUMNS 2 COLUMNWIDTHS 20 110 ! BUTTON " " ID grType1 AT (139 16 13 9) NOFRAME ! BUTTON " " ID grType2 AT (139 27 13 9) NOFRAME NONUSABLE ! BUTTON " " ID grType3 AT (139 38 13 9) NOFRAME ! BUTTON " " ID grType4 AT (139 49 13 9) NOFRAME NONUSABLE ! BUTTON " " ID grType5 AT (139 60 13 9) NOFRAME ! BUTTON " " ID grType6 AT (139 71 13 9) NOFRAME NONUSABLE BUTTON "$$DONE" ID grSetupDone AT (5 88 40 12) |
From: Ton v. O. <tvo...@us...> - 2006-09-25 23:59:51
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv17249 Modified Files: slist.c Log Message: Eliminate compiler warning about uninitialized use of err. Index: slist.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/slist.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** slist.c 25 Sep 2006 20:49:05 -0000 1.34 --- slist.c 25 Sep 2006 23:59:45 -0000 1.35 *************** *** 1108,1112 **** List *lst1,*lst2,*result; Int16 m,n,i,k; ! CError err; if (func->paramcount<2) --- 1108,1112 ---- List *lst1,*lst2,*result; Int16 m,n,i,k; ! CError err = c_noerror; if (func->paramcount<2) |
From: Jorge G. <cl...@us...> - 2006-09-25 20:49:12
|
Update of /cvsroot/easycalc/easycalc/include In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv4188/include Modified Files: slist.h Log Message: concat() now is multiparameter Index: slist.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/include/slist.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** slist.h 12 Sep 2006 19:40:55 -0000 1.21 --- slist.h 25 Sep 2006 20:49:05 -0000 1.22 *************** *** 69,72 **** --- 69,73 ---- CError list_func2(Functype *func,CodeStack *stack) NEWFUNC; CError list_func3(Functype *func,CodeStack *stack) NEWFUNC; + CError list_concat(Functype *func,CodeStack *stack) NEWFUNC; CError list_stat(Functype *func,CodeStack *stack) NEWFUNC; CError list_regr(Functype *func,CodeStack *stack) NEWFUNC; |
From: Jorge G. <cl...@us...> - 2006-09-25 20:49:12
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv4188/mlib Modified Files: konvert.c slist.c Log Message: concat() now is multiparameter Index: konvert.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/konvert.c,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** konvert.c 12 Sep 2006 19:40:56 -0000 1.64 --- konvert.c 25 Sep 2006 20:49:05 -0000 1.65 *************** *** 196,200 **** {"stddev",LIST_STDDEV,list_stat,0}, {"linreg",LIST_LINREG,list_regr,2}, ! {"concat",LIST_CONCAT,list_func3,2}, {"conv",LIST_CONV,list_func3,2}, {"kron",LIST_KRON,list_func3,2}, --- 196,200 ---- {"stddev",LIST_STDDEV,list_stat,0}, {"linreg",LIST_LINREG,list_regr,2}, ! {"concat",0,list_concat,0}, {"conv",LIST_CONV,list_func3,2}, {"kron",LIST_KRON,list_func3,2}, Index: slist.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/slist.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** slist.c 24 Sep 2006 14:18:26 -0000 1.33 --- slist.c 25 Sep 2006 20:49:05 -0000 1.34 *************** *** 1036,1058 **** break; - case LIST_CONCAT: - { - Int16 m,n,i; - - m=lst1->size; - n=lst2->size; - result = list_new(m+n); - if (!result){ - list_delete(lst1); - list_delete(lst2); - return c_memory;} - - for(i=0;i<m;i++) - result->item[i] = lst1->item[i]; - for(i=0;i<n;i++) - result->item[i+m] = lst2->item[i]; - } - break; - case LIST_KRON: { --- 1036,1039 ---- *************** *** 1112,1115 **** --- 1093,1146 ---- /************************************************************************** * + * FUNCTION: list_concat + * + * DESCRIPTION: concatenation of two or more lists + * + * PARAMETERS: lists on stack + * + * RETURN: list + * + ***************************************************************************/ + + CError + list_concat(Functype *func, CodeStack *stack) + { + List *lst1,*lst2,*result; + Int16 m,n,i,k; + CError err; + + if (func->paramcount<2) + return c_syntax; + + for(k=1;k<func->paramcount;k++){ + + err = stack_get_val2(stack,&lst1,&lst2,list); + if (err) + return err; + + m=lst1->size; + n=lst2->size; + result = list_new(m+n); + if (!result){ + list_delete(lst1); + list_delete(lst2); + return c_memory; + } + for(i=0;i<m;i++) + result->item[i] = lst1->item[i]; + for(i=0;i<n;i++) + result->item[i+m] = lst2->item[i]; + + list_delete(lst1); + list_delete(lst2); + err = stack_add_val(stack,&result,list); + list_delete(result); + } + + return err; + } + + /************************************************************************** + * * FUNCTION: list_fft * |