From ca60bdfbe8588a52ca23e253197b6de9d27d95f5 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 31 Dec 2007 05:51:52 +0000 Subject: [PATCH] New version of calc written by Carlo Bramini (carlo(dot)bramix AT libero.it) Better than the one we currently have. For now in rosapps, so we can test it, if it's all working fine, we should replace the wine one. Changes by me: use pow() instead of cbrt(), as cbrt doesn't work in our tree. I imported the whole codebase, although the mpfr files are not used. I moved the localizations to "lang" and the icons to "res" subfolder. svn path=/trunk/; revision=31512 --- rosapps/directory.rbuild | 4 + rosapps/roscalc/about.c | 33 + rosapps/roscalc/calc.h | 219 +++ .../docs/Help.en/algebraic_functions.htm | 74 + .../docs/Help.en/arithmetic_functions.htm | 51 + rosapps/roscalc/docs/Help.en/calc.hhc | 82 + rosapps/roscalc/docs/Help.en/calc.hhk | 9 + rosapps/roscalc/docs/Help.en/calc.hhp | 40 + .../docs/Help.en/degree_conversion.htm | 28 + .../roscalc/docs/Help.en/display_format.htm | 65 + .../roscalc/docs/Help.en/error_message.htm | 18 + .../Help.en/fixed_scientific_notation.htm | 24 + .../docs/Help.en/general_information.htm | 50 + rosapps/roscalc/docs/Help.en/help_id.h | 83 + .../docs/Help.en/how_to_input_numbers.htm | 85 + .../docs/Help.en/hyperbolic_functions.htm | 34 + rosapps/roscalc/docs/Help.en/images/0.PNG | Bin 0 -> 187 bytes rosapps/roscalc/docs/Help.en/images/1.PNG | Bin 0 -> 186 bytes rosapps/roscalc/docs/Help.en/images/1_x.PNG | Bin 0 -> 221 bytes rosapps/roscalc/docs/Help.en/images/2.PNG | Bin 0 -> 206 bytes rosapps/roscalc/docs/Help.en/images/3.PNG | Bin 0 -> 193 bytes rosapps/roscalc/docs/Help.en/images/4.PNG | Bin 0 -> 202 bytes rosapps/roscalc/docs/Help.en/images/5.PNG | Bin 0 -> 207 bytes rosapps/roscalc/docs/Help.en/images/6.PNG | Bin 0 -> 195 bytes rosapps/roscalc/docs/Help.en/images/7.PNG | Bin 0 -> 199 bytes rosapps/roscalc/docs/Help.en/images/8.PNG | Bin 0 -> 191 bytes rosapps/roscalc/docs/Help.en/images/9.PNG | Bin 0 -> 197 bytes rosapps/roscalc/docs/Help.en/images/A.PNG | Bin 0 -> 207 bytes rosapps/roscalc/docs/Help.en/images/And.PNG | Bin 0 -> 249 bytes rosapps/roscalc/docs/Help.en/images/Ave.PNG | Bin 0 -> 243 bytes rosapps/roscalc/docs/Help.en/images/B.PNG | Bin 0 -> 189 bytes rosapps/roscalc/docs/Help.en/images/Bin.PNG | Bin 0 -> 280 bytes rosapps/roscalc/docs/Help.en/images/Byte.PNG | Bin 0 -> 311 bytes rosapps/roscalc/docs/Help.en/images/C.PNG | Bin 0 -> 198 bytes rosapps/roscalc/docs/Help.en/images/CC.PNG | Bin 0 -> 226 bytes rosapps/roscalc/docs/Help.en/images/CE.PNG | Bin 0 -> 235 bytes rosapps/roscalc/docs/Help.en/images/D.PNG | Bin 0 -> 205 bytes rosapps/roscalc/docs/Help.en/images/Dat.PNG | Bin 0 -> 223 bytes rosapps/roscalc/docs/Help.en/images/Dec.PNG | Bin 0 -> 279 bytes rosapps/roscalc/docs/Help.en/images/Dword.PNG | Bin 0 -> 311 bytes rosapps/roscalc/docs/Help.en/images/E.PNG | Bin 0 -> 198 bytes rosapps/roscalc/docs/Help.en/images/Exp.PNG | Bin 0 -> 224 bytes rosapps/roscalc/docs/Help.en/images/F-E.PNG | Bin 0 -> 204 bytes rosapps/roscalc/docs/Help.en/images/F.PNG | Bin 0 -> 189 bytes .../roscalc/docs/Help.en/images/Gradians.PNG | Bin 0 -> 348 bytes rosapps/roscalc/docs/Help.en/images/Hex.PNG | Bin 0 -> 280 bytes rosapps/roscalc/docs/Help.en/images/Hyp.PNG | Bin 0 -> 262 bytes rosapps/roscalc/docs/Help.en/images/Hyp2.PNG | Bin 0 -> 240 bytes rosapps/roscalc/docs/Help.en/images/Inv.PNG | Bin 0 -> 294 bytes rosapps/roscalc/docs/Help.en/images/Inv2.PNG | Bin 0 -> 216 bytes rosapps/roscalc/docs/Help.en/images/Lsh.PNG | Bin 0 -> 232 bytes rosapps/roscalc/docs/Help.en/images/MC.PNG | Bin 0 -> 217 bytes rosapps/roscalc/docs/Help.en/images/MP.PNG | Bin 0 -> 225 bytes rosapps/roscalc/docs/Help.en/images/MR.PNG | Bin 0 -> 219 bytes rosapps/roscalc/docs/Help.en/images/MS.PNG | Bin 0 -> 218 bytes rosapps/roscalc/docs/Help.en/images/Mod.PNG | Bin 0 -> 232 bytes rosapps/roscalc/docs/Help.en/images/Not.PNG | Bin 0 -> 230 bytes rosapps/roscalc/docs/Help.en/images/Oct.PNG | Bin 0 -> 282 bytes rosapps/roscalc/docs/Help.en/images/Or.PNG | Bin 0 -> 204 bytes rosapps/roscalc/docs/Help.en/images/PARL.PNG | Bin 0 -> 186 bytes rosapps/roscalc/docs/Help.en/images/PARR.PNG | Bin 0 -> 237 bytes rosapps/roscalc/docs/Help.en/images/Qword.PNG | Bin 0 -> 311 bytes .../roscalc/docs/Help.en/images/Radians.PNG | Bin 0 -> 344 bytes rosapps/roscalc/docs/Help.en/images/Sta.PNG | Bin 0 -> 290 bytes rosapps/roscalc/docs/Help.en/images/Sum.PNG | Bin 0 -> 228 bytes rosapps/roscalc/docs/Help.en/images/Word.PNG | Bin 0 -> 299 bytes rosapps/roscalc/docs/Help.en/images/Xor.PNG | Bin 0 -> 241 bytes rosapps/roscalc/docs/Help.en/images/add.PNG | Bin 0 -> 189 bytes rosapps/roscalc/docs/Help.en/images/back.PNG | Bin 0 -> 328 bytes rosapps/roscalc/docs/Help.en/images/cos.PNG | Bin 0 -> 216 bytes .../roscalc/docs/Help.en/images/degrees.PNG | Bin 0 -> 329 bytes .../roscalc/docs/Help.en/images/divide.PNG | Bin 0 -> 194 bytes rosapps/roscalc/docs/Help.en/images/dms.PNG | Bin 0 -> 223 bytes rosapps/roscalc/docs/Help.en/images/dot1.PNG | Bin 0 -> 178 bytes rosapps/roscalc/docs/Help.en/images/dot2.PNG | Bin 0 -> 180 bytes rosapps/roscalc/docs/Help.en/images/equ.PNG | Bin 0 -> 178 bytes rosapps/roscalc/docs/Help.en/images/int.PNG | Bin 0 -> 214 bytes rosapps/roscalc/docs/Help.en/images/ln.PNG | Bin 0 -> 199 bytes rosapps/roscalc/docs/Help.en/images/log.PNG | Bin 0 -> 210 bytes rosapps/roscalc/docs/Help.en/images/mult.PNG | Bin 0 -> 190 bytes rosapps/roscalc/docs/Help.en/images/nf.PNG | Bin 0 -> 206 bytes rosapps/roscalc/docs/Help.en/images/perc.PNG | Bin 0 -> 279 bytes rosapps/roscalc/docs/Help.en/images/pi.PNG | Bin 0 -> 198 bytes rosapps/roscalc/docs/Help.en/images/s.PNG | Bin 0 -> 198 bytes rosapps/roscalc/docs/Help.en/images/sign.PNG | Bin 0 -> 216 bytes rosapps/roscalc/docs/Help.en/images/sin.PNG | Bin 0 -> 222 bytes rosapps/roscalc/docs/Help.en/images/sqrt.PNG | Bin 0 -> 300 bytes rosapps/roscalc/docs/Help.en/images/sub.PNG | Bin 0 -> 175 bytes rosapps/roscalc/docs/Help.en/images/tan.PNG | Bin 0 -> 217 bytes rosapps/roscalc/docs/Help.en/images/xe2.PNG | Bin 0 -> 243 bytes rosapps/roscalc/docs/Help.en/images/xe3.PNG | Bin 0 -> 242 bytes rosapps/roscalc/docs/Help.en/images/xey.PNG | Bin 0 -> 228 bytes .../docs/Help.en/logical_functions.htm | 31 + .../roscalc/docs/Help.en/memory_function.htm | 45 + rosapps/roscalc/docs/Help.en/percent.htm | 35 + rosapps/roscalc/docs/Help.en/popups.txt | 411 +++++ .../docs/Help.en/shortcuts_from_keyboard.htm | 232 +++ .../docs/Help.en/statistical_functions.htm | 45 + .../roscalc/docs/Help.en/the_pi_button.htm | 23 + .../docs/Help.en/trigonometric_functions.htm | 36 + .../docs/Help.en/using_the_clipboard.htm | 55 + .../docs/Help.it/algebraic_functions.htm | 66 + .../docs/Help.it/arithmetic_functions.htm | 49 + rosapps/roscalc/docs/Help.it/calc.hhc | 82 + rosapps/roscalc/docs/Help.it/calc.hhk | 9 + rosapps/roscalc/docs/Help.it/calc.hhp | 40 + .../docs/Help.it/degree_conversion.htm | 26 + .../roscalc/docs/Help.it/display_format.htm | 57 + .../roscalc/docs/Help.it/error_message.htm | 17 + .../Help.it/fixed_scientific_notation.htm | 22 + .../docs/Help.it/general_information.htm | 49 + rosapps/roscalc/docs/Help.it/help_id.h | 83 + .../docs/Help.it/how_to_input_numbers.htm | 84 + .../docs/Help.it/hyperbolic_functions.htm | 31 + rosapps/roscalc/docs/Help.it/images/0.PNG | Bin 0 -> 187 bytes rosapps/roscalc/docs/Help.it/images/1.PNG | Bin 0 -> 186 bytes rosapps/roscalc/docs/Help.it/images/1_x.PNG | Bin 0 -> 221 bytes rosapps/roscalc/docs/Help.it/images/2.PNG | Bin 0 -> 206 bytes rosapps/roscalc/docs/Help.it/images/3.PNG | Bin 0 -> 193 bytes rosapps/roscalc/docs/Help.it/images/4.PNG | Bin 0 -> 202 bytes rosapps/roscalc/docs/Help.it/images/5.PNG | Bin 0 -> 207 bytes rosapps/roscalc/docs/Help.it/images/6.PNG | Bin 0 -> 195 bytes rosapps/roscalc/docs/Help.it/images/7.PNG | Bin 0 -> 199 bytes rosapps/roscalc/docs/Help.it/images/8.PNG | Bin 0 -> 191 bytes rosapps/roscalc/docs/Help.it/images/9.PNG | Bin 0 -> 197 bytes rosapps/roscalc/docs/Help.it/images/A.PNG | Bin 0 -> 207 bytes rosapps/roscalc/docs/Help.it/images/And.PNG | Bin 0 -> 249 bytes rosapps/roscalc/docs/Help.it/images/Ave.PNG | Bin 0 -> 243 bytes rosapps/roscalc/docs/Help.it/images/B.PNG | Bin 0 -> 189 bytes rosapps/roscalc/docs/Help.it/images/Bin.PNG | Bin 0 -> 280 bytes rosapps/roscalc/docs/Help.it/images/Byte.PNG | Bin 0 -> 311 bytes rosapps/roscalc/docs/Help.it/images/C.PNG | Bin 0 -> 198 bytes rosapps/roscalc/docs/Help.it/images/CC.PNG | Bin 0 -> 226 bytes rosapps/roscalc/docs/Help.it/images/CE.PNG | Bin 0 -> 235 bytes rosapps/roscalc/docs/Help.it/images/D.PNG | Bin 0 -> 205 bytes rosapps/roscalc/docs/Help.it/images/Dat.PNG | Bin 0 -> 223 bytes rosapps/roscalc/docs/Help.it/images/Dec.PNG | Bin 0 -> 279 bytes rosapps/roscalc/docs/Help.it/images/Dword.PNG | Bin 0 -> 311 bytes rosapps/roscalc/docs/Help.it/images/E.PNG | Bin 0 -> 198 bytes rosapps/roscalc/docs/Help.it/images/Exp.PNG | Bin 0 -> 224 bytes rosapps/roscalc/docs/Help.it/images/F-E.PNG | Bin 0 -> 204 bytes rosapps/roscalc/docs/Help.it/images/F.PNG | Bin 0 -> 189 bytes .../roscalc/docs/Help.it/images/Gradians.PNG | Bin 0 -> 359 bytes rosapps/roscalc/docs/Help.it/images/Hex.PNG | Bin 0 -> 280 bytes rosapps/roscalc/docs/Help.it/images/Hyp.PNG | Bin 0 -> 262 bytes rosapps/roscalc/docs/Help.it/images/Hyp2.PNG | Bin 0 -> 240 bytes rosapps/roscalc/docs/Help.it/images/Inv.PNG | Bin 0 -> 294 bytes rosapps/roscalc/docs/Help.it/images/Inv2.PNG | Bin 0 -> 216 bytes rosapps/roscalc/docs/Help.it/images/Lsh.PNG | Bin 0 -> 232 bytes rosapps/roscalc/docs/Help.it/images/MC.PNG | Bin 0 -> 217 bytes rosapps/roscalc/docs/Help.it/images/MP.PNG | Bin 0 -> 225 bytes rosapps/roscalc/docs/Help.it/images/MR.PNG | Bin 0 -> 219 bytes rosapps/roscalc/docs/Help.it/images/MS.PNG | Bin 0 -> 218 bytes rosapps/roscalc/docs/Help.it/images/Mod.PNG | Bin 0 -> 232 bytes rosapps/roscalc/docs/Help.it/images/Not.PNG | Bin 0 -> 230 bytes rosapps/roscalc/docs/Help.it/images/Oct.PNG | Bin 0 -> 282 bytes rosapps/roscalc/docs/Help.it/images/Or.PNG | Bin 0 -> 204 bytes rosapps/roscalc/docs/Help.it/images/PARL.PNG | Bin 0 -> 186 bytes rosapps/roscalc/docs/Help.it/images/PARR.PNG | Bin 0 -> 237 bytes rosapps/roscalc/docs/Help.it/images/Qword.PNG | Bin 0 -> 311 bytes .../roscalc/docs/Help.it/images/Radians.PNG | Bin 0 -> 339 bytes rosapps/roscalc/docs/Help.it/images/Sta.PNG | Bin 0 -> 290 bytes rosapps/roscalc/docs/Help.it/images/Sum.PNG | Bin 0 -> 228 bytes rosapps/roscalc/docs/Help.it/images/Word.PNG | Bin 0 -> 299 bytes rosapps/roscalc/docs/Help.it/images/Xor.PNG | Bin 0 -> 241 bytes rosapps/roscalc/docs/Help.it/images/add.PNG | Bin 0 -> 189 bytes rosapps/roscalc/docs/Help.it/images/back.PNG | Bin 0 -> 225 bytes rosapps/roscalc/docs/Help.it/images/cos.PNG | Bin 0 -> 216 bytes .../roscalc/docs/Help.it/images/degrees.PNG | Bin 0 -> 319 bytes .../roscalc/docs/Help.it/images/divide.PNG | Bin 0 -> 194 bytes rosapps/roscalc/docs/Help.it/images/dms.PNG | Bin 0 -> 223 bytes rosapps/roscalc/docs/Help.it/images/dot1.PNG | Bin 0 -> 178 bytes rosapps/roscalc/docs/Help.it/images/dot2.PNG | Bin 0 -> 180 bytes rosapps/roscalc/docs/Help.it/images/equ.PNG | Bin 0 -> 178 bytes rosapps/roscalc/docs/Help.it/images/int.PNG | Bin 0 -> 214 bytes rosapps/roscalc/docs/Help.it/images/ln.PNG | Bin 0 -> 199 bytes rosapps/roscalc/docs/Help.it/images/log.PNG | Bin 0 -> 210 bytes rosapps/roscalc/docs/Help.it/images/mult.PNG | Bin 0 -> 190 bytes rosapps/roscalc/docs/Help.it/images/nf.PNG | Bin 0 -> 206 bytes rosapps/roscalc/docs/Help.it/images/perc.PNG | Bin 0 -> 279 bytes rosapps/roscalc/docs/Help.it/images/pi.PNG | Bin 0 -> 198 bytes rosapps/roscalc/docs/Help.it/images/s.PNG | Bin 0 -> 198 bytes rosapps/roscalc/docs/Help.it/images/sign.PNG | Bin 0 -> 216 bytes rosapps/roscalc/docs/Help.it/images/sin.PNG | Bin 0 -> 222 bytes rosapps/roscalc/docs/Help.it/images/sqrt.PNG | Bin 0 -> 300 bytes rosapps/roscalc/docs/Help.it/images/sub.PNG | Bin 0 -> 175 bytes rosapps/roscalc/docs/Help.it/images/tan.PNG | Bin 0 -> 217 bytes rosapps/roscalc/docs/Help.it/images/xe2.PNG | Bin 0 -> 243 bytes rosapps/roscalc/docs/Help.it/images/xe3.PNG | Bin 0 -> 242 bytes rosapps/roscalc/docs/Help.it/images/xey.PNG | Bin 0 -> 228 bytes .../docs/Help.it/logical_functions.htm | 31 + .../roscalc/docs/Help.it/memory_function.htm | 42 + rosapps/roscalc/docs/Help.it/percent.htm | 34 + rosapps/roscalc/docs/Help.it/popups.txt | 410 +++++ .../docs/Help.it/shortcuts_from_keyboard.htm | 232 +++ .../docs/Help.it/statistical_functions.htm | 44 + .../roscalc/docs/Help.it/the_pi_button.htm | 22 + .../docs/Help.it/trigonometric_functions.htm | 35 + .../docs/Help.it/using_the_clipboard.htm | 54 + rosapps/roscalc/docs/copying.txt | 339 ++++ rosapps/roscalc/docs/help.txt | 506 ++++++ rosapps/roscalc/docs/readme.txt | 49 + rosapps/roscalc/docs/todo.txt | 3 + rosapps/roscalc/docs/whatsnew.txt | 69 + rosapps/roscalc/fun_mpfr.c | 423 +++++ rosapps/roscalc/function.c | 510 ++++++ rosapps/roscalc/lang/en-US.rc | 365 ++++ rosapps/roscalc/lang/it-IT.rc | 365 ++++ rosapps/roscalc/makeall.bat | 2 + rosapps/roscalc/makefile | 82 + rosapps/roscalc/res/ROS_logo.bmp | Bin 0 -> 10166 bytes rosapps/roscalc/res/calc.ico | Bin 0 -> 766 bytes rosapps/roscalc/res/calc_sm.ico | Bin 0 -> 318 bytes rosapps/roscalc/resource.h | 118 ++ rosapps/roscalc/resource.rc | 45 + rosapps/roscalc/roscalc.rbuild | 15 + rosapps/roscalc/rpn.c | 419 +++++ rosapps/roscalc/rpn_mpfr.c | 435 +++++ rosapps/roscalc/utl.c | 105 ++ rosapps/roscalc/utl_mpfr.c | 131 ++ rosapps/roscalc/winmain.c | 1566 +++++++++++++++++ 221 files changed, 8878 insertions(+) create mode 100644 rosapps/roscalc/about.c create mode 100644 rosapps/roscalc/calc.h create mode 100644 rosapps/roscalc/docs/Help.en/algebraic_functions.htm create mode 100644 rosapps/roscalc/docs/Help.en/arithmetic_functions.htm create mode 100644 rosapps/roscalc/docs/Help.en/calc.hhc create mode 100644 rosapps/roscalc/docs/Help.en/calc.hhk create mode 100644 rosapps/roscalc/docs/Help.en/calc.hhp create mode 100644 rosapps/roscalc/docs/Help.en/degree_conversion.htm create mode 100644 rosapps/roscalc/docs/Help.en/display_format.htm create mode 100644 rosapps/roscalc/docs/Help.en/error_message.htm create mode 100644 rosapps/roscalc/docs/Help.en/fixed_scientific_notation.htm create mode 100644 rosapps/roscalc/docs/Help.en/general_information.htm create mode 100644 rosapps/roscalc/docs/Help.en/help_id.h create mode 100644 rosapps/roscalc/docs/Help.en/how_to_input_numbers.htm create mode 100644 rosapps/roscalc/docs/Help.en/hyperbolic_functions.htm create mode 100644 rosapps/roscalc/docs/Help.en/images/0.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/1.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/1_x.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/2.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/3.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/4.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/5.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/6.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/7.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/8.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/9.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/A.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/And.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Ave.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/B.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Bin.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Byte.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/C.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/CC.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/CE.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/D.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Dat.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Dec.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Dword.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/E.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Exp.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/F-E.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/F.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Gradians.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Hex.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Hyp.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Hyp2.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Inv.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Inv2.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Lsh.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/MC.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/MP.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/MR.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/MS.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Mod.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Not.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Oct.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Or.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/PARL.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/PARR.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Qword.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Radians.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Sta.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Sum.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Word.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/Xor.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/add.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/back.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/cos.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/degrees.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/divide.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/dms.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/dot1.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/dot2.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/equ.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/int.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/ln.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/log.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/mult.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/nf.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/perc.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/pi.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/s.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/sign.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/sin.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/sqrt.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/sub.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/tan.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/xe2.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/xe3.PNG create mode 100644 rosapps/roscalc/docs/Help.en/images/xey.PNG create mode 100644 rosapps/roscalc/docs/Help.en/logical_functions.htm create mode 100644 rosapps/roscalc/docs/Help.en/memory_function.htm create mode 100644 rosapps/roscalc/docs/Help.en/percent.htm create mode 100644 rosapps/roscalc/docs/Help.en/popups.txt create mode 100644 rosapps/roscalc/docs/Help.en/shortcuts_from_keyboard.htm create mode 100644 rosapps/roscalc/docs/Help.en/statistical_functions.htm create mode 100644 rosapps/roscalc/docs/Help.en/the_pi_button.htm create mode 100644 rosapps/roscalc/docs/Help.en/trigonometric_functions.htm create mode 100644 rosapps/roscalc/docs/Help.en/using_the_clipboard.htm create mode 100644 rosapps/roscalc/docs/Help.it/algebraic_functions.htm create mode 100644 rosapps/roscalc/docs/Help.it/arithmetic_functions.htm create mode 100644 rosapps/roscalc/docs/Help.it/calc.hhc create mode 100644 rosapps/roscalc/docs/Help.it/calc.hhk create mode 100644 rosapps/roscalc/docs/Help.it/calc.hhp create mode 100644 rosapps/roscalc/docs/Help.it/degree_conversion.htm create mode 100644 rosapps/roscalc/docs/Help.it/display_format.htm create mode 100644 rosapps/roscalc/docs/Help.it/error_message.htm create mode 100644 rosapps/roscalc/docs/Help.it/fixed_scientific_notation.htm create mode 100644 rosapps/roscalc/docs/Help.it/general_information.htm create mode 100644 rosapps/roscalc/docs/Help.it/help_id.h create mode 100644 rosapps/roscalc/docs/Help.it/how_to_input_numbers.htm create mode 100644 rosapps/roscalc/docs/Help.it/hyperbolic_functions.htm create mode 100644 rosapps/roscalc/docs/Help.it/images/0.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/1.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/1_x.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/2.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/3.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/4.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/5.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/6.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/7.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/8.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/9.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/A.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/And.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Ave.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/B.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Bin.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Byte.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/C.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/CC.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/CE.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/D.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Dat.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Dec.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Dword.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/E.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Exp.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/F-E.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/F.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Gradians.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Hex.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Hyp.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Hyp2.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Inv.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Inv2.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Lsh.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/MC.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/MP.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/MR.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/MS.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Mod.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Not.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Oct.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Or.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/PARL.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/PARR.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Qword.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Radians.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Sta.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Sum.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Word.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/Xor.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/add.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/back.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/cos.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/degrees.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/divide.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/dms.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/dot1.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/dot2.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/equ.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/int.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/ln.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/log.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/mult.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/nf.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/perc.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/pi.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/s.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/sign.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/sin.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/sqrt.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/sub.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/tan.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/xe2.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/xe3.PNG create mode 100644 rosapps/roscalc/docs/Help.it/images/xey.PNG create mode 100644 rosapps/roscalc/docs/Help.it/logical_functions.htm create mode 100644 rosapps/roscalc/docs/Help.it/memory_function.htm create mode 100644 rosapps/roscalc/docs/Help.it/percent.htm create mode 100644 rosapps/roscalc/docs/Help.it/popups.txt create mode 100644 rosapps/roscalc/docs/Help.it/shortcuts_from_keyboard.htm create mode 100644 rosapps/roscalc/docs/Help.it/statistical_functions.htm create mode 100644 rosapps/roscalc/docs/Help.it/the_pi_button.htm create mode 100644 rosapps/roscalc/docs/Help.it/trigonometric_functions.htm create mode 100644 rosapps/roscalc/docs/Help.it/using_the_clipboard.htm create mode 100644 rosapps/roscalc/docs/copying.txt create mode 100644 rosapps/roscalc/docs/help.txt create mode 100644 rosapps/roscalc/docs/readme.txt create mode 100644 rosapps/roscalc/docs/todo.txt create mode 100644 rosapps/roscalc/docs/whatsnew.txt create mode 100644 rosapps/roscalc/fun_mpfr.c create mode 100644 rosapps/roscalc/function.c create mode 100644 rosapps/roscalc/lang/en-US.rc create mode 100644 rosapps/roscalc/lang/it-IT.rc create mode 100644 rosapps/roscalc/makeall.bat create mode 100644 rosapps/roscalc/makefile create mode 100644 rosapps/roscalc/res/ROS_logo.bmp create mode 100644 rosapps/roscalc/res/calc.ico create mode 100644 rosapps/roscalc/res/calc_sm.ico create mode 100644 rosapps/roscalc/resource.h create mode 100644 rosapps/roscalc/resource.rc create mode 100644 rosapps/roscalc/roscalc.rbuild create mode 100644 rosapps/roscalc/rpn.c create mode 100644 rosapps/roscalc/rpn_mpfr.c create mode 100644 rosapps/roscalc/utl.c create mode 100644 rosapps/roscalc/utl_mpfr.c create mode 100644 rosapps/roscalc/winmain.c diff --git a/rosapps/directory.rbuild b/rosapps/directory.rbuild index 56470322849..7eba8daeafe 100644 --- a/rosapps/directory.rbuild +++ b/rosapps/directory.rbuild @@ -87,6 +87,10 @@ + + + + diff --git a/rosapps/roscalc/about.c b/rosapps/roscalc/about.c new file mode 100644 index 00000000000..ae9b386c1f7 --- /dev/null +++ b/rosapps/roscalc/about.c @@ -0,0 +1,33 @@ +#include "calc.h" + +#define MAX_LICENSE_SIZE 1000 // it's enought! + +INT_PTR CALLBACK AboutDlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) +{ + TCHAR *license; + + switch (msg) { + case WM_INITDIALOG: + license = (TCHAR *)alloca(MAX_LICENSE_SIZE*sizeof(TCHAR)); + if (LoadString(calc.hInstance, IDS_STRING_LICENSE, license, MAX_LICENSE_SIZE)) + SendDlgItemMessage(hWnd, IDC_EDIT_LICENSE, WM_SETTEXT, 0, (LPARAM)license); + /* Update software version */ + SendDlgItemMessage(hWnd, IDC_TEXT_VERSION, WM_GETTEXT, (WPARAM)MAX_LICENSE_SIZE, (LPARAM)license); + _tcscat(license, CALC_VERSION); + SendDlgItemMessage(hWnd, IDC_TEXT_VERSION, WM_SETTEXT, 0, (LPARAM)license); + return TRUE; + case WM_COMMAND: + switch (LOWORD(wp)) { + case IDOK: + EndDialog(hWnd, 0); + return TRUE; + } + break; + + case WM_CLOSE: + EndDialog(hWnd, 0); + return 0; + } + return FALSE; +} + diff --git a/rosapps/roscalc/calc.h b/rosapps/roscalc/calc.h new file mode 100644 index 00000000000..ed1d7d0a19c --- /dev/null +++ b/rosapps/roscalc/calc.h @@ -0,0 +1,219 @@ +#ifndef __CALC_H__ +#define __CALC_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef ENABLE_MULTI_PRECISION +#include + +#ifndef MPFR_DEFAULT_RND +#define MPFR_DEFAULT_RND mpfr_get_default_rounding_mode () +#endif + +#define LOCAL_EXP_SIZE 100000000L +#else + +#define LOCAL_EXP_SIZE 10000L + +#endif + +#include "resource.h" + +#ifndef IDC_STATIC +#define IDC_STATIC ((DWORD)-1) +#endif + +#define CALC_VERSION TEXT("1.06") + +/*#define USE_KEYBOARD_HOOK*/ + +#define SIZEOF(_ar) (sizeof(_ar)/sizeof(_ar[1])) + +// RPN.C +/* +typedef struct _postfix_item_t { + unsigned int type; + union { +#ifdef ENABLE_MULTI_PRECISION + mpfr_t mf; +#else + double f; + INT64 i; +#endif + struct { + unsigned short int code; + unsigned short int elem; + } action; + } number; + struct _postfix_item_t *next; +} postfix_item_t; + +void flush_postfix(void); +void infix2postfix(char *in_str); +postfix_item_t *exec_postfix(void); +*/ + +// + +enum { + RPN_OPERATOR_PARENT, + RPN_OPERATOR_PERCENT, + RPN_OPERATOR_EQUAL, + + RPN_OPERATOR_OR, + RPN_OPERATOR_XOR, + RPN_OPERATOR_AND, + RPN_OPERATOR_LSH, + RPN_OPERATOR_ADD, + RPN_OPERATOR_SUB, + RPN_OPERATOR_MULT, + RPN_OPERATOR_DIV, + RPN_OPERATOR_MOD, + RPN_OPERATOR_POW, + RPN_OPERATOR_SQR, +}; + +typedef union { +#ifdef ENABLE_MULTI_PRECISION + mpfr_t mf; +#else + double f; + INT64 i; + UINT64 u; +#endif +} calc_number_t; + +void run_operator(calc_number_t *, calc_number_t *, + calc_number_t *, unsigned int); +int exec_infix2postfix(calc_number_t *, unsigned int); +void exec_closeparent(calc_number_t *); +int eval_parent_count(void); +void flush_postfix(void); +void exec_change_infix(void); +void start_rpn_engine(void); +void stop_rpn_engine(void); + +typedef struct { + calc_number_t num; + DWORD base; + void *next; +} statistic_t; + +enum { + CALC_LAYOUT_SCIENTIFIC=0, + CALC_LAYOUT_STANDARD, +}; + +typedef struct { + HINSTANCE hInstance; +#ifdef USE_KEYBOARD_HOOK + HHOOK hKeyboardHook; +#endif + HWND hWnd; + DWORD layout; + TCHAR buffer[256]; + TCHAR *ptr; + calc_number_t code; + calc_number_t prev; + calc_number_t memory; + statistic_t *stat; + BOOL is_memory; + BOOL is_nan; + BOOL sci_out; + BOOL sci_in; + BOOL usesep; + BOOL is_menu_on; + signed int esp; + DWORD base; + DWORD size; + DWORD degr; + DWORD action; + HWND hStatWnd; + char *Clipboard; + char *ClipPtr; + unsigned int last_operator; + unsigned int prev_operator; + TCHAR sDecimal[8]; + TCHAR sThousand[8]; + unsigned int sDecimal_len; + unsigned int sThousand_len; +} calc_t; + +extern calc_t calc; + +// +#define CALC_E 2.7182818284590452354 +#define CALC_PI 3.14159265358979323846 + +#define MODIFIER_INV 0x01 +#define MODIFIER_HYP 0x02 + +void apply_int_mask(calc_number_t *a); +#ifdef ENABLE_MULTI_PRECISION +void validate_rad2angle(calc_number_t *c); +void validate_angle2rad(calc_number_t *c); +#else +__int64 logic_dbl2int(calc_number_t *a); +double validate_rad2angle(double a); +double validate_angle2rad(calc_number_t *c); +#endif +void rpn_sin(calc_number_t *c); +void rpn_cos(calc_number_t *c); +void rpn_tan(calc_number_t *c); +void rpn_asin(calc_number_t *c); +void rpn_acos(calc_number_t *c); +void rpn_atan(calc_number_t *c); +void rpn_sinh(calc_number_t *c); +void rpn_cosh(calc_number_t *c); +void rpn_tanh(calc_number_t *c); +void rpn_asinh(calc_number_t *c); +void rpn_acosh(calc_number_t *c); +void rpn_atanh(calc_number_t *c); +BOOL rpn_validate_result(calc_number_t *c); +void rpn_int(calc_number_t *c); +void rpn_frac(calc_number_t *c); +void rpn_reci(calc_number_t *c); +void rpn_fact(calc_number_t *c); +void rpn_not(calc_number_t *c); +void rpn_pi(calc_number_t *c); +void rpn_2pi(calc_number_t *c); +void rpn_sign(calc_number_t *c); +void rpn_exp2(calc_number_t *c); +void rpn_exp3(calc_number_t *c); +void rpn_sqrt(calc_number_t *c); +void rpn_cbrt(calc_number_t *c); +void rpn_exp(calc_number_t *c); +void rpn_exp10(calc_number_t *c); +void rpn_ln(calc_number_t *c); +void rpn_log(calc_number_t *c); +void rpn_ave(calc_number_t *c); +void rpn_sum(calc_number_t *c); +void rpn_s(calc_number_t *c); +void rpn_s_m1(calc_number_t *c); +void rpn_dms2dec(calc_number_t *c); +void rpn_dec2dms(calc_number_t *c); +void rpn_zero(calc_number_t *c); +void rpn_copy(calc_number_t *dst, calc_number_t *src); +int rpn_is_zero(calc_number_t *c); +void rpn_alloc(calc_number_t *c); +void rpn_free(calc_number_t *c); + +// + +void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base); +void convert_text2number_2(calc_number_t *a); +void convert_real_integer(unsigned int base); + +// + +INT_PTR CALLBACK AboutDlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp); + +#endif diff --git a/rosapps/roscalc/docs/Help.en/algebraic_functions.htm b/rosapps/roscalc/docs/Help.en/algebraic_functions.htm new file mode 100644 index 00000000000..303bbb7e9b6 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/algebraic_functions.htm @@ -0,0 +1,74 @@ + + + +ALGEBRAIC FUNCTIONS + + + + +

ALGEBRAIC FUNCTIONS

+

 

+

ReactOS Calc implements the most commonly used algebraic functions.

+

 

+

+

It isolates the integer part of the number shown into the output display.

+

 

+

++

+

The integer part of the number is discarded and the fractional part stays on the output display.

+

 

+

+

Square function. It calculates the square of the number shown on the output display.

+

 

+

++ ,

+

It returns the positive square root of the number shown on the output display.

+

If the current number is negative, then the error message will be displayed.

+

When working with standard layout, the +[Sqrt] button is a shortcut to this function.

+

 

+

+

Cube function. It calculates the cube of the number shown on the output display.

+

 

+

++

+

It returns the cube root of the number shown on the output display.

+

 

+

+

Power function. It calculates the power of X elevated to Y.

+

 

+

++

+

Root function. It calculates the Y-th root of X.

+

 

+

+

Reciprocal. It divides 1 by the number shown on the output display.

+

 

+

+

Factorial. It calculates the factorial of the integer part of the number shown into the output display.

+

The calculation is defined within these limits:

+

0 <= n <= 170

+

 

+

+

Natural logarithm. It calculates the natural logarithm of the current number.

+

ReactOS Calc assumes the Nepero's constant to be:

+

e=2.7182818284590452354

+

The calculation is defined for x > 0.

+

 

+

++

+

Natural anti-logarithm. It calculates the power of the Nepero's constant to the current number.

+

 

+

+

Decimal logarithm. It calculates the logarithm of the current +number to base 10.

+

The calculation is defined for x > 0.

+

 

+

++

+

Decimal anti-logarithm. It calculates the power of 10 to the current number.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/arithmetic_functions.htm b/rosapps/roscalc/docs/Help.en/arithmetic_functions.htm new file mode 100644 index 00000000000..735124f8bb5 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/arithmetic_functions.htm @@ -0,0 +1,51 @@ + + + +ARITHMETIC FUNCTIONS + + + + +

ARITHMETIC FUNCTIONS

+

 

+

ReactOS Calc implements the standard arithmetic rules with the following operators:

+

 

+

+

Addition

+

 

+

+

Subtraction

+

 

+

+

Multiplication

+

 

+

+

Division

+

 

+

+

Remainder of a division

+

 

+

Those rules express the concept of priority.

+

Here there is a list of priorities implemented from the highest to the lowest:

+
    +
  1. +

    Special functions which change directly the current value into a new one: trigonometrics, hyperbolics, exponentials and logarithms, reciprocal, base conversions, integer and fractional part detection and change of sign.

  2. +
  3. +

    Power and root functions.

  4. +
  5. +

    Multiplications, divisions, + remainders.

  6. +
  7. +

    Additions, subtractions.

  8. +
  9. +

    Logical functions.

  10. +
+

These rules may be overcome by using parentheses.

+

With +and buttons, the user can isolate a mathematical expression to be evaluated separately. The number of parentheses into a single expression is virtually unlimited. +The number of currently-open parentheses is displayed in the left box underneath the base change option set.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/calc.hhc b/rosapps/roscalc/docs/Help.en/calc.hhc new file mode 100644 index 00000000000..20637fc2b08 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/calc.hhc @@ -0,0 +1,82 @@ + + + + + + + + + +
    +
  • + + + +
      +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    +
  • + + + +
  • + + + +
+ diff --git a/rosapps/roscalc/docs/Help.en/calc.hhk b/rosapps/roscalc/docs/Help.en/calc.hhk new file mode 100644 index 00000000000..c0ba08a9ac4 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/calc.hhk @@ -0,0 +1,9 @@ + + + + + + +
    +
+ diff --git a/rosapps/roscalc/docs/Help.en/calc.hhp b/rosapps/roscalc/docs/Help.en/calc.hhp new file mode 100644 index 00000000000..55c1b63133c --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/calc.hhp @@ -0,0 +1,40 @@ +[OPTIONS] +Compatibility=1.1 or later +Compiled file=calc.chm +Contents file=calc.hhc +Default Window=ReactOS Calc Help Type +Default topic=general_information.htm +Display compile progress=No +Index file=calc.hhk +Language=0x410 Italiano (Italia) +Title=ReactOS Calc Help + +[WINDOWS] +ReactOS Calc Help Type="ReactOS Calc Help","calc.hhc","calc.hhk","general_information.htm",,,,,,0x2120,,0x3006,,,,,,,,0 + + +[FILES] +trigonometric_functions.htm +algebraic_functions.htm +arithmetic_functions.htm +degree_conversion.htm +display_format.htm +error_message.htm +fixed_scientific_notation.htm +general_information.htm +how_to_input_numbers.htm +hyperbolic_functions.htm +logical_functions.htm +memory_function.htm +percent.htm +statistical_functions.htm +the_pi_button.htm +shortcuts_from_keyboard.htm +using_the_clipboard.htm + +[TEXT POPUPS] +help_id.h +popups.txt + +[INFOTYPES] + diff --git a/rosapps/roscalc/docs/Help.en/degree_conversion.htm b/rosapps/roscalc/docs/Help.en/degree_conversion.htm new file mode 100644 index 00000000000..38d22a08720 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/degree_conversion.htm @@ -0,0 +1,28 @@ + + + +DEGREE CONVERSION + + + + +

DEGREE CONVERSION

+

 

+

With +button you can convert decimal degrees into degree-minute-second format and +vice-versa.

+

When working with d-m-s angles, the notation used into the output display is "DDD.MMSS" where D +stands for degree, M for minute and S for second.

+

 

+

+

It will convert decimal angles to degree-minute-second angles.

+

 

+

++

+

It will convert degree-minute-second angles into decimal +angles.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/display_format.htm b/rosapps/roscalc/docs/Help.en/display_format.htm new file mode 100644 index 00000000000..4ec3304eefb --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/display_format.htm @@ -0,0 +1,65 @@ + + + +DISPLAY FORMAT + + + + +

DISPLAY FORMAT

+

 

+

You can enter digits by pressing the buttons +mentioned in the +HOW TO INPUT NUMBERS section.

+

These numbers can be entered into four different bases:

+

 

+

+ hexadecimal.

+

+decimal.

+

+octal.

+

+binary +system.

+

 

+

A number shown into the output display can be easily converted from a numeric base to another +by simply changing the base on the fly.

+

 

+

When working with pure decimal numbers, the user can enter the numbers in two ways:

+

Normal mode: each number is entered +its integer part and, eventually, its fractional part.

+

Exponential mode: the number is entered by typing a mantissa and then an exponent. This +method allows you to write very big or very small numbers that you would not be able to type +in a different manner.

+

You can use it only when the calculator is configured in scientific +mode.

+

However, there are some limits even when you work with exponential notation.

+

These limits are:

+

 

+

-1.79769313486231570e+308 <= x <= -2.22507385850720140e-308

+

2.22507385850720140e-308 <= x <= 1.79769313486231570e+308

+

 

+

The exponential input mode is activated by the + button.

+

After the mantissa has been typed, by pressing +this button you will be able to enter the exponent.

+

When the support for GNU multi-precision libraries is activated, these limits rise greatly to 64 displayed digits for the mantissa and 8 digits for the exponent, both with sign.

+

 

+

When the calculator is in [HEX], [OCT] or [BIN] state, it's possible to apply a masking for +limiting the range of the numbers.

+

Four range are available:

+

 

+

+It limits the integers to 64 bit numbers.

+

+It limits the integers to 32 bit numbers.

+

+It limits the integers to 16 bit numbers.

+

+It limits the integers to 8 bit numbers.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/error_message.htm b/rosapps/roscalc/docs/Help.en/error_message.htm new file mode 100644 index 00000000000..cfc9de48204 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/error_message.htm @@ -0,0 +1,18 @@ + + + +ERROR MESSAGE + + + + +

ERROR MESSAGE

+

 

+

The output display will show the message "Error" if the current calculation overflows the limits of the calculator, or when an undefined condition is generated (example: division by zero).

+

The error condition is cleared using the + button.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/fixed_scientific_notation.htm b/rosapps/roscalc/docs/Help.en/fixed_scientific_notation.htm new file mode 100644 index 00000000000..bb76fc1eafa --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/fixed_scientific_notation.htm @@ -0,0 +1,24 @@ + + + +FIXED SCIENTIFIC NOTATION + + + + +

FIXED SCIENTIFIC NOTATION

+

 

+

When working with ReactOS Calc, it is possible to select a temporary scientific notation +(activated by button) or a fixed scientific notation.

+

Fixed scientific notation will be turned on by pressing + button.

+

When fixed scientific notation is active, all results will be displayed with scientific +notation even for small numbers.

+

The calculator will be restored to normal mode by pressing + button again or by pressing +the button.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/general_information.htm b/rosapps/roscalc/docs/Help.en/general_information.htm new file mode 100644 index 00000000000..9d562a4192b --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/general_information.htm @@ -0,0 +1,50 @@ + + + +General Information + + + + +

General Information

+ +

 

+

ReactOS Calc is a programme for +evaluating mathematical, financial and statistical calculations.

+

ReactOS Calc has several features including:

+
    +
  • +

    Internal precision with 17 decimal numbers (standard IEEE math library).

  • +
  • +

    Up to 512 bits of internal precision and 64 decimal digits displayed in the output display (with GNU multi-precision libraries).

  • +
  • +

    Robust RPN (reverse polish notation) engine which allows a virtually unlimited number of arithmetic and algebraic sub-expressions.

  • +
  • +

    Two different interfaces: standard or scientific.

  • +
  • +

    Many common arithmetic, algebraic and statistical functions are included.

  • +
+

 

+

The following topics will be discussed:

+

HOW TO INPUT NUMBERS

+

DISPLAY FORMAT

+

ERROR MESSAGE

+

ARITHMETIC FUNCTIONS

+

LOGICAL FUNCTIONS

+

ALGEBRAIC FUNCTIONS

+

TRIGONOMETRIC FUNCTIONS

+

THE PI BUTTON

+

HYPERBOLIC FUNCTIONS

+

STATISTICAL FUNCTIONS

+

MEMORY FUNCTION

+

DEGREE CONVERSION

+

FIXED SCIENTIFIC NOTATION

+

PERCENT MODE +

+ +

  +

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/help_id.h b/rosapps/roscalc/docs/Help.en/help_id.h new file mode 100644 index 00000000000..ad6f415f7d0 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/help_id.h @@ -0,0 +1,83 @@ +#define IDH_RADIO_HEX 1002 +#define IDH_RADIO_DEC 1003 +#define IDH_RADIO_OCT 1004 +#define IDH_RADIO_BIN 1005 +#define IDH_CHECK_INV 1006 +#define IDH_CHECK_HYP 1007 +#define IDH_BUTTON_STA 1009 +#define IDH_BUTTON_AVE 1010 +#define IDH_BUTTON_SUM 1011 +#define IDH_BUTTON_S 1012 +#define IDH_BUTTON_DAT 1013 +#define IDH_BUTTON_FE 1014 +#define IDH_BUTTON_DMS 1015 +#define IDH_BUTTON_SIN 1016 +#define IDH_BUTTON_COS 1017 +#define IDH_BUTTON_TAN 1018 +#define IDH_BUTTON_LEFTPAR 1019 +#define IDH_BUTTON_EXP 1020 +#define IDH_BUTTON_XeY 1021 +#define IDH_BUTTON_Xe2 1022 +#define IDH_BUTTON_Xe3 1023 +#define IDH_BUTTON_RIGHTPAR 1024 +#define IDH_BUTTON_LN 1025 +#define IDH_BUTTON_LOG 1026 +#define IDH_BUTTON_NF 1027 +#define IDH_BUTTON_RX 1028 +#define IDH_BUTTON_MC 1029 +#define IDH_BUTTON_MR 1030 +#define IDH_BUTTON_MS 1031 +#define IDH_BUTTON_MP 1032 +#define IDH_BUTTON_PI 1033 +#define IDH_BUTTON_7 1034 +#define IDH_BUTTON_4 1035 +#define IDH_BUTTON_1 1036 +#define IDH_BUTTON_0 1037 +#define IDH_BUTTON_A 1038 +#define IDH_BUTTON_8 1039 +#define IDH_BUTTON_5 1040 +#define IDH_BUTTON_2 1041 +#define IDH_BUTTON_SIGN 1042 +#define IDH_BUTTON_B 1043 +#define IDH_BUTTON_9 1044 +#define IDH_BUTTON_6 1045 +#define IDH_BUTTON_3 1046 +#define IDH_BUTTON_DOT 1047 +#define IDH_BUTTON_C 1048 +#define IDH_BUTTON_DIV 1049 +#define IDH_BUTTON_MULT 1050 +#define IDH_BUTTON_SUB 1051 +#define IDH_BUTTON_ADD 1052 +#define IDH_BUTTON_D 1053 +#define IDH_BUTTON_MOD 1054 +#define IDH_BUTTON_OR 1055 +#define IDH_BUTTON_LSH 1056 +#define IDH_BUTTON_EQU 1057 +#define IDH_BUTTON_E 1058 +#define IDH_BUTTON_AND 1059 +#define IDH_BUTTON_XOR 1060 +#define IDH_BUTTON_NOT 1061 +#define IDH_BUTTON_INT 1062 +#define IDH_BUTTON_F 1063 +#define IDH_RADIO_QWORD 1064 +#define IDH_RADIO_DWORD 1065 +#define IDH_RADIO_WORD 1066 +#define IDH_RADIO_BYTE 1067 +#define IDH_RADIO_DEG 1068 +#define IDH_RADIO_RAD 1069 +#define IDH_RADIO_GRAD 1070 +#define IDH_BUTTON_CANC 1071 +#define IDH_BUTTON_CE 1072 +#define IDH_BUTTON_BACK 1073 +#define IDH_TEXT_OUTPUT 1074 +#define IDH_TEXT_PARENT 1075 +#define IDH_TEXT_MEMORY 1076 +#define IDH_EDIT_LICENSE 1078 +#define IDH_LIST_STAT 1079 +#define IDH_BUTTON_RET 1080 +#define IDH_BUTTON_LOAD 1081 +#define IDH_BUTTON_CD 1082 +#define IDH_BUTTON_CAD 1083 +#define IDH_TEXT_NITEMS 1084 +#define IDH_BUTTON_SQRT 1085 +#define IDH_BUTTON_PERCENT 1086 diff --git a/rosapps/roscalc/docs/Help.en/how_to_input_numbers.htm b/rosapps/roscalc/docs/Help.en/how_to_input_numbers.htm new file mode 100644 index 00000000000..1a54dc4bf33 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/how_to_input_numbers.htm @@ -0,0 +1,85 @@ + + + +HOW TO INPUT NUMBERS + + + + +

HOW TO INPUT NUMBERS

+

 

+

The ReactOS Calc provides some buttons for typing numbers and expressions.

+

However, some of them are available only into Standard or Scientific modes, or when the calculator is in a specific state.

+

 

+

 

+

+ +

+

+ +

+

Digit buttons: they are used for entering digits into the display.

+

 

+

+ + +

+

Hexadecimal buttons: they are used for completing an hex number.

+

For using these buttons, the calculator must be configured into scientific mode and the [HEX] state must be selected.

+

 

+

+or +

+ +

+Decimal point: used for starting the non integer part of a decimal number. +

+ +

  +

+ +

+

+ +

+Change sign: if it's pressed after a calculation or when entering the operands, it will change the sign of the number shown into the output display. +

+ +

  +

+ +

+

+ +

+If the displayed number has been entered manually and it isn't a result of a calculation, +you can delete the last digit by pressing this button. +

+ +

  +

+ +

+

+ +

+This button removes an incorrect number from the output display. All pending +operations are preserved. +

+ +

  +

+ +

+

+ +

+It clears the output display and all pending operations. +

+ +

  +

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/hyperbolic_functions.htm b/rosapps/roscalc/docs/Help.en/hyperbolic_functions.htm new file mode 100644 index 00000000000..da3fd3efa04 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/hyperbolic_functions.htm @@ -0,0 +1,34 @@ + + + +HYPERBOLIC FUNCTIONS + + + + +

HYPERBOLIC FUNCTIONS

+

 

+

ReactOS Calc allows the calculation of three types of hyperbolic functions with their inverse +operations.

+

Those functions are activated by the same buttons used for trigonometric functions; the +hyperbolic context is enabled by activating the +modifier.

+

The inverse functions are activated by the + modifier.

+

 

+

++

+

Hyperbolic sine

+

 

+

++

+

Hyperbolic cosine

+

 

+

++

+

Hyperbolic tangent

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/images/0.PNG b/rosapps/roscalc/docs/Help.en/images/0.PNG new file mode 100644 index 0000000000000000000000000000000000000000..1f23a706533bbcb2b8b2c874ac9de3b4c8687407 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=k*AAe zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epg3EYBo3 zlFVdQ&MBb@07h&--T(jq literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/1.PNG b/rosapps/roscalc/docs/Help.en/images/1.PNG new file mode 100644 index 0000000000000000000000000000000000000000..a6102442963e675916af4321996c76236887e494 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=p{I*u zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1eqTRENN1c zWE|7xFs^M>sET0Qn0&=3LenE{PA{8smZ?!m)5Ik{Y#}}q&%5a^_Og@aJ;uoAmY}wP inaMQh;Z#Lg35G@I*%FRi{5A<_IfJLGpUXO@geCwm%sT}D literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/1_x.PNG b/rosapps/roscalc/docs/Help.en/images/1_x.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0076342b3a41c03d9c8c52026119da49933b8d53 GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~W6i*k& z5D)LphMPoAwBvoTKxuUm}W;`yl=3%j&~9>y&>k^W^f&t)~6 zP7Wp4edjasBwL?yWZFq@<#GRXKV7`%+VG09hYu-1Zz5IV$<_ zrsSfcD@H-iJga{JO*wUtqsP`tAwXGlr^NzOX@=)gzXkhc-`oW{h{4m<&t;ucLK6UM CF-r3Q literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/3.PNG b/rosapps/roscalc/docs/Help.en/images/3.PNG new file mode 100644 index 0000000000000000000000000000000000000000..fef0aa6660b8d65573067e6c601089729cce64cd GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=g{O;S zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epg3EYBo3 zlSda)I8UgZ*a-l^pgI3!TA#>h6X9l7tH^-BK1hSsNB@W r2R)u9u&`;!3apsOrO)@`00V>fz2Ab(#k2H*ZeZ|q^>bP0l+XkKQ5!=J literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/4.PNG b/rosapps/roscalc/docs/Help.en/images/4.PNG new file mode 100644 index 0000000000000000000000000000000000000000..da7584ae64f8d8874da64835141b5bacf8fee32f GIT binary patch literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=qo<2w zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1R0To9B0gr z>~3CU!FDj@ zE%3AlmtIVld-KFo2RV2GtP}#2Mc1xbtSQdm_Waw#nMx%`fR17CboFyt=akR{0JtDW A5&!@I literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/5.PNG b/rosapps/roscalc/docs/Help.en/images/5.PNG new file mode 100644 index 0000000000000000000000000000000000000000..df08b33c47062f18248cebfe1858ab153ae203e0 GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL4-DPZ!4! z5AWnZpWpK{$1<>Uvol}VWc~f!1*xqjTQ?YNbkMafdcom)aYbqf=e>&wGA9yP(!^6- zmIR;ZF<#*764kIKrz3)m-|f*}57zmD@=H>p+TP55m@2s`|HVV&U#bF+f)zwR-CU8n z;w_KX6XQqCC0C3d9p>uyaxq|vEOA)irWJM8J6Mn5!o5#|vb*`u0$s%5>FVdQ&MBb@ E08eX5VgLXD literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/6.PNG b/rosapps/roscalc/docs/Help.en/images/6.PNG new file mode 100644 index 0000000000000000000000000000000000000000..bad59333f7c215cc14ed3c9ee7247f10c94ce710 GIT binary patch literal 195 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=m8Xki zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epg3EYBo3 zl**J-jH@Edm>%`4<7|00jZv8O@1vd{A{}ccovAU)lFYJBHjy~# sEts*3O+%vb+9k$Dsg)ldHSqB;I5>Y2JX_(F3Umd7r>mdKI;Vst0LsWi%>V!Z literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/7.PNG b/rosapps/roscalc/docs/Help.en/images/7.PNG new file mode 100644 index 0000000000000000000000000000000000000000..7c70ad8d0cbe187c3b831d09932c75fd75e70518 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=ou`Xq zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1ep^FENS8? zE=z(}2&6kizf6(*XvQe(vhw_kbV*OMz*okQ-P;F wxb$MW+?yw!I>^BjV5JbCEV}mDQcZD&)Fq4$_VV5q1iFO5)78&qol`;+0DjR#8~^|S literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/8.PNG b/rosapps/roscalc/docs/Help.en/images/8.PNG new file mode 100644 index 0000000000000000000000000000000000000000..f72b96b96f4f3a9db6a8343cea85629cf57262ae GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=nWu|m zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epg3EYBo3 zlWa5L7ZX(UT^GER oT9CjJ<;~8Lwd7DYvy}nEa+miPlkO*50$sr1>FVdQ&MBb@07>sa^Z)<= literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/9.PNG b/rosapps/roscalc/docs/Help.en/images/9.PNG new file mode 100644 index 0000000000000000000000000000000000000000..c314b778cbedb3c07662052af2cc671437db1988 GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=ji-xa zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epg3EYBo3 zlY{$W$kx|MUvol}VWc~f!1*xqjTQ?YNbkMafdcom)aYbqf=e>&wG7l11o=F77 zI@Ha%c;2YPcgZdHW#?a{OKxiS_#|U#w|IN1!|w+jKTJF~oi{k#`(uL4ooRyd88fsz zzujDsdLv3=@j(yIT@9~g7bLJmd9$-*Em4|Yx+RU7AztQ7;4ZdRu|O9wc)I$ztaD0e F0swi&O$Gn} literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/And.PNG b/rosapps/roscalc/docs/Help.en/images/And.PNG new file mode 100644 index 0000000000000000000000000000000000000000..c95fe1554268c53e8c2c1cfb70b4451c32871b7e GIT binary patch literal 249 zcmV4wn;vi+*A3i~Jrhu1$aYJ7A7icY3hQnx){yNK);TIXH z% z8uA!zRD}7>_YS*QJ?jhRR@XHI_KRN8I8CTP z=jIdZuL8jzVc9BftI`|`mi^!^A&gvC0)_|hYW1-`rLp}6OT5+vA?5H3=$Y})A}a+( tD&iD~Mvf)2=GGXq0dfAM!mnTN`~Z%IxzW%1p;rI^002ovPDHLkV1lc>WVZkS literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/B.PNG b/rosapps/roscalc/docs/Help.en/images/B.PNG new file mode 100644 index 0000000000000000000000000000000000000000..1dacc395ea8adbc812eb452dcc781c35c64b115b GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=iKmNW zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epy9EYCzO zluimhIU;#MZHMfMoF=jUs5Tjw#f5EwYxrAPoc7na8Q4Dza_}?gi*lQK#X_p5SyiHO lW&^<+J`w-` literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/Bin.PNG b/rosapps/roscalc/docs/Help.en/images/Bin.PNG new file mode 100644 index 0000000000000000000000000000000000000000..6fbd58d1551f0baf6a9da2d870d4c768d7c1e337 GIT binary patch literal 280 zcmV+z0q6dSP)Jc@pCP_P0B4#&&7B=~%>812jl@vd-bL@kwzY$f;r%6%TUn|>_8(?Y`!X9l7h-?jdiw(rvrpQ*2ygyA$jjLGuBM;u e|EB3@)9(j^(~4M@ZRRup0000PcCHdSiJA_W7OV;kWDF7$P5-ew~idUeT-yurKP3UZ>vU;j< zhbRf|>-*SnU;g5E)>rL@IJavZ=pHPNWP63TM?HFkyM9hEBfAH1sXrmBM{tN5z|EO{pbcZ>~sf@8j8Ou{bx2Wf{k>r^b&a%g^#EdX#g;sK@PC whQXw{8WT+U0t}eeE@fsi4Vvi961ACe{@x!K-`)s33v>vBr>mdKI;Vst022;J`v3p{ literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/CC.PNG b/rosapps/roscalc/docs/Help.en/images/CC.PNG new file mode 100644 index 0000000000000000000000000000000000000000..e02082b925dc150552693f6c1afe9c0a5d686008 GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^Hb5-H!2~2X8F>o>DVB6cUq=Rpjs4tz5?O)#nVv3= zArbD$e?GtGKRkg+Mn{In!TtWu^7Iu8rY#c_QxjXUxL?M~Naezc#V*O=03O24Rcro?z72U@#rU<&r_THPnC~?-Z*o1zosx86>HP(y=uGqE+WNcvD`AteI ahaqx#^K324nI1q#GI+ZBxvXo>DVB6cUq=Rpjs4tz5?O)#MV>B> zArbD$e?GtGKRkg+Mn{In!TtWu^7Iu8rY#c_QxjXUxL?M~Naezc#VIRP?QU(Pt&Kb;jXYLI%N> zt&H}wYzm(2RGcQ*?)K79<#Z-jvBbn%E9VGyZkg(oy0}j+cUGU7@5`xdZTTL|rza}5 jI5eAP%bP0l+XkKIDS?R literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/D.PNG b/rosapps/roscalc/docs/Help.en/images/D.PNG new file mode 100644 index 0000000000000000000000000000000000000000..421923d13e315cc21319042804689266aa02782a GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=i>HfY zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epy9EYCzO zluimhIU;#MZHMfMoF=j0EXfN@kKRge<*~H8a42^MoASqdOl`a~Ia}&}_9WCDTG}8p zzc;Gw;t2^}w@t#Vn~pJZxh>dQ;;_I?tLUkBwi$!@r?(T&#q4VdVeHh>x=4JXnCb!zfWciS9Eb zeG-TLZQn9JvYb_s==%^}h|3c_lOoaF$ElYAW3VJ=rms7dnCGHP0hRuuqj6wTrxGCB%b@^h-BqGCF91PsJ4qIBzlcE v39~L;YIjpi`4P{FMa)d5K^L{+XB9CncK;-J@|H&i&>;+-u6{1-oD!M0bBx{Nl+IvxzX!Jv_yUyCzBZuvEH$xWkeOk43{} z_ytdANc7D3=)ao9$wy6DOmN>DqWGz{A^{B~HCI&T? Wbra8ddq)AC$l&Sf=d#Wzp$Pz2v`M4@ literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/F-E.PNG b/rosapps/roscalc/docs/Help.en/images/F-E.PNG new file mode 100644 index 0000000000000000000000000000000000000000..3b741c16183c38e8ad0e827a06281fa389ee4dde GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=v!{z= zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6TgeBPqOrP0} zoVH2#i_8-4>@{A{xx=R2J?o0m7J&nzi4Lh1OIC>W2v{pj6Py|5F3j<7iGRu#LFpcs zV_bEqi>LLnDc@7O?BSu{V1J3RQEFwzR$bqn425zhCw8n`aR}%f22WQ%mvv4FO#pZH BMMMAq literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/F.PNG b/rosapps/roscalc/docs/Help.en/images/F.PNG new file mode 100644 index 0000000000000000000000000000000000000000..8209f89f886e83882a8464a2cb8d985b0aaa7ffd GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=iKmNW zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1ep^FENS8? zE=z(>^cXMjb%|v7`FgGK?Ao7~(PwxJhy!`j&_^)(dykMOhoI6tAerAYLcqdb4~gN| zVu!h5irn+V=3yB5J-sH6N0qX+vbE#W%s)ILP7ISq$}A{zy27i-BPNvfU`Q;lEb5Jf z8yTB3SL9Jen;RdW7VrGTBxPL#vLL)6=pWpYH2^O)L%*Lns!v`HGp8kIGNf_Y| zl>^X$rq=!IP(Z_A=GF5>a@h12x2IcyMOI(Y5B@dwha`~t1-8Tdv_F3zn2Ql{!Kz={ e|4r2|O}_)IhkqCg2CLKn0000>xqQyYw{0EI)7`rHn_I1v2)ow1c z3E2QeNNqwmK64gIA{A0q(WkDKd)y>X166=S9jZ|Fw!fl4vs~p+fSyXl4jWZWsIpMP zxq?|4sET(AcW4S@*M=Fy!j7F{6i*Q6X&6c}whM*4;i>p&9P^8M=jEJh5Np{NTNq;H z>YcVsp~AQeR4FWDda7}HQfp#^DvPg+vixu4L0-wV?%Vx8jZ=Ezq( z^WBf@+zXRMYF{1Oar|$W(2=ZQXU;Ddv`SKTMHHkij))8o3i`;Fr|6q2#TE5!g-f6i zNn{1`6_P!Id>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4Nzi< zr;B5VhxglQv0M!b0xjA$l@*&lNL=z%xfQ{&wY2w7rhHE&_m}LnnAvC3)D-y_a9mVr zdCZl*Kw#~JS6y+XVeblhjd)`i`L=4fm2Hm=OxQdnNW&pMPxRp_2hQhQWlN8U`f%ND zoA~qQN6Rq27n~o}Pu;zLVn)u^*SnRZRI_|u-S}ScRGEv%FmCQL-Qu3V;ZK{V#yGw@ nd*?-Qyq2 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/Inv2.PNG b/rosapps/roscalc/docs/Help.en/images/Inv2.PNG new file mode 100644 index 0000000000000000000000000000000000000000..d0c8f901cf9892a57c27972b5dabd68299792055 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^dO$45!2~3AzjI0eDVB6cUq=Rpjs4tz5?O)#eoq(2 z5D)KUo1zyShZPtdmh%W5X?W8&ZJAipi}U;KO^U2`1xL(?_^`nG`@0KQH62bDD8~3P z?wa>$!66~7#eSAfPXii{h^TCJT*PDf?!$5AuXCH8bu^Z6+5CM}D16Pt?{9$Q6+cIB z!yTJ!ZJkp@&(TyCoTTjUvqlG z+r?{BXB_OfIz8nVkI>JIPNuV79T%q@lMLl6Qm!)*rBS5uShXw$U27 zMN`jrZ0xaGIkE0%&pOo;D^e?@#g0rLPd#$OH_E`t$3^YoM;G_uEcL5L>nQsLfkmHgu1IZ(5?y@IW2%Xf!$FQM)A%^9c(|@E$UMc$U@&i$;Pb$= RNkG>zc)I$ztaD0e0stVtN)Z46 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/MS.PNG b/rosapps/roscalc/docs/Help.en/images/MS.PNG new file mode 100644 index 0000000000000000000000000000000000000000..dbdef2514c2595dd59a6bae394732e71322b6ba4 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~WL{AsT z5D)LR z64Y&DJ7zR%iQBKI#=E8|ES~l-H$q_c7x(5u12$!YZ!a1gdP6Egz1i6q{1|s$oI70$ Q=tu?zPgg&ebxsLQ0ODFsb^rhX literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/Mod.PNG b/rosapps/roscalc/docs/Help.en/images/Mod.PNG new file mode 100644 index 0000000000000000000000000000000000000000..d1c5c07380f148d03e190d522ae01d6306fa3e41 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~Wd`}n0 z5D)LMx4)`lz4o(e8uEeHlH_2 znSO|wSNF??U!uATg`OH$MYEMFUwhJ^(>*h*qt|$qh|Jt?kjJV3aH%+H)j5`j3{o?qV;GKDNgJd~OMEE;2Sst^Cl` cz{kUoe|589@w;RJphFovUHx3vIVCg!0EDVff&c&j literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/Oct.PNG b/rosapps/roscalc/docs/Help.en/images/Oct.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0bf5d892cdb4ccbd980ab7f5b0276d4ee7f4a0e5 GIT binary patch literal 282 zcmV+#0pzaz(6HqiA0*6x;*8w*re^Ez9F@EvmBM{t2g_TzrfH5$)BNm|kEtyPULoAGc-q9MqX}ozO*q|}Uh?i|x+HXB zMXJRt@x=!{5-&Am$S+7>iSlM=$y%Z`oqJ0fGecU=-HR^b>~TQnFnGH9xvXmL*Sf=S@&0@Ml4P@kw|>{JA+B`0gF>s5R29HMHY**3r({mLqFXV;B-sawS<|; fG^lY#9tXqc{cH&vzQ-{Gt!40Z^>bP0l+XkKOq@ya literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/Qword.PNG b/rosapps/roscalc/docs/Help.en/images/Qword.PNG new file mode 100644 index 0000000000000000000000000000000000000000..59e9d8dbd0c24418ab7bac773b49c1ae8ee9fe54 GIT binary patch literal 311 zcmV-70m%M|P)JNhf9lhAob-)x=XrFV)eGT<^Hgr z&Xj}y;g)2I5^&#gQy@$7Gv_iZUOjF?WJ(xDvJFA)ds+r4V&z2YO|j5D7#BG>UCip= zP7dlUBKVn4fpd?Ec-fu)z+7}Ze?J)oV002ov JPDHLkV1kH6hfx3k literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/Radians.PNG b/rosapps/roscalc/docs/Help.en/images/Radians.PNG new file mode 100644 index 0000000000000000000000000000000000000000..7958dbb2d2590c3d08be64722356c547da751ef0 GIT binary patch literal 344 zcmV-e0jK_nP)>xqK$!J+xu{@3{O3|KTO7Me>byB zbQ$kscce>rjahrpj>3uv=376OtHZ9%&t(RR5&hpffCPQRy5Wf1C#K-MItSoQx zf{X+iWte7Me3F{iQGYyDdUE)E-cS~&88FC}YQ)TZ3;Swu9;66iPO(2MTKiKvG&j_r q=J)7^XZ*|7&7ZpeZ)pD1?avFJElZ`4V>xC30000EamT;r(`6JXeDPPrGi-hdU2X9!mC5pO}%@vE;>+T>oQoE*<^%=Ql?0Xcqd}W5$*6 z@6(-R{?+Aw58inhk$%wQO{|&MZ4Parbg7=RI_XP3YgDjJo8o!6Xlm@_ji(%ZXGVrb zI=^FBQ}SLsWxJ!vhOF9Cmy#0Snh70VHS_4{6$+Ieb0mKU`7?i#-#Ak@;FVdQ&MBb@0JQyVF#rGn literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/Sum.PNG b/rosapps/roscalc/docs/Help.en/images/Sum.PNG new file mode 100644 index 0000000000000000000000000000000000000000..6668d1871eb407b0fae8fae45071c10ebcd568dc GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~WY)==* z5D)LS(*n5~6nNTnYd+k0c=AxPhx){fM4m+DjW6X6-Dp<$vGsg>p=Y|0*8I)q7-)n?{S-#GOShaVRq)u xCsOaj4+Rgn;<+kV!jG0~ddL2!Hoar@egZ{(0;cg*jnV)B002ovPDHLkV1nT6ig^G4 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/Xor.PNG b/rosapps/roscalc/docs/Help.en/images/Xor.PNG new file mode 100644 index 0000000000000000000000000000000000000000..a4a8eac4a152236288508e3a9bebe48790aefe49 GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~W3Qrfu z5D)LS(*n5~6nGqT|9rUf@Z_On5A}%|8z%%@mfTq<_IriIzMsz)X})pX7~>|*YOw$3 z#YFMd>9q&%ylQJZV0Tel>Zi$}0+kJac$Z2AosUQi_&WD{Ui1cz%=8r;lAN4!hDm-) zr|?Bg6p0SiQO!(Y*NN9Fk2d#d6|FX7`BowonRw&qlZFtszEu;AHlLMgG!+dLa#21S oWc*ycw;{FTv$|;=heRHqgviN>^QY{71avclr>mdKI;Vst0P#~;*8l(j literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/add.PNG b/rosapps/roscalc/docs/Help.en/images/add.PNG new file mode 100644 index 0000000000000000000000000000000000000000..e7e72c3d739de1a1fdb518b7e22a6a47a3510657 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=iKmNW zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1Q}kpJ(i^} zR0I-kItRrBJu$Y5WZS|fDfn{#!Ux73;V(pbT-u~(8Fe*H4AFMiRW?1cVU;}Zv4t`{ m2W~88W-<-B$Q3rLi1Fr8t_M0DqG>?;89ZJ6T-G@yGywpRoo>DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(ehe3dtTpz6=aiY77hwEes65fImVFD%O2tP?QfkKLE4>o&Z4KINRV z@}2Z5@2PfQP2S!Q*H0zmd%Q6QkaV YduPx# literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/cos.PNG b/rosapps/roscalc/docs/Help.en/images/cos.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0b49714c1c118fdbcd641afb5269d7f8f33463f6 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=zo(01 zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1Q}kpJ(i^b zY61y{%#I&U99C^oFYEjyIZM{z@rMot?}d>*n^Fb-&X~54GwG|msjhN{{K;vKe_ReH zw9N2Z&f+xn5pxDd;6aNl$%SD@GYo=MdwBv3nAR?3W-<+W$jTxs!LVTBIYAXm6>Xr? O7(8A5T-G@yGywnsY)6j( literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/degrees.PNG b/rosapps/roscalc/docs/Help.en/images/degrees.PNG new file mode 100644 index 0000000000000000000000000000000000000000..481be36c99fd098f943b16033754aea38963b539 GIT binary patch literal 329 zcmV-P0k-~$P)hPp_3d0<5;pltG*k1E5)>52t1@<^e0t#p!y z4Ys^IMpWoL_OP8aUNiqW52Oh8-hukSen)W{>NlFBNT4X=G((}|-N3$Ld2xX}QRdYA z#>bFmi~+WzyP`aQLh`_l3U4PuAB;+Uay(MJzl5|+i@uK*c#|l~lXlCa&Kf*z|KBk5 bX~6kfA-!zc#3#B58NnhwUpDuI%+~lM`Bz8zu-d0uxA4;)=TDr_()8+G5@nesxl*w$ r^lyeikflT;qZd0%))FSey8;ZVXSp7{J2O=g=m-W+S3j3^P6zopr0C3wodjJ3c literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/equ.PNG b/rosapps/roscalc/docs/Help.en/images/equ.PNG new file mode 100644 index 0000000000000000000000000000000000000000..8a2e2b312455b48c57658bc7c4b025ad934ad1c2 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=rl*Tz zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1Q}kpJ(i^= zjSEx-5(L|OI(+P$6(!o&pYP~VF-dh+Jm*&17FE@IOtMllsX(PR;mt+HMyZtPyiwAF6fG%P1boFyt=akR{05_LG%K!iX literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/log.PNG b/rosapps/roscalc/docs/Help.en/images/log.PNG new file mode 100644 index 0000000000000000000000000000000000000000..efb691343b9ac24ce9f2b0bd0a7cff4dcf9418cf GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=r>Bc! zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6TgeBz$Oq)4c z!zKx&D<3dgAg;(Ex2iz!&pvfaiHmO-ZnbMRX=l0XHnWSzHVYF3yh6YD^FCmUdv%9so5hKQ7TmdbQFW9tDnm{ Hr-UW|)vQM8 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/mult.PNG b/rosapps/roscalc/docs/Help.en/images/mult.PNG new file mode 100644 index 0000000000000000000000000000000000000000..81bcc8e320c0cf3b99c54be3aee84e5ce8a5ced3 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=si%u$ zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1R2kR9B1Y^ zym#_Y5_IKkQJLMqr*z+_>UYnH3(eZf_tTf$atSo(i)x!<==Qj$=SjoLR1*pJX2JZ@ mW)B4iFtKbP$85tDnm{r-UW| DEVf3% literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/perc.PNG b/rosapps/roscalc/docs/Help.en/images/perc.PNG new file mode 100644 index 0000000000000000000000000000000000000000..2da9e91bdd066f669f5fe03c8f7db3380cffa6bf GIT binary patch literal 279 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6k~CayA#8@b22Z19F}xPUq=Rp zjs4tz5?O(Kg=CK)Uj~LMH3o);76yi2K%s^g3=E|P3=FRl7#OT(FffQ0%-I!a1C*HR z>EamT;hp^F^Lu{gSO#`(cIFG4tiQjzAhp$G>js034!YJwFF1TJu1F2xymv7{=0pNZ znz(|}Rn{j*B=1Q1u+_ajxsfMBY18?R?@BYL9jtZO(nXNpFCmKriq^NVH^fHU|IAp(UaOe&3`0FCi!jP5m VC9uL#!UgC+22WQ%mvv4FO#sZ|Tq^(o literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/pi.PNG b/rosapps/roscalc/docs/Help.en/images/pi.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0666df59ae3f0c92076a339068aefb4794d7457d GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=t*47) zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1R0lu9A|8g z>_{^?H^G@xBBOvsaCxGEk~D8(f0UcsO8@r>GBa45eB#~}r5-4cQpGBcS5P0Z$v+RPZ-`s`xN$4TBmhcI}$`njxgN@xNAkU>GX literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/s.PNG b/rosapps/roscalc/docs/Help.en/images/s.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0448704dee4c4dfc545cd9e5415b0a18846b5852 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=t*47) zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1Q}kpJ(i^% zDgp@ynO#(ls?M})j&`0@n-azLMZoi#15-oI=@T3JeNM9}NOj(}azpG}F;J{Do!WJ*GC}lLtN2Pd8jsQ1<9@*e0#it-dtimGPs)6D}pFoK!2)apqIq z73JpR<`(8$G-qPg!4;`fS|q~uE-rMNs^H3^Ji(QnC2Pqd(M={#nHbKm`6T$OZ(=FX OX$+pOelF{r5}E+k7EHSU literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/sin.PNG b/rosapps/roscalc/docs/Help.en/images/sin.PNG new file mode 100644 index 0000000000000000000000000000000000000000..f492ba4074a09d021bb972c979f8d5a5fb462a84 GIT binary patch literal 222 zcmV<403rX0P)9p*>jCKUIzB0k+REcEF$GAEamT;r(`6AXkF|Pn&klhdU2X9!mC5pLoKc?a8Iib5#c41g6yenICO(`>=$A_x-G@An_Z9H&b?R{Ar^_J(8 z54z>sF+M8}SLMEX(9KYy_R9r7FShI(i7RZ6rM#GPlvjv*#ifpIcBw!99NJ|3Th49f vm$Z{?Ydo9(#4VO?;w$~Tq-{R)yWhe$SFQ=HpE_+3(A5l{u6{1-oD!MfZ;Ly?v6AAa`!Yw&_%GbP0l+XkK|57=9 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/tan.PNG b/rosapps/roscalc/docs/Help.en/images/tan.PNG new file mode 100644 index 0000000000000000000000000000000000000000..81b2bd005bdc4e710d5735336fe76c7c1765bdb6 GIT binary patch literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~W1Wy;o z5D)LNiH+}!Q3Eo`hi_@G~0Kssk+W)c@Yt8{v02+ zF!&43s9S2%7%=Z-gPOo>2RGfrw>L=e9$Prap<$ytJ4@CQrRi(8q%kvm-E=%KNHk%HXz4hOwlQYmMxVa#NRvIR z=<+G41i;L0TGzU)a+WttZ@Os>7>nMaG1Ul{xYjLEqa%ep7`w{sfC7scDfNv3NZ z5D)L;67A7f%|kIx6Yd{2ty%K1Fnd^X#X7F_Nb6Mw<&;$TUGg>?V literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/images/xey.PNG b/rosapps/roscalc/docs/Help.en/images/xey.PNG new file mode 100644 index 0000000000000000000000000000000000000000..3f7b5467dadc150b1647f01630639391c7249a3e GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~WY)==* z5D)LS(=Ku~DDb%I)_mA~SfAV8`Ik_q828JCccxf2O|j)W_wKH&#Zp_zsn6FKGjvD4 ziLLuswoP1T&BAQn86A5MA9I&hJRbUO+wG1eT5-y6&OP`nl^FW&X_}r+|NmvpISfzK z6KAv@s#2M{@{mRI^rhbKdWwthG!$&|lbgfSVDie|pfedfUHx3vIVCg!02q&1zyJUM literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.en/logical_functions.htm b/rosapps/roscalc/docs/Help.en/logical_functions.htm new file mode 100644 index 00000000000..244399f4abd --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/logical_functions.htm @@ -0,0 +1,31 @@ + + + +LOGICAL FUNCTIONS + + + + +

LOGICAL FUNCTIONS

+

 

+

There is a set of logical functions which can be used between two operands.

+

They can be used as normal arithmetic operators.

+

The only exception is the "Not" operator which works on a single number.

+

The provided functions are:

+

 

+

+

It executes an "and" between the numbers.

+

 

+

+

It executes an "or" between the numbers.

+

 

+

+

It executes an "exclusive or" between the numbers.

+

 

+

+

It inverts all bits of the number shown into the output display.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/memory_function.htm b/rosapps/roscalc/docs/Help.en/memory_function.htm new file mode 100644 index 00000000000..eb3aa3a7f1f --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/memory_function.htm @@ -0,0 +1,45 @@ + + + +MEMORY FUNCTION + + + + +

MEMORY FUNCTION

+

 

+

ReactOS Calc reserves for the user a memory region for storing data.

+

With this feature, the user can store frequently used numbers (typically, these numbers are +constants) and recall them at any time, without the need to re-enter them manually.

+

If the memory function is currently in use, the text "M" will appear in the right box underneath the base change option set.

+

The memory is preserved when switching between standard and scientific mode, but its content is +lost when ReactOS Calc application is closed.

+

Four keys are available with memory function support.

+

 

+

+

Memory Clear: clears the content of the memory.

+

 

+

+

Memory Recall: retrieves the stored data from the memory and it shows it into the output +display, without affecting the content of the storage.

+

 

+

+

Memory Store: stores the displayed value into the memory. The content of the display is +unaffected. After pressing this button, the previous content of the memory is lost.

+

If the +modifier is activated, then this button will swap current memory value with displayed +value. Under these conditions, the displayed value is stored and the previously stored quantity +is shown on the output display.

+

If the memory is empty, it will act as a normal store.

+

 

+

+

Memory Sum: the displayed value is algebraically added to the current memory. The output +display will be unchanged after this transfer and addition.

+

If the +modifier is activated, then the displayed value will be algebraically subtracted from the memory. If the memory is +empty, it will work in both condition as a simple memory store.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/percent.htm b/rosapps/roscalc/docs/Help.en/percent.htm new file mode 100644 index 00000000000..6d402a1b8e6 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/percent.htm @@ -0,0 +1,35 @@ + + + +PERCENT + + + + +

PERCENT

+

 

+

The +button is available only with standard mode and it's used as modifier for the four +basic arithmetic operators.

+

The input sequence for a percent calculation is:

+

 

+

"first" "operator" "second" "percent"

+

 

+

The modification applied by the percent button for each operator are:

+

 

+

+

Add "second"-% of "first" to "first".

+

 

+

+

Subtract "second"-% of "first" from "first".

+

 

+

+

Multiply "second"-% of "first" with "first".

+

 

+

+

Divide "first" by "second"-% of "first".

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/popups.txt b/rosapps/roscalc/docs/Help.en/popups.txt new file mode 100644 index 00000000000..756ab386527 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/popups.txt @@ -0,0 +1,411 @@ +.topic IDH_TEXT_OUTPUT +Output display + +This is the place where the typed numbers and the results of the calculations are shown. + +.topic IDH_RADIO_HEX +Hex + +It selects the hexadecimal numeric base and it converts the number shown into the output display. + +Shortcut from keyboard: F5 + +.topic IDH_RADIO_DEC +Dec + +It selects the decimal numeric base and it converts the number shown into the output display. + +Shortcut from keyboard: F6 + +.topic IDH_RADIO_OCT +Oct + +It selects the octal numeric base and it converts the number shown into the output display. + +Shortcut from keyboard: F7 + +.topic IDH_RADIO_BIN +Bin + +It selects the binary numeric base and it converts the number shown into the output display. + +Shortcut from keyboard: F8 + +.topic IDH_RADIO_DEG +Degrees + +It enables the processing of trigonometric functions into degree format. + +Shortcut from keyboard: F2 + +.topic IDH_RADIO_RAD +Radians + +It enables the processing of trigonometric functions into radians format. + +Shortcut from keyboard: F3 + +.topic IDH_RADIO_GRAD +Gradians + +It enables the processing of trigonometric functions into gradians format. + +Shortcut from keyboard: F4 + +.topic IDH_RADIO_QWORD +Qword + +It limits the length of integer numbers to 64 bits. + +Shortcut from keyboard: F12 + +.topic IDH_RADIO_DWORD +Dword + +It limits the length of integer numbers to 32 bits. + +Shortcut from keyboard: F2 + +.topic IDH_RADIO_WORD +Word + +It limits the length of integer numbers to 16 bits. + +Shortcut from keyboard: F3 + +.topic IDH_RADIO_BYTE +Byte + +It limits the length of integer numbers to 8 bits. + +Shortcut from keyboard: F4 + +.topic IDH_CHECK_INV +Inv + +It enables the inverse function for [sin] [cos] [tan] [pi] [x^y] [x^2] [x^3] [ln] [log] [dms] [MS] [M+] [Int] buttons. + +Shortcut from keyboard: I + +.topic IDH_CHECK_HYP +Hyp + +It enables the hyperbolic mode for [sin] [cos] [tan] buttons + +Shortcut from keyboard: H + +.topic IDH_BUTTON_BACK +Back + +It deletes the last digit typed on the calculator. + +It also disables the temporary scientific mode if an exponent is removed completely. + +Shortcut from keyboard: Backspace + +.topic IDH_BUTTON_CE +CE + +It deletes the last typed number from the output display. + +Shortcut from keyboard: Delete + +.topic IDH_BUTTON_CANC +CANCEL + +It deletes the current calculation and all sub expressions. + +Shortcut from keyboard: ESC + +.topic IDH_BUTTON_FE +F-E + +It enables or it disables the fixed scietific notation. + +Shortcut from keyboard: V + +.topic IDH_BUTTON_0 +This button is used for entering digits. + +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +.topic IDH_BUTTON_1 +This button is used for entering digits. + +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +.topic IDH_BUTTON_2 +This button is used for entering digits. + +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +.topic IDH_BUTTON_3 +This button is used for entering digits. + +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +.topic IDH_BUTTON_4 +This button is used for entering digits. + +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +.topic IDH_BUTTON_5 +This button is used for entering digits. + +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +.topic IDH_BUTTON_6 +This button is used for entering digits. + +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +.topic IDH_BUTTON_7 +This button is used for entering digits. + +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +.topic IDH_BUTTON_8 +This button is used for entering digits. + +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +.topic IDH_BUTTON_9 +This button is used for entering digits. + +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +.topic IDH_BUTTON_A +This button is used for entering hexadecimal numbers. + +Shortcut from keyboard: A + +.topic IDH_BUTTON_B +This button is used for entering hexadecimal numbers. + +Shortcut from keyboard: B + +.topic IDH_BUTTON_C +This button is used for entering hexadecimal numbers. + +Shortcut from keyboard: C + +.topic IDH_BUTTON_D +This button is used for entering hexadecimal numbers. + +Shortcut from keyboard: D + +.topic IDH_BUTTON_E +This button is used for entering hexadecimal numbers. + +Shortcut from keyboard: E + +.topic IDH_BUTTON_F +This button is used for entering hexadecimal numbers. + +Shortcut from keyboard: F + +.topic IDH_BUTTON_SIGN +It changes the sign of the number. + +Shortcut from keyboard: F9 + +.topic IDH_BUTTON_DOT +It adds the decimal point for a decimal number. + +Shortcut from keyboard: , or . + +.topic IDH_BUTTON_ADD +Addition + +Shortcut from keyboard: + + +.topic IDH_BUTTON_SUB +Subtraction + +Shortcut from keyboard: - + +.topic IDH_BUTTON_MULT +Multiplication + +Shortcut from keyboard: * + +.topic IDH_BUTTON_DIV +Division + +Shortcut from keyboard: / + +.topic IDH_BUTTON_EQU +It resolves the current calculation and all sub expressions. + +Shortcut from keyboard: = + +.topic IDH_BUTTON_MOD +Remainder of an integer division. + +Shortcut from keyboard: % + +.topic IDH_BUTTON_AND +Logical "and". + +Shortcut from keyboard: & + +.topic IDH_BUTTON_OR +Logical "or". + +Shortcut from keyboard: | + +.topic IDH_BUTTON_XOR +Logical exclusive "or". + +Shortcut from keyboard: ^ + +.topic IDH_BUTTON_LSH +Logical shift to left. + +Shortcut from keyboard: < + +.topic IDH_BUTTON_NOT +Logical bit inversion. + +Shortcut from keyboard: ~ + +.topic IDH_BUTTON_INT +It isolates the Integer or fractional part of a number. + +Shortcut from keyboard: ; + +.topic IDH_BUTTON_MC +It deletes the memory. + +Shortcut from keyboard: CTRL-L + +.topic IDH_BUTTON_MR +It recalls a previously stored number from the memory. + +Shortcut from keyboard: CTRL-R + +.topic IDH_BUTTON_MS +It stores a number into the memory and it eventually transfers the previous value to the output display. + +Shortcut from keyboard: CTRL-M + +.topic IDH_BUTTON_MP +It adds or it subtracts the value into the output display to the memory. + +Shortcut from keyboard: CTRL-P + +.topic IDH_BUTTON_PI +It loads the pi or 2*pi value into the output display. + +Shortcut from keyboard: P + +.topic IDH_BUTTON_LEFTPAR +It starts a new sub expression. + +Shortcut from keyboard: ( + +.topic IDH_BUTTON_RIGHTPAR +It closes and it resolves a sub expression. + +Shortcut from keyboard: ) + +.topic IDH_BUTTON_DMS +It converts a decimal degree to a decimal-minute-second degree and viceversa. + +Shortcut from keyboard: M + +.topic IDH_BUTTON_EXP +It enables the temporary scientific notation. + +Shortcut from keyboard: X + +.topic IDH_BUTTON_LN +It calculates the natural logarithm. Natural anti logarithm calculation is activated by Inv modifier. + +Shortcut from keyboard: N + +.topic IDH_BUTTON_LOG +It calculates the decimal logarithm. Decimal anti logarithm calculation is activated by Inv modifier. + +Shortcut from keyboard: L + +.topic IDH_BUTTON_NF +It calculates the factorial of a number. + +Shortcut from keyboard: ! + +.topic IDH_BUTTON_RX +It calculates the reciprocal of a number. + +Shortcut from keyboard: R + +.topic IDH_BUTTON_SIN +It calculates the sine, hyperbolic sine, arcsine or the hyperbolic arcsine of an angle. + +Shortcut from keyboard: S + +.topic IDH_BUTTON_COS +It calculates the cosine, hyperbolic cosine, arcsine or the hyperbolic arccosine of an angle. + +Shortcut from keyboard: O + +.topic IDH_BUTTON_TAN +It calculates the tangent, hyperbolic tangent, arcstangent or the hyperbolic arctangent of an angle. + +Shortcut from keyboard: T + +.topic IDH_BUTTON_XeY +It calculates the power of X to Y. + +With the Inv modifier, it calculates the Yth root of X. + +Shortcut from keyboard: Y + +.topic IDH_BUTTON_Xe2 +It calculates the square of X. + +With the Inv modifier, it calculates the square root of X. + +Shortcut from keyboard: @ + +.topic IDH_BUTTON_Xe3 +It calculates the cube of X. + +With the Inv modifier, it calculates the cubic root of X. + +Shortcut from keyboard: $ + +.topic IDH_BUTTON_STA +It enables the statistical window and its functions. + +Shortcut from keyboard: CTRL-S + +.topic IDH_BUTTON_AVE +It calculates the arithmetic average of the numbers stored into the statistical box. + +Shortcut from keyboard: CTRL-A + +.topic IDH_BUTTON_SUM +It calculates the sum of the numbers stored into the statistical box. + +Shortcut from keyboard: CTRL-T + +.topic IDH_BUTTON_S +It calculates the standard deviation of the numbers stores into the statistical box. + +Shortcut from keyboard: CTRL-D + +.topic IDH_BUTTON_DAT +It inserts a new number into the statistical box + +Shortcut from keyboard: Insert + +.topic IDH_BUTTON_PERCENT +It executes the calculation with percent mode. + +Shortcut from keyboard: % + +.topic IDH_BUTTON_SQRT +It calculates the square root of a number. + +Shortcut from keyboard: @ diff --git a/rosapps/roscalc/docs/Help.en/shortcuts_from_keyboard.htm b/rosapps/roscalc/docs/Help.en/shortcuts_from_keyboard.htm new file mode 100644 index 00000000000..ebd493e8cb0 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/shortcuts_from_keyboard.htm @@ -0,0 +1,232 @@ + + + +Shortcuts from Keyboard + + + + +

SHORTCUTS FROM KEYBOARD

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 F5 0
 F6 1
 F7 2
 F8 3
 F2 4
 F3 5
 F4 6
 F12 7
 F2 8
 F3 9
 F4 A
 I B
 H C
 Backspace D
 Delete E
 ESC F
 CTRL-S +
 CTRL-A -
 CTRL-T *
 CTRL-D /
 Insert %
 ( &
 ) |
 V ^
 X ~
 M <
 S ;
 O =
 TCTRL-L
 @CTRL-R
 #CTRL-M
 YCTRL-P
 N %
 L @
 !  +  ,  OR .
 R P
+ + + + diff --git a/rosapps/roscalc/docs/Help.en/statistical_functions.htm b/rosapps/roscalc/docs/Help.en/statistical_functions.htm new file mode 100644 index 00000000000..dc57480504c --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/statistical_functions.htm @@ -0,0 +1,45 @@ + + + +STATISTICAL FUNCTIONS + + + + +

STATISTICAL FUNCTIONS

+

 

+

By pressing the +button, the statistical window is enabled.

+

Statistical window allows to store groups of number and execute some common statistical +operators.

+

Into the statistical box, there are four buttons with these functions:

+

 

+

[RET]

+

It moves the focus back to the calculator.

+

[LOAD]

+

It loads the selected number into the output display of the calculator.

+

[CD]

+

It deletes the selected number from the list.

+

[CAD]

+

It deletes all numbers currently stored into the list.

+

 

+

While the statistical window is shown, four additional buttons are enabled:

+

 

+

+

It calculates the arithmetic average of the numbers stored into the list.

+

 

+

+

It calculates the sum of all numbers stored into the list.

+

 

+

+

It calculates the population standard deviations of the numbers stored into the list.

+

 

+

+

It inserts the number shown into the output display into the list.

+

 

+

Note: when the statistical box is closed, its content is lost.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/the_pi_button.htm b/rosapps/roscalc/docs/Help.en/the_pi_button.htm new file mode 100644 index 00000000000..fe9275f6c85 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/the_pi_button.htm @@ -0,0 +1,23 @@ + + + +THE PI BUTTON + + + + +

THE PI BUTTON

+

 

+

For helping the calculations with trigonometric functions, it's possible to load the value +of  p  into the output display.

+

The function is called by pressing +the button.

+

If the +modifier is activated, then the output display will be loaded with 2*p.

+

In ReactOS Calc, p +has the value 3.14159265358979323846

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/trigonometric_functions.htm b/rosapps/roscalc/docs/Help.en/trigonometric_functions.htm new file mode 100644 index 00000000000..2a67d5286a9 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/trigonometric_functions.htm @@ -0,0 +1,36 @@ + + + +TRIGONOMETRIC FUNCTIONS + + + + +

TRIGONOMETRIC FUNCTIONS

+

 

+

ReactOS Calc allows the calculation of three types of trigonometric functions with their inverse operations.

+

These functions can be used with three different angular +units of measurement: degrees, radians or gradians.

+

The angular mode does not affect the non trigonometric functions.

+

Please note that the degree type uses decimal degrees and not angles in the degree-minute-second form.

+

The available functions are:

+

 

+

+

It calculates the sine of the given angle.

+

If the +modifier is activated, it finds the angle whose sine value is shown into the output display.

+

 

+

+

It calculates the cosine of the given angle.

+

If the +modifier is activated, it finds the angle whose cosine value is shown into the output display.

+

 

+

+

It calculates the tangent of the given angle.

+

If the +modifier is activated, it finds the angle whose tangent value is shown into the output display.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.en/using_the_clipboard.htm b/rosapps/roscalc/docs/Help.en/using_the_clipboard.htm new file mode 100644 index 00000000000..d1f3ec06a93 --- /dev/null +++ b/rosapps/roscalc/docs/Help.en/using_the_clipboard.htm @@ -0,0 +1,55 @@ + + + +USING THE CLIPBOARD + + + + +

USING THE CLIPBOARD

+

You can copy the content of the output display into the clipboard.

+

You can also paste its content in the calculator.

+

The commands retrieved from the clipboard will follow the same rules +mentioned in the SHORTCUTS FROM KEYBOARD +section with the following exceptions:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

:c

+

:e

+

:m

+

:p

+

:r

+

:q

+

\

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/algebraic_functions.htm b/rosapps/roscalc/docs/Help.it/algebraic_functions.htm new file mode 100644 index 00000000000..d4c26c3c4ea --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/algebraic_functions.htm @@ -0,0 +1,66 @@ + + + +FUNZIONI ALGEBRICHE + + + + +

FUNZIONI ALGEBRICHE

+

 

+

ReactOS Calc può eseguire le più comuni funzioni algebriche.

+

 

+

+

Fornisce la parte intera del numero visualizzato sul display.

+

 

+

+

+

Fornisce la parte decimale del numero visualizzato sul display.

+

 

+

+

Funzione quadrato. Calcola il quadrato del numero visualizzato sul display.

+

 

+

+ ,

+

Funzione di radice quadrata. Ritorna la radice quadrata positiva del numero visualizzato sul display.

+

Se il numero sul visualizzatore é negativo, allora verrà visualizzato il messaggio di errore.

+

Quando l'interfaccia utente standard é attiva, il pulsante [Sqrt] é una scorciatoia per questa funzione.

+

 

+

+

Funzione cubo. Calcola il cubo del numero visualizzato sul display.

+

 

+

+

+

Funzione di radice cubica. Ritorna la radice cubica del numero visualizzato sul display.

+

 

+

+

Funzione elevamento a potenza. Calcola la potenza di X elevato a Y.

+

 

+

+

+

Funzione di radice. Calcola la Y-esima radice di X.

+

 

+

+

Reciproco. Divide 1 per il numero visualizzato sul display.

+

 

+

+

Fattoriale. Calcola il fattoriale della parte intera del numero visualizzato sul display.

+

La funzione é definita entro questi limiti:

+

0 <= n <= 170

+

 

+

+

Logaritmo naturale. Calcola il logaritmo naturale del numero attualmente visualizzato.

+

ReactOS Calc assume la costante di Nepero pari a:

+

e=2.7182818284590452354

+

La funzione é definita per x > 0.

+

 

+

+

+

Funzione esponenziale. Calcola l'elevamento a potenza della costante di Nepero per il numero corrente.

+

 

+

+

Logaritmo decimale. Calcola il logaritmo in base 10 del numero corrente.

+

La funzione é definita per x > 0.

+

 

+

+

+

Funzione esponenziale decimale. Calcola l'elevamento a potenza di 10 per il numero corrente.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/arithmetic_functions.htm b/rosapps/roscalc/docs/Help.it/arithmetic_functions.htm new file mode 100644 index 00000000000..e3068a4e0a8 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/arithmetic_functions.htm @@ -0,0 +1,49 @@ + + + +FUNZIONI ARITMETICHE + + + + +

FUNZIONI ARITMETICHE

+

 

+

ReactOS Calc segue le regole normalmente impiegate nel sistema aritmetico con i seguenti operatori:

+

 

+

+

Addizione

+

 

+

+

Sottrazione

+

 

+

+

Moltiplicazione

+

 

+

+

Divisione

+

 

+

+

Resto di una divisione

+

 

+

Tali regole esprimono il concetto di priorità tra gli operatori.

+

La lista di questa gerarchia di proprietà é la seguente, ordinata per priorità descrescente:

+
    +
  1. +

    Funzioni speciali che cambiano direttamente il numero corrente: funzioni trigonometriche, iperboliche, esponenziali e logaritmiche, reciproco, conversioni tra basi numeriche, separazione di parti intere e frazionarie e cambio di segno.

  2. +
  3. +

    Funzioni di elevamento a potenza e radici.

  4. +
  5. +

    Moltiplicazioni, divisioni e resti.

  6. +
  7. +

    Addizioni, sottrazioni.

  8. +
  9. +

    Funzioni logiche.

  10. +
+

Queste regole possono essere in qualche modo aggirate grazie allàuso delle parentesi.

+

Tramite i pulsanti e , é possibile isolare una sotto espressione matematica così da poter essere risolta separatamente. La quantità di parentesi introducibile in una singola espressione é virtualmente illimitata. +Il numero di parentesi aperte é dato dal valore visualizzato nel controllo posto al di sotto delle funzioni per il cambio di base e a fianco dei modificatori per le funzioni inverse e iperboliche.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/calc.hhc b/rosapps/roscalc/docs/Help.it/calc.hhc new file mode 100644 index 00000000000..3c156966e54 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/calc.hhc @@ -0,0 +1,82 @@ + + + + + + + + + +
    +
  • + + + +
      +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    +
  • + + + +
  • + + + +
+ diff --git a/rosapps/roscalc/docs/Help.it/calc.hhk b/rosapps/roscalc/docs/Help.it/calc.hhk new file mode 100644 index 00000000000..c0ba08a9ac4 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/calc.hhk @@ -0,0 +1,9 @@ + + + + + + +
    +
+ diff --git a/rosapps/roscalc/docs/Help.it/calc.hhp b/rosapps/roscalc/docs/Help.it/calc.hhp new file mode 100644 index 00000000000..55c1b63133c --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/calc.hhp @@ -0,0 +1,40 @@ +[OPTIONS] +Compatibility=1.1 or later +Compiled file=calc.chm +Contents file=calc.hhc +Default Window=ReactOS Calc Help Type +Default topic=general_information.htm +Display compile progress=No +Index file=calc.hhk +Language=0x410 Italiano (Italia) +Title=ReactOS Calc Help + +[WINDOWS] +ReactOS Calc Help Type="ReactOS Calc Help","calc.hhc","calc.hhk","general_information.htm",,,,,,0x2120,,0x3006,,,,,,,,0 + + +[FILES] +trigonometric_functions.htm +algebraic_functions.htm +arithmetic_functions.htm +degree_conversion.htm +display_format.htm +error_message.htm +fixed_scientific_notation.htm +general_information.htm +how_to_input_numbers.htm +hyperbolic_functions.htm +logical_functions.htm +memory_function.htm +percent.htm +statistical_functions.htm +the_pi_button.htm +shortcuts_from_keyboard.htm +using_the_clipboard.htm + +[TEXT POPUPS] +help_id.h +popups.txt + +[INFOTYPES] + diff --git a/rosapps/roscalc/docs/Help.it/degree_conversion.htm b/rosapps/roscalc/docs/Help.it/degree_conversion.htm new file mode 100644 index 00000000000..008fa92df0f --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/degree_conversion.htm @@ -0,0 +1,26 @@ + + + +CONVERSIONE TRA TIPI DI GRADI + + + + +

CONVERSIONE TRA TIPI DI GRADI

+

 

+

Con il pulsante +é possibile convertire gradi decimali in unità angolari nel formato gradi-minuti-secondi e viceversa.

+

Quando si visualizzano gli angoli nel formato d-m-s, la notazione utilizzata é "DDD.MMSS" + dove D indica i gradi, M i minuti ed S i secondi.

+

 

+

+

Converte un angolo decimale in un angolo in formato d-m-s.

+

 

+

++

+

Converte un angolo in formato d-m-s in un angolo decimale.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/display_format.htm b/rosapps/roscalc/docs/Help.it/display_format.htm new file mode 100644 index 00000000000..96b6ded8caa --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/display_format.htm @@ -0,0 +1,57 @@ + + + +TIPI DI VISUALIZZAZIONE + + + + +

TIPI DI VISUALIZZAZIONE

+

 

+

E` possibile introdurre le cifre e comporre i numeri usando i pulsanti descritti +nella sezione COME INTRODURRE I NUMERI.

+

Tali numeri posso essere immessi in quattro differenti basi numeriche:

+

 

+

+ esadecimale.

+

+decimale.

+

+ottale.

+

+sistema binario.

+

 

+

Ogni numero visualizzato sul display può essere facilmente convertito da una base numerica ad un'altra +semplicemente selezionando la nuova base desiderata.

+

 

+

Quando la modalità numerica é quella decimale, é possibile introdurre i numeri in due notazioni:

+

Modo normale: ciascun numero é immesso digitando prima la sua parte intera e, eventualmente, la relativa parte frazionaria.

+

Modo esponenziale: il numero desiderato viene introdotto digitando una mantissa e poi un esponente. +Questa tecnica consente di scrivere numeri molto grandi o molto piccoli, che probabilmente non sarebbe stato possibile rappresentare in maniera diversa.

+

E' possibile usare questa modalità solo quando la calcolatrice é configurata in modo scientifico.

+

Tuttavia, esistono dei limiti anche per i numeri introdotti con la notazione esponenziale.

+

Questi limiti sono:

+

 

+

-1.79769313486231570e+308 <= x <= -2.22507385850720140e-308

+

2.22507385850720140e-308 <= x <= 1.79769313486231570e+308

+

 

+

Questa modalità esponenziale temporanea é attivata dal pulsante

+

Dopo aver digitato la mantissa, premendo questo tasto sarà possibile immettere l'esponente.

+

Quando le librerie GNU multi-precision sono in uso, questi limiti si elevano a 64 cifre visualizzabili per la mantissa e 8 cifre per l'esponente, entrambi con segno.

+

 

+

Quando la calcolatrice si trova invece nello stato [HEX], [OCT] o [BIN], é possibile applicare una limitazione logica sulla risoluzione numerica (operazione normalmente come mascheramento).

+

Sono disponibili quattro tipi di limitazioni:

+

 

+

+Limita i numeri interi a 64 bit di risoluzione.

+

+Limita i numeri interi a 32 bit di risoluzione.

+

+Limita i numeri interi a 16 bit di risoluzione.

+

+Limita i numeri interi a 8 bit di risoluzione.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/error_message.htm b/rosapps/roscalc/docs/Help.it/error_message.htm new file mode 100644 index 00000000000..83470471044 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/error_message.htm @@ -0,0 +1,17 @@ + + + +MESSAGGIO DI ERRORE + + + + +

MESSAGGIO DI ERRORE

+

 

+

Se il risultato calcolato supera i limiti della calcolatrice oppure se viene generata una condizione indefinita (ad esempio, una divisione per zero), allora sul visualizzatore verrà stampata la scritta "Errore".

+

La condizione di errore viene rimossa usando il tasto

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/fixed_scientific_notation.htm b/rosapps/roscalc/docs/Help.it/fixed_scientific_notation.htm new file mode 100644 index 00000000000..a76a9578a9a --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/fixed_scientific_notation.htm @@ -0,0 +1,22 @@ + + + +NOTAZIONE SCIENTIFICA FISSA + + + + +

NOTAZIONE SCIENTIFICA FISSA

+

 

+

Lavorando con ReactOS Calc, é possibile selezionare la notazione scientifica temporanea +(attivata dal pulsante ) oppure la notazione scientifica fissa.

+

La notazione scientifica fissa é attivata premendo il pulsante

+

Quando la notazione scientifica fissa é attiva, tutti i risultati saranno visualizzati usando la notazione esponenziale anche per quei numeri che potrebbero essere rappresentati in modalità normale.

+

La calcolatrice sarà ripristinata in modalità normale premendo nuovamente sul pulsante + oppure premendo il pulsante +

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/general_information.htm b/rosapps/roscalc/docs/Help.it/general_information.htm new file mode 100644 index 00000000000..fad40bc574f --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/general_information.htm @@ -0,0 +1,49 @@ + + + +Introduzione + + + + +

Introduzione

+ +

 

+

ReactOS Calc é un programma per eseguire calcoli matematici, finanziari e statistici.

+

ReactOS Calc dispone di numerose funzionalità tra cui:

+
    +
  • +

    Precisione interna a 17 cifre decimali (risoluzione standard IEEE).

  • +
  • +

    Precisione interna a 512 cifre decimali e 64 cifre visualizzate su display (tramite utilizzo librerie GNU multi-precision).

  • +
  • +

    Funzioni di calcolo eseguite internamente con un'efficiente implementazione RPN (notazione polacca inversa), capace di eseguire un numero praticamente illimitato di espressioni matematiche annidate.

  • +
  • +

    Due differenti interfacce utente: standard oppure scientifica.

  • +
  • +

    Sono incluse le funzioni aritmetiche, algebriche e statistiche normalmente più usate.

  • +
+

 

+

In questa guida verranno illustrati i seguenti argomenti:

+

COME INTRODURRE I NUMERI

+

TIPI DI VISUALIZZAZIONE

+

MESSAGGIO DI ERRORE

+

FUNZIONI ARITMETICHE

+

FUNZIONI LOGICHE

+

FUNZIONI ALGEBRICHE

+

FUNZIONI TRIGONOMETRICHE

+

IL PULSANTE PI-GRECO

+

FUNZIONI IPERBOLICHE

+

FUNZIONI STATISTICHE

+

FUNZIONE DI MEMORIA

+

CONVERSIONE TRA TIPI DI GRADI

+

NOTAZIONE SCIENTIFICA FISSA

+

MODALITA' PERCENTUALE +

+ +

  +

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/help_id.h b/rosapps/roscalc/docs/Help.it/help_id.h new file mode 100644 index 00000000000..ad6f415f7d0 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/help_id.h @@ -0,0 +1,83 @@ +#define IDH_RADIO_HEX 1002 +#define IDH_RADIO_DEC 1003 +#define IDH_RADIO_OCT 1004 +#define IDH_RADIO_BIN 1005 +#define IDH_CHECK_INV 1006 +#define IDH_CHECK_HYP 1007 +#define IDH_BUTTON_STA 1009 +#define IDH_BUTTON_AVE 1010 +#define IDH_BUTTON_SUM 1011 +#define IDH_BUTTON_S 1012 +#define IDH_BUTTON_DAT 1013 +#define IDH_BUTTON_FE 1014 +#define IDH_BUTTON_DMS 1015 +#define IDH_BUTTON_SIN 1016 +#define IDH_BUTTON_COS 1017 +#define IDH_BUTTON_TAN 1018 +#define IDH_BUTTON_LEFTPAR 1019 +#define IDH_BUTTON_EXP 1020 +#define IDH_BUTTON_XeY 1021 +#define IDH_BUTTON_Xe2 1022 +#define IDH_BUTTON_Xe3 1023 +#define IDH_BUTTON_RIGHTPAR 1024 +#define IDH_BUTTON_LN 1025 +#define IDH_BUTTON_LOG 1026 +#define IDH_BUTTON_NF 1027 +#define IDH_BUTTON_RX 1028 +#define IDH_BUTTON_MC 1029 +#define IDH_BUTTON_MR 1030 +#define IDH_BUTTON_MS 1031 +#define IDH_BUTTON_MP 1032 +#define IDH_BUTTON_PI 1033 +#define IDH_BUTTON_7 1034 +#define IDH_BUTTON_4 1035 +#define IDH_BUTTON_1 1036 +#define IDH_BUTTON_0 1037 +#define IDH_BUTTON_A 1038 +#define IDH_BUTTON_8 1039 +#define IDH_BUTTON_5 1040 +#define IDH_BUTTON_2 1041 +#define IDH_BUTTON_SIGN 1042 +#define IDH_BUTTON_B 1043 +#define IDH_BUTTON_9 1044 +#define IDH_BUTTON_6 1045 +#define IDH_BUTTON_3 1046 +#define IDH_BUTTON_DOT 1047 +#define IDH_BUTTON_C 1048 +#define IDH_BUTTON_DIV 1049 +#define IDH_BUTTON_MULT 1050 +#define IDH_BUTTON_SUB 1051 +#define IDH_BUTTON_ADD 1052 +#define IDH_BUTTON_D 1053 +#define IDH_BUTTON_MOD 1054 +#define IDH_BUTTON_OR 1055 +#define IDH_BUTTON_LSH 1056 +#define IDH_BUTTON_EQU 1057 +#define IDH_BUTTON_E 1058 +#define IDH_BUTTON_AND 1059 +#define IDH_BUTTON_XOR 1060 +#define IDH_BUTTON_NOT 1061 +#define IDH_BUTTON_INT 1062 +#define IDH_BUTTON_F 1063 +#define IDH_RADIO_QWORD 1064 +#define IDH_RADIO_DWORD 1065 +#define IDH_RADIO_WORD 1066 +#define IDH_RADIO_BYTE 1067 +#define IDH_RADIO_DEG 1068 +#define IDH_RADIO_RAD 1069 +#define IDH_RADIO_GRAD 1070 +#define IDH_BUTTON_CANC 1071 +#define IDH_BUTTON_CE 1072 +#define IDH_BUTTON_BACK 1073 +#define IDH_TEXT_OUTPUT 1074 +#define IDH_TEXT_PARENT 1075 +#define IDH_TEXT_MEMORY 1076 +#define IDH_EDIT_LICENSE 1078 +#define IDH_LIST_STAT 1079 +#define IDH_BUTTON_RET 1080 +#define IDH_BUTTON_LOAD 1081 +#define IDH_BUTTON_CD 1082 +#define IDH_BUTTON_CAD 1083 +#define IDH_TEXT_NITEMS 1084 +#define IDH_BUTTON_SQRT 1085 +#define IDH_BUTTON_PERCENT 1086 diff --git a/rosapps/roscalc/docs/Help.it/how_to_input_numbers.htm b/rosapps/roscalc/docs/Help.it/how_to_input_numbers.htm new file mode 100644 index 00000000000..b405cc5571e --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/how_to_input_numbers.htm @@ -0,0 +1,84 @@ + + + +COME INTRODURRE I NUMERI + + + + +

COME INTRODURRE I NUMERI

+

 

+

ReactOS Calc rende disponibili alcuni pulsanti per digitare numeri ed espressioni.

+

Tuttavia, alcuni di essi sono disponibili solo in modalità Standard (oppure Scientifica), oppure quando la calcolatrice si trova in uno stato specifico.

+

 

+

 

+

+ +

+

+ +

+

Tasti numerici: sono usati per introdurre le cifre dei numeri visualizzati sul display.

+

 

+

+ + +

+

Tasti esadecimali: sono usati per completare un numero esadecimale.

+

Per usare questi pulsanti, la calcolatrice deve essere configurata in modalità scientifica e lo stato [HEX] deve essere selezionato.

+

 

+

+or +

+ +

+Separatore decimale: usato per delimitare la parte intera di un numero e iniziare l'immissione della sua (eventuale) parte frazionaria. +

+ +

  +

+ +

+

+ +

+Cambio di segno: se viene premuto dopo un calcolo o durante l'immissione degli operandi, il segno associato al numero visualizzato sul display commuterà da positivo a negativo e viceversa. +

+ +

  +

+ +

+

+ +

+Se il numero visualizzato é stato introdotto manualmente e non é quindi il risultato di un calcolo, +é possibile cancellare l'ultima cifra premendo questo pulsante. +

+ +

  +

+ +

+

+ +

+Questo pulsante rimuove un numero errato dal display. Tutte le operazioni pendenti sono preservate. +

+ +

  +

+ +

+

+ +

+Cancella il visualizzatore e rimuove tutte le operazioni pendenti. +

+ +

  +

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/hyperbolic_functions.htm b/rosapps/roscalc/docs/Help.it/hyperbolic_functions.htm new file mode 100644 index 00000000000..c505c38f67f --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/hyperbolic_functions.htm @@ -0,0 +1,31 @@ + + + +FUNZIONI IPERBOLICHE + + + + +

FUNZIONI IPERBOLICHE

+

 

+

ReactOS Calc permette il calcolo di tre tipi di funzioni iperboliche e delle relative funzioni inverse.

+

Queste funzioni sono attivate dagli stessi pulsanti usati per le funzioni trgonometriche; la +modalità iperbolica viene selezionata tramite il modificatore

+

Le funzioni inverse sono attivate dal modificatore

+

 

+

++

+

Seno iperbolico

+

 

+

++

+

Coseno iperbolico

+

 

+

++

+

Tangente iperbolica

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/images/0.PNG b/rosapps/roscalc/docs/Help.it/images/0.PNG new file mode 100644 index 0000000000000000000000000000000000000000..1f23a706533bbcb2b8b2c874ac9de3b4c8687407 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=k*AAe zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epg3EYBo3 zlFVdQ&MBb@07h&--T(jq literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/1.PNG b/rosapps/roscalc/docs/Help.it/images/1.PNG new file mode 100644 index 0000000000000000000000000000000000000000..a6102442963e675916af4321996c76236887e494 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=p{I*u zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1eqTRENN1c zWE|7xFs^M>sET0Qn0&=3LenE{PA{8smZ?!m)5Ik{Y#}}q&%5a^_Og@aJ;uoAmY}wP inaMQh;Z#Lg35G@I*%FRi{5A<_IfJLGpUXO@geCwm%sT}D literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/1_x.PNG b/rosapps/roscalc/docs/Help.it/images/1_x.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0076342b3a41c03d9c8c52026119da49933b8d53 GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~W6i*k& z5D)LphMPoAwBvoTKxuUm}W;`yl=3%j&~9>y&>k^W^f&t)~6 zP7Wp4edjasBwL?yWZFq@<#GRXKV7`%+VG09hYu-1Zz5IV$<_ zrsSfcD@H-iJga{JO*wUtqsP`tAwXGlr^NzOX@=)gzXkhc-`oW{h{4m<&t;ucLK6UM CF-r3Q literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/3.PNG b/rosapps/roscalc/docs/Help.it/images/3.PNG new file mode 100644 index 0000000000000000000000000000000000000000..fef0aa6660b8d65573067e6c601089729cce64cd GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=g{O;S zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epg3EYBo3 zlSda)I8UgZ*a-l^pgI3!TA#>h6X9l7tH^-BK1hSsNB@W r2R)u9u&`;!3apsOrO)@`00V>fz2Ab(#k2H*ZeZ|q^>bP0l+XkKQ5!=J literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/4.PNG b/rosapps/roscalc/docs/Help.it/images/4.PNG new file mode 100644 index 0000000000000000000000000000000000000000..da7584ae64f8d8874da64835141b5bacf8fee32f GIT binary patch literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=qo<2w zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1R0To9B0gr z>~3CU!FDj@ zE%3AlmtIVld-KFo2RV2GtP}#2Mc1xbtSQdm_Waw#nMx%`fR17CboFyt=akR{0JtDW A5&!@I literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/5.PNG b/rosapps/roscalc/docs/Help.it/images/5.PNG new file mode 100644 index 0000000000000000000000000000000000000000..df08b33c47062f18248cebfe1858ab153ae203e0 GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL4-DPZ!4! z5AWnZpWpK{$1<>Uvol}VWc~f!1*xqjTQ?YNbkMafdcom)aYbqf=e>&wGA9yP(!^6- zmIR;ZF<#*764kIKrz3)m-|f*}57zmD@=H>p+TP55m@2s`|HVV&U#bF+f)zwR-CU8n z;w_KX6XQqCC0C3d9p>uyaxq|vEOA)irWJM8J6Mn5!o5#|vb*`u0$s%5>FVdQ&MBb@ E08eX5VgLXD literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/6.PNG b/rosapps/roscalc/docs/Help.it/images/6.PNG new file mode 100644 index 0000000000000000000000000000000000000000..bad59333f7c215cc14ed3c9ee7247f10c94ce710 GIT binary patch literal 195 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=m8Xki zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epg3EYBo3 zl**J-jH@Edm>%`4<7|00jZv8O@1vd{A{}ccovAU)lFYJBHjy~# sEts*3O+%vb+9k$Dsg)ldHSqB;I5>Y2JX_(F3Umd7r>mdKI;Vst0LsWi%>V!Z literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/7.PNG b/rosapps/roscalc/docs/Help.it/images/7.PNG new file mode 100644 index 0000000000000000000000000000000000000000..7c70ad8d0cbe187c3b831d09932c75fd75e70518 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=ou`Xq zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1ep^FENS8? zE=z(}2&6kizf6(*XvQe(vhw_kbV*OMz*okQ-P;F wxb$MW+?yw!I>^BjV5JbCEV}mDQcZD&)Fq4$_VV5q1iFO5)78&qol`;+0DjR#8~^|S literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/8.PNG b/rosapps/roscalc/docs/Help.it/images/8.PNG new file mode 100644 index 0000000000000000000000000000000000000000..f72b96b96f4f3a9db6a8343cea85629cf57262ae GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=nWu|m zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epg3EYBo3 zlWa5L7ZX(UT^GER oT9CjJ<;~8Lwd7DYvy}nEa+miPlkO*50$sr1>FVdQ&MBb@07>sa^Z)<= literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/9.PNG b/rosapps/roscalc/docs/Help.it/images/9.PNG new file mode 100644 index 0000000000000000000000000000000000000000..c314b778cbedb3c07662052af2cc671437db1988 GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=ji-xa zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epg3EYBo3 zlY{$W$kx|MUvol}VWc~f!1*xqjTQ?YNbkMafdcom)aYbqf=e>&wG7l11o=F77 zI@Ha%c;2YPcgZdHW#?a{OKxiS_#|U#w|IN1!|w+jKTJF~oi{k#`(uL4ooRyd88fsz zzujDsdLv3=@j(yIT@9~g7bLJmd9$-*Em4|Yx+RU7AztQ7;4ZdRu|O9wc)I$ztaD0e F0swi&O$Gn} literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/And.PNG b/rosapps/roscalc/docs/Help.it/images/And.PNG new file mode 100644 index 0000000000000000000000000000000000000000..c95fe1554268c53e8c2c1cfb70b4451c32871b7e GIT binary patch literal 249 zcmV4wn;vi+*A3i~Jrhu1$aYJ7A7icY3hQnx){yNK);TIXH z% z8uA!zRD}7>_YS*QJ?jhRR@XHI_KRN8I8CTP z=jIdZuL8jzVc9BftI`|`mi^!^A&gvC0)_|hYW1-`rLp}6OT5+vA?5H3=$Y})A}a+( tD&iD~Mvf)2=GGXq0dfAM!mnTN`~Z%IxzW%1p;rI^002ovPDHLkV1lc>WVZkS literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/B.PNG b/rosapps/roscalc/docs/Help.it/images/B.PNG new file mode 100644 index 0000000000000000000000000000000000000000..1dacc395ea8adbc812eb452dcc781c35c64b115b GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=iKmNW zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epy9EYCzO zluimhIU;#MZHMfMoF=jUs5Tjw#f5EwYxrAPoc7na8Q4Dza_}?gi*lQK#X_p5SyiHO lW&^<+J`w-` literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/Bin.PNG b/rosapps/roscalc/docs/Help.it/images/Bin.PNG new file mode 100644 index 0000000000000000000000000000000000000000..6fbd58d1551f0baf6a9da2d870d4c768d7c1e337 GIT binary patch literal 280 zcmV+z0q6dSP)Jc@pCP_P0B4#&&7B=~%>812jl@vd-bL@kwzY$f;r%6%TUn|>_8(?Y`!X9l7h-?jdiw(rvrpQ*2ygyA$jjLGuBM;u e|EB3@)9(j^(~4M@ZRRup0000PcCHdSiJA_W7OV;kWDF7$P5-ew~idUeT-yurKP3UZ>vU;j< zhbRf|>-*SnU;g5E)>rL@IJavZ=pHPNWP63TM?HFkyM9hEBfAH1sXrmBM{tN5z|EO{pbcZ>~sf@8j8Ou{bx2Wf{k>r^b&a%g^#EdX#g;sK@PC whQXw{8WT+U0t}eeE@fsi4Vvi961ACe{@x!K-`)s33v>vBr>mdKI;Vst022;J`v3p{ literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/CC.PNG b/rosapps/roscalc/docs/Help.it/images/CC.PNG new file mode 100644 index 0000000000000000000000000000000000000000..e02082b925dc150552693f6c1afe9c0a5d686008 GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^Hb5-H!2~2X8F>o>DVB6cUq=Rpjs4tz5?O)#nVv3= zArbD$e?GtGKRkg+Mn{In!TtWu^7Iu8rY#c_QxjXUxL?M~Naezc#V*O=03O24Rcro?z72U@#rU<&r_THPnC~?-Z*o1zosx86>HP(y=uGqE+WNcvD`AteI ahaqx#^K324nI1q#GI+ZBxvXo>DVB6cUq=Rpjs4tz5?O)#MV>B> zArbD$e?GtGKRkg+Mn{In!TtWu^7Iu8rY#c_QxjXUxL?M~Naezc#VIRP?QU(Pt&Kb;jXYLI%N> zt&H}wYzm(2RGcQ*?)K79<#Z-jvBbn%E9VGyZkg(oy0}j+cUGU7@5`xdZTTL|rza}5 jI5eAP%bP0l+XkKIDS?R literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/D.PNG b/rosapps/roscalc/docs/Help.it/images/D.PNG new file mode 100644 index 0000000000000000000000000000000000000000..421923d13e315cc21319042804689266aa02782a GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=i>HfY zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1epy9EYCzO zluimhIU;#MZHMfMoF=j0EXfN@kKRge<*~H8a42^MoASqdOl`a~Ia}&}_9WCDTG}8p zzc;Gw;t2^}w@t#Vn~pJZxh>dQ;;_I?tLUkBwi$!@r?(T&#q4VdVeHh>x=4JXnCb!zfWciS9Eb zeG-TLZQn9JvYb_s==%^}h|3c_lOoaF$ElYAW3VJ=rms7dnCGHP0hRuuqj6wTrxGCB%b@^h-BqGCF91PsJ4qIBzlcE v39~L;YIjpi`4P{FMa)d5K^L{+XB9CncK;-J@|H&i&>;+-u6{1-oD!M0bBx{Nl+IvxzX!Jv_yUyCzBZuvEH$xWkeOk43{} z_ytdANc7D3=)ao9$wy6DOmN>DqWGz{A^{B~HCI&T? Wbra8ddq)AC$l&Sf=d#Wzp$Pz2v`M4@ literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/F-E.PNG b/rosapps/roscalc/docs/Help.it/images/F-E.PNG new file mode 100644 index 0000000000000000000000000000000000000000..3b741c16183c38e8ad0e827a06281fa389ee4dde GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=v!{z= zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6TgeBPqOrP0} zoVH2#i_8-4>@{A{xx=R2J?o0m7J&nzi4Lh1OIC>W2v{pj6Py|5F3j<7iGRu#LFpcs zV_bEqi>LLnDc@7O?BSu{V1J3RQEFwzR$bqn425zhCw8n`aR}%f22WQ%mvv4FO#pZH BMMMAq literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/F.PNG b/rosapps/roscalc/docs/Help.it/images/F.PNG new file mode 100644 index 0000000000000000000000000000000000000000..8209f89f886e83882a8464a2cb8d985b0aaa7ffd GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=iKmNW zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1ep^FENS8? zE=z(>^cXMjb%|FG1|1oQRU;Mui5PovKb)`2`3=%XN4Sh{lvD&{egH!MYyjT90Nuv%<6 zt26MwgLEq9K^Xo1dOlJ-luB)8ZR3AEn|o zZOi(|6(W(eGVNxzY$t4~R6>uDsj=4wCC!j8dVlmT>t>2!Y?=8GI>d8^9l}?g!ibPc zP?$gVGwM@2={Ah7p2{2My5!M=XW#$Nhdx7}CGT;om=D=IH0_Dz?l1rV002ovPDHLk FV1oTGo#Frh literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/Hex.PNG b/rosapps/roscalc/docs/Help.it/images/Hex.PNG new file mode 100644 index 0000000000000000000000000000000000000000..e5ca3b44ab48bce1183e457f7336b6d19fa469be GIT binary patch literal 280 zcmV+z0q6dSP)O)L%*Lns!v`HGp8kIGNf_Y| zl>^X$rq=!IP(Z_A=GF5>a@h12x2IcyMOI(Y5B@dwha`~t1-8Tdv_F3zn2Ql{!Kz={ e|4r2|O}_)IhkqCg2CLKn0000>xqQyYw{0EI)7`rHn_I1v2)ow1c z3E2QeNNqwmK64gIA{A0q(WkDKd)y>X166=S9jZ|Fw!fl4vs~p+fSyXl4jWZWsIpMP zxq?|4sET(AcW4S@*M=Fy!j7F{6i*Q6X&6c}whM*4;i>p&9P^8M=jEJh5Np{NTNq;H z>YcVsp~AQeR4FWDda7}HQfp#^DvPg+vixu4L0-wV?%Vx8jZ=Ezq( z^WBf@+zXRMYF{1Oar|$W(2=ZQXU;Ddv`SKTMHHkij))8o3i`;Fr|6q2#TE5!g-f6i zNn{1`6_P!Id>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4Nzi< zr;B5VhxglQv0M!b0xjA$l@*&lNL=z%xfQ{&wY2w7rhHE&_m}LnnAvC3)D-y_a9mVr zdCZl*Kw#~JS6y+XVeblhjd)`i`L=4fm2Hm=OxQdnNW&pMPxRp_2hQhQWlN8U`f%ND zoA~qQN6Rq27n~o}Pu;zLVn)u^*SnRZRI_|u-S}ScRGEv%FmCQL-Qu3V;ZK{V#yGw@ nd*?-Qyq2 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/Inv2.PNG b/rosapps/roscalc/docs/Help.it/images/Inv2.PNG new file mode 100644 index 0000000000000000000000000000000000000000..d0c8f901cf9892a57c27972b5dabd68299792055 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^dO$45!2~3AzjI0eDVB6cUq=Rpjs4tz5?O)#eoq(2 z5D)KUo1zyShZPtdmh%W5X?W8&ZJAipi}U;KO^U2`1xL(?_^`nG`@0KQH62bDD8~3P z?wa>$!66~7#eSAfPXii{h^TCJT*PDf?!$5AuXCH8bu^Z6+5CM}D16Pt?{9$Q6+cIB z!yTJ!ZJkp@&(TyCoTTjUvqlG z+r?{BXB_OfIz8nVkI>JIPNuV79T%q@lMLl6Qm!)*rBS5uShXw$U27 zMN`jrZ0xaGIkE0%&pOo;D^e?@#g0rLPd#$OH_E`t$3^YoM;G_uEcL5L>nQsLfkmHgu1IZ(5?y@IW2%Xf!$FQM)A%^9c(|@E$UMc$U@&i$;Pb$= RNkG>zc)I$ztaD0e0stVtN)Z46 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/MS.PNG b/rosapps/roscalc/docs/Help.it/images/MS.PNG new file mode 100644 index 0000000000000000000000000000000000000000..dbdef2514c2595dd59a6bae394732e71322b6ba4 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~WL{AsT z5D)LR z64Y&DJ7zR%iQBKI#=E8|ES~l-H$q_c7x(5u12$!YZ!a1gdP6Egz1i6q{1|s$oI70$ Q=tu?zPgg&ebxsLQ0ODFsb^rhX literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/Mod.PNG b/rosapps/roscalc/docs/Help.it/images/Mod.PNG new file mode 100644 index 0000000000000000000000000000000000000000..d1c5c07380f148d03e190d522ae01d6306fa3e41 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~Wd`}n0 z5D)LMx4)`lz4o(e8uEeHlH_2 znSO|wSNF??U!uATg`OH$MYEMFUwhJ^(>*h*qt|$qh|Jt?kjJV3aH%+H)j5`j3{o?qV;GKDNgJd~OMEE;2Sst^Cl` cz{kUoe|589@w;RJphFovUHx3vIVCg!0EDVff&c&j literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/Oct.PNG b/rosapps/roscalc/docs/Help.it/images/Oct.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0bf5d892cdb4ccbd980ab7f5b0276d4ee7f4a0e5 GIT binary patch literal 282 zcmV+#0pzaz(6HqiA0*6x;*8w*re^Ez9F@EvmBM{t2g_TzrfH5$)BNm|kEtyPULoAGc-q9MqX}ozO*q|}Uh?i|x+HXB zMXJRt@x=!{5-&Am$S+7>iSlM=$y%Z`oqJ0fGecU=-HR^b>~TQnFnGH9xvXmL*Sf=S@&0@Ml4P@kw|>{JA+B`0gF>s5R29HMHY**3r({mLqFXV;B-sawS<|; fG^lY#9tXqc{cH&vzQ-{Gt!40Z^>bP0l+XkKOq@ya literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/Qword.PNG b/rosapps/roscalc/docs/Help.it/images/Qword.PNG new file mode 100644 index 0000000000000000000000000000000000000000..59e9d8dbd0c24418ab7bac773b49c1ae8ee9fe54 GIT binary patch literal 311 zcmV-70m%M|P)JNhf9lhAob-)x=XrFV)eGT<^Hgr z&Xj}y;g)2I5^&#gQy@$7Gv_iZUOjF?WJ(xDvJFA)ds+r4V&z2YO|j5D7#BG>UCip= zP7dlUBKVn4fpd?Ec-fu)z+7}Ze?J)oV002ov JPDHLkV1kH6hfx3k literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/Radians.PNG b/rosapps/roscalc/docs/Help.it/images/Radians.PNG new file mode 100644 index 0000000000000000000000000000000000000000..58b5562a150ec2880c91f63dc1e48fcf158bea81 GIT binary patch literal 339 zcmV-Z0j&OsP))BS6|NuYK=U4 l@U;DYKKvQ}MCSNgH7}oDLaA=B(>nkF002ovPDHLkV1lA)k;DK1 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/Sta.PNG b/rosapps/roscalc/docs/Help.it/images/Sta.PNG new file mode 100644 index 0000000000000000000000000000000000000000..a5fa9c05cc5f7228dac79bd7d2ac3f710bde3f2c GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6k~CayA#8@b22Z19F}xPUq=Rp zjs4tz5?O(Kg=CK)Uj~LMH3o);76yi2K%s^g3=E|P3=FRl7#OT(FffQ0%-I!a1C&_c z>EamT;r(`6JXeDPPrGi-hdU2X9!mC5pO}%@vE;>+T>oQoE*<^%=Ql?0Xcqd}W5$*6 z@6(-R{?+Aw58inhk$%wQO{|&MZ4Parbg7=RI_XP3YgDjJo8o!6Xlm@_ji(%ZXGVrb zI=^FBQ}SLsWxJ!vhOF9Cmy#0Snh70VHS_4{6$+Ieb0mKU`7?i#-#Ak@;FVdQ&MBb@0JQyVF#rGn literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/Sum.PNG b/rosapps/roscalc/docs/Help.it/images/Sum.PNG new file mode 100644 index 0000000000000000000000000000000000000000..6668d1871eb407b0fae8fae45071c10ebcd568dc GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~WY)==* z5D)LS(*n5~6nNTnYd+k0c=AxPhx){fM4m+DjW6X6-Dp<$vGsg>p=Y|0*8I)q7-)n?{S-#GOShaVRq)u xCsOaj4+Rgn;<+kV!jG0~ddL2!Hoar@egZ{(0;cg*jnV)B002ovPDHLkV1nT6ig^G4 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/Xor.PNG b/rosapps/roscalc/docs/Help.it/images/Xor.PNG new file mode 100644 index 0000000000000000000000000000000000000000..a4a8eac4a152236288508e3a9bebe48790aefe49 GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~W3Qrfu z5D)LS(*n5~6nGqT|9rUf@Z_On5A}%|8z%%@mfTq<_IriIzMsz)X})pX7~>|*YOw$3 z#YFMd>9q&%ylQJZV0Tel>Zi$}0+kJac$Z2AosUQi_&WD{Ui1cz%=8r;lAN4!hDm-) zr|?Bg6p0SiQO!(Y*NN9Fk2d#d6|FX7`BowonRw&qlZFtszEu;AHlLMgG!+dLa#21S oWc*ycw;{FTv$|;=heRHqgviN>^QY{71avclr>mdKI;Vst0P#~;*8l(j literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/add.PNG b/rosapps/roscalc/docs/Help.it/images/add.PNG new file mode 100644 index 0000000000000000000000000000000000000000..e7e72c3d739de1a1fdb518b7e22a6a47a3510657 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=iKmNW zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1Q}kpJ(i^} zR0I-kItRrBJu$Y5WZS|fDfn{#!Ux73;V(pbT-u~(8Fe*H4AFMiRW?1cVU;}Zv4t`{ m2W~88W-<-B$Q3rLi1Fr8t_M0DqG>?;89ZJ6T-G@yGywpRoGWb9d)l6yth-{ra~J2X>Gj+yzoUBjvR%i+ uZ{NF*n^Fb-&X~54GwG|msjhN{{K;vKe_ReH zw9N2Z&f+xn5pxDd;6aNl$%SD@GYo=MdwBv3nAR?3W-<+W$jTxs!LVTBIYAXm6>Xr? O7(8A5T-G@yGywnsY)6j( literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/degrees.PNG b/rosapps/roscalc/docs/Help.it/images/degrees.PNG new file mode 100644 index 0000000000000000000000000000000000000000..04a6a43c4a5666d678ab382947fab4cb41f505c2 GIT binary patch literal 319 zcmV-F0l@x=P))Bw~T01kcm> zBX09^o_bou)6+Bc1oO?c!E@;Ryo^5&SSQL!!yg8@!{VJ&P-z|^Szs|5ZKRNJfYoBt zU7mrp7tQlF55n;K=lx3YC@HndYR~7fe|XrOEleJ1r=XqJ6<#0@Cn3j^gp}|qMZKsz zd6Z~V;>&GSE(32830(mHW3h9r2kOEWPES!g=vwB&wW4B0XwW?;Mc+jY(JQPg2 z8Dj`rrcq+$l;oTG=?a`bA{za1nRIPF;xm=oXf25{c#i#lKKvQ}l+>};nHBIBo;fza Ro6`UQ002ovPDHLkV1nOvi~s-t literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/divide.PNG b/rosapps/roscalc/docs/Help.it/images/divide.PNG new file mode 100644 index 0000000000000000000000000000000000000000..45da53b30f61dda1aa8030c36142fc17220c0143 GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=rKgKy zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1R0To9B0gr z>~6kfA-!zc#3#B58NnhwUpDuI%+~lM`Bz8zu-d0uxA4;)=TDr_()8+G5@nesxl*w$ r^lyeikflT;qZd0%))FSey8;ZVXSp7{J2O=g=m-W+S3j3^P6zopr0C3wodjJ3c literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/equ.PNG b/rosapps/roscalc/docs/Help.it/images/equ.PNG new file mode 100644 index 0000000000000000000000000000000000000000..8a2e2b312455b48c57658bc7c4b025ad934ad1c2 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=rl*Tz zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1Q}kpJ(i^= zjSEx-5(L|OI(+P$6(!o&pYP~VF-dh+Jm*&17FE@IOtMllsX(PR;mt+HMyZtPyiwAF6fG%P1boFyt=akR{05_LG%K!iX literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/log.PNG b/rosapps/roscalc/docs/Help.it/images/log.PNG new file mode 100644 index 0000000000000000000000000000000000000000..efb691343b9ac24ce9f2b0bd0a7cff4dcf9418cf GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=r>Bc! zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6TgeBz$Oq)4c z!zKx&D<3dgAg;(Ex2iz!&pvfaiHmO-ZnbMRX=l0XHnWSzHVYF3yh6YD^FCmUdv%9so5hKQ7TmdbQFW9tDnm{ Hr-UW|)vQM8 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/mult.PNG b/rosapps/roscalc/docs/Help.it/images/mult.PNG new file mode 100644 index 0000000000000000000000000000000000000000..81bcc8e320c0cf3b99c54be3aee84e5ce8a5ced3 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=si%u$ zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1R2kR9B1Y^ zym#_Y5_IKkQJLMqr*z+_>UYnH3(eZf_tTf$atSo(i)x!<==Qj$=SjoLR1*pJX2JZ@ mW)B4iFtKbP$85tDnm{r-UW| DEVf3% literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/perc.PNG b/rosapps/roscalc/docs/Help.it/images/perc.PNG new file mode 100644 index 0000000000000000000000000000000000000000..2da9e91bdd066f669f5fe03c8f7db3380cffa6bf GIT binary patch literal 279 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6k~CayA#8@b22Z19F}xPUq=Rp zjs4tz5?O(Kg=CK)Uj~LMH3o);76yi2K%s^g3=E|P3=FRl7#OT(FffQ0%-I!a1C*HR z>EamT;hp^F^Lu{gSO#`(cIFG4tiQjzAhp$G>js034!YJwFF1TJu1F2xymv7{=0pNZ znz(|}Rn{j*B=1Q1u+_ajxsfMBY18?R?@BYL9jtZO(nXNpFCmKriq^NVH^fHU|IAp(UaOe&3`0FCi!jP5m VC9uL#!UgC+22WQ%mvv4FO#sZ|Tq^(o literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/pi.PNG b/rosapps/roscalc/docs/Help.it/images/pi.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0666df59ae3f0c92076a339068aefb4794d7457d GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=t*47) zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1R0lu9A|8g z>_{^?H^G@xBBOvsaCxGEk~D8(f0UcsO8@r>GBa45eB#~}r5-4cQpGBcS5P0Z$v+RPZ-`s`xN$4TBmhcI}$`njxgN@xNAkU>GX literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/s.PNG b/rosapps/roscalc/docs/Help.it/images/s.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0448704dee4c4dfc545cd9e5415b0a18846b5852 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5|=t*47) zh=+IbpU?04nPVB)x!IX7Y_k6T?t;`-ldT&JHah597ro%{y|^MZg!A6T1Q}kpJ(i^% zDgp@ynO#(ls?M})j&`0@n-azLMZoi#15-oI=@T3JeNM9}NOj(}azpG}F;J{Do!WJ*GC}lLtN2Pd8jsQ1<9@*e0#it-dtimGPs)6D}pFoK!2)apqIq z73JpR<`(8$G-qPg!4;`fS|q~uE-rMNs^H3^Ji(QnC2Pqd(M={#nHbKm`6T$OZ(=FX OX$+pOelF{r5}E+k7EHSU literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/sin.PNG b/rosapps/roscalc/docs/Help.it/images/sin.PNG new file mode 100644 index 0000000000000000000000000000000000000000..f492ba4074a09d021bb972c979f8d5a5fb462a84 GIT binary patch literal 222 zcmV<403rX0P)9p*>jCKUIzB0k+REcEF$GAEamT;r(`6AXkF|Pn&klhdU2X9!mC5pLoKc?a8Iib5#c41g6yenICO(`>=$A_x-G@An_Z9H&b?R{Ar^_J(8 z54z>sF+M8}SLMEX(9KYy_R9r7FShI(i7RZ6rM#GPlvjv*#ifpIcBw!99NJ|3Th49f vm$Z{?Ydo9(#4VO?;w$~Tq-{R)yWhe$SFQ=HpE_+3(A5l{u6{1-oD!MfZ;Ly?v6AAa`!Yw&_%GbP0l+XkK|57=9 literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/tan.PNG b/rosapps/roscalc/docs/Help.it/images/tan.PNG new file mode 100644 index 0000000000000000000000000000000000000000..81b2bd005bdc4e710d5735336fe76c7c1765bdb6 GIT binary patch literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~W1Wy;o z5D)LNiH+}!Q3Eo`hi_@G~0Kssk+W)c@Yt8{v02+ zF!&43s9S2%7%=Z-gPOo>2RGfrw>L=e9$Prap<$ytJ4@CQrRi(8q%kvm-E=%KNHk%HXz4hOwlQYmMxVa#NRvIR z=<+G41i;L0TGzU)a+WttZ@Os>7>nMaG1Ul{xYjLEqa%ep7`w{sfC7scDfNv3NZ z5D)L;67A7f%|kIx6Yd{2ty%K1Fnd^X#X7F_Nb6Mw<&;$TUGg>?V literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/images/xey.PNG b/rosapps/roscalc/docs/Help.it/images/xey.PNG new file mode 100644 index 0000000000000000000000000000000000000000..3f7b5467dadc150b1647f01630639391c7249a3e GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^DnKm5!2~4Ryu0{;6id3JuOkD)#(wTUiL5~WY)==* z5D)LS(=Ku~DDb%I)_mA~SfAV8`Ik_q828JCccxf2O|j)W_wKH&#Zp_zsn6FKGjvD4 ziLLuswoP1T&BAQn86A5MA9I&hJRbUO+wG1eT5-y6&OP`nl^FW&X_}r+|NmvpISfzK z6KAv@s#2M{@{mRI^rhbKdWwthG!$&|lbgfSVDie|pfedfUHx3vIVCg!02q&1zyJUM literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/docs/Help.it/logical_functions.htm b/rosapps/roscalc/docs/Help.it/logical_functions.htm new file mode 100644 index 00000000000..cc200b50024 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/logical_functions.htm @@ -0,0 +1,31 @@ + + + +FUNZIONI LOGICHE + + + + +

FUNZIONI LOGICHE

+

 

+

E' possibile eseguire alcune funzioni logiche utilizzabili tra due operandi.

+

Sono utilizzabili in maniera similare ai normali operatori aritmetici.

+

L'unica eccezione é rappresentata dall'operatore "Not" che agisce su un singolo operando.

+

Le funzioni disponibili sono:

+

 

+

+

Esegue un "and" logico tra due operandi.

+

 

+

+

Esegue un "or" logico tra due operandi.

+

 

+

+

Esegue un "or esclusivo" tra due operandi.

+

 

+

+

Inverte tutti i bit del numero visualizzato sul display.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/memory_function.htm b/rosapps/roscalc/docs/Help.it/memory_function.htm new file mode 100644 index 00000000000..9f6702f4307 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/memory_function.htm @@ -0,0 +1,42 @@ + + + +FUNZIONE DI MEMORIA + + + + +

FUNZIONE DI MEMORIA

+

 

+

ReactOS Calc rende disponibile una regione di memoria in cui é possibile memorizzare dati.

+

Grazie a questa funzionalità, l'utente può memorizzare i numeri usati più di frequente (solitamente, questi numeri sono +costanti oppure risultati intermedi) e richiamarli successivamente in qualsiasi istante, senza bisogno di ridigitarli manualmente.

+

Se la funzione di memoria é in uso, il testo "M" sarà visualizzato nel controllo posto al di sopra dei pulsanti con le funzoni di memoria.

+

La memoria é mantenuta durante la commutazione tra interfaccia Standard e Scientifica, tuttavia viene perduta quando l'applicazione ReactOS Calc viene chiusa.

+

Quattro tasti sono resi disponibili con la funzione di memoria.

+

 

+

+

Memory Clear: cancella il contenuto della memoria.

+

 

+

+

Memory Recall: legge il valore memorizzato nella memoria e lo visualizza sul display, senza modificare il contenuto attuale della memoria stessa.

+

 

+

+

Memory Store: salva nella memoria il valore visualizzato. Il contenuto del display viene lasciato inalterato. +A seguito di questa funzione, il precedente contenuto della memoria viene perduto.

+

Se il modificatore +é attivo, allora il valore attualmente in memoria verrà scambiato con quello visualizzato sul display. +In questo caso, il valore visualizzato viene salvato in memoria mentre quello precedentemente memorizzato viene visualizzato sul display.

+

Se la memoria non contiene alcun valore, ciò che viene eseguito é una semplice memorizzazione del valore visualizzato.

+

 

+

+

Memory Sum: il valore visualizzato viene algebricamente sommato al valore attualmente in memoria. +Il contenuto del display viene lasciato inalterato dopo questa addizione.

+

Se il modificatore +é attivato, allora il valore visualizzato sarà algebricamente sottratto alla memoria. +Se la memoria non contiene alcun valore, entrambe le condizioni eseguiranno una semplice memorizzazione del valore visualizzato.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/percent.htm b/rosapps/roscalc/docs/Help.it/percent.htm new file mode 100644 index 00000000000..89ae3f35c6f --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/percent.htm @@ -0,0 +1,34 @@ + + + +MODALITA' PERCENTUALE + + + + +

MODALITA' PERCENTUALE

+

 

+

Il pulsante +é disponibile solo in modalità Standard ed é utilizzabile come modificatore per le quattro operazioni di base dell'aritmetica.

+

La procedura da seguire per eseguire un calcolo percentuale é:

+

 

+

"operando1" "operatore" "operando2" "percentuale"

+

 

+

Le varianti applicate dal pulsante di percentuale agli operatori aritmetici sono:

+

 

+

+

Aggiunge "operando2"-% di "operando1" a "operando1".

+

 

+

+

Sottrae "operando2"-% di "operando1" da "operando1".

+

 

+

+

Moltiplica "operando2"-% di "operando1" con "operando1".

+

 

+

+

Divide "operando1" per "operando2"-% di "operando1".

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/popups.txt b/rosapps/roscalc/docs/Help.it/popups.txt new file mode 100644 index 00000000000..0cf12ca78e6 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/popups.txt @@ -0,0 +1,410 @@ +.topic IDH_TEXT_OUTPUT +Display (Visualizzatore) + +In questo controllo sono visualizzati i numeri digitati e i risultati dei calcoli. + +.topic IDH_RADIO_HEX +Hex + +Seleziona e converte il numero visualizzato in base esadecimale. + +Comando da tastiera: F5 + +.topic IDH_RADIO_DEC +Dec + +Seleziona e converte il numero visualizzato in base decimale. + +Comando da tastiera: F6 + +.topic IDH_RADIO_OCT +Oct + +Seleziona e converte il numero visualizzato in base ottale. + +Comando da tastiera: F7 + +.topic IDH_RADIO_BIN +Bin + +Seleziona e converte il numero visualizzato in base binaria. + +Comando da tastiera: F8 + +.topic IDH_RADIO_DEG +Gradi + +Interpreta gli angoli passati alle funzioni trigonometriche come gradi decimali. + +Comando da tastiera: F2 + +.topic IDH_RADIO_RAD +Radianti + +Interpreta gli angoli passati alle funzioni trigonometriche come gradi radianti. + +Comando da tastiera: F3 + +.topic IDH_RADIO_GRAD +Gradienti + +Interpreta gli angoli passati alle funzioni trigonometriche come gradi centesimali. + +Comando da tastiera: F4 + +.topic IDH_RADIO_QWORD +Qword + +Limita la dimensione di un numero intero a 64 bit. + +Comando da tastiera: F12 + +.topic IDH_RADIO_DWORD +Dword + +Limita la dimensione di un numero intero a 32 bit. + +Comando da tastiera: F2 + +.topic IDH_RADIO_WORD +Word + +Limita la dimensione di un numero intero a 16 bit. + +Comando da tastiera: F3 + +.topic IDH_RADIO_BYTE +Byte + +Limita la dimensione di un numero intero a 8 bit. + +Comando da tastiera: F4 + +.topic IDH_CHECK_INV +Inv + +Attiva la funzione inversa per i pulsanti [sin] [cos] [tan] [pi] [x^y] [x^2] [x^3] [ln] [log] [dms] [MS] [M+] [Int]. + +Comando da tastiera: I + +.topic IDH_CHECK_HYP +Hyp + +Attiva la modalità iperbolica per i pulsanti [sin] [cos] [tan] + +Comando da tastiera: H + +.topic IDH_BUTTON_BACK +Cancella + +Rimuove l'ultima cifra digitata dal numero in fase di immissione. + +Inoltre, disabilita la notazione scientifica temporanea se l'esponente viene rimosso completamente. + +Comando da tastiera: Backspace + +.topic IDH_BUTTON_CE +CE + +Cancella l'ultimo numero digitato sul display. + +Comando da tastiera: Delete + +.topic IDH_BUTTON_CANC +CANCEL + +Cancella il visualizzatore e rimuove tutte le operazioni pendenti. + +Comando da tastiera: ESC + +.topic IDH_BUTTON_FE +F-E + +Attiva o disattiva la notazione scientifica fissa. + +Comando da tastiera: V + +.topic IDH_BUTTON_0 +Questo pulsante é utilizzato per introdurre le cifre di un numero. + +Comando da tastiera: 0 sulla tasiera o sul tastierino numerico. + +.topic IDH_BUTTON_1 +Questo pulsante é utilizzato per introdurre le cifre di un numero. + +Comando da tastiera: 1 sulla tasiera o sul tastierino numerico. + +.topic IDH_BUTTON_2 +Questo pulsante é utilizzato per introdurre le cifre di un numero. + +Comando da tastiera: 2 sulla tasiera o sul tastierino numerico. + +.topic IDH_BUTTON_3 +Questo pulsante é utilizzato per introdurre le cifre di un numero. + +Comando da tastiera: 3 sulla tasiera o sul tastierino numerico. + +.topic IDH_BUTTON_4 +Questo pulsante é utilizzato per introdurre le cifre di un numero. + +Comando da tastiera: 4 sulla tasiera o sul tastierino numerico. + +.topic IDH_BUTTON_5 +Questo pulsante é utilizzato per introdurre le cifre di un numero. + +Comando da tastiera: 5 sulla tasiera o sul tastierino numerico. + +.topic IDH_BUTTON_6 +Questo pulsante é utilizzato per introdurre le cifre di un numero. + +Comando da tastiera: 6 sulla tasiera o sul tastierino numerico. + +.topic IDH_BUTTON_7 +Questo pulsante é utilizzato per introdurre le cifre di un numero. + +Comando da tastiera: 7 sulla tasiera o sul tastierino numerico. + +.topic IDH_BUTTON_8 +Questo pulsante é utilizzato per introdurre le cifre di un numero. + +Comando da tastiera: 8 sulla tasiera o sul tastierino numerico. + +.topic IDH_BUTTON_9 +Questo pulsante é utilizzato per introdurre le cifre di un numero. + +Comando da tastiera: 9 sulla tasiera o sul tastierino numerico. + +.topic IDH_BUTTON_A +Questo pulsante é utilizzato per introdurre numeri esadecimali. + +Comando da tastiera: A + +.topic IDH_BUTTON_B +Questo pulsante é utilizzato per introdurre numeri esadecimali. + +Comando da tastiera: B + +.topic IDH_BUTTON_C +Questo pulsante é utilizzato per introdurre numeri esadecimali. + +Comando da tastiera: C + +.topic IDH_BUTTON_D +Questo pulsante é utilizzato per introdurre numeri esadecimali. + +Comando da tastiera: D + +.topic IDH_BUTTON_E +Questo pulsante é utilizzato per introdurre numeri esadecimali. + +Comando da tastiera: E + +.topic IDH_BUTTON_F +Questo pulsante é utilizzato per introdurre numeri esadecimali. + +Comando da tastiera: F + +.topic IDH_BUTTON_SIGN +Cambia il segno del numero visualizzato. + +Comando da tastiera: F9 + +.topic IDH_BUTTON_DOT +Inserisce il separatore decimale per delimitare la parte intera di un numero e iniziare l'immissione della sua (eventuale) parte frazionaria. + +Comando da tastiera: , oppure . + +.topic IDH_BUTTON_ADD +Addizione + +Comando da tastiera: + + +.topic IDH_BUTTON_SUB +Sottrazione + +Comando da tastiera: - + +.topic IDH_BUTTON_MULT +Moltiplicazione + +Comando da tastiera: * + +.topic IDH_BUTTON_DIV +Divisione + +Comando da tastiera: / + +.topic IDH_BUTTON_EQU +Risolve l'elaborazione corrente e tutte le sue sotto espressioni. + +Comando da tastiera: = + +.topic IDH_BUTTON_MOD +Resto di una divisione intera. + +Comando da tastiera: % + +.topic IDH_BUTTON_AND +"and" logico. + +Comando da tastiera: & + +.topic IDH_BUTTON_OR +"Or" logico. + +Comando da tastiera: | + +.topic IDH_BUTTON_XOR +"or" esclusivo. + +Comando da tastiera: ^ + +.topic IDH_BUTTON_LSH +Scorrimento a sinistra di un bit. + +Comando da tastiera: < + +.topic IDH_BUTTON_NOT +Inverte tutti i bit del numero visualizzato. + +Comando da tastiera: ~ + +.topic IDH_BUTTON_INT +Separa e visualizza la parte intera del numero visualizzato. + +Comando da tastiera: ; + +.topic IDH_BUTTON_MC +Cancella la memoria. + +Comando da tastiera: CTRL-L + +.topic IDH_BUTTON_MR +Ripristina sul display il valore salvato in memoria. + +Comando da tastiera: CTRL-R + +.topic IDH_BUTTON_MS +Memorizza il numero attuale in memoria e trasferisce eventualmente il valore precedentemente memorizzato sul display. +Comando da tastiera: CTRL-M + +.topic IDH_BUTTON_MP +Somma o sottrae il valore attuale dalla memoria. + +Comando da tastiera: CTRL-P + +.topic IDH_BUTTON_PI +Carica sul display il valore pi-greco oppure 2*pi-greco. + +Comando da tastiera: P + +.topic IDH_BUTTON_LEFTPAR +Apre una nuova parentesi e inizia una sotto-espressione. + +Comando da tastiera: ( + +.topic IDH_BUTTON_RIGHTPAR +Chiude l'ultima parentesi aperta e risolve la relativa sotto-espressione. + +Comando da tastiera: ) + +.topic IDH_BUTTON_DMS +Avvia la conversione da gradi decimali in in gradi-minuti-secondi e viceversa. + +Comando da tastiera: M + +.topic IDH_BUTTON_EXP +Attiva la notazione scientifica temporanea. + +Comando da tastiera: X + +.topic IDH_BUTTON_LN +Calcola il logaritmo naturale. Il calcolo dell'esponenziale in base Neperiana é attivata dal modificatore 'Inv'. + +Comando da tastiera: N + +.topic IDH_BUTTON_LOG +Calcola il logaritmo decimale. Il calcolo dell'esponenziale in base 10 é attivata dal modificatore 'Inv'. + +Comando da tastiera: L + +.topic IDH_BUTTON_NF +Calcola il fattoriale del numero visualizzato. + +Comando da tastiera: ! + +.topic IDH_BUTTON_RX +Calcola il reciproco di un numero. + +Comando da tastiera: R + +.topic IDH_BUTTON_SIN +Calcola il seno, seno iperbolico, arcoseno oppure l'arcoseno iperbolico di un angolo. + +Comando da tastiera: S + +.topic IDH_BUTTON_COS +Calcola il coseno, coseno iperbolico, arcocoseno oppure l'arcocoseno iperbolico di un angolo. + +Comando da tastiera: O + +.topic IDH_BUTTON_TAN +Calcola la tangente, tangente iperbolica, arcotangente oppure l'arcotangente iperbolica di un angolo. + +Comando da tastiera: T + +.topic IDH_BUTTON_XeY +Calcola la potenza di X elevato a Y. + +Se usato con il modificatore Inv, calcola la Y-esima radice di X. + +Comando da tastiera: Y + +.topic IDH_BUTTON_Xe2 +Calcola il quadrato di X. + +Se usato con il modificatore Inv, calcola la radice quadrata di X. + +Comando da tastiera: @ + +.topic IDH_BUTTON_Xe3 +Calcola il cubo di X. + +Se usato con il modificatore Inv, calcola la radice cubica di X. + +Comando da tastiera: $ + +.topic IDH_BUTTON_STA +Attiva la finestra di statistica e le sue funzioni di calcolo. + +Comando da tastiera: CTRL-S + +.topic IDH_BUTTON_AVE +Calcola la media aritmetica dei numeri memorizzati nella finestra di statistica. + +Comando da tastiera: CTRL-A + +.topic IDH_BUTTON_SUM +Calcola la somma aritmetica di tutti i numeri memorizzati nella finestra di statistica. + +Comando da tastiera: CTRL-T + +.topic IDH_BUTTON_S +Calcola la deviazione standard sui numeri memorizzati nella finestra di statistica. + +Comando da tastiera: CTRL-D + +.topic IDH_BUTTON_DAT +Inserisce il numero visualizzato sul display nella lista della finestra di statistica. + +Comando da tastiera: Insert + +.topic IDH_BUTTON_PERCENT +Esegue il calcolo in modalità percentuale. + +Comando da tastiera: % + +.topic IDH_BUTTON_SQRT +Calcola la radice quadrata di un numero. + +Comando da tastiera: @ diff --git a/rosapps/roscalc/docs/Help.it/shortcuts_from_keyboard.htm b/rosapps/roscalc/docs/Help.it/shortcuts_from_keyboard.htm new file mode 100644 index 00000000000..a51da962f77 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/shortcuts_from_keyboard.htm @@ -0,0 +1,232 @@ + + + +Shortcuts from Keyboard + + + + +

COMANDI DA TASTIERA

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 F5 0
 F6 1
 F7 2
 F8 3
 F2 4
 F3 5
 F4 6
 F12 7
 F2 8
 F3 9
 F4 A
 I B
 H C
 Backspace D
 Delete E
 ESC F
 CTRL-S +
 CTRL-A -
 CTRL-T *
 CTRL-D /
 Insert %
 ( &
 ) |
 V ^
 X ~
 M <
 S ;
 O =
 TCTRL-L
 @CTRL-R
 #CTRL-M
 YCTRL-P
 N %
 L @
 !  +  ,  Oppure .
 R P
+ + + + diff --git a/rosapps/roscalc/docs/Help.it/statistical_functions.htm b/rosapps/roscalc/docs/Help.it/statistical_functions.htm new file mode 100644 index 00000000000..514d1344950 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/statistical_functions.htm @@ -0,0 +1,44 @@ + + + +FUNZIONI STATISTICHE + + + + +

FUNZIONI STATISTICHE

+

 

+

Premendo il pulsante +, la finestra di statistica viene visualizzata.

+

La finestra di statistica permette di memorizzare gruppi di numeri e di eseguire su di essi alcuni comuni operatori statistici.

+

All'interno della finestra di statistica ci sono quattro tasti a cui sono assegnate queste funzioni:

+

 

+

[RET]

+

Riporta la finestra della calcolatrice in primo piano.

+

[LOAD]

+

Carica il numero selezionato sul visualizzatore della calcolatrice.

+

[CD]

+

Cancella il numero selezionato dalla lista dei numeri memorizzati nella finstra di statistica.

+

[CAD]

+

Cancella tutti i numeri memorizzati nella finestra di statistica.

+

 

+

Quando la finestra di statistica é attiva, quattro ulteriori tasti vengono attivati nella calcolatrice:

+

 

+

+

Calcola la media aritmetica dei numeri memorizzati nella finestra di statistica.

+

 

+

+

Calcola la somma aritmetica di tutti i numeri memorizzati nella finestra di statistica.

+

 

+

+

Calcola la deviazione standard sui numeri memorizzati nella finestra di statistica.

+

 

+

+

Inserisce il numero visualizzato sul display nella lista della finestra di statistica.

+

 

+

Nota: quando la finestra di statistica viene chiusa, il suo contenuto é perduto.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/the_pi_button.htm b/rosapps/roscalc/docs/Help.it/the_pi_button.htm new file mode 100644 index 00000000000..f804d147a37 --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/the_pi_button.htm @@ -0,0 +1,22 @@ + + + +IL PULSANTE PI-GRECO + + + + +

IL PULSANTE PI-GRECO

+

 

+

Per facilitare i calcoli con le funzioni trigonometriche, +é possibile caricare il valore  p  nel visualizzatore.

+

Tale funzione é richiamata premendo il pulsante

+

Se il modificatore +é attivato, allora il display verrà caricato con 2*p.

+

In ReactOS Calc, p +assume il valore 3.14159265358979323846

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/trigonometric_functions.htm b/rosapps/roscalc/docs/Help.it/trigonometric_functions.htm new file mode 100644 index 00000000000..14b55bb7f9b --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/trigonometric_functions.htm @@ -0,0 +1,35 @@ + + + +FUNZIONI TRIGONOMETRICHE + + + + +

FUNZIONI TRIGONOMETRICHE

+

 

+

ReactOS Calc permette il calcolo di tre tipi di funzioni trigonometriche e le relative funzioni inverse.

+

Queste funzioni possono essere usate con tre differenti tipi di misure angolari: gradi d'arco, radianti o gradi centesimali.

+

Il tipo di angolo selezionato non condiziona in alcun modo le funzioni non trigonometriche.

+

Da notare che il tipo gradi d'arco utilizza gradi decimali e non angoli nel formato gradi-minuti-secondi.

+

Le funzioni disponibili sono:

+

 

+

+

Calcola il seno dell'angolo fornito.

+

Se il modificatore +viene attivato, la funzione ricerca l'angolo il cui seno é visualizzato sul display.

+

 

+

+

Calcola il coseno dell'angolo fornito.

+

Se il modificatore +viene attivato, la funzione ricerca l'angolo il cui coseno é visualizzato sul display.

+

 

+

+

Calcola la tangente dell'angolo fornito.

+

Se il modificatore +viene attivato, la funzione ricerca l'angolo la cui tangente é visualizzata sul display.

+

 

+ + + + diff --git a/rosapps/roscalc/docs/Help.it/using_the_clipboard.htm b/rosapps/roscalc/docs/Help.it/using_the_clipboard.htm new file mode 100644 index 00000000000..200dba5285e --- /dev/null +++ b/rosapps/roscalc/docs/Help.it/using_the_clipboard.htm @@ -0,0 +1,54 @@ + + + +USO DELLE FUNZIONI DI COPIA/INCOLLA + + + + +

USO DELLE FUNZIONI DI COPIA/INCOLLA

+

E' possibile copiare il contenuto del visualizzatore negli appunti di Windows o di ReactOS.

+

E' altresì possibile trasferire il contenuto degli appunti nella calcolatrice.

+

I comandi ricevuti dagli appunti seguono le stesse regole descritte nella sezione +COMANDI DA TASTIERA, con le seguenti eccezioni:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

:c

+

:e

+

:m

+

:p

+

:r

+

:q

+

\

+ + + + diff --git a/rosapps/roscalc/docs/copying.txt b/rosapps/roscalc/docs/copying.txt new file mode 100644 index 00000000000..d511905c164 --- /dev/null +++ b/rosapps/roscalc/docs/copying.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/rosapps/roscalc/docs/help.txt b/rosapps/roscalc/docs/help.txt new file mode 100644 index 00000000000..aa41c242124 --- /dev/null +++ b/rosapps/roscalc/docs/help.txt @@ -0,0 +1,506 @@ +ReactOS Calc is a programme for evaluating mathematical, financial and statistical calculations. + +ReactOS Calc has several features including: +- Internal precision with 17 decimal numbers (standard IEEE math library). +- Up to 512 bits of internal precision and 64 decimal digits displayed in the output display (with GNU multi-precision libraries). +- Robust RPN (reverse polish notation) engine which allows a virtually unlimited number of arithmetic and algebraic sub-expressions. +- Two different interfaces: standard or scientific. +- Many common arithmetic, algebraic and statistical functions are included. + +The following topics will be discussed: + +HOW TO INPUT NUMBERS +DISPLAY FORMAT +ERROR MESSAGE +ARITHMETIC FUNCTIONS +LOGICAL FUNCTIONS +ALGEBRAIC FUNCTIONS +TRIGONOMETRIC FUNCTIONS +THE PI BUTTON +HYPERBOLIC FUNCTIONS +STATISTICAL FUNCTIONS +MEMORY FUNCTION +DEGREE CONVERSION +FIXED SCIENTIFIC NOTATION +PERCENT MODE + +HOW TO INPUT NUMBERS +-------------------- +The ReactOS Calc provides some buttons for typing numbers and expressions. +However, some of them are available only into Standard or Scientific modes, or when the calculator is in a specific state. +[0], [1], [2], [3], [4], [5], [6], [7], [8], [9] +Digit buttons: they are used for entering digits into the display. +[A], [B], [C], [D], [E], [F] +Hexadecimal buttons: they are used for completing an hex number. For using these buttons, the calculator must be configured into scientific mode and the [HEX] state must be selected. +[.] or [,] +Decimal point: used for starting the non integer part of a decimal number. +[+/-] +Change sign: if it's pressed after a calculation or when entering the operands, it will change the sign of the number shown into the output display. +[BACK] +If the displayed number has been entered manually and it isn't a result of a calculation, you can delete the last digit by pressing this button. +[CE] +This button removes an incorrect number from the output display. All pending operations are preserved. +[ C ] +It clears the output display and all pending operations. + +DISPLAY FORMAT +-------------- +You can enter digits by pressing the buttons mentioned in the section. +These numbers can be entered into four different bases: hexadecimal, decimal, octal or binary system. +A number shown into the output display can be easily converted from a numeric base to another by simply changing the base on the fly. + +When working with pure decimal numbers, the user can enter the numbers in two ways: +- Normal mode: each number is entered its integer part and, eventually, its fractional part. +- Exponential mode: the number is entered by typing a mantissa and then an exponent. This method allows you to write very big or very small numbers that you would not be able to type in a different manner. You can use it only when the calculator is configured in scientific mode. +However, there are some limits even when you work with exponential notation. +These limits are: +-1.79769313486231570e+308 <= x <= -2.22507385850720140e-308 +2.22507385850720140e-308 <= x <= 1.79769313486231570e+308 +The exponential input mode is activated by the [Exp] button. +After the mantissa has been typed, by pressing this button you will be able to enter the exponent. +When the support for GNU multi-precision libraries is activated, these limits rise greatly to 64 displayed digits for the mantissa and 8 digits for the exponent, both with sign. + +When the calculator is in [HEX], [OCT] or [BIN] state, it's possible to apply a masking for limiting the range of the numbers. Four range are available: +[QWORD] +It limits the integers to 64 bit numbers. +[DWORD] +It limits the integers to 32 bit numbers. +[WORD] +It limits the integers to 16 bit numbers. +[BYTE] +It limits the integers to 8 bit numbers. + +ERROR MESSAGE +------------- +The output display will show the message "Error" if the current calculation overflows the limits of the calculator, or when an undefined condition is generated (example: division by zero). +The error condition is cleared using the [ C ] button. + +ARITHMETIC FUNCTIONS +-------------------- +ReactOS Calc implements the standard arithmetic rules with the following operators: +[+] +Addition +[-] +Subtraction +[*] +Multiplication +[/] +Division +[Mod] +Remainder of a division +Those rules express the concept of priority. +Here there is a list of priorities implemented from the highest to the lowest: +- Special functions which change directly the current value into a new one: trigonometrics, hyperbolics, exponentials and logarithms, reciprocal, base conversions, integer and fractional part detection and change of sign. +- Power and root functions. +- multiplications, divisions, reminders. +- additions, subtractions. +- Logical functions. +These rules may be overcome by using parentheses. +With [(] and [)] buttons, the user can isolate a mathematical expression to be evaluated separately. The number of parentheses into a single expression is virtually unlimited. The number of currently-open parentheses is displayed in the left box underneath the base change option set. + +LOGICAL FUNCTIONS +----------------- +There is a set of logical functions which can be used between two operands. They can be used as normal arithmetic operators. +The only exception is the "Not" operator which works on a single number. +The provided functions are: +[And] +It executes an "and" between the numbers. +[Or] +It executes an "or" between the numbers. +[Xor] +It executes an "exclusive or" between the numbers. +[Not] +It inverts all bits of the number shown into the output display. + +ALGEBRAIC FUNCTIONS +------------------- +ReactOS Calc implements the most commonly used algebraic functions. +[Int] +It isolates the integer part of the number shown into the output display. +[Inv]+[Int] +The integer part of the number is discarded and the fractional part stays on the output display. +[x^2] +Square function. It calculates the square of the number shown on the output display. +[Inv]+[x^2] +It returns the positive square root of the number shown on the output display. +If the current number is negative, then the error message will be displayed. +When working with standard layout, the [sqrt] button is a shortcut to this function. +[x^3] +Cube function. It calculates the cube of the number shown on the output display. +[Inv]+[x^3] +It returns the cube root of the number shown on the output display. +[x^y] +Power function. It calculates the power of X elevated to Y. +[Inv]+[x^y] +Root function. It calculates the Y-th root of X. +[1/x] +Reciprocal. It divides 1 by the number shown on the output display. +[n!] +Factorial. It calculates the factorial of the integer part of the number shown into the output display. +The calculation is defined within these limits: +0 <= n <= 170 +[ln] +Natural logarithm. It calculates the natural logarithm of the current number. +ReactOS Calc assumes the Nepero's constant to be: +e=2.7182818284590452354 +The calculation is defined for x > 0. +[Inv]+[ln] +Natural anti-logarithm. It calculates the power of the Nepero's constant to the current number. +[Log] +Decimal logarithm. It calculates the logarithm of the current number to base 10. +The calculation is defined for x > 0. +[Inv]+[Log] +Decimal anti-logarithm. It calculates the power of 10 to the current number. + +TRIGONOMETRIC FUNCTIONS +----------------------- +ReactOS Calc allows the calculation of three types of trigonometric functions with their inverse operations. +These functions can be used with three different angular units of measurement: degrees, radians or gradians. +The angular mode does not affect the non trigonometric functions. +Please note that the degree type uses decimal degrees and not angles in the degree-minute-second form. +The available functions are: +[sin] +It calculates the sine of the given angle. +If the [Inv] modifier is activated, it finds the angle whose sine value is shown into the output display. +[cos] +It calculates the cosine of the given angle. +If the [Inv] modifier is activated, it finds the angle whose cosine value is shown into the output display. +[tan] +It calculates the tangent of the given angle. +If the [Inv] modifier is activated, it finds the angle whose tangent value is shown into the output display. + +THE PI BUTTON +------------- +For helping the calculations with trigonometric functions, it's possible to load the value of 'Pi' into the output display. +The function is called by pressing the [PI] button. +If the [Inv] modifier is activated, then the output display will be loaded with 2*PI. +In ReactOS Calc, Pi has the value 3.14159265358979323846 + +HYPERBOLIC FUNCTIONS +-------------------- +ReactOS Calc allows the calculation of three types of hyperbolic functions with their inverse operations. +Those functions are activated by the same buttons used for trigonometric functions; the hyperbolic context is enabled by activating the [Hyp] modifier. The inverse functions are activated by the [Inv] modifier. +[sin]+[Hyp] +Hyperbolic sine +[cos]+[Hyp] +Hyperbolic cosine +[tan]+[Hyp] +Hyperbolic tangent + +STATISTICAL FUNCTIONS +--------------------- +By pressing the [STA] button, the statistical window is enabled. +Statistical window allows to store groups of number and execute some common statistical operators. +Into the statistical box, there are four buttons with these functions: +[RET] +It moves the focus back to the calculator. +[LOAD] +It loads the selected number into the output display of the calculator. +[CD] +It deletes the selected number from the list. +[CAD] +It deletes all numbers currently stored into the list. + +While the statistical window is shown, four additional buttons are enabled: +[Ave] +It calculates the arithmetic average of the numbers stored into the list. +[Sum] +It calculates the sum of all numbers stored into the list. +[s] +It calculates the population standard deviations of the numbers stored into the list. +[Dat] +It inserts the number shown into the output display into the list. + +Note: when the statistical box is closed, its content is lost. + +MEMORY FUNCTION +--------------- +ReactOS Calc reserves for the user a memory region for storing data. +With this feature, the user can store frequently used numbers (typically, these numbers are constants) and recall them at any time, without the need to re-enter them manually. +If the memory function is currently in use, the text "M" will appear in the right box underneath the base change option set. +The memory is preserved when switching between standard and scientific mode, but its content is lost when ReactOS Calc application is closed. +Four keys are available with memory function support. +[MC] +Memory Clear: clears the content of the memory. +[MR] +Memory Recall: retrieves the stored data from the memory and it shows it into the output display, without affecting the content of the storage. +[MS] +Memory Store: stores the displayed value into the memory. The content of the display is unaffected. After pressing this button, the previous content of the memory is lost. If the [INV] modifier is activated, then this button will swap current memory value with displayed value. Under these conditions, the displayed value is stored and the previously stored quantity is shown on the output display. +If the memory is empty, it will act as a normal store. +[M+] +Memory Sum: the displayed value is algebraically added to the current memory. The output display will be unchanged after this transfer and addition. If the [INV] modifier is activated, then the displayed value will be algebraically subtracted from the memory. If the memory is empty, it will work in both condition as a simple memory store. + +DEGREE CONVERSION +----------------- +With [dms] button you can convert decimal degrees into degree-minute-second format and vice-versa. +When working with d-m-s angles, the notation used into the output display is "DDD.MMSS" where D stands for degree, M for minute and S for second. +The [dms] button will convert decimal angles to degree-minute-second angles. +The [dms] button with [Inv] modifier will convert degree-minute-second angles into decimal angles. + +FIXED SCIENTIFIC NOTATION +------------------------- +When working with ReactOS Calc, it is possible to select a temporary scientific notation (activated by [Exp] button) or a fixed scientific notation. +Fixed scientific notation will be turned on by pressing [F-E] button. +When fixed scientific notation is active, all results will be displayed with scientific notation even for small numbers. +The calculator will be restored to normal mode by pressing [F-E] button again or by pressing the [ C ] button. + +PERCENT +------- +The [%] button is available only with standard mode and it's used as modifier for the four basic arithmetic operators. +The input sequence for a percent calculation is: +"first" "operator" "second" "percent" +The modification applied by the percent button for each operator are: +[+] +Add "second"-% of "first" to "first". +[-] +Subtract "second"-% of "first" from "first". +[*] +Multiply "second"-% of "first" with "first". +[/] +Divide "first" by "second"-% of "first". + +GLOSSARY +-------- + +Output display +This is the place where the typed numbers and the results of the calculations are shown. + +Hex +It selects the hexadecimal numeric base and it converts the number shown into the output display. +Shortcut from keyboard: F5 + +Dec +It selects the decimal numeric base and it converts the number shown into the output display. +Shortcut from keyboard: F6 + +Oct +It selects the octal numeric base and it converts the number shown into the output display. +Shortcut from keyboard: F7 + +Bin +It selects the binary numeric base and it converts the number shown into the output display. +Shortcut from keyboard: F8 + +Degrees +It enables the processing of trigonometric functions into degree format. +Shortcut from keyboard: F2 + +Radians +It enables the processing of trigonometric functions into radians format. +Shortcut from keyboard: F3 + +Gradians +It enables the processing of trigonometric functions into gradians format. +Shortcut from keyboard: F4 + +Qword +It limits the length of integer numbers to 64 bits. +Shortcut from keyboard: F12 + +Dword +It limits the length of integer numbers to 32 bits. +Shortcut from keyboard: F2 + +Word +It limits the length of integer numbers to 16 bits. +Shortcut from keyboard: F3 + +Byte +It limits the length of integer numbers to 8 bits. +Shortcut from keyboard: F4 + +Inv +It enables the inverse function for [sin] [cos] [tan] [pi] [x^y] [x^2] [x^3] [ln] [log] [dms] [MS] [M+] [Int] buttons. +Shortcut from keyboard: I + +Hyp +It enables the hyperbolic mode for [sin] [cos] [tan] buttons +Shortcut from keyboard: H + +Back +It deletes the last digit typed on the calculator. +It also disables the temporary scientific mode if an exponent is removed completely. +Shortcut from keyboard: Backspace + +CE +It deletes the last typed number from the output display. +Shortcut from keyboard: Delete + +_C_ +It deletes the current calculation and all sub expressions. +Shortcut from keyboard: ESC + +F-E +It enables or it disables the fixed scietific notation. +Shortcut from keyboard: V + +0 1 2 3 4 5 6 7 8 9 +These buttons are used for entering digits. +Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. + +A B C D E F +These buttons are used for entering hexadecimal numbers. +Shortcut from keyboard: the letters from A to F. + ++/- +It changes the sign of the number. +Shortcut from keyboard: F9 + +. or , +It adds the decimal point for a decimal number. +Shortcut from keyboard: , or . + ++ +Addition +Shortcut from keyboard: + + +- +Subtraction +Shortcut from keyboard: - + +* +Multiplication +Shortcut from keyboard: * + +/ +Division +Shortcut from keyboard: / + += +It resolves the current calculation and all sub expressions. +Shortcut from keyboard: = + +Mod +Remainder of an integer division. +Shortcut from keyboard: % + +And +Logical "and". +Shortcut from keyboard: & + +Or +Logical "or". +Shortcut from keyboard: | + +Xor +Logical exclusive "or". +Shortcut from keyboard: ^ + +Lsh +Logical shift to left. +Shortcut from keyboard: < + +Not +Logical bit inversion. +Shortcut from keyboard: ~ + +Int +It isolates the Integer or fractional part of a number. +Shortcut from keyboard: ; + +MC +It deletes the memory. +Shortcut from keyboard: CTRL-L + +MR +It recalls a previously stored number from the memory. +Shortcut from keyboard: CTRL-R + +MS +It stores a number into the memory and it eventually transfers the previous value to the output display. +Shortcut from keyboard: CTRL-M + +M+ +It adds or it subtracts the value into the output display to the memory. +Shortcut from keyboard: CTRL-P + +pi +It loads the pi or 2*pi value into the output display. +Shortcut from keyboard: P + +( +It starts a new sub expression. +Shortcut from keyboard: ( + +) +It closes and it resolves a sub expression. +Shortcut from keyboard: ) + +dms +It converts a decimal degree to a decimal-minute-second degree and viceversa. +Shortcut from keyboard: M + +Exp +It enables the temporary scientific notation. +Shortcut from keyboard: X + +ln +It calculates the natural logarithm. Natural anti logarithm calculation is activated by Inv modifier. +Shortcut from keyboard: N + +Log +It calculates the decimal logarithm. Decimal anti logarithm calculation is activated by Inv modifier. +Shortcut from keyboard: L + +n! +It calculates the factorial of a number. +Shortcut from keyboard: ! + +1/x +It calculates the reciprocal of a number. +Shortcut from keyboard: R + +sin +It calculates the sine, hyperbolic sine, arcsine or the hyperbolic arcsine of an angle. +Shortcut from keyboard: S + +cos +It calculates the cosine, hyperbolic cosine, arcsine or the hyperbolic arccosine of an angle. +Shortcut from keyboard: O + +tan +It calculates the tangent, hyperbolic tangent, arcstangent or the hyperbolic arctangent of an angle. +Shortcut from keyboard: T + +x^y +It calculates the power of X to Y. +With the Inv modifier, it calculates the Yth root of X. +Shortcut from keyboard: Y + +x^2 +It calculates the square of X. +With the Inv modifier, it calculates the square root of X. +Shortcut from keyboard: @ + +x^3 +It calculates the cube of X. +With the Inv modifier, it calculates the cubic root of X. +Shortcut from keyboard: $ + +Sta +It enables the statistical window and its functions. +Shortcut from keyboard: CTRL-S + +Ave +It calculates the arithmetic average of the numbers stored into the statistical box. +Shortcut from keyboard: CTRL-A + +Sum +It calculates the sum of the numbers stored into the statistical box. +Shortcut from keyboard: CTRL-T + +s +It calculates the standard deviation of the numbers stores into the statistical box. +Shortcut from keyboard: CTRL-D + +Dat +It inserts a new number into the statistical box +Shortcut from keyboard: Insert + +% +It executes the calculation with percent mode. +Shortcut from keyboard: % + +sqrt +It calculates the square root of a number. +Shortcut from keyboard: @ diff --git a/rosapps/roscalc/docs/readme.txt b/rosapps/roscalc/docs/readme.txt new file mode 100644 index 00000000000..036a1982c53 --- /dev/null +++ b/rosapps/roscalc/docs/readme.txt @@ -0,0 +1,49 @@ + * * * * R E A C T O S - C A L C * * * * + +INTRODUCTION +============= +This is ReactOS Calc, a scientific calculator for Win32 and Win64 systems. +I decided to start this project because the winecalc wasn't very usable (it's just my personal opinion) and the calculator included into Win95 and Win98 has some big limitations, like the missing support for 64 bit integers. +The user interface of ReactOS Calc is really similar to Microsoft calculator, so you should be able to use this replacement very quickly. + +COMPILATION +============ +You need MinGW for compiling ReactOS Calc. +Just launch MAKEALL.BAT from the source directory. +This will generate all executables for various configurations and platforms. + +COMPILING THE HELP FILE +======================== +ReactOS Calc uses HTMLHELP for opening the help file and generating the popups. +The Microsoft HTMLHELP Workshop is freely downloadable from Microsoft's site at: + +http://www.microsoft.com/downloads/details.aspx?familyid=00535334-c8a6-452f-9aa0-d597d16580cc&displaylang=en + +INSTALLATION +============= +CALC.CHM must be copied under %systemroot%\Help directory. +For Microsoft Windows's users, it can be \Windows\Help or \WinNT\Help. +For ReactOS's users, it must be \ReactOS\Help (at the moment the Help directory doesn't exists, so it must be created manually). + +NOTES TO REACTOS'S USERS +========================= +At the time of the write of this text, the newest version of ReactOS is 0.3.3. +While ReactOS Calc works fine with Microsoft's operating systems, there are some known issues with ReactOS: +* The keyboard is only partially working. +* At startup, the focus is visible on the Inv control. +* The selection on the various radio buttons isn't displayed correctly. +* Into the aboutbox, the color around the ReactOS's logo isn't applied. +* Into the aboutbox, the scroll bar used into the read-only edit control doesn't work (seen into the italian version). +* For some reasons, the [RET] button of the statistical box doesn't set the focus on the calculator. +* Help file and help popups don't work. + +CLOSING WORDS +============== +it's a very short readme file, I know. +Unfortunately, I'm not very good at writing user's manuals. +Although ReactOS Calc is pretty simple and I still think you should be able to understand the basic operations yourself, a good manual would be a nice presentation for new users. +Then, the next step is the translation into other languages. +If you would like to help in some way on these tasks, you are welcome. + +------------------------------------------------------------------- +Carlo Bramini, 19-12-2007 diff --git a/rosapps/roscalc/docs/todo.txt b/rosapps/roscalc/docs/todo.txt new file mode 100644 index 00000000000..414e1069751 --- /dev/null +++ b/rosapps/roscalc/docs/todo.txt @@ -0,0 +1,3 @@ +* Translators for the user interfaces and the help texts. +* Use correct symbols for math functions (square root, etc...) +* Implements conversion dialog box. diff --git a/rosapps/roscalc/docs/whatsnew.txt b/rosapps/roscalc/docs/whatsnew.txt new file mode 100644 index 00000000000..d0dbf6c15b3 --- /dev/null +++ b/rosapps/roscalc/docs/whatsnew.txt @@ -0,0 +1,69 @@ +1.07 (20071219) +======================= +* Added support for GNU multi-precision libraries. LibGMP and LibMPFR are required for compiling ReactOS Calc with big number support. +* When calculating the standard deviation, the population can be 'n' or 'n-1' as the true Microsoft Calculator does. +* Unified language support: just one executable for all. +* Fixed type bug into CopyMemToClipboard() when compiled with WideChar support. +* The code for handling the memory functions has been simplified and now it calls directly the RPN engine. +* Fixed bug into statistical window, when uploading numbers with different bases. +* Fixed bug into integer limitation: now if the selection changes on QWORD, DWORD, WORD or BYTE, then the result is modified immediately. +* Fixed bug signaled by remi-aldo about a the precision issue. +* Fixed bug into shortcuts from keyboard: modulo shortcut was missing. +* Implemented coloured buttons. +* ReactOS Calc has been compiled for working with x86-64 (still untested on the real hardware). + +1.06 (20070518) +======================= +* The decimal separator is copied into the clipboard, but only if it has been typed by the user. +* Now the [+/-] button can change the sign of any number into the output display. +* Added italian translation of the help file. + +1.05 (20070503) +======================= +* Fixed bug when the following input keys are pressed: [0] [.] [+/-] and another number, then the dot and the sign were lost. +* The ERROR message at division by zero is displayed again. +* [Exp] button won't work if the output display is zero (0e+100 is always zero). +* Now [.] can start a number directly: if it is pressed when display is empty then "0." is pushed automatically. + +1.04 (20070430) +======================= +* Fixed a bug when zero is the first number entered. +* The change of the sign +/- doesn't work if the display is empty or zero. +* Added logical operators into decimal mode (obviously, only the integer part is processed). +* Fixed decimal precision to highest possible resolution. +* Decimal point and thousand separator are now regional dependant. +* Added memory subtraction and memory swap commands. +* Added 2*PI constant (generated by "inv"+"pi"). +* Added Help popups for calculator functions. +* Added User's manual and Help file support. +* Now the PASTE menu command is disabled if the clipboard doesn't store good data. +* Fixed bug with BACK button. +* Fixed ":q" command from clipboard to the 'cancel' button. + +1.03 (20070404) +======================= +* Added double-click check on statistic window. +* Fixed focus selection when switching from statistic window with RET button. +* EQUAL button will now reduce a number entered with exponential notation (if it's possible). +* Version number was not updated to 1.02 in previous version. + +1.02 (20070402) +======================= +* Fixed a "copy-paste" error into hyperbolic functions. +* Now context menu is enabled only when child controls are clicked. + +1.01 (20070331) +======================= +* Fixed english translation for "Radians" and "Gradians". +* Corrected conversion between radians and gradians angles. +* Added work-around for catching keys without the keyboard hook (selectable at compile time). +* The version number of the programme has been moved from the resource files to ABOUT.C. +* "DOT" function can be used for starting a number (integer part will be zero). +* Added repeat function. +* If the number is grater than maximum resolution, it will be displayed with exponential notation. +* Removed mouse and keyboard focuses from displayed buttons. +* Added normal and small icons. + +1.00 (20070323) +======================= +* First write. diff --git a/rosapps/roscalc/fun_mpfr.c b/rosapps/roscalc/fun_mpfr.c new file mode 100644 index 00000000000..b6607334c47 --- /dev/null +++ b/rosapps/roscalc/fun_mpfr.c @@ -0,0 +1,423 @@ +#include "calc.h" +#include + +void apply_int_mask(calc_number_t *r) +{ + mpz_t a, mask; + + switch (calc.size) { + case IDC_RADIO_QWORD: + mpz_init_set_str(mask, "FFFFFFFFFFFFFFFF", 16); + break; + case IDC_RADIO_DWORD: + mpz_init_set_str(mask, "00000000FFFFFFFF", 16); + break; + case IDC_RADIO_WORD: + mpz_init_set_str(mask, "000000000000FFFF", 16); + break; + case IDC_RADIO_BYTE: + mpz_init_set_str(mask, "00000000000000FF", 16); + break; + default: + mpz_init_set_si(mask, -1); + } + mpz_init(a); + mpfr_get_z(a, r->mf, MPFR_DEFAULT_RND); + mpz_and(a, a, mask); + mpfr_set_z(r->mf, a, MPFR_DEFAULT_RND); + mpz_clear(a); + mpz_clear(mask); +} + +void validate_rad2angle(calc_number_t *r) +{ + mpfr_t mult, divs; + + mpfr_init(mult); + mpfr_init(divs); + switch (calc.degr) { + case IDC_RADIO_DEG: + mpfr_set_ui(mult, 180, MPFR_DEFAULT_RND); + mpfr_const_pi(divs, MPFR_DEFAULT_RND); + break; + case IDC_RADIO_RAD: + mpfr_set_ui(mult, 1, MPFR_DEFAULT_RND); + mpfr_set_ui(divs, 1, MPFR_DEFAULT_RND); + break; + case IDC_RADIO_GRAD: + mpfr_set_ui(mult, 200, MPFR_DEFAULT_RND); + mpfr_const_pi(divs, MPFR_DEFAULT_RND); + break; + } + mpfr_mul(r->mf, r->mf, mult, MPFR_DEFAULT_RND); + mpfr_div(r->mf, r->mf, divs, MPFR_DEFAULT_RND); + + mpfr_clear(mult); + mpfr_clear(divs); +} + +void validate_angle2rad(calc_number_t *r) +{ + mpfr_t mult, divs; + + if (!mpfr_number_p(r->mf)) { + calc.is_nan = TRUE; + return; + } + mpfr_init(mult); + mpfr_init(divs); + switch (calc.degr) { + case IDC_RADIO_DEG: + mpfr_const_pi(mult, MPFR_DEFAULT_RND); + mpfr_set_ui(divs, 180, MPFR_DEFAULT_RND); + break; + case IDC_RADIO_RAD: + mpfr_set_ui(mult, 1, MPFR_DEFAULT_RND); + mpfr_set_ui(divs, 1, MPFR_DEFAULT_RND); + break; + case IDC_RADIO_GRAD: + mpfr_const_pi(mult, MPFR_DEFAULT_RND); + mpfr_set_ui(divs, 200, MPFR_DEFAULT_RND); + break; + } + mpfr_mul(r->mf, r->mf, mult, MPFR_DEFAULT_RND); + mpfr_div(r->mf, r->mf, divs, MPFR_DEFAULT_RND); + + mpfr_clear(mult); + mpfr_clear(divs); +} + +void rpn_sin(calc_number_t *c) +{ + validate_angle2rad(c); + mpfr_sin(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} +void rpn_cos(calc_number_t *c) +{ + validate_angle2rad(c); + mpfr_cos(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} +void rpn_tan(calc_number_t *c) +{ + validate_angle2rad(c); + mpfr_tan(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +void rpn_asin(calc_number_t *c) +{ + mpfr_asin(c->mf, c->mf, MPFR_DEFAULT_RND); + validate_rad2angle(c); +} +void rpn_acos(calc_number_t *c) +{ + mpfr_acos(c->mf, c->mf, MPFR_DEFAULT_RND); + validate_rad2angle(c); +} +void rpn_atan(calc_number_t *c) +{ + mpfr_atan(c->mf, c->mf, MPFR_DEFAULT_RND); + validate_rad2angle(c); +} + +void rpn_sinh(calc_number_t *c) +{ + mpfr_sinh(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} +void rpn_cosh(calc_number_t *c) +{ + mpfr_cosh(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} +void rpn_tanh(calc_number_t *c) +{ + mpfr_tanh(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +void rpn_asinh(calc_number_t *c) +{ + mpfr_asinh(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} +void rpn_acosh(calc_number_t *c) +{ + mpfr_acosh(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} +void rpn_atanh(calc_number_t *c) +{ + mpfr_atanh(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +void rpn_int(calc_number_t *c) +{ + mpfr_trunc(c->mf, c->mf); +} + +void rpn_frac(calc_number_t *c) +{ + mpfr_frac(c->mf, c->mf, MPFR_DEFAULT_RND); +} + +void rpn_reci(calc_number_t *c) +{ + if (mpfr_sgn(c->mf) == 0) + calc.is_nan = TRUE; + else + mpfr_ui_div(c->mf, 1, c->mf, MPFR_DEFAULT_RND); +} + +void rpn_fact(calc_number_t *c) +{ + if (mpfr_sgn(c->mf) < 0) { + calc.is_nan = TRUE; + return; + } + + mpfr_trunc(c->mf, c->mf); + if (mpfr_fits_ulong_p(c->mf, MPFR_DEFAULT_RND) == 0) + calc.is_nan = TRUE; + else { + mpfr_fac_ui(c->mf, mpfr_get_ui(c->mf, MPFR_DEFAULT_RND), MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; + } +} + +void rpn_not(calc_number_t *c) +{ + mpz_t a; + + mpz_init(a); + mpfr_get_z(a, c->mf, MPFR_DEFAULT_RND); + mpz_com(a, a); + mpfr_set_z(c->mf, a, MPFR_DEFAULT_RND); + mpz_clear(a); +} + +void rpn_pi(calc_number_t *c) +{ + mpfr_const_pi(c->mf, MPFR_DEFAULT_RND); +} + +void rpn_2pi(calc_number_t *c) +{ + mpfr_const_pi(c->mf, MPFR_DEFAULT_RND); + mpfr_mul_ui(c->mf, c->mf, 2, MPFR_DEFAULT_RND); +} + +void rpn_sign(calc_number_t *c) +{ + mpfr_mul_si(c->mf, c->mf, -1, MPFR_DEFAULT_RND); +} + +void rpn_exp2(calc_number_t *c) +{ + mpfr_sqr(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +void rpn_exp3(calc_number_t *c) +{ + mpfr_pow_ui(c->mf, c->mf, 3, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +void rpn_sqrt(calc_number_t *c) +{ + mpfr_sqrt(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +void rpn_cbrt(calc_number_t *c) +{ + mpfr_cbrt(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +void rpn_exp(calc_number_t *c) +{ + mpfr_exp(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +void rpn_exp10(calc_number_t *c) +{ + mpfr_exp10(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +void rpn_ln(calc_number_t *c) +{ + mpfr_log(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +void rpn_log(calc_number_t *c) +{ + mpfr_log10(c->mf, c->mf, MPFR_DEFAULT_RND); + if (!mpfr_number_p(c->mf)) calc.is_nan = TRUE; +} + +static void stat_sum(mpfr_t sum) +{ + statistic_t *p = calc.stat; + + mpfr_set_ui(sum, 0, MPFR_DEFAULT_RND); + while (p != NULL) { + mpfr_add(sum, sum, p->num.mf, MPFR_DEFAULT_RND); + p = (statistic_t *)(p->next); + } +} + +void rpn_ave(calc_number_t *c) +{ + int n; + + stat_sum(c->mf); + n = SendDlgItemMessage(calc.hStatWnd, IDC_LIST_STAT, LB_GETCOUNT, 0, 0); + + if (n) + mpfr_div_ui(c->mf, c->mf, n, MPFR_DEFAULT_RND); + + if (calc.base != IDC_RADIO_DEC) + mpfr_trunc(c->mf, c->mf); +} + +void rpn_sum(calc_number_t *c) +{ + stat_sum(c->mf); + + if (calc.base != IDC_RADIO_DEC) + mpfr_trunc(c->mf, c->mf); +} + +static void rpn_s_ex(calc_number_t *c, int pop_type) +{ + mpfr_t dev; + mpfr_t num; + unsigned long n = 0; + statistic_t *p = calc.stat; + + n = SendDlgItemMessage(calc.hStatWnd, IDC_LIST_STAT, LB_GETCOUNT, 0, 0); + if (n < 2) { + mpfr_set_ui(c->mf, 0, MPFR_DEFAULT_RND); + return; + } + + stat_sum(c->mf); + mpfr_div_ui(c->mf, c->mf, n, MPFR_DEFAULT_RND); + + mpfr_init(dev); + mpfr_init(num); + + mpfr_set_ui(dev, 0, MPFR_DEFAULT_RND); + p = calc.stat; + while (p != NULL) { + mpfr_sub(num, p->num.mf, c->mf, MPFR_DEFAULT_RND); + mpfr_sqr(num, num, MPFR_DEFAULT_RND); + mpfr_add(dev, dev, num, MPFR_DEFAULT_RND); + p = (statistic_t *)(p->next); + } + mpfr_div_ui(c->mf, dev, pop_type ? n-1 : n, MPFR_DEFAULT_RND); + mpfr_sqrt(c->mf, c->mf, MPFR_DEFAULT_RND); + + if (calc.base != IDC_RADIO_DEC) + mpfr_trunc(c->mf, c->mf); + + mpfr_clear(dev); + mpfr_clear(num); +} + +void rpn_s(calc_number_t *c) +{ + rpn_s_ex(c, 0); +} + +void rpn_s_m1(calc_number_t *c) +{ + rpn_s_ex(c, 1); +} + +void rpn_dms2dec(calc_number_t *c) +{ + mpfr_t d, m, s; + + mpfr_init(d); + mpfr_init(m); + mpfr_init(s); + + mpfr_trunc(d, c->mf); + mpfr_frac(m, c->mf, MPFR_DEFAULT_RND); + mpfr_mul_ui(m, m, 100, MPFR_DEFAULT_RND); + + mpfr_frac(s, m, MPFR_DEFAULT_RND); + mpfr_trunc(m, m); + mpfr_mul_ui(s, s, 100, MPFR_DEFAULT_RND); + mpfr_ceil(s, s); + + mpfr_div_ui(m, m, 60, MPFR_DEFAULT_RND); + mpfr_div_ui(s, s, 3600, MPFR_DEFAULT_RND); + mpfr_add(c->mf, d, m, MPFR_DEFAULT_RND); + mpfr_add(c->mf, c->mf, s, MPFR_DEFAULT_RND); + + mpfr_clear(d); + mpfr_clear(m); + mpfr_clear(s); +} + +void rpn_dec2dms(calc_number_t *c) +{ + mpfr_t d, m, s; + + mpfr_init(d); + mpfr_init(m); + mpfr_init(s); + + mpfr_trunc(d, c->mf); + mpfr_frac(m, c->mf, MPFR_DEFAULT_RND); + mpfr_mul_ui(m, m, 60, MPFR_DEFAULT_RND); + + mpfr_frac(s, m, MPFR_DEFAULT_RND); + mpfr_trunc(m, m); + mpfr_mul_ui(s, s, 60, MPFR_DEFAULT_RND); + mpfr_ceil(s, s); + + mpfr_div_ui(m, m, 100, MPFR_DEFAULT_RND); + mpfr_div_ui(s, s, 10000, MPFR_DEFAULT_RND); + mpfr_add(c->mf, d, m, MPFR_DEFAULT_RND); + mpfr_add(c->mf, c->mf, s, MPFR_DEFAULT_RND); + + mpfr_clear(d); + mpfr_clear(m); + mpfr_clear(s); +} + +void rpn_zero(calc_number_t *c) +{ + mpfr_set_ui(c->mf, 0, MPFR_DEFAULT_RND); +} + +void rpn_copy(calc_number_t *dst, calc_number_t *src) +{ + mpfr_set(dst->mf, src->mf, MPFR_DEFAULT_RND); +} + +int rpn_is_zero(calc_number_t *c) +{ + return (mpfr_sgn(c->mf) == 0); +} + +void rpn_alloc(calc_number_t *c) +{ + mpfr_init(c->mf); +} + +void rpn_free(calc_number_t *c) +{ + mpfr_clear(c->mf); +} diff --git a/rosapps/roscalc/function.c b/rosapps/roscalc/function.c new file mode 100644 index 00000000000..ca92e3f30d8 --- /dev/null +++ b/rosapps/roscalc/function.c @@ -0,0 +1,510 @@ +#include "calc.h" +#include + +void apply_int_mask(calc_number_t *r) +{ + unsigned __int64 mask; + + switch (calc.size) { + case IDC_RADIO_QWORD: + mask = _UI64_MAX; + break; + case IDC_RADIO_DWORD: + mask = ULONG_MAX; + break; + case IDC_RADIO_WORD: + mask = USHRT_MAX; + break; + case IDC_RADIO_BYTE: + mask = UCHAR_MAX; + break; + default: + mask = (unsigned __int64)-1; + } + r->i &= mask; +} + +double asinh(double x) +{ + return log(x+sqrt(x*x+1)); +} + +double acosh(double x) +{ + // must be x>=1, if not return Nan (Not a Number) + if(!(x>=1.0)) return sqrt(-1.0); + + // return only the positive result (as sqrt does). + return log(x+sqrt(x*x-1.0)); +} + +double atanh(double x) +{ + // must be x>-1, x<1, if not return Nan (Not a Number) + if(!(x>-1.0 && x<1.0)) return sqrt(-1.0); + + return log((1.0+x)/(1.0-x))/2.0; +} + +double validate_rad2angle(double a) +{ + switch (calc.degr) { + case IDC_RADIO_DEG: + a = a * (180.0/CALC_PI); + break; + case IDC_RADIO_RAD: + break; + case IDC_RADIO_GRAD: + a = a * (200.0/CALC_PI); + break; + } + return a; +} + +double validate_angle2rad(calc_number_t *c) +{ + switch (calc.degr) { + case IDC_RADIO_DEG: + c->f = c->f * (CALC_PI/180.0); + break; + case IDC_RADIO_RAD: + break; + case IDC_RADIO_GRAD: + c->f = c->f * (CALC_PI/200.0); + break; + } + return c->f; +} + +void rpn_sin(calc_number_t *c) +{ + c->f = sin(validate_angle2rad(c)); +} +void rpn_cos(calc_number_t *c) +{ + c->f = cos(validate_angle2rad(c)); +} +void rpn_tan(calc_number_t *c) +{ + c->f = tan(validate_angle2rad(c)); +} + +void rpn_asin(calc_number_t *c) +{ + c->f = validate_rad2angle(asin(c->f)); + if (_isnan(c->f)) + calc.is_nan = TRUE; +} +void rpn_acos(calc_number_t *c) +{ + c->f = validate_rad2angle(acos(c->f)); + if (_isnan(c->f)) + calc.is_nan = TRUE; +} +void rpn_atan(calc_number_t *c) +{ + c->f = validate_rad2angle(atan(c->f)); + if (_isnan(c->f)) + calc.is_nan = TRUE; +} + +void rpn_sinh(calc_number_t *c) +{ + c->f = sinh(c->f); + if (_isnan(c->f)) + calc.is_nan = TRUE; +} +void rpn_cosh(calc_number_t *c) +{ + c->f = cosh(c->f); + if (_isnan(c->f)) + calc.is_nan = TRUE; +} +void rpn_tanh(calc_number_t *c) +{ + c->f = tanh(c->f); + if (_isnan(c->f)) + calc.is_nan = TRUE; +} + +void rpn_asinh(calc_number_t *c) +{ + c->f = asinh(c->f); + if (_isnan(c->f)) + calc.is_nan = TRUE; +} +void rpn_acosh(calc_number_t *c) +{ + c->f = acosh(c->f); + if (_isnan(c->f)) + calc.is_nan = TRUE; +} +void rpn_atanh(calc_number_t *c) +{ + c->f = atanh(c->f); + if (_isnan(c->f)) + calc.is_nan = TRUE; +} + +void rpn_int(calc_number_t *c) +{ + double int_part; + + modf(calc.code.f, &int_part); + c->f = int_part; +} + +void rpn_frac(calc_number_t *c) +{ + double int_part; + + c->f = modf(calc.code.f, &int_part); +} + +void rpn_reci(calc_number_t *c) +{ + if (c->f == 0) + calc.is_nan = TRUE; + else + c->f = 1./c->f; +} + +void rpn_fact(calc_number_t *c) +{ + double fact, mult, num; + + if (calc.base == IDC_RADIO_DEC) + num = c->f; + else + num = (double)c->i; + if (num > 1000) { + calc.is_nan = TRUE; + return; + } + if (num < 0) { + calc.is_nan = TRUE; + return; + } else + if (num == 0) + fact = 1; + else { + rpn_int(c); + fact = 1; + mult = 2; + while (mult <= num) { + fact *= mult; + mult++; + } + c->f = fact; + } + if (_finite(fact) == 0) + calc.is_nan = TRUE; + else + if (calc.base == IDC_RADIO_DEC) + c->f = fact; + else + c->i = (__int64)fact; +} + +__int64 logic_dbl2int(calc_number_t *a) +{ + double int_part; + int width; + + modf(a->f, &int_part); + width = (int_part==0) ? 1 : (int)log10(fabs(int_part))+1; + if (width > 63) { + calc.is_nan = TRUE; + return 0; + } + return (__int64)int_part; +} + +void rpn_not(calc_number_t *c) +{ + if (calc.base == IDC_RADIO_DEC) { + calc_number_t n; + n.i = logic_dbl2int(c); + c->f = (long double)(~n.i); + } else + c->i = ~c->i; +} + +void rpn_pi(calc_number_t *c) +{ + c->f = CALC_PI; +} + +void rpn_2pi(calc_number_t *c) +{ + c->f = CALC_PI*2; +} + +void rpn_sign(calc_number_t *c) +{ + if (calc.base == IDC_RADIO_DEC) + c->f = 0-c->f; + else + c->i = 0-c->i; +} + +void rpn_exp2(calc_number_t *c) +{ + if (calc.base == IDC_RADIO_DEC) { + c->f *= c->f; + if (_finite(c->f) == 0) + calc.is_nan = TRUE; + } else + c->i *= c->i; +} + +void rpn_exp3(calc_number_t *c) +{ + if (calc.base == IDC_RADIO_DEC) { + c->f = pow(c->f, 3.); + if (_finite(c->f) == 0) + calc.is_nan = TRUE; + } else + c->i *= (c->i*c->i); +} + +static __int64 myabs64(__int64 number) +{ + return (number < 0) ? 0-number : number; +} + +static unsigned __int64 sqrti(unsigned __int64 number) +{ +/* modified form of Newton's method for approximating roots */ +#define NEXT(n, i) (((n) + (i)/(n)) >> 1) + unsigned __int64 n, n1; + +#ifdef __GNUC__ + if (number == 0xffffffffffffffffLL) +#else + if (number == 0xffffffffffffffff) +#endif + return 0xffffffff; + + n = 1; + n1 = NEXT(n, number); + while (myabs64(n1 - n) > 1) { + n = n1; + n1 = NEXT(n, number); + } + while((n1*n1) > number) + n1--; + return n1; +#undef NEXT +} + +void rpn_sqrt(calc_number_t *c) +{ + if (calc.base == IDC_RADIO_DEC) { + if (c->f < 0) + calc.is_nan = TRUE; + else + c->f = sqrt(c->f); + } else { + c->i = sqrti(c->i); + } +} + +static __int64 cbrti(__int64 x) { + __int64 s, y, b; + + s = 60; + y = 0; + while(s >= 0) { + y = 2*y; + b = (3*y*(y + 1) + 1) << s; + s = s - 3; + if (x >= b) { + x = x - b; + y = y + 1; + } + } + return y; +} + +void rpn_cbrt(calc_number_t *c) +{ + if (calc.base == IDC_RADIO_DEC) +//#ifdef __GNUC__ +#if 0 + c->f = cbrt(c->f); +#else + c->f = pow(c->f,1./3.); +#endif + else { + c->i = cbrti(c->i); + } +} + +void rpn_exp(calc_number_t *c) +{ + c->f = exp(c->f); + if (_finite(c->f) == 0) + calc.is_nan = TRUE; +} + +void rpn_exp10(calc_number_t *c) +{ + double int_part; + + modf(c->f, &int_part); + if (fmod(int_part, 2.) == 0.) + calc.is_nan = TRUE; + else { + c->f = pow(10., c->f); + if (_finite(c->f) == 0) + calc.is_nan = TRUE; + } +} + +void rpn_ln(calc_number_t *c) +{ + if (c->f <= 0) + calc.is_nan = TRUE; + else + c->f = log(c->f); +} + +void rpn_log(calc_number_t *c) +{ + if (c->f <= 0) + calc.is_nan = TRUE; + else + c->f = log10(c->f); +} + +static double stat_sum(void) +{ + double sum = 0; + statistic_t *p = calc.stat; + + while (p != NULL) { + if (p->base == IDC_RADIO_DEC) + sum += p->num.f; + else + sum += p->num.i; + p = (statistic_t *)(p->next); + } + return sum; +} + +void rpn_ave(calc_number_t *c) +{ + double ave = 0; + int n; + + ave = stat_sum(); + n = SendDlgItemMessage(calc.hStatWnd, IDC_LIST_STAT, LB_GETCOUNT, 0, 0); + + if (n) + ave = ave / (double)n; + if (calc.base == IDC_RADIO_DEC) + c->f = ave; + else + c->i = (__int64)ave; +} + +void rpn_sum(calc_number_t *c) +{ + double sum = stat_sum(); + + if (calc.base == IDC_RADIO_DEC) + c->f = sum; + else + c->i = (__int64)sum; +} + +static void rpn_s_ex(calc_number_t *c, int pop_type) +{ + double ave = 0; + double n = 0; + double dev = 0; + double num = 0; + statistic_t *p = calc.stat; + + ave = stat_sum(); + n = (double)SendDlgItemMessage(calc.hStatWnd, IDC_LIST_STAT, LB_GETCOUNT, 0, 0); + + if (n == 0) { + c->f = 0; + return; + } + ave = ave / n; + + dev = 0; + p = calc.stat; + while (p != NULL) { + if (p->base == IDC_RADIO_DEC) + num = p->num.f; + else + num = (double)p->num.i; + dev += pow(num-ave, 2.); + p = (statistic_t *)(p->next); + } + dev = sqrt(dev/(pop_type ? n-1 : n)); + if (calc.base == IDC_RADIO_DEC) + c->f = dev; + else + c->i = (__int64)dev; +} + +void rpn_s(calc_number_t *c) +{ + rpn_s_ex(c, 0); +} + +void rpn_s_m1(calc_number_t *c) +{ + rpn_s_ex(c, 1); +} + +void rpn_dms2dec(calc_number_t *c) +{ + double d, m, s; + + m = modf(c->f, &d) * 100; + s = (modf(m, &m) * 100)+.5; + modf(s, &s); + + m = m/60; + s = s/3600; + + c->f = d + m + s; +} + +void rpn_dec2dms(calc_number_t *c) +{ + double d, m, s; + + m = modf(c->f, &d) * 60; + s = ceil(modf(m, &m) * 60); + c->f = d + m/100. + s/10000.; +} + +void rpn_zero(calc_number_t *c) +{ + c->f = 0; +} + +void rpn_copy(calc_number_t *dst, calc_number_t *src) +{ + *dst = *src; +} + +int rpn_is_zero(calc_number_t *c) +{ + return (c->f == 0); +} + +void rpn_alloc(calc_number_t *c) +{ +} + +void rpn_free(calc_number_t *c) +{ +} diff --git a/rosapps/roscalc/lang/en-US.rc b/rosapps/roscalc/lang/en-US.rc new file mode 100644 index 00000000000..b96e85007ed --- /dev/null +++ b/rosapps/roscalc/lang/en-US.rc @@ -0,0 +1,365 @@ +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +// Dialog + +IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 +STYLE WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS Calculator" +MENU IDR_MENU_SCIENTIFIC_1 +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + GROUPBOX "",IDC_STATIC,4,16,132,21 + CONTROL "Hex",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29, + 10 + CONTROL "Dec",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29, + 10 + CONTROL "Oct",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27, + 10 + CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24, + 26,10 + GROUPBOX "",IDC_STATIC,4,36,76,21 + CONTROL "Inv",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,8,44,26,10 + CONTROL "Hyp",IDC_CHECK_HYP,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,40,44,29,10 + CTEXT "",IDC_TEXT_PARENT,84,40,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + CTEXT "",IDC_TEXT_MEMORY,112,40,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + PUSHBUTTON "Sta",IDC_BUTTON_STA,4,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Ave",IDC_BUTTON_AVE,4,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Sum",IDC_BUTTON_SUM,4,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "s",IDC_BUTTON_S,4,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Dat",IDC_BUTTON_DAT,4,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "F-E",IDC_BUTTON_FE,38,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "dms",IDC_BUTTON_DMS,38,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "sin",IDC_BUTTON_SIN,38,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "cos",IDC_BUTTON_COS,38,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "tan",IDC_BUTTON_TAN,38,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "(",IDC_BUTTON_LEFTPAR,64,64,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Exp",IDC_BUTTON_EXP,64,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "x^y",IDC_BUTTON_XeY,64,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "x^2",IDC_BUTTON_Xe2,64,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "x^3",IDC_BUTTON_Xe3,64,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON ")",IDC_BUTTON_RIGHTPAR,90,64,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "ln",IDC_BUTTON_LN,90,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "log",IDC_BUTTON_LOG,90,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "n!",IDC_BUTTON_NF,90,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1/x",IDC_BUTTON_RX,90,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MC",IDC_BUTTON_MC,124,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MR",IDC_BUTTON_MR,124,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MS",IDC_BUTTON_MS,124,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "M+",IDC_BUTTON_MP,124,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "pi",IDC_BUTTON_PI,124,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "7",IDC_BUTTON_7,158,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "4",IDC_BUTTON_4,158,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1",IDC_BUTTON_1,158,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "0",IDC_BUTTON_0,158,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "A",IDC_BUTTON_A,158,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "8",IDC_BUTTON_8,184,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "5",IDC_BUTTON_5,184,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "2",IDC_BUTTON_2,184,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+/-",IDC_BUTTON_SIGN,184,121,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "B",IDC_BUTTON_B,184,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "9",IDC_BUTTON_9,210,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "6",IDC_BUTTON_6,210,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "3",IDC_BUTTON_3,210,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON ",",IDC_BUTTON_DOT,210,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "C",IDC_BUTTON_C,210,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "/",IDC_BUTTON_DIV,236,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "*",IDC_BUTTON_MULT,236,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "-",IDC_BUTTON_SUB,236,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+",IDC_BUTTON_ADD,236,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "D",IDC_BUTTON_D,236,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Mod",IDC_BUTTON_MOD,262,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Or",IDC_BUTTON_OR,262,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Lsh",IDC_BUTTON_LSH,262,102,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "=",IDC_BUTTON_EQU,262,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "E",IDC_BUTTON_E,262,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "And",IDC_BUTTON_AND,288,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Xor",IDC_BUTTON_XOR,288,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Not",IDC_BUTTON_NOT,288,102,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Int",IDC_BUTTON_INT,288,121,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "F",IDC_BUTTON_F,288,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + GROUPBOX "",IDC_STATIC,140,16,172,21 + CONTROL "Qword",IDC_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON | + NOT WS_VISIBLE,148,24,37,10 + CONTROL "Dword",IDC_RADIO_DWORD,"Button",BS_AUTORADIOBUTTON | + NOT WS_VISIBLE,188,24,37,10 + CONTROL "Word",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT + WS_VISIBLE,232,24,33,10 + CONTROL "Byte",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT + WS_VISIBLE,272,24,30,10 + CONTROL "Degrees",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, + 42,10 + CONTROL "Radians",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + 24,42,10 + CONTROL "Gradians",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, + 236,24,44,10 + PUSHBUTTON "C",IDC_BUTTON_CANC,272,40,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "CE",IDC_BUTTON_CE,228,40,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Back",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + RTEXT "",IDC_TEXT_OUTPUT,4,4,308,12,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5, NOT WS_VISIBLE +END + +IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 +STYLE WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS Calculator" +MENU IDR_MENU_STANDARD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + PUSHBUTTON "C",IDC_BUTTON_CANC,128,24,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "CE",IDC_BUTTON_CE,84,24,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Back",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + RTEXT "",IDC_TEXT_OUTPUT,4,4,164,12,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + PUSHBUTTON "7",IDC_BUTTON_7,40,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "4",IDC_BUTTON_4,40,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1",IDC_BUTTON_1,40,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "0",IDC_BUTTON_0,40,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "8",IDC_BUTTON_8,66,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "5",IDC_BUTTON_5,66,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "2",IDC_BUTTON_2,66,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+/-",IDC_BUTTON_SIGN,66,105,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "9",IDC_BUTTON_9,92,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "6",IDC_BUTTON_6,92,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "3",IDC_BUTTON_3,92,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON ",",IDC_BUTTON_DOT,92,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "/",IDC_BUTTON_DIV,118,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "*",IDC_BUTTON_MULT,118,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "-",IDC_BUTTON_SUB,118,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+",IDC_BUTTON_ADD,118,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Sqrt",IDC_BUTTON_SQRT,144,48,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "%",IDC_BUTTON_PERCENT,144,67,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1/x",IDC_BUTTON_RX,144,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "=",IDC_BUTTON_EQU,144,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + CTEXT "",IDC_TEXT_MEMORY,4,24,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + PUSHBUTTON "MC",IDC_BUTTON_MC,4,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MR",IDC_BUTTON_MR,4,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MS",IDC_BUTTON_MS,4,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "M+",IDC_BUTTON_MP,4,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5, NOT WS_VISIBLE +END + +IDD_DIALOG_ABOUT DIALOG DISCARDABLE 0, 0, 264, 169 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION +CAPTION "About ReactOS Calc" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,105,148,52,16 + CONTROL 106,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | + SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 + LTEXT "ReactOS Calculator",IDC_STATIC,120,12,132,8, + SS_CENTERIMAGE + LTEXT "Version ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE + LTEXT "Written by Carlo Bramini",IDC_STATIC,120,32,132,8, + SS_CENTERIMAGE + GROUPBOX "",IDC_STATIC,112,0,148,52 + GROUPBOX "",IDC_STATIC,4,56,256,88 + EDITTEXT IDC_EDIT_LICENSE,12,68,240,68,ES_MULTILINE | ES_READONLY | + WS_VSCROLL +END + +IDD_DIALOG_STAT DIALOG DISCARDABLE 0, 0, 163, 85 +STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Statistics box" +FONT 8, "MS Sans Serif" +BEGIN + LISTBOX IDC_LIST_STAT,4,4,156,40,LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "RET",IDC_BUTTON_RET,4,48,36,16 + PUSHBUTTON "LOAD",IDC_BUTTON_LOAD,44,48,36,16 + PUSHBUTTON "CD",IDC_BUTTON_CD,84,48,36,16 + PUSHBUTTON "CAD",IDC_BUTTON_CAD,124,48,36,16 + CTEXT "n=0",IDC_TEXT_NITEMS,4,68,156,12,SS_CENTERIMAGE | + SS_SUNKEN +END + + +// Menus + +IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +BEGIN + POPUP "Edit" + BEGIN + MENUITEM "Copy\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Paste\tCTRL-V", IDM_EDIT_PASTE + END + POPUP "View" + BEGIN + MENUITEM "Standard", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Scientific", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Conversion", IDM_VIEW_CONVERSION + MENUITEM SEPARATOR + MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Octal\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Binary\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM SEPARATOR + MENUITEM "Degrees\tF2", IDM_VIEW_DEG, CHECKED + MENUITEM "Radians\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "Gradians\tF4", IDM_VIEW_GRAD, CHECKED + MENUITEM SEPARATOR + MENUITEM "Group digits", IDM_VIEW_GROUP, CHECKED + END + POPUP "Help" + BEGIN + MENUITEM "Help topics", IDM_HELP_HELP + MENUITEM SEPARATOR + MENUITEM "About ReactOS Calc", IDM_HELP_ABOUT + END +END + +IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +BEGIN + POPUP "Edit" + BEGIN + MENUITEM "Copy\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Paste\tCTRL-V", IDM_EDIT_PASTE + END + POPUP "View" + BEGIN + MENUITEM "Standard", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Scientific", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Conversion", IDM_VIEW_CONVERSION + MENUITEM SEPARATOR + MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Octal\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Binary\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM SEPARATOR + MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED + MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED + MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED + MENUITEM "Byte\tF4", IDM_VIEW_BYTE, CHECKED + MENUITEM SEPARATOR + MENUITEM "Group digits", IDM_VIEW_GROUP, CHECKED + END + POPUP "Help" + BEGIN + MENUITEM "Help topics", IDM_HELP_HELP + MENUITEM SEPARATOR + MENUITEM "About ReactOS Calc", IDM_HELP_ABOUT + END +END + +IDR_MENU_STANDARD MENU DISCARDABLE +BEGIN + POPUP "Edit" + BEGIN + MENUITEM "Copy\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Paste\tCTRL-V", IDM_EDIT_PASTE + END + POPUP "View" + BEGIN + MENUITEM "Standard", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Scientific", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Conversion", IDM_VIEW_CONVERSION + MENUITEM SEPARATOR + MENUITEM "Group digits", IDM_VIEW_GROUP, CHECKED + END + POPUP "Help" + BEGIN + MENUITEM "Help topics", IDM_HELP_HELP + MENUITEM SEPARATOR + MENUITEM "About ReactOS Calc", IDM_HELP_ABOUT + END +END + +// String Tables + +STRINGTABLE DISCARDABLE +BEGIN + IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_MATH_ERROR "Error" + IDS_QUICKHELP "Quick help" +END + diff --git a/rosapps/roscalc/lang/it-IT.rc b/rosapps/roscalc/lang/it-IT.rc new file mode 100644 index 00000000000..a4254367610 --- /dev/null +++ b/rosapps/roscalc/lang/it-IT.rc @@ -0,0 +1,365 @@ +LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL + +// Dialog + +IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 +STYLE WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Calcolatrice ReactOS" +MENU IDR_MENU_SCIENTIFIC_1 +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "",IDC_STATIC,4,16,132,21 + CONTROL "Hex",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29, + 10 + CONTROL "Dec",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29, + 10 + CONTROL "Oct",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27, + 10 + CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24, + 26,10 + GROUPBOX "",IDC_STATIC,4,36,76,21 + CONTROL "Inv",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,8,44,26,10 + CONTROL "Hyp",IDC_CHECK_HYP,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,40,44,29,10 + CTEXT "",IDC_TEXT_PARENT,84,40,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + CTEXT "",IDC_TEXT_MEMORY,112,40,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + PUSHBUTTON "Sta",IDC_BUTTON_STA,4,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Ave",IDC_BUTTON_AVE,4,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Sum",IDC_BUTTON_SUM,4,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "s",IDC_BUTTON_S,4,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Dat",IDC_BUTTON_DAT,4,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "F-E",IDC_BUTTON_FE,38,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "dms",IDC_BUTTON_DMS,38,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "sin",IDC_BUTTON_SIN,38,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "cos",IDC_BUTTON_COS,38,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "tan",IDC_BUTTON_TAN,38,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "(",IDC_BUTTON_LEFTPAR,64,64,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Exp",IDC_BUTTON_EXP,64,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "x^y",IDC_BUTTON_XeY,64,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "x^2",IDC_BUTTON_Xe2,64,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "x^3",IDC_BUTTON_Xe3,64,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON ")",IDC_BUTTON_RIGHTPAR,90,64,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "ln",IDC_BUTTON_LN,90,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "log",IDC_BUTTON_LOG,90,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "n!",IDC_BUTTON_NF,90,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1/x",IDC_BUTTON_RX,90,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MC",IDC_BUTTON_MC,124,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MR",IDC_BUTTON_MR,124,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MS",IDC_BUTTON_MS,124,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "M+",IDC_BUTTON_MP,124,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "pi",IDC_BUTTON_PI,124,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "7",IDC_BUTTON_7,158,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "4",IDC_BUTTON_4,158,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1",IDC_BUTTON_1,158,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "0",IDC_BUTTON_0,158,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "A",IDC_BUTTON_A,158,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "8",IDC_BUTTON_8,184,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "5",IDC_BUTTON_5,184,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "2",IDC_BUTTON_2,184,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+/-",IDC_BUTTON_SIGN,184,121,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "B",IDC_BUTTON_B,184,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "9",IDC_BUTTON_9,210,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "6",IDC_BUTTON_6,210,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "3",IDC_BUTTON_3,210,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON ",",IDC_BUTTON_DOT,210,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "C",IDC_BUTTON_C,210,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "/",IDC_BUTTON_DIV,236,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "*",IDC_BUTTON_MULT,236,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "-",IDC_BUTTON_SUB,236,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+",IDC_BUTTON_ADD,236,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "D",IDC_BUTTON_D,236,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Mod",IDC_BUTTON_MOD,262,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Or",IDC_BUTTON_OR,262,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Lsh",IDC_BUTTON_LSH,262,102,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "=",IDC_BUTTON_EQU,262,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "E",IDC_BUTTON_E,262,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "And",IDC_BUTTON_AND,288,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Xor",IDC_BUTTON_XOR,288,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Not",IDC_BUTTON_NOT,288,102,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Int",IDC_BUTTON_INT,288,121,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "F",IDC_BUTTON_F,288,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + GROUPBOX "",IDC_STATIC,140,16,172,21 + CONTROL "Qword",IDC_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON | + NOT WS_VISIBLE,148,24,37,10 + CONTROL "Dword",IDC_RADIO_DWORD,"Button",BS_AUTORADIOBUTTON | + NOT WS_VISIBLE,188,24,37,10 + CONTROL "Word",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT + WS_VISIBLE,232,24,33,10 + CONTROL "Byte",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT + WS_VISIBLE,272,24,30,10 + CONTROL "Gradi",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, + 33,10 + CONTROL "Radianti",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + 24,42,10 + CONTROL "Gradienti",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, + 236,24,44,10 + PUSHBUTTON "C",IDC_BUTTON_CANC,272,40,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "CE",IDC_BUTTON_CE,228,40,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Cancella",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + RTEXT "",IDC_TEXT_OUTPUT,4,4,308,12,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5, NOT WS_VISIBLE +END + +IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 +STYLE WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Calcolatrice ReactOS" +MENU IDR_MENU_STANDARD +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "C",IDC_BUTTON_CANC,128,24,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "CE",IDC_BUTTON_CE,84,24,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Cancella",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + RTEXT "",IDC_TEXT_OUTPUT,4,4,164,12,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + PUSHBUTTON "7",IDC_BUTTON_7,40,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "4",IDC_BUTTON_4,40,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1",IDC_BUTTON_1,40,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "0",IDC_BUTTON_0,40,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "8",IDC_BUTTON_8,66,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "5",IDC_BUTTON_5,66,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "2",IDC_BUTTON_2,66,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+/-",IDC_BUTTON_SIGN,66,105,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "9",IDC_BUTTON_9,92,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "6",IDC_BUTTON_6,92,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "3",IDC_BUTTON_3,92,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON ",",IDC_BUTTON_DOT,92,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "/",IDC_BUTTON_DIV,118,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "*",IDC_BUTTON_MULT,118,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "-",IDC_BUTTON_SUB,118,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+",IDC_BUTTON_ADD,118,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Sqrt",IDC_BUTTON_SQRT,144,48,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "%",IDC_BUTTON_PERCENT,144,67,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1/x",IDC_BUTTON_RX,144,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "=",IDC_BUTTON_EQU,144,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + CTEXT "",IDC_TEXT_MEMORY,4,24,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + PUSHBUTTON "MC",IDC_BUTTON_MC,4,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MR",IDC_BUTTON_MR,4,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MS",IDC_BUTTON_MS,4,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "M+",IDC_BUTTON_MP,4,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5, NOT WS_VISIBLE +END + +IDD_DIALOG_ABOUT DIALOG DISCARDABLE 0, 0, 264, 169 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION +CAPTION "Informazioni su ReactOS Calc" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,105,148,52,16 + CONTROL 106,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | + SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 + LTEXT "Calcolatrice ReactOS",IDC_STATIC,120,12,132,8, + SS_CENTERIMAGE + LTEXT "Versione ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE + LTEXT "Scritto da Carlo Bramini",IDC_STATIC,120,32,132,8, + SS_CENTERIMAGE + GROUPBOX "",IDC_STATIC,112,0,148,52 + GROUPBOX "",IDC_STATIC,4,56,256,88 + EDITTEXT IDC_EDIT_LICENSE,12,68,240,68,ES_MULTILINE | ES_READONLY | + WS_VSCROLL +END + +IDD_DIALOG_STAT DIALOG DISCARDABLE 0, 0, 163, 85 +STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Finestra di statistica" +FONT 8, "MS Sans Serif" +BEGIN + LISTBOX IDC_LIST_STAT,4,4,156,40,LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "RET",IDC_BUTTON_RET,4,48,36,16 + PUSHBUTTON "LOAD",IDC_BUTTON_LOAD,44,48,36,16 + PUSHBUTTON "CD",IDC_BUTTON_CD,84,48,36,16 + PUSHBUTTON "CAD",IDC_BUTTON_CAD,124,48,36,16 + CTEXT "n=0",IDC_TEXT_NITEMS,4,68,156,12,SS_CENTERIMAGE | + SS_SUNKEN +END + + +// Menus + +IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +BEGIN + POPUP "Modifica" + BEGIN + MENUITEM "Copia\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Incolla\tCTRL-V", IDM_EDIT_PASTE + END + POPUP "Visualizza" + BEGIN + MENUITEM "Standard", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Scientifica", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Conversione", IDM_VIEW_CONVERSION + MENUITEM SEPARATOR + MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Decimale\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Ottale\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Binaria\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM SEPARATOR + MENUITEM "Gradi\tF2", IDM_VIEW_DEG, CHECKED + MENUITEM "Radianti\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "Gradienti\tF4", IDM_VIEW_GRAD, CHECKED + MENUITEM SEPARATOR + MENUITEM "Raggruppamento cifre", IDM_VIEW_GROUP, CHECKED + END + POPUP "Aiuto" + BEGIN + MENUITEM "Guida in linea", IDM_HELP_HELP + MENUITEM SEPARATOR + MENUITEM "Informazioni su ReactOS Calc", IDM_HELP_ABOUT + END +END + +IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +BEGIN + POPUP "Modifica" + BEGIN + MENUITEM "Copia\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Incolla\tCTRL-V", IDM_EDIT_PASTE + END + POPUP "Visualizza" + BEGIN + MENUITEM "Standard", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Scientifica", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Conversione", IDM_VIEW_CONVERSION + MENUITEM SEPARATOR + MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Decimale\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Ottale\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Binaria\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM SEPARATOR + MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED + MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED + MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED + MENUITEM "Byte\tF4", IDM_VIEW_BYTE, CHECKED + MENUITEM SEPARATOR + MENUITEM "Raggruppamento cifre", IDM_VIEW_GROUP, CHECKED + END + POPUP "Aiuto" + BEGIN + MENUITEM "Guida in linea", IDM_HELP_HELP + MENUITEM SEPARATOR + MENUITEM "Informazioni su ReactOS Calc", IDM_HELP_ABOUT + END +END + +IDR_MENU_STANDARD MENU DISCARDABLE +BEGIN + POPUP "Modifica" + BEGIN + MENUITEM "Copia\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Incolla\tCTRL-V", IDM_EDIT_PASTE + END + POPUP "Visualizza" + BEGIN + MENUITEM "Standard", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Scientifica", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Conversione", IDM_VIEW_CONVERSION + MENUITEM SEPARATOR + MENUITEM "Raggruppamento cifre", IDM_VIEW_GROUP, CHECKED + END + POPUP "Aiuto" + BEGIN + MENUITEM "Guida in linea", IDM_HELP_HELP + MENUITEM SEPARATOR + MENUITEM "Informazioni su ReactOS Calc", IDM_HELP_ABOUT + END +END + +// String Tables + +STRINGTABLE DISCARDABLE +BEGIN + IDS_STRING_LICENSE "ReactOS Calc e` software libero rilasciato sotto licenza GNU GPL.\r\n\r\nE` possibile ottenere una copia del testo della licenza GNU GPL all'indirizzo:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nE` possibile ottenere una traduzione del testo della licenza GNU GPL all'indirizzo:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_MATH_ERROR "Errore" + IDS_QUICKHELP "Guida rapida" +END + diff --git a/rosapps/roscalc/makeall.bat b/rosapps/roscalc/makeall.bat new file mode 100644 index 00000000000..28e4f56e903 --- /dev/null +++ b/rosapps/roscalc/makeall.bat @@ -0,0 +1,2 @@ +make gmu-mp=1 +make gnu_mp=0 diff --git a/rosapps/roscalc/makefile b/rosapps/roscalc/makefile new file mode 100644 index 00000000000..5b64eb2217b --- /dev/null +++ b/rosapps/roscalc/makefile @@ -0,0 +1,82 @@ +# Makefile for ReactOS Calc +# +# syntax: +# make +# +# parameters: +# +# x68_64=1 : compile for x86_64 +# undefined: use default tools (typically IA_32) +# +# gnu-mp=1 : compile with GNU multi precision library +# undefined: use standard IEEE precision + +# Default tools +TOOL_PREFIX= + +ifdef x86-64 +TOOL_PREFIX=x86_64-pc-mingw32- +endif + +CPP = $(TOOL_PREFIX)g++.exe +CC = $(TOOL_PREFIX)gcc.exe +WINDRES = $(TOOL_PREFIX)windres.exe + +# Define some variables +INCLUDE = +DEBUG = -Wall +OPTIMIZE = -O2 -fomit-frame-pointer + +ifdef x86-64 +# nothing here +else +OPTIMIZE+= -mpreferred-stack-boundary=2 +endif + +# Strip, typical mingw flag, help library +LIBS = -s -mwindows -lhtmlhelp + +# Check if precision is specified +ifndef gnu-mp +gnu_mp=1 +endif + +# Check the precision flags +ifeq ($(gnu-mp), 1) +PRECISION=gmp +DEFS += -DENABLE_MULTI_PRECISION +FILES = rpn_mpfr about fun_mpfr utl_mpfr winmain +LIBS += -lgmp -lmpfr +else +PRECISION=ieee +DEFS += +FILES = rpn about function utl winmain +LIBS += -lm +endif + +CFLAGS = $(DEFS) $(INCLUDE) $(DEBUG) $(OPTIMIZE) + +DIR_OBJECTS = obj/$(TOOL_PREFIX)$(PRECISION)/ + +# target file name +TARGET = $(DIR_OBJECTS)calc.exe + + +OBJS= $(addprefix $(DIR_OBJECTS), $(addsuffix .o, $(FILES))) +RES = $(DIR_OBJECTS)resource.res + +.PHONY: all all-before all-after clean clean-custom + +all: all-before $(TARGET) all-after + +clean: clean-custom + $(RM) $(OBJ) $(TARGET) + +$(TARGET): $(OBJS) $(RES) + $(CC) $^ -o $@ $(LIBS) + +$(DIR_OBJECTS)%.o: %.c + $(CC) -c $< -o $@ $(CFLAGS) + +$(RES): resource.rc + $(WINDRES) -i $< --input-format=rc -o $@ -O coff diff --git a/rosapps/roscalc/res/ROS_logo.bmp b/rosapps/roscalc/res/ROS_logo.bmp new file mode 100644 index 0000000000000000000000000000000000000000..ef21ef99a935d1de1bce71d4568a7953d887478b GIT binary patch literal 10166 zcmeG>eQXm~o{xMi`!*lsGC;hzq3jlpT9d68gUZ>-n{pFzweJX<2QEpZ$vV@nu5^FF!})g^zgR~{TQzB{E~cIa522P z5_O18XyT6nWT~k_fx!;sXtbjtj{}8gCQ(OY6)Jw$fF=gpP}BRxsIR*XO-@aq){{-h zTCoLni4J79Sy14MA=C=E_8J4~^0c9$!9JiFM8?WuH1S0T8oJVk=KdZ=P4!jC`1X3# zang#y_kw`iidsLi1I`e#3stD<-7UzLw-tCc zq2QHP)aJAx$NL5}3F~b~ssP7qm13r_Wqh+@V1+KW!1L*;(`t>WQ3v{#d|B9L#j{tp;^JG2PwGU0+ zyo4V7eGc@V1ljG#@~#F=-=9W(?SBAUhmose6KXsAAISK|deG4dvJN9h{XtZ$djVt_LDu)osKdDz8B2Dei5s7wR-qVK zE8j%HF9yIrR-kzvO?>$$R8?64Ht$2m9b3S@0Tj5QP}4^s31D(Pk zj}_wG3bOWr99^(~0vTQfy+zQQ*s+o19mGU8=v$EwKC?hh6+@mt4h;@LPECN{z#m|b zIfy0W+hBu}U<07j3bNZl->P@>!M@<1KTkkTkbEJz0{TM!PQqOAYmk3H&-%UvvCrYT z1)f{r@fK*%&Pb9pqt)?`#S_E%27+e@KNfANi?rm8@a4l=NgMi}?Yvhq=uGmWQzz-Z z2kQx@by_iD7w%4_e#%}R0evhOxIe9)@XppoG(N$iSKopg-OkRnO&3mO8Z^HdC@@S%Vp4_~KUtjp4$=_tSWPF~s(cIrEO-Mp^!^Vw}@ zUn;V@b?FyEtWzt+pZ;5 zma=Y58SuY-`}S<5FHX1+ic)-Ue0FIAvL9rSflF_(o!~r55y~DZN}^IZqh+0{Tc6p+ zOV?$oU9NKYKN}B1uw8s_l*E#6#D7E&0I{H8>-ZhNXcSpK4`M{a23c8K9-8#UF9 z2M^wMl}BUnC~S2uOx~qSVkAw>K$;A{t6-}Nj1QyZvW8)U$c`$VPG#Y0#@4J4oxZJU zY;@f&|9lxI^O4{h{=TzisJ2ty^ zwzB-=W$WY|Xds)OwgrnkO>_lT%KicySRdFEiNN^eHfj_h8kIbq6Uyn$;iU4-AOB)i zdU}B$)(kQhT;vW-9v;G@Q_jr1*s_?J87cXqeL%p1*^y#iw)4>}2yeRsxAEZ};Dfbl-lIV_hY&d2W0)eWs0)d# zX-0tutTL83fE7}Mk`HNNtwI%Yu1+e&bvBuL1}o$mL&m%)-COMrCF3TjH%3v{4s(*M|4t#3RG`ou&hHm>Gnu3~ zS@0@G&#-=qDj=KVP)qHH@jB{Ibmm5NyimgoAJsn~B+KiPFdfAsi!9sVZWnME>WxxI zB8%mT{vu2nl^*Ugx7?`&*5N`?WHYh7fnmV;>X`8(gp}&)t)PEdtRn5ArXmaSHLAZ( zz(hNiEyc(9IM5-!-CY40V)T2M9jp;pvB?mBG!~Si6WBu|gr;PKP9ct3u*79#h?Vz;)GHr}hyWrKic^ACq&Xk8Hi3F%s7~PMh8mPu1!e#9 z16HUx!a0cYI(#Z&zZVyUbP(%YHp9D_O(BoyQQ&NmQ{Ws9dQbD$Z;ijWoSX|-k+xv% zs3(+Cy&%10S~ubr=Ymj#^a%{uSp2i5JdB%2W|# zhB!i4z^i%V3|1T+^)NXMV{&GgvEb!NVPHZzwr1bdiOZZ7XTs40?0+9DksizQI1!dz zE33??scNd{5MU-kTz}|SW(+Cj6%?@-555SehKwG!6(`f2o5=`qbTYWf%X^>;SQ)pz zSI=DL0=OP(GYk2z6_umClqQip8INixH_M&?)jJa_PXsNN|KzEZH~{ikkVw25y=Gh# z7ER-f&W!7ig&RU{gIO>q<9v>G>xyuZmPn-gCqY=f(ReF=^&Af5Yco6)r6RNvfT1*y zVm(yW;=~|03Hr0AWd7_iXnzCy&OxQMhG_QXmgek+SD_i2i(n?XeGY4LeA%{aE5_!z zIp_z9ij97MDh7bwU}v))34kmr2#sJ---*fR!Sy8nWjGh@Jaj2EUo0daXTu^J%sNen z^sD9+Pz{nLH(hF7b$?a=Z}NTjz!xAxW=QGh{HM>&)eA)fb6%FImg{|tCRB8an4go4 zKxW;sPYE)L2`gf#w19J>V=)wlX2Xg{S=QHhFVqrj@!2XWj`sH2d=(eItvoo`Sl-`V z(V1V7<8k_zt5lc$N`C-rm9U5Xic%-KnbS~ZFbjT(o>vl^mX4Z`?&JpwwG3JXg#^jwYk5$6W$3`<6C=G%RQb_h+cAFSE?!3 z!xryWQ)}grS4Yj_qjo)H0CvF&Qox)cuNCS{;tGsOCeqS)Puj_}7aBFL#%-_vXIEF> zfir)r`P-QTD?e;>_0*>5_omcd?>(V{Jh(p!=QS`eoPJUw71s|(k@Co}rCRNQMKDJa z+~UB4TQT?+T&Y-mXeI9etRxns4Ud$x4xjvPxOKzDGc`4rzRCSVZf?z)4J*?s*Blz( z`qlodvd*86m*RAm%_oEza@5KyXesNVsOs8{5njf%lqT3*1`Cnr=+y*_2?#~-Qn3ig z@!yoszFhLo$nQ!hp}ywRj~ zgh%yo%#tCCiPKbO$#aXdkmEh@k6%=lS1_*R zoneRO#*f;LWNBU>K2Vbj>R$!>fA@Oz+M8uxxvGDe=DL2EyrRI1M+nX+u>$&!c{~n- ze0tT%A*nAJ*6e=eliyDLYPTkB!}{F$Ex8}8A3Jk#;v79Fkc-oiW zh=_@le2yQzrn>y%r=Mh{9k?`q{_frROEqI-+b@o+9QoabVa@f!(I|)h1*d3YgQo}J zZzAuSGMu>a(-$w_`Se#=X%{ce-@SYH{5LgYXI5;#xMIb{VNKcLXbl5Y^7{E~_=6R7 zq@F~;fBoyjhu>=3KYRxCN9X5rYu1ke0DCHty&SRdg8mEu^w%aN&}dTIPhR=w-$VFq z*#hh@)zp9lD@ums8U(MUH@;ApH+Fs@f z%%2T^$p6KTG^RMl-mW34L-dj8FH^}`pQ!9iLewPAFMWLM(XWU`p7UkBzH-BgizR9M zTQ({AM}HSGuruP)dHr8IXhZZ1SZtBk#=dJi;m9omuay>@Cm{X`7x%H)_9frLc?k}1 z!jBBm7RBeo_cu~$35Z^ac^)TU0s3)z!HU$ zH!caF7z?HR1;>WMXVZFO+~H2|D2#9rY51A(QRAB6hsmgQ#Ao{BV_XJW3%{&N;Nbi_@% literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/res/calc.ico b/rosapps/roscalc/res/calc.ico new file mode 100644 index 0000000000000000000000000000000000000000..8d6164a89db1c26d7bb2a1e2e0e1db72dab21071 GIT binary patch literal 766 zcmZQzU<5)11px*Sc)`TLAO@s0fLH;D9e|jTfdxo1Ff;(=(7~N`DGYCJZDIKH?h3<` zb2$uuetlv1^X(18n^RL5{(O4E@aEbUhA*#xa@$H6{`~vH@aEhcpxQeO3_>7V7#RN3 z82mzUFxUSTyLaz)aR~*2@bcQb*Vc2R@bB_-?`GfzdY2Ul*%^32d}D577GqW*WH$!$ zH*;@h*~|)r?3=-SWb+1r{tZwMgZ&3|&jw>KFo5%c9tHvgA65NA7i9nFtVa(&8b=r0 V_yz_BW}wR$sf9u2!3{@Z006#RY99aq literal 0 HcmV?d00001 diff --git a/rosapps/roscalc/res/calc_sm.ico b/rosapps/roscalc/res/calc_sm.ico new file mode 100644 index 0000000000000000000000000000000000000000..c33c0cd7aea3caac199d2f4549ad56f16cc401b9 GIT binary patch literal 318 zcmZWiF$%&!5S)_(+f-sD+6k6|q*OctsRR+kDvgMRjq!3?q=;zY1AK{vf{(DUu&@>@ z%ap-$FPb8_%go;FuyX*Twk!*#>I^8ENidr#fq@ePQObGZ1&+sIhUC7*<1#~h4iVo% zyp9sdJHhKJae5X}RzQVLt9yo;4-}>(*7+=>_;})o@ua={mXvd)q*N+c_Si + +#include "resource.h" + +#ifndef IDC_STATIC +#define IDC_STATIC -1 +#endif + +// Common resources + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +// Icons + +IDI_CALC_BIG ICON DISCARDABLE "res/calc.ico" +IDI_CALC_SMALL ICON DISCARDABLE "res/calc_sm.ico" + +// Bitmaps + +IDB_BITMAP_ROS BITMAP DISCARDABLE "res/ROS_logo.bmp" + + +#include "lang/en-US.rc" +#include "lang/it-IT.rc" + diff --git a/rosapps/roscalc/roscalc.rbuild b/rosapps/roscalc/roscalc.rbuild new file mode 100644 index 00000000000..9e04760c372 --- /dev/null +++ b/rosapps/roscalc/roscalc.rbuild @@ -0,0 +1,15 @@ + + . + + 0x0501 + 0x0501 + user32 + gdi32 + kernel32 + about.c + function.c + rpn.c + utl.c + winmain.c + resource.rc + diff --git a/rosapps/roscalc/rpn.c b/rosapps/roscalc/rpn.c new file mode 100644 index 00000000000..1941112a912 --- /dev/null +++ b/rosapps/roscalc/rpn.c @@ -0,0 +1,419 @@ +#include "calc.h" + +typedef struct { + calc_number_t number; + unsigned int operation; +} calc_node_t; + +typedef struct { + calc_node_t node; + void *next; +} stack_node_t; + +typedef void (*operator_call)(calc_number_t *, calc_number_t *, calc_number_t *); + +typedef struct { + unsigned int prec; + operator_call op_f; + operator_call op_i; + operator_call op_p; +} calc_operator_t; + +static stack_node_t *stack; +static stack_node_t temp; +static BOOL percent_mode; + +static void rpn_add_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_sub_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_mul_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_div_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_mod_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_pow_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_sqr_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_and_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_or_f (calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_xor_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_shl_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); + +/* Integer mode calculations */ +static void rpn_add_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_sub_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_mul_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_div_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_mod_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_and_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_or_i (calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_xor_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_shl_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); + +/* Percentage mode calculations */ +static void rpn_add_p(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_sub_p(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_mul_p(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_div_p(calc_number_t *r, calc_number_t *a, calc_number_t *b); + +static const calc_operator_t operator_list[] = { + { 0, NULL, NULL, NULL, }, // RPN_OPERATOR_PARENT + { 0, NULL, NULL, NULL, }, // RPN_OPERATOR_PERCENT + { 0, NULL, NULL, NULL, }, // RPN_OPERATOR_EQUAL + { 1, rpn_or_f, rpn_or_i, NULL, }, // RPN_OPERATOR_OR + { 2, rpn_xor_f, rpn_xor_i, NULL, }, // RPN_OPERATOR_XOR + { 3, rpn_and_f, rpn_and_i, NULL, }, // RPN_OPERATOR_AND + { 4, rpn_shl_f, rpn_shl_i, NULL, }, // RPN_OPERATOR_LSH + { 5, rpn_add_f, rpn_add_i, rpn_add_p, }, // RPN_OPERATOR_ADD + { 5, rpn_sub_f, rpn_sub_i, rpn_sub_p, }, // RPN_OPERATOR_SUB + { 6, rpn_mul_f, rpn_mul_i, rpn_mul_p, }, // RPN_OPERATOR_MULT + { 6, rpn_div_f, rpn_div_i, rpn_div_p, }, // RPN_OPERATOR_DIV + { 6, rpn_mod_f, rpn_mod_i, NULL, }, // RPN_OPERATOR_MOD + { 7, rpn_pow_f, NULL, NULL, }, // RPN_OPERATOR_POW + { 7, rpn_sqr_f, NULL, NULL, }, // RPN_OPERATOR_SQR +}; + +static stack_node_t *pop(void) +{ + if (stack == NULL) + return NULL; + + temp = *stack; + free(stack); + stack = temp.next; + + return &temp; +} + +static int is_stack_empty(void) +{ + return (stack == NULL); +} + +static void push(stack_node_t *op) +{ + stack_node_t *z = (stack_node_t *)malloc(sizeof(stack_node_t)); + + *z = *op; + z->next = stack; + stack = z; +} +/* +static unsigned int get_prec(unsigned int opc) +{ + unsigned int x; + + for (x=0; xf = a->f + b->f; +} + +static void rpn_sub_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->f = a->f - b->f; +} + +static void rpn_mul_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->f = a->f * b->f; +} + +static void rpn_div_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + if (b->f == 0) + calc.is_nan = TRUE; + else + r->f = a->f / b->f; +} + +static void rpn_mod_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + double t; + + if (b->f == 0) + calc.is_nan = TRUE; + else { + modf(a->f/b->f, &t); + r->f = a->f - (t * b->f); + } +} + +static void rpn_and_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + calc_number_t ai, bi; + + ai.i = logic_dbl2int(a); + bi.i = logic_dbl2int(b); + + r->f = (long double)(ai.i & bi.i); +} + +static void rpn_or_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + calc_number_t ai, bi; + + ai.i = logic_dbl2int(a); + bi.i = logic_dbl2int(b); + + r->f = (long double)(ai.i | bi.i); +} + +static void rpn_xor_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + calc_number_t ai, bi; + + ai.i = logic_dbl2int(a); + bi.i = logic_dbl2int(b); + + r->f = (long double)(ai.i ^ bi.i); +} + +static void rpn_shl_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + calc_number_t ai, bi; + + ai.i = logic_dbl2int(a); + bi.i = logic_dbl2int(b); + + r->f = (long double)(ai.i << bi.i); +} + +static void rpn_pow_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->f = pow(a->f, b->f); + if (_finite(r->f) == 0 || _isnan(r->f)) + calc.is_nan = TRUE; +} + +static void rpn_sqr_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + if (b->f == 0) + calc.is_nan = TRUE; + else { + r->f = pow(a->f, 1./b->f); + if (_finite(r->f) == 0 || _isnan(r->f)) + calc.is_nan = TRUE; + } +} + +/* Integer mode calculations */ +static void rpn_add_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->i = a->i + b->i; +} + +static void rpn_sub_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->i = a->i - b->i; +} + +static void rpn_mul_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->i = a->i * b->i; +} + +static void rpn_div_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + if (b->i == 0) + calc.is_nan = TRUE; + else + r->i = a->i / b->i; +} + +static void rpn_mod_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + if (b->i == 0) + calc.is_nan = TRUE; + else + r->i = a->i % b->i; +} + +static void rpn_and_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->i = a->i & b->i; +} + +static void rpn_or_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->i = a->i | b->i; +} + +static void rpn_xor_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->i = a->i ^ b->i; +} + +static void rpn_shl_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->i = a->i << b->i; +} + +/* Percent mode calculations */ +static void rpn_add_p(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->f = a->f * (1. + b->f/100.); +} + +static void rpn_sub_p(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->f = a->f * (1. - b->f/100.); +} + +static void rpn_mul_p(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + r->f = a->f * b->f / 100.; +} + +static void rpn_div_p(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + if (b->f == 0) + calc.is_nan = TRUE; + else + r->f = a->f * 100. / b->f; +} + + +void run_operator(calc_number_t *result, + calc_number_t *a, + calc_number_t *b, + unsigned int operation) +{ + if (calc.base == IDC_RADIO_DEC) { + if (percent_mode) { + percent_mode = FALSE; + operator_list[operation].op_p(result, a, b); + } else + operator_list[operation].op_f(result, a, b); + } else { + operator_list[operation].op_i(result, a, b); + /* apply final limitator to result */ + apply_int_mask(result); + } +} + +static void evalStack(calc_number_t *number) +{ + stack_node_t *op, ip; + unsigned int prec; + + percent_mode = FALSE; + op = pop(); + ip = *op; + prec = operator_list[ip.node.operation].prec; + while (!is_stack_empty()) { + op = pop(); + + if (prec <= operator_list[op->node.operation].prec) { + if (op->node.operation == RPN_OPERATOR_PARENT) continue; + + calc.prev = ip.node.number; + run_operator(&ip.node.number, &op->node.number, &ip.node.number, op->node.operation); + if (calc.is_nan) { + flush_postfix(); + return; + } + } else { + push(op); + break; + } + } + + if(ip.node.operation != RPN_OPERATOR_EQUAL && ip.node.operation != RPN_OPERATOR_PERCENT) + push(&ip); + + calc.prev_operator = op->node.operation; + + *number = ip.node.number; +} + +int exec_infix2postfix(calc_number_t *number, unsigned int func) +{ + stack_node_t tmp; + + if (is_stack_empty() && func == RPN_OPERATOR_EQUAL) { + /* if a number has been entered with exponential */ + /* notation, I may update it with normal mode */ + if (calc.sci_in) + return 1; + return 0; + } + + tmp.node.number = *number; + tmp.node.operation = func; + + push(&tmp); + + if (func != RPN_OPERATOR_PARENT) { + calc.last_operator = func; + evalStack(number); + } + return 1; +} + +void exec_change_infix(void) +{ + stack_node_t *op = stack; + + if (op == NULL) + return; + if (op->node.operation == RPN_OPERATOR_PARENT || + op->node.operation == RPN_OPERATOR_PERCENT || + op->node.operation == RPN_OPERATOR_EQUAL) + return; + /* remove the head, it will be re-inserted with new operator */ + pop(); +} + +void exec_closeparent(calc_number_t *number) +{ + stack_node_t *op, ip; + + ip.node.number = *number; + while (!is_stack_empty()) { + op = pop(); + + if (op->node.operation == RPN_OPERATOR_PARENT) + break; + + run_operator(&ip.node.number, &op->node.number, &ip.node.number, op->node.operation); + if (calc.is_nan) { + flush_postfix(); + return; + } + } + *number = ip.node.number; +} + +int eval_parent_count(void) +{ + stack_node_t *s = stack; + int n = 0; + + while (s != NULL) { + if (s->node.operation == RPN_OPERATOR_PARENT) + n++; + s = (stack_node_t *)(s->next); + } + return n; +} + +void flush_postfix() +{ + while (!is_stack_empty()) + pop(); + /* clear prev and last typed operators */ + calc.prev_operator = + calc.last_operator = 0; +} + +void start_rpn_engine(void) +{ + stack = NULL; +} + +void stop_rpn_engine(void) +{ +} + diff --git a/rosapps/roscalc/rpn_mpfr.c b/rosapps/roscalc/rpn_mpfr.c new file mode 100644 index 00000000000..66a581c2d2c --- /dev/null +++ b/rosapps/roscalc/rpn_mpfr.c @@ -0,0 +1,435 @@ +#include "calc.h" + +typedef struct { + calc_number_t number; + unsigned int operation; +} calc_node_t; + +typedef struct { + calc_node_t node; + void *next; +} stack_node_t; + +typedef void (*operator_call)(calc_number_t *, calc_number_t *, calc_number_t *); + +typedef struct { + unsigned int prec; + operator_call op_f; + operator_call op_i; + operator_call op_p; +} calc_operator_t; + +static stack_node_t *stack; +static stack_node_t temp; +static BOOL percent_mode; + +static void rpn_add_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_sub_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_mul_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_div_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_pow_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_sqr_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_and_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_or_f (calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_xor_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_shl_f(calc_number_t *r, calc_number_t *a, calc_number_t *b); + +/* Integer mode calculations */ +static void rpn_add_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_sub_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_mul_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_div_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_mod_i(calc_number_t *r, calc_number_t *a, calc_number_t *b); + +/* Percentage mode calculations */ +static void rpn_add_p(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_sub_p(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_mul_p(calc_number_t *r, calc_number_t *a, calc_number_t *b); +static void rpn_div_p(calc_number_t *r, calc_number_t *a, calc_number_t *b); + +static const calc_operator_t operator_list[] = { + { 0, NULL, NULL, NULL, }, // RPN_OPERATOR_PARENT + { 0, NULL, NULL, NULL, }, // RPN_OPERATOR_PERCENT + { 0, NULL, NULL, NULL, }, // RPN_OPERATOR_EQUAL + { 1, rpn_or_f, rpn_or_f, NULL, }, // RPN_OPERATOR_OR + { 2, rpn_xor_f, rpn_xor_f, NULL, }, // RPN_OPERATOR_XOR + { 3, rpn_and_f, rpn_and_f, NULL, }, // RPN_OPERATOR_AND + { 4, rpn_shl_f, rpn_shl_f, NULL, }, // RPN_OPERATOR_LSH + { 5, rpn_add_f, rpn_add_i, rpn_add_p, }, // RPN_OPERATOR_ADD + { 5, rpn_sub_f, rpn_sub_i, rpn_sub_p, }, // RPN_OPERATOR_SUB + { 6, rpn_mul_f, rpn_mul_i, rpn_mul_p, }, // RPN_OPERATOR_MULT + { 6, rpn_div_f, rpn_div_i, rpn_div_p, }, // RPN_OPERATOR_DIV + { 6, rpn_mod_i, rpn_mod_i, NULL, }, // RPN_OPERATOR_MOD + { 7, rpn_pow_f, NULL, NULL, }, // RPN_OPERATOR_POW + { 7, rpn_sqr_f, NULL, NULL, }, // RPN_OPERATOR_SQR +}; + +static void node_copy(stack_node_t *dst, stack_node_t *src) +{ + mpfr_set(dst->node.number.mf,src->node.number.mf,MPFR_DEFAULT_RND); + dst->node.operation = src->node.operation; + dst->next = src->next; +} + +static stack_node_t *pop() +{ + if (stack == NULL) + return NULL; + + /* copy the node */ + node_copy(&temp, stack); + + /* free the node */ + mpfr_clear(stack->node.number.mf); + free(stack); + stack = temp.next; + + return &temp; +} + +static int is_stack_empty(void) +{ + return (stack == NULL); +} + +static void push(stack_node_t *op) +{ + stack_node_t *z = (stack_node_t *)malloc(sizeof(stack_node_t)); + + mpfr_init_set(z->node.number.mf,op->node.number.mf,MPFR_DEFAULT_RND); + z->node.operation = op->node.operation; + z->next = stack; + stack = z; +} +/* +static unsigned int get_prec(unsigned int opc) +{ + unsigned int x; + + for (x=0; xmf, MPFR_DEFAULT_RND); + mpfr_get_z(bi, b->mf, MPFR_DEFAULT_RND); + cb(ai, ai, bi); + mpfr_set_z(r->mf, ai, MPFR_DEFAULT_RND); + mpz_clear(ai); + mpz_clear(bi); +} + + +/* Real mode calculations */ +static void rpn_add_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + mpfr_add(r->mf, a->mf, b->mf, MPFR_DEFAULT_RND); +} + +static void rpn_sub_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + mpfr_sub(r->mf, a->mf, b->mf, MPFR_DEFAULT_RND); +} + +static void rpn_mul_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + mpfr_mul(r->mf, a->mf, b->mf, MPFR_DEFAULT_RND); +} + +static void rpn_div_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + if (mpfr_sgn(b->mf) == 0) + calc.is_nan = TRUE; + else + mpfr_div(r->mf, a->mf, b->mf, MPFR_DEFAULT_RND); +} + +static void rpn_and_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + rpn_exec_int(r, a, b, mpz_and); +} + +static void rpn_or_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + rpn_exec_int(r, a, b, mpz_ior); +} + +static void rpn_xor_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + rpn_exec_int(r, a, b, mpz_xor); +} + +static void rpn_shl_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + unsigned long e; + + mpfr_trunc(r->mf, b->mf); + if (mpfr_fits_ulong_p(r->mf, MPFR_DEFAULT_RND) == 0) + calc.is_nan = TRUE; + else { + e = mpfr_get_ui(r->mf, MPFR_DEFAULT_RND); + mpfr_mul_2exp(r->mf, a->mf, e, MPFR_DEFAULT_RND); + } +} + +static void rpn_pow_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + mpfr_pow(r->mf, a->mf, b->mf, MPFR_DEFAULT_RND); +} + +static void rpn_sqr_f(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + if (mpfr_sgn(b->mf) == 0) + calc.is_nan = TRUE; + else { + mpfr_t tmp; + + mpfr_init(tmp); + mpfr_set(tmp, b->mf, MPFR_DEFAULT_RND); + mpfr_ui_div(tmp, 1, tmp, MPFR_DEFAULT_RND); + mpfr_pow(r->mf, a->mf, tmp, MPFR_DEFAULT_RND); + mpfr_clear(tmp); + } +} + +/* Integer mode calculations */ +static void rpn_add_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + rpn_exec_int(r, a, b, mpz_add); +} + +static void rpn_sub_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + rpn_exec_int(r, a, b, mpz_sub); +} + +static void rpn_mul_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + rpn_exec_int(r, a, b, mpz_mul); +} + +static void rpn_div_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + if (mpfr_sgn(b->mf) == 0) + calc.is_nan = TRUE; + else + rpn_exec_int(r, a, b, mpz_tdiv_q); +} + +static void rpn_mod_i(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + if (mpfr_sgn(b->mf) == 0) + calc.is_nan = TRUE; + else + rpn_exec_int(r, a, b, mpz_tdiv_r); +} + +/* Percent mode calculations */ +static void rpn_add_p(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + mpfr_t tmp; + + mpfr_init(tmp); + mpfr_set(tmp, b->mf, MPFR_DEFAULT_RND); + mpfr_div_ui(tmp, tmp, 100, MPFR_DEFAULT_RND); + mpfr_add_ui(tmp, tmp, 1, MPFR_DEFAULT_RND); + mpfr_mul(r->mf, a->mf, tmp, MPFR_DEFAULT_RND); + mpfr_clear(tmp); +} + +static void rpn_sub_p(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + mpfr_t tmp; + + mpfr_init(tmp); + mpfr_set(tmp, b->mf, MPFR_DEFAULT_RND); + mpfr_div_ui(tmp, tmp, 100, MPFR_DEFAULT_RND); + mpfr_sub_ui(tmp, tmp, 1, MPFR_DEFAULT_RND); + mpfr_mul(r->mf, a->mf, tmp, MPFR_DEFAULT_RND); + mpfr_clear(tmp); +} + +static void rpn_mul_p(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + mpfr_mul(r->mf, a->mf, b->mf, MPFR_DEFAULT_RND); + mpfr_div_ui(r->mf, r->mf, 100, MPFR_DEFAULT_RND); +} + +static void rpn_div_p(calc_number_t *r, calc_number_t *a, calc_number_t *b) +{ + if (mpfr_sgn(b->mf) == 0) + calc.is_nan = TRUE; + else { + mpfr_mul_ui(r->mf, a->mf, 100, MPFR_DEFAULT_RND); + mpfr_div(r->mf, r->mf, b->mf, MPFR_DEFAULT_RND); + } +} + + +void run_operator(calc_number_t *result, + calc_number_t *a, + calc_number_t *b, + unsigned int operation) +{ + if (calc.base == IDC_RADIO_DEC) { + if (percent_mode) { + percent_mode = FALSE; + operator_list[operation].op_p(result, a, b); + } else + operator_list[operation].op_f(result, a, b); + } else { + operator_list[operation].op_i(result, a, b); + /* apply final limitator to result */ + apply_int_mask(result); + } +} + +static void evalStack(calc_number_t *number) +{ + stack_node_t *op, ip; + unsigned int prec; + + mpfr_init(ip.node.number.mf); + percent_mode = FALSE; + op = pop(); + node_copy(&ip, op); + prec = operator_list[ip.node.operation].prec; + while (!is_stack_empty()) { + op = pop(); + + if (prec <= operator_list[op->node.operation].prec) { + if (op->node.operation == RPN_OPERATOR_PARENT) continue; + + rpn_copy(&calc.prev, &ip.node.number); + run_operator(&ip.node.number, &op->node.number, &ip.node.number, op->node.operation); + if (calc.is_nan) { + flush_postfix(); + mpfr_clear(ip.node.number.mf); + return; + } + } else { + push(op); + break; + } + } + + if(ip.node.operation != RPN_OPERATOR_EQUAL && ip.node.operation != RPN_OPERATOR_PERCENT) + push(&ip); + + calc.prev_operator = op->node.operation; + + rpn_copy(number, &ip.node.number); + mpfr_clear(ip.node.number.mf); +} + +int exec_infix2postfix(calc_number_t *number, unsigned int func) +{ + stack_node_t tmp; + + if (is_stack_empty() && func == RPN_OPERATOR_EQUAL) { + /* if a number has been entered with exponential */ + /* notation, I may update it with normal mode */ + if (calc.sci_in) + return 1; + return 0; + } + + mpfr_init(tmp.node.number.mf); + rpn_copy(&tmp.node.number, number); + tmp.node.operation = func; + + push(&tmp); + mpfr_clear(tmp.node.number.mf); + + if (func != RPN_OPERATOR_PARENT) { + calc.last_operator = func; + evalStack(number); + } + return 1; +} + +void exec_change_infix(void) +{ + stack_node_t *op = stack; + + if (op == NULL) + return; + if (op->node.operation == RPN_OPERATOR_PARENT || + op->node.operation == RPN_OPERATOR_PERCENT || + op->node.operation == RPN_OPERATOR_EQUAL) + return; + /* remove the head, it will be re-inserted with new operator */ + pop(); +} + +void exec_closeparent(calc_number_t *number) +{ + stack_node_t *op, ip; + + rpn_copy(&ip.node.number, number); + while (!is_stack_empty()) { + op = pop(); + + if (op->node.operation == RPN_OPERATOR_PARENT) + break; + + run_operator(&ip.node.number, &op->node.number, &ip.node.number, op->node.operation); + if (calc.is_nan) { + flush_postfix(); + return; + } + } + rpn_copy(number, &ip.node.number); +} + +int eval_parent_count(void) +{ + stack_node_t *s = stack; + int n = 0; + + while (s != NULL) { + if (s->node.operation == RPN_OPERATOR_PARENT) + n++; + s = (stack_node_t *)(s->next); + } + return n; +} + +void flush_postfix() +{ + while (!is_stack_empty()) + pop(); + /* clear prev and last typed operators */ + calc.prev_operator = + calc.last_operator = 0; +} + +void start_rpn_engine(void) +{ + mpf_set_default_prec(512); + mpfr_set_default_prec(512); + stack = NULL; + mpfr_init(calc.code.mf); + mpfr_init(calc.prev.mf); + mpfr_init(calc.memory.mf); + mpfr_init(temp.node.number.mf); +} + +void stop_rpn_engine(void) +{ + mpfr_clear(calc.code.mf); + mpfr_clear(calc.prev.mf); + mpfr_clear(calc.memory.mf); + mpfr_clear(temp.node.number.mf); +} diff --git a/rosapps/roscalc/utl.c b/rosapps/roscalc/utl.c new file mode 100644 index 00000000000..745ff265fc3 --- /dev/null +++ b/rosapps/roscalc/utl.c @@ -0,0 +1,105 @@ +#include "calc.h" + +void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base) +{ + TCHAR *ptr, *dst; + calc_number_t tmp; + int width; + + switch (base) { + case IDC_RADIO_HEX: + _stprintf(buffer, TEXT("%I64X"), rpn->i); + break; + case IDC_RADIO_DEC: +/* + * Modifed from 17 to 16 for fixing this bug: + * 14+14+6.3+6.3= 40.5999999 instead of 40.6 + * So, it's probably better to leave the least + * significant digit out of the display. + */ +#define MAX_LD_WIDTH 16 + /* calculate the width of integer number */ + width = (rpn->f==0) ? 1 : (int)log10(fabs(rpn->f))+1; + if (calc.sci_out == TRUE || width > MAX_LD_WIDTH || width < -MAX_LD_WIDTH) + ptr = buffer + _stprintf(buffer, TEXT("%#le"), rpn->f); + else { + ptr = buffer + _stprintf(buffer, TEXT("%#*.*lf"), width, ((MAX_LD_WIDTH-width-1)>=0) ? MAX_LD_WIDTH-width-1 : 0, rpn->f); + dst = _tcschr(buffer, TEXT('.')); + while (--ptr > dst) + if (*ptr != TEXT('0')) + break; + + /* put the string terminator for removing the final '0' (if any) */ + ptr[1] = TEXT('\0'); + /* check if the number finishes with '.' */ + if (ptr == dst) + /* remove the dot (it will be re-added later) */ + ptr[0] = TEXT('\0'); + } +#undef MAX_LD_WIDTH + break; + case IDC_RADIO_OCT: + _stprintf(buffer, TEXT("%I64o"), rpn->i); + break; + case IDC_RADIO_BIN: + if (rpn->i == 0) { + buffer[0] = TEXT('0'); + buffer[1] = TEXT('\0'); + break; + } + tmp = *rpn; + buffer[0] = TEXT('\0'); + while (tmp.u) { + memmove(buffer+1, buffer, (size-1)*sizeof(TCHAR)); + if (tmp.u & 1) + calc.buffer[0] = TEXT('1'); + else + calc.buffer[0] = TEXT('0'); + tmp.u >>= 1; + } + break; + } +} + +void convert_text2number_2(calc_number_t *a) +{ + TCHAR *ptr; + + switch (calc.base) { + case IDC_RADIO_HEX: + _stscanf(calc.buffer, TEXT("%I64X"), &(a->i)); + break; + case IDC_RADIO_DEC: + _stscanf(calc.buffer, TEXT("%lf"), &(a->f)); + break; + case IDC_RADIO_OCT: + _stscanf(calc.buffer, TEXT("%I64o"), &(a->i)); + break; + case IDC_RADIO_BIN: + ptr = calc.buffer; + a->i = 0; + while (*ptr != TEXT('\0')) { + a->i <<= 1; + if (*ptr++ == TEXT('1')) + a->i |= 1; + } + break; + } +} + +void convert_real_integer(unsigned int base) +{ + switch (base) { + case IDC_RADIO_DEC: + calc.code.f = (double)calc.code.i; + break; + case IDC_RADIO_OCT: + case IDC_RADIO_BIN: + case IDC_RADIO_HEX: + if (calc.base == IDC_RADIO_DEC) { + calc.code.i = (__int64)calc.code.f; + apply_int_mask(&calc.code); + } + break; + } +} diff --git a/rosapps/roscalc/utl_mpfr.c b/rosapps/roscalc/utl_mpfr.c new file mode 100644 index 00000000000..3afd27eb36b --- /dev/null +++ b/rosapps/roscalc/utl_mpfr.c @@ -0,0 +1,131 @@ +#include "calc.h" + +void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base) +{ + char temp[1024]; + char *ptr, *dst; + int width; + unsigned long int n, q; + mpz_t zz; + mpf_t ff; + + mpz_init(zz); + mpf_init(ff); + mpfr_get_z(zz, rpn->mf, MPFR_DEFAULT_RND); + mpfr_get_f(ff, rpn->mf, MPFR_DEFAULT_RND); + + switch (base) { + case IDC_RADIO_HEX: + gmp_sprintf(temp, "%ZX", zz); + break; + case IDC_RADIO_DEC: +#define MAX_LD_WIDTH 64 + /* calculate the width of integer number */ + if (mpf_sgn(ff) == 0) + width = 1; + else { + mpfr_t t; + mpfr_init(t); + mpfr_abs(t, rpn->mf, MPFR_DEFAULT_RND); + mpfr_log10(t, t, MPFR_DEFAULT_RND); + width = 1 + mpfr_get_si(t, MPFR_DEFAULT_RND); + mpfr_clear(t); + } + if (calc.sci_out == TRUE || width > MAX_LD_WIDTH || width < -MAX_LD_WIDTH) + ptr = temp + gmp_sprintf(temp, "%*.*#Fe", 1, MAX_LD_WIDTH, ff); + else { + ptr = temp + gmp_sprintf(temp, "%#*.*Ff", width, ((MAX_LD_WIDTH-width-1)>=0) ? MAX_LD_WIDTH-width-1 : 0, ff); + dst = strchr(temp, '.'); + while (--ptr > dst) + if (*ptr != '0') + break; + + /* put the string terminator for removing the final '0' (if any) */ + ptr[1] = '\0'; + /* check if the number finishes with '.' */ + if (ptr == dst) + /* remove the dot (it will be re-added later) */ + ptr[0] = '\0'; + } +#undef MAX_LD_WIDTH + break; + case IDC_RADIO_OCT: + gmp_sprintf(temp, "%Zo", zz); + break; + case IDC_RADIO_BIN: + /* if the number is zero, just write 0 ;) */ + if (rpn_is_zero(rpn)) { + temp[0] = TEXT('0'); + temp[1] = TEXT('\0'); + break; + } + /* repeat until a bit set to '1' is found */ + n = 0; + do { + q = mpz_scan1(zz, n); + if (q == ULONG_MAX) + break; + while (n < q) + temp[n++] = '0'; + temp[n++] = '1'; + } while (1); + /* now revert the string into TCHAR buffer */ + for (q=0; qmf, temp, NULL, base, MPFR_DEFAULT_RND); +#else + mpfr_strtofr(a->mf, calc.buffer, NULL, base, MPFR_DEFAULT_RND); +#endif +} + +void convert_real_integer(unsigned int base) +{ + switch (base) { + case IDC_RADIO_DEC: + break; + case IDC_RADIO_OCT: + case IDC_RADIO_BIN: + case IDC_RADIO_HEX: + if (calc.base == IDC_RADIO_DEC) { + mpfr_trunc(calc.code.mf, calc.code.mf); + apply_int_mask(&calc.code); + } + break; + } +} + diff --git a/rosapps/roscalc/winmain.c b/rosapps/roscalc/winmain.c new file mode 100644 index 00000000000..8b6b78c546f --- /dev/null +++ b/rosapps/roscalc/winmain.c @@ -0,0 +1,1566 @@ +#include "calc.h" + +#define HTMLHELP_PATH(_pt) TEXT("%systemroot%\\Help\\calc.chm::") TEXT(_pt) +#define WM_CLOSE_STATS (WM_APP+1) +#define WM_HANDLE_CLIPBOARD (WM_APP+2) +#define WM_INSERT_STAT (WM_APP+3) +#define WM_LOAD_STAT (WM_APP+4) + +#define MAKE_BITMASK4(_show_b16, _show_b10, _show_b8, _show_b2) \ + (((_show_b2) << 0) | \ + ((_show_b8) << 1) | \ + ((_show_b10) << 2) | \ + ((_show_b16) << 3)) + +#define MAKE_BITMASK5(_transl, _is_stats, _is_ctrl, _show_b16, _show_b10, _show_b8, _show_b2) \ + (((_show_b2) << 0) | \ + ((_show_b8) << 1) | \ + ((_show_b10) << 2) | \ + ((_show_b16) << 3) | \ + ((_is_ctrl) << 5) | \ + ((_is_stats) << 6) | \ + ((_transl) << 7)) + +#define KEY_IS_UP 0x80000000 +#define KEY_WAS_DOWN 0x40000000 + +#define BITMASK_IS_ASCII 0x80 +#define BITMASK_IS_STATS 0x40 +#define BITMASK_IS_CTRL 0x20 +#define BITMASK_HEX_MASK 0x08 +#define BITMASK_DEC_MASK 0x04 +#define BITMASK_OCT_MASK 0x02 +#define BITMASK_BIN_MASK 0x01 + +#define CALC_CLR_RED 0x000000FF +#define CALC_CLR_BLUE 0x00FF0000 +#define CALC_CLR_PURP 0x00FF00FF + +typedef struct { + CHAR key; // Virtual key identifier + WORD idc; // IDC for posting message +} key2code_t; + +typedef struct { + WORD idc; // IDC for posting message + CHAR key; // Virtual key identifier + BYTE mask; // enable/disable into the various modes. + INT col; // color used for drawing the text +} key3code_t; + +#define CTRL_FLAG 0x100 +#define ALT_FLAG 0x200 + +#define CTRL_A (0x0001+'A'-'A') +#define CTRL_C (0x0001+'C'-'A') +#define CTRL_D (0x0001+'D'-'A') +#define CTRL_L (0x0001+'L'-'A') +#define CTRL_M (0x0001+'M'-'A') +#define CTRL_P (0x0001+'P'-'A') +#define CTRL_R (0x0001+'R'-'A') +#define CTRL_S (0x0001+'S'-'A') +#define CTRL_T (0x0001+'T'-'A') +#define CTRL_V (0x0001+'V'-'A') +#define CTRL_Z (0x0001+'Z'-'A') + +static const key3code_t key2code[] = { + /* CONTROL-ID Key asc sta ctl hex dec oct bin */ + { IDC_BUTTON_STA, CTRL_S, MAKE_BITMASK5( 1, 0, 1, 1, 1, 1, 1), CALC_CLR_BLUE, }, + { IDC_BUTTON_AVE, CTRL_A, MAKE_BITMASK5( 1, 1, 1, 1, 1, 1, 1), CALC_CLR_BLUE, }, + { IDC_BUTTON_SUM, CTRL_T, MAKE_BITMASK5( 1, 1, 1, 1, 1, 1, 1), CALC_CLR_BLUE, }, + { IDC_BUTTON_S, CTRL_D, MAKE_BITMASK5( 1, 1, 1, 1, 1, 1, 1), CALC_CLR_BLUE, }, + { IDC_BUTTON_MS, CTRL_M, MAKE_BITMASK5( 1, 0, 1, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_MR, CTRL_R, MAKE_BITMASK5( 1, 0, 1, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_MP, CTRL_P, MAKE_BITMASK5( 1, 0, 1, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_MC, CTRL_L, MAKE_BITMASK5( 1, 0, 1, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_0, '0', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_BLUE, }, + { IDC_BUTTON_1, '1', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_BLUE, }, + { IDC_BUTTON_2, '2', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_3, '3', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_4, '4', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_5, '5', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_6, '6', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_7, '7', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_8, '8', MAKE_BITMASK5( 1, 0, 0, 1, 1, 0, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_9, '9', MAKE_BITMASK5( 1, 0, 0, 1, 1, 0, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_DOT, '.', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_DOT, ',', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), -1, }, + { IDC_BUTTON_ADD, '+', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_SUB, '-', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_MULT, '*', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_DIV, '/', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_AND, '&', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_OR, '|', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_XOR, '^', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_LSH, '<', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_NOT, '~', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_INT, ';', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_RED, }, + { IDC_BUTTON_EQU, '=', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_A, 'A', MAKE_BITMASK5( 1, 0, 0, 1, 0, 0, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_B, 'B', MAKE_BITMASK5( 1, 0, 0, 1, 0, 0, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_C, 'C', MAKE_BITMASK5( 1, 0, 0, 1, 0, 0, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_D, 'D', MAKE_BITMASK5( 1, 0, 0, 1, 0, 0, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_E, 'E', MAKE_BITMASK5( 1, 0, 0, 1, 0, 0, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_F, 'F', MAKE_BITMASK5( 1, 0, 0, 1, 0, 0, 0), CALC_CLR_BLUE, }, + { IDC_CHECK_HYP, 'H', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), -1, }, + { IDC_CHECK_INV, 'I', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), -1, }, + { IDC_BUTTON_LOG, 'L', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_PURP, }, + { IDC_BUTTON_DMS, 'M', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_PURP, }, + { IDC_BUTTON_LN, 'N', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_PURP, }, + { IDC_BUTTON_PI, 'P', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_RX, 'R', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_PURP, }, + { IDC_BUTTON_SIN, 'S', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_PURP, }, + { IDC_BUTTON_COS, 'O', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_PURP, }, + { IDC_BUTTON_TAN, 'T', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_PURP, }, + { IDC_BUTTON_FE, 'V', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_PURP, }, + { IDC_BUTTON_EXP, 'X', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_PURP, }, + { IDC_BUTTON_XeY, 'Y', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_PURP, }, + { IDC_BUTTON_SQRT, '@', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_BLUE, }, + { IDC_BUTTON_Xe2, '@', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_PURP, }, + { IDC_BUTTON_Xe3, '#', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_PURP, }, + { IDC_BUTTON_NF, '!', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_PURP, }, + { IDC_BUTTON_LEFTPAR, '(', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_PURP, }, + { IDC_BUTTON_RIGHTPAR, ')', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_PURP, }, + { IDC_BUTTON_MOD, '%', MAKE_BITMASK5( 1, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_PERCENT, '%', MAKE_BITMASK5( 1, 0, 0, 0, 1, 0, 0), CALC_CLR_BLUE, }, + /*----------------------------------------------------------------------*/ + { IDC_BUTTON_DAT, VK_INSERT, MAKE_BITMASK5( 0, 1, 0, 1, 1, 1, 1), CALC_CLR_BLUE, }, + { IDC_BUTTON_EQU, VK_RETURN, MAKE_BITMASK5( 0, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_CANC, VK_ESCAPE, MAKE_BITMASK5( 0, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_CE, VK_DELETE, MAKE_BITMASK5( 0, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_BUTTON_BACK, VK_BACK, MAKE_BITMASK5( 0, 0, 0, 1, 1, 1, 1), CALC_CLR_RED, }, + { IDC_RADIO_HEX, VK_F5, MAKE_BITMASK5( 0, 0, 0, 1, 1, 1, 1), -1, }, + { IDC_RADIO_DEC, VK_F6, MAKE_BITMASK5( 0, 0, 0, 1, 1, 1, 1), -1, }, + { IDC_RADIO_OCT, VK_F7, MAKE_BITMASK5( 0, 0, 0, 1, 1, 1, 1), -1, }, + { IDC_RADIO_BIN, VK_F8, MAKE_BITMASK5( 0, 0, 0, 1, 1, 1, 1), -1, }, + { IDC_BUTTON_SIGN, VK_F9, MAKE_BITMASK5( 0, 0, 0, 1, 1, 1, 1), CALC_CLR_BLUE, }, +}; + +static const key2code_t key2code_base16[] = { + { VK_F2, IDC_RADIO_DWORD, }, + { VK_F3, IDC_RADIO_WORD, }, + { VK_F4, IDC_RADIO_BYTE, }, + { VK_F12, IDC_RADIO_QWORD, }, +}; + +static const key2code_t key2code_base10[] = { + { VK_F2, IDC_RADIO_DEG, }, + { VK_F3, IDC_RADIO_RAD, }, + { VK_F4, IDC_RADIO_GRAD, }, +}; + +static const WORD operator_codes[] = { + /* CONTROL-ID operator */ + (WORD)IDC_STATIC, // RPN_OPERATOR_PARENT + IDC_BUTTON_PERCENT, // RPN_OPERATOR_PERCENT + IDC_BUTTON_EQU, // RPN_OPERATOR_EQUAL + IDC_BUTTON_OR, // RPN_OPERATOR_OR + IDC_BUTTON_XOR, // RPN_OPERATOR_XOR + IDC_BUTTON_AND, // RPN_OPERATOR_AND + IDC_BUTTON_LSH, // RPN_OPERATOR_LSH + IDC_BUTTON_ADD, // RPN_OPERATOR_ADD + IDC_BUTTON_SUB, // RPN_OPERATOR_SUB + IDC_BUTTON_MULT, // RPN_OPERATOR_MULT + IDC_BUTTON_DIV, // RPN_OPERATOR_DIV + IDC_BUTTON_MOD, // RPN_OPERATOR_MOD +}; + +typedef void (*rpn_callback1)(calc_number_t *); + +typedef struct { + WORD idc; + BYTE range; + BYTE check_nan; + rpn_callback1 direct; + rpn_callback1 inverse; + rpn_callback1 hyperb; + rpn_callback1 inv_hyp; +} function_table_t; + +static void run_pow(calc_number_t *number); +static void run_sqr(calc_number_t *number); +static void run_fe(calc_number_t *number); +static void run_dat_sta(calc_number_t *number); +static void run_mp(calc_number_t *c); +static void run_mm(calc_number_t *c); +static void run_ms(calc_number_t *c); +static void run_mw(calc_number_t *c); +static void run_canc(calc_number_t *c); +static void run_rpar(calc_number_t *c); +static void run_lpar(calc_number_t *c); + +static const function_table_t function_table[] = { + { IDC_BUTTON_SIN, MODIFIER_INV|MODIFIER_HYP, 1, rpn_sin, rpn_asin, rpn_sinh, rpn_asinh }, + { IDC_BUTTON_COS, MODIFIER_INV|MODIFIER_HYP, 1, rpn_cos, rpn_acos, rpn_cosh, rpn_acosh }, + { IDC_BUTTON_TAN, MODIFIER_INV|MODIFIER_HYP, 1, rpn_tan, rpn_atan, rpn_tanh, rpn_atanh }, + { IDC_BUTTON_INT, MODIFIER_INV, 1, rpn_int, rpn_frac, NULL, NULL }, + { IDC_BUTTON_RX, 0, 1, rpn_reci, NULL, NULL, NULL }, + { IDC_BUTTON_NOT, 0, 1, rpn_not, NULL, NULL, NULL }, + { IDC_BUTTON_PI, MODIFIER_INV, 0, rpn_pi, rpn_2pi, NULL, NULL }, + { IDC_BUTTON_Xe2, MODIFIER_INV, 1, rpn_exp2, rpn_sqrt, NULL, NULL }, + { IDC_BUTTON_Xe3, MODIFIER_INV, 1, rpn_exp3, rpn_cbrt, NULL, NULL }, + { IDC_BUTTON_LN, MODIFIER_INV, 1, rpn_ln, rpn_exp, NULL, NULL }, + { IDC_BUTTON_LOG, MODIFIER_INV, 1, rpn_log, rpn_exp10, NULL, NULL }, + { IDC_BUTTON_NF, 0, 1, rpn_fact, NULL, NULL, NULL }, + { IDC_BUTTON_AVE, 0, 0, rpn_ave, NULL, NULL, NULL }, + { IDC_BUTTON_SUM, 0, 0, rpn_sum, NULL, NULL, NULL }, + { IDC_BUTTON_S, MODIFIER_INV, 0, rpn_s_m1, rpn_s, NULL, NULL }, + { IDC_BUTTON_XeY, MODIFIER_INV, 1, run_pow, run_sqr, NULL, NULL }, + { IDC_BUTTON_SQRT, MODIFIER_INV, 1, rpn_sqrt, NULL, NULL, NULL }, + { IDC_BUTTON_DMS, MODIFIER_INV, 1, rpn_dec2dms, rpn_dms2dec, NULL, NULL }, + { IDC_BUTTON_FE, 0, 1, run_fe, NULL, NULL, NULL }, + { IDC_BUTTON_DAT, 0, 1, run_dat_sta, NULL, NULL, NULL, }, + { IDC_BUTTON_MP, MODIFIER_INV, 1, run_mp, run_mm, NULL, NULL, }, + { IDC_BUTTON_MS, MODIFIER_INV, 1, run_ms, run_mw, NULL, NULL, }, + { IDC_BUTTON_CANC, 0, 0, run_canc, NULL, NULL, NULL, }, + { IDC_BUTTON_RIGHTPAR, 0, 1, run_rpar, NULL, NULL, NULL, }, + { IDC_BUTTON_LEFTPAR, 0, 0, run_lpar, NULL, NULL, NULL, }, +}; + +/* +*/ + +calc_t calc; + +static void load_config(void) +{ + TCHAR buf[32]; + DWORD tmp; + + /* Try to load last selected layout */ + GetProfileString(TEXT("SciCalc"), TEXT("layout"), TEXT("0"), buf, SIZEOF(buf)); + if (_stscanf(buf, TEXT("%ld"), &calc.layout) != 1) + calc.layout = CALC_LAYOUT_STANDARD; + + /* Try to load last selected formatting option */ + GetProfileString(TEXT("SciCalc"), TEXT("UseSep"), TEXT("0"), buf, SIZEOF(buf)); + if (_stscanf(buf, TEXT("%ld"), &tmp) != 1) + calc.usesep = FALSE; + else + calc.usesep = (tmp == 1) ? TRUE : FALSE; + + /* memory is empty at startup */ + calc.is_memory = FALSE; + + /* acquire regional settings */ + calc.sDecimal_len = GetProfileString(TEXT("intl"), TEXT("sDecimal"), TEXT("."), calc.sDecimal, SIZEOF(calc.sDecimal)); + calc.sThousand_len = GetProfileString(TEXT("intl"), TEXT("sThousand"), TEXT(","), calc.sThousand, SIZEOF(calc.sThousand)); +} + +static void save_config(void) +{ + TCHAR buf[32]; + + _stprintf(buf, TEXT("%lu"), calc.layout); + WriteProfileString(TEXT("SciCalc"), TEXT("layout"), buf); + WriteProfileString(TEXT("SciCalc"), TEXT("UseSep"), (calc.usesep==TRUE) ? TEXT("1") : TEXT("0")); +} + +static LRESULT post_key_press(LPARAM lParam, WORD idc) +{ + HWND hCtlWnd = GetDlgItem(calc.hWnd,idc); + TCHAR ClassName[64]; + + /* check if the key is enabled! */ + if (!IsWindowEnabled(hCtlWnd)) + return 1; + + if (!GetClassName(hCtlWnd, ClassName, SIZEOF(ClassName))) + return 1; + + if (!_tcscmp(ClassName, TEXT("Button"))) { + DWORD dwStyle = GetWindowLong(hCtlWnd, GWL_STYLE) & 0xF; + + /* Set states for press/release, but only for push buttons */ + if (dwStyle == BS_PUSHBUTTON || dwStyle == BS_DEFPUSHBUTTON || dwStyle == BS_OWNERDRAW) { + if (!(lParam & KEY_WAS_DOWN)) { + PostMessage(hCtlWnd, BM_SETSTATE, 1, 0); + } else + if ((lParam & KEY_IS_UP)) { + PostMessage(hCtlWnd, BM_SETSTATE, 0, 0); + PostMessage(hCtlWnd, BM_CLICK, 0, 0); + } + return 1; + } + } + /* default action: simple click event at key release */ + if ((lParam & KEY_IS_UP)) { + PostMessage(hCtlWnd, BM_CLICK, 0, 0); + } + return 1; +} + +static int vk2ascii(unsigned int vk) +{ + unsigned short int s; + int scan; + BYTE state[256]; + HKL layout=GetKeyboardLayout(0); + + if(!GetKeyboardState(state)) + return 0; + + scan=MapVirtualKeyEx(vk, 0, layout); + s = 0; + if (ToAsciiEx(vk, scan, state, &s, 0, layout)>0) { + /* convert to upper case */ + if (s >= 'a' && s <= 'z') + s = s - 'a' + 'A'; + /* add check to CTRL key */ + if (vk >= 'A' && vk <= 'Z' && + s >= CTRL_A && s <= CTRL_Z) + s |= CTRL_FLAG; + else + if (GetAsyncKeyState(VK_MENU) < 0) + s |= ALT_FLAG; + return s; + } + return 0; +} + +static int process_vk_key(WPARAM wParam, LPARAM lParam) +{ + const key2code_t *k; + unsigned int x; + unsigned short int ch; + + ch = vk2ascii(LOWORD(wParam)); + if ((lParam & KEY_IS_UP)) { + /* Test for "copy" to clipboard */ + if (ch == (CTRL_C|CTRL_FLAG)) { + SendMessage(calc.hWnd, WM_COMMAND, IDM_EDIT_COPY, 0); + return 1; + } + /* Test for "paste" from clipboard */ + if (ch == (CTRL_V|CTRL_FLAG)) { + SendMessage(calc.hWnd, WM_COMMAND, IDM_EDIT_PASTE, 0); + return 1; + } + /* Test of help menu */ + if (LOWORD(wParam) == VK_F1) { + SendMessage(calc.hWnd, WM_COMMAND, IDM_HELP_HELP, 0); + return 1; + } + } + + for (x=0; xkey == LOWORD(wParam)) { + return post_key_press(lParam, k->idc); + } + k++; + } while (--x); + } + return 0; +} + +#ifdef USE_KEYBOARD_HOOK +static LRESULT CALLBACK +KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam) +{ + if(nCode<0 || calc.is_menu_on) + return CallNextHookEx(calc.hKeyboardHook,nCode,wParam,lParam); + + if(nCode==HC_ACTION) + if (process_vk_key(wParam, lParam)) + return; + + return CallNextHookEx(calc.hKeyboardHook,nCode,wParam,lParam); +} +#endif + +static void update_lcd_display(HWND hwnd) +{ + /* +20 is the additional space for separator mode */ + TCHAR *tmp = (TCHAR *)alloca((calc.ptr-calc.buffer+3+20)*sizeof(TCHAR)); + + if (calc.buffer[0] == TEXT('\0')) + _tcscpy(tmp, TEXT("0")); + else + _tcscpy(tmp, calc.buffer); + /* add final '.' in decimal mode (if it's missing) */ + if (calc.base == IDC_RADIO_DEC) { + if (_tcschr(tmp, TEXT('.')) == NULL) + _tcscat(tmp, TEXT(".")); + } + /* if separator mode is on, let's add an additional space */ + if (calc.usesep && !calc.sci_in && !calc.sci_out && !calc.is_nan) { + /* go to the integer part of the string */ + TCHAR *p = _tcschr(tmp, TEXT('.')); + TCHAR *e = _tcschr(tmp, TEXT('\0')); + int n=0, t; + + if (p == NULL) p = e; + switch (calc.base) { + case IDC_RADIO_HEX: + case IDC_RADIO_BIN: + t = 4; + break; + default: + /* fall here for: + IDC_RADIO_DEC: + IDC_RADIO_OCT: */ + t = 3; + break; + } + while (--p > tmp) { + if (++n == t && *(p-1) != TEXT('-')) { + memmove(p+1, p, (e-p+1)*sizeof(TCHAR)); + e++; + *p = TEXT(' '); + n = 0; + } + } + /* if decimal mode, apply regional settings */ + if (calc.base == IDC_RADIO_DEC) { + TCHAR *p = tmp; + TCHAR *e = _tcschr(tmp, TEXT('.')); + + /* searching for thousands default separator */ + while (p < e) { + if (*p == TEXT(' ')) { + memmove(p+calc.sThousand_len, p+1, _tcslen(p)*sizeof(TCHAR)); + memcpy(p, calc.sThousand, calc.sThousand_len*sizeof(TCHAR)); + p += calc.sThousand_len; + } else + p++; + } + /* update decimal point too. */ + memmove(p+calc.sDecimal_len, p+1, _tcslen(p)*sizeof(TCHAR)); + memcpy(p, calc.sDecimal, calc.sDecimal_len*sizeof(TCHAR)); + } + } else { + TCHAR *p = _tcschr(tmp, TEXT('.')); + + /* update decimal point when usesep is false */ + if (p != NULL) { + memmove(p+calc.sDecimal_len, p+1, _tcslen(p)*sizeof(TCHAR)); + memcpy(p, calc.sDecimal, calc.sDecimal_len*sizeof(TCHAR)); + } + } + SendDlgItemMessage(hwnd, IDC_TEXT_OUTPUT, WM_SETTEXT, (WPARAM)0, (LPARAM)tmp); +} + +static void update_parent_display(HWND hWnd) +{ + TCHAR str[8]; + int n = eval_parent_count(); + + if (!n) + str[0] = TEXT('\0'); + else + _stprintf(str,TEXT("(=%d"), n); + SendDlgItemMessage(hWnd, IDC_TEXT_PARENT, WM_SETTEXT, 0, (LPARAM)str); +} + +static void build_operand(HWND hwnd, DWORD idc) +{ + unsigned int i = 0, n; + + if (idc == IDC_BUTTON_DOT) { + /* if dot is the first char, it's added automatically */ + if (calc.buffer == calc.ptr) { + *calc.ptr++ = TEXT('0'); + *calc.ptr++ = TEXT('.'); + *calc.ptr = TEXT('\0'); + update_lcd_display(hwnd); + return; + } + /* if pressed dot and it's already in the string, then return */ + if (_tcschr(calc.buffer, TEXT('.')) != NULL) + return; + } + if (idc != IDC_STATIC) { + while (idc != key2code[i].idc) i++; + } + n = calc.ptr - calc.buffer; + if (idc == IDC_BUTTON_0 && n == 0) { + /* no need to put the dot because it's handled by update_lcd_display() */ + calc.buffer[0] = TEXT('0'); + calc.buffer[1] = TEXT('\0'); + update_lcd_display(hwnd); + return; + } + switch (calc.base) { + case IDC_RADIO_HEX: + if (n >= 16) + return; + break; + case IDC_RADIO_DEC: + if (n >= SIZEOF(calc.buffer)-1) + return; + if (calc.sci_in) { + if (idc != IDC_STATIC) + calc.esp = (calc.esp * 10 + (key2code[i].key-'0')) % LOCAL_EXP_SIZE; + if (calc.ptr == calc.buffer) + _stprintf(calc.ptr, TEXT("0.e%+d"), calc.esp); + else + _stprintf(calc.ptr, TEXT("e%+d"), calc.esp); + update_lcd_display(hwnd); + return; + } + break; + case IDC_RADIO_OCT: + if (n >= 22) + return; + break; + case IDC_RADIO_BIN: + if (n >= 64) + return; + break; + } + calc.ptr += _stprintf(calc.ptr, TEXT("%C"), key2code[i].key); + update_lcd_display(hwnd); +} + +static void prepare_rpn_result(calc_number_t *rpn, TCHAR *buffer, int size, int base) +{ + if (calc.is_nan) { + rpn_zero(&calc.code); + LoadString(calc.hInstance, IDS_MATH_ERROR, buffer, size); + return; + } + prepare_rpn_result_2(rpn, buffer, size, base); +} + +static void display_rpn_result(HWND hwnd, calc_number_t *rpn) +{ + calc.sci_in = FALSE; + prepare_rpn_result(rpn, calc.buffer, SIZEOF(calc.buffer), calc.base); + calc.ptr = calc.buffer + _tcslen(calc.buffer); + update_lcd_display(hwnd); + calc.ptr = calc.buffer; + update_parent_display(hwnd); +} + +static int get_modifiers(HWND hwnd) +{ + int modifiers = 0; + + if (SendDlgItemMessage(hwnd, IDC_CHECK_INV, BM_GETCHECK, 0, 0)) + modifiers |= MODIFIER_INV; + if (SendDlgItemMessage(hwnd, IDC_CHECK_HYP, BM_GETCHECK, 0, 0)) + modifiers |= MODIFIER_HYP; + + return modifiers; +} + +static void convert_text2number(calc_number_t *a) +{ + /* if the screen output buffer is empty, then */ + /* the operand is taken from the last input */ + if (calc.buffer == calc.ptr) { + /* if pushed valued is ZERO then we should grab it */ + if (!_tcscmp(calc.buffer, TEXT("0.")) || + !_tcscmp(calc.buffer, TEXT("0"))) + /* this zero is good for both integer and decimal */ + rpn_zero(a); + else + rpn_copy(a, &calc.code); + return; + } + /* ZERO is the default value for all numeric bases */ + rpn_zero(a); + convert_text2number_2(a); +} + +static const struct _update_check_menus { + DWORD *sel; + WORD idm; + WORD idc; +} upd[] = { + { &calc.layout, IDM_VIEW_STANDARD, CALC_LAYOUT_STANDARD }, + { &calc.layout, IDM_VIEW_SCIENTIFIC, CALC_LAYOUT_SCIENTIFIC }, + /*-----------------------------------------*/ + { &calc.base, IDM_VIEW_HEX, IDC_RADIO_HEX, }, + { &calc.base, IDM_VIEW_DEC, IDC_RADIO_DEC, }, + { &calc.base, IDM_VIEW_OCT, IDC_RADIO_OCT, }, + { &calc.base, IDM_VIEW_BIN, IDC_RADIO_BIN, }, + /*-----------------------------------------*/ + { &calc.degr, IDM_VIEW_DEG, IDC_RADIO_DEG, }, + { &calc.degr, IDM_VIEW_RAD, IDC_RADIO_RAD, }, + { &calc.degr, IDM_VIEW_GRAD, IDC_RADIO_GRAD, }, + /*-----------------------------------------*/ + { &calc.size, IDM_VIEW_QWORD, IDC_RADIO_QWORD, }, + { &calc.size, IDM_VIEW_DWORD, IDC_RADIO_DWORD, }, + { &calc.size, IDM_VIEW_WORD, IDC_RADIO_WORD, }, + { &calc.size, IDM_VIEW_BYTE, IDC_RADIO_BYTE, }, +}; + +static void update_menu(HWND hwnd) +{ + HMENU hMenu = GetSubMenu(GetMenu(hwnd), 1); + unsigned int x; + + for (x=0; xnext); + rpn_free(&s->num); + free(s); + } + calc.stat = p; +} + +static void delete_stat_item(int n) +{ + statistic_t *p = calc.stat; + statistic_t *s; + + if (n == 0) { + calc.stat = (statistic_t *)p->next; + rpn_free(&p->num); + free(p); + } else { + s = (statistic_t *)p->next; + while (--n) { + p = s; + s = (statistic_t *)p->next; + } + p->next = s->next; + rpn_free(&s->num); + free(s); + } +} + +static LRESULT CALLBACK DlgStatProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) +{ + TCHAR buffer[SIZEOF(calc.buffer)]; + DWORD n; + + switch (msg) { + case WM_INITDIALOG: + return TRUE; + case WM_COMMAND: + switch (LOWORD(wp)) { + case IDC_LIST_STAT: + if (HIWORD(wp) == CBN_DBLCLK) + SendMessage(hWnd, WM_COMMAND, (WPARAM)IDC_BUTTON_LOAD, 0); + return TRUE; + case IDC_BUTTON_RET: + SetFocus(GetDlgItem(GetParent(hWnd), IDC_BUTTON_FOCUS)); + return TRUE; + case IDC_BUTTON_LOAD: + n = SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_GETCURSEL, 0, 0); + if (n == (DWORD)-1) + return TRUE; + PostMessage(GetParent(hWnd), WM_LOAD_STAT, (WPARAM)n, 0); + return TRUE; + case IDC_BUTTON_CD: + n = SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_GETCURSEL, 0, 0); + if (n == (DWORD)-1) + return TRUE; + SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_DELETESTRING, (WPARAM)n, 0); + update_n_stats_items(hWnd, buffer); + delete_stat_item(n); + return TRUE; + case IDC_BUTTON_CAD: + SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_RESETCONTENT, 0, 0); + clean_stat_list(); + update_n_stats_items(hWnd, buffer); + return TRUE; + } + break; + case WM_CLOSE: + clean_stat_list(); + DestroyWindow(hWnd); + return TRUE; + case WM_DESTROY: + PostMessage(GetParent(hWnd), WM_CLOSE_STATS, 0, 0); + return TRUE; + case WM_INSERT_STAT: + prepare_rpn_result(&(((statistic_t *)lp)->num), + buffer, SIZEOF(buffer), + ((statistic_t *)lp)->base); + SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_ADDSTRING, 0, (LPARAM)buffer); + update_n_stats_items(hWnd, buffer); + return TRUE; + } + return FALSE; +} + +static WPARAM idm_2_idc(int idm) +{ + int x; + + for (x=0; xnum); + rpn_copy(&s->num, a); + s->base = calc.base; + s->next = NULL; + if (p == NULL) + calc.stat = s; + else { + while (p->next != NULL) + p = (statistic_t *)(p->next); + p->next = s; + } + PostMessage(calc.hStatWnd, WM_INSERT_STAT, 0, (LPARAM)s); +} + +static void run_mp(calc_number_t *c) +{ + run_operator(&calc.memory, &calc.memory, c, RPN_OPERATOR_ADD); + update_memory_flag(calc.hWnd, TRUE); +} + +static void run_mm(calc_number_t *c) +{ + run_operator(&calc.memory, &calc.memory, c, RPN_OPERATOR_SUB); + update_memory_flag(calc.hWnd, TRUE); +} + +static void run_ms(calc_number_t *c) +{ + rpn_copy(&calc.memory, c); + update_memory_flag(calc.hWnd, rpn_is_zero(&calc.memory) ? FALSE : TRUE); +} + +static void run_mw(calc_number_t *c) +{ + calc_number_t tmp; + + rpn_copy(&tmp, &calc.memory); + rpn_copy(&calc.memory, c); + if (calc.is_memory) + rpn_copy(c, &tmp); + update_memory_flag(calc.hWnd, rpn_is_zero(&calc.memory) ? FALSE : TRUE); +} + +static statistic_t *upload_stat_number(int n) +{ + statistic_t *p = calc.stat; + + if (p == NULL) + return p; + + while (n--) { + p = (statistic_t *)(p->next); + if (p == NULL) + return p; + } + +#ifndef ENABLE_MULTI_PRECISION + if (calc.base != p->base) { + if (calc.base == IDC_RADIO_DEC) + calc.code.f = (double)p->num.i; + else { + calc.code.i = (__int64)p->num.f; + apply_int_mask(&calc.code); + } + } else +#endif + rpn_copy(&calc.code, &p->num); + + calc.is_nan = FALSE; + + return p; +} + +static void run_pow(calc_number_t *number) +{ + exec_infix2postfix(number, RPN_OPERATOR_POW); +} + +static void run_sqr(calc_number_t *number) +{ + exec_infix2postfix(number, RPN_OPERATOR_SQR); +} + +static void run_fe(calc_number_t *number) +{ + calc.sci_out = ((calc.sci_out == TRUE) ? FALSE : TRUE); +} + +static void handle_context_menu(HWND hWnd, WPARAM wp, LPARAM lp) +{ + TCHAR text[64]; + HMENU hMenu = CreatePopupMenu(); + DWORD idm; + + LoadString(calc.hInstance, IDS_QUICKHELP, text, SIZEOF(text)); + AppendMenu(hMenu, MF_STRING | MF_ENABLED, IDM_HELP_HELP, text); + idm = (DWORD)TrackPopupMenu(hMenu, + TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD | TPM_RIGHTBUTTON, + LOWORD(lp), + HIWORD(lp), + 0, + hWnd, + NULL); + DestroyMenu(hMenu); + if (idm != 0) { + HH_POPUP popup; + + memset(&popup, 0, sizeof(popup)); + popup.cbStruct = sizeof(HH_POPUP); + popup.clrForeground = 1; + popup.clrBackground = -1; + popup.pt.x = LOWORD(lp); + popup.pt.y = HIWORD(lp); + popup.rcMargins.top = -1; + popup.rcMargins.bottom = -1; + popup.rcMargins.left = -1; + popup.rcMargins.right = -1; + popup.idString = GetWindowLong((HWND)wp, GWL_ID); +// HtmlHelp((HWND)wp, HTMLHELP_PATH("/popups.txt"), HH_DISPLAY_TEXT_POPUP, (DWORD_PTR)&popup); + } +} + +static void run_canc(calc_number_t *c) +{ + flush_postfix(); + rpn_zero(c); + /* clear also scientific display modes */ + calc.sci_out = FALSE; + calc.sci_in = FALSE; + /* clear state of inv and hyp flags */ + SendDlgItemMessage(calc.hWnd, IDC_CHECK_INV, BM_SETCHECK, 0, 0); + SendDlgItemMessage(calc.hWnd, IDC_CHECK_HYP, BM_SETCHECK, 0, 0); +} + +static void run_rpar(calc_number_t *c) +{ + exec_closeparent(c); +} + +static void run_lpar(calc_number_t *c) +{ + exec_infix2postfix(c, RPN_OPERATOR_PARENT); +} + +static LRESULT CALLBACK SubclassButtonProc(HWND hWnd, WPARAM wp, LPARAM lp) +{ + LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lp; + DWORD dwStyle; + UINT dwText; + TCHAR text[64]; + int dx, dy, len; + SIZE size; + POINT pt; + + if(dis->CtlType == ODT_BUTTON) { + /* + * little exception: 1/x has different color + * in standard and scientific modes + */ + if (calc.layout == CALC_LAYOUT_STANDARD && + IDC_BUTTON_RX == dis->CtlID) { + SetTextColor(dis->hDC, CALC_CLR_BLUE); + } else + for (dx=0; dxCtlID) { + SetTextColor(dis->hDC, key2code[dx].col); + break; + } + } + /* button text to write */ + len = GetWindowText(dis->hwndItem, text, SIZEOF(text)); + /* default state: unpushed & enabled */ + dwStyle = 0; + dwText = 0; + if ((dis->itemState & ODS_DISABLED)) + dwText = DSS_DISABLED; + if ((dis->itemState & ODS_SELECTED)) + dwStyle = DFCS_PUSHED; + + DrawFrameControl(dis->hDC, &dis->rcItem, DFC_BUTTON, DFCS_BUTTONPUSH | dwStyle); + GetTextExtentPoint32(dis->hDC, text, len, &size); + dx = ((dis->rcItem.right-dis->rcItem.left) - size.cx) >> 1; + dy = ((dis->rcItem.bottom-dis->rcItem.top) - size.cy) >> 1; + if ((dwStyle & DFCS_PUSHED)) { + dx++; + dy++; + } + pt.x = dis->rcItem.left + dx; + pt.y = dis->rcItem.top + dy; + DrawState(dis->hDC, NULL, NULL, (LPARAM)text, 0, pt.x, pt.y, size.cx, size.cy, DST_TEXT | dwText); + } + return 1L; +} + +static LRESULT CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) +{ + unsigned int x; + + switch (msg) { + case WM_DRAWITEM: + return SubclassButtonProc(hWnd, wp, lp); + + case WM_INITDIALOG: + calc.hWnd=hWnd; + +#ifdef USE_KEYBOARD_HOOK + calc.hKeyboardHook=SetWindowsHookEx( + WH_KEYBOARD, + KeyboardHookProc, + NULL, + GetCurrentThreadId() + ); +#endif + rpn_zero(&calc.code); + calc.sci_out = FALSE; + calc.base = IDC_RADIO_DEC; + calc.size = IDC_RADIO_QWORD; + calc.degr = IDC_RADIO_DEG; + calc.ptr = calc.buffer; + calc.is_nan = FALSE; + enable_allowed_controls(hWnd, IDC_RADIO_DEC); + update_radio(hWnd, IDC_RADIO_DEC); + update_menu(hWnd); + display_rpn_result(hWnd, &calc.code); + update_memory_flag(hWnd, calc.is_memory); + /* remove keyboard focus */ + SetFocus(GetDlgItem(hWnd, IDC_BUTTON_FOCUS)); + /* set our calc icon */ + SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(calc.hInstance, MAKEINTRESOURCE(IDI_CALC_BIG))); + SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(calc.hInstance, MAKEINTRESOURCE(IDI_CALC_SMALL))); + /* update text for decimal button */ + SendDlgItemMessage(hWnd, IDC_BUTTON_DOT, WM_SETTEXT, (WPARAM)0, (LPARAM)calc.sDecimal); + break; + case WM_CTLCOLORSTATIC: + if ((HWND)lp == GetDlgItem(hWnd, IDC_TEXT_OUTPUT)) + return (LRESULT)GetStockObject(WHITE_BRUSH); + break; + case WM_HANDLE_CLIPBOARD: + handle_clipboard_input(hWnd); + return TRUE; + case WM_COMMAND: + if (HIWORD(wp) != BN_CLICKED && HIWORD(wp) != BN_DBLCLK) + break; + /* avoid flicker if the user selects from keyboard */ + if (GetFocus() != GetDlgItem(hWnd, IDC_BUTTON_FOCUS)) + SetFocus(GetDlgItem(hWnd, IDC_BUTTON_FOCUS)); + switch (LOWORD(wp)) { + case IDM_HELP_ABOUT: + DialogBox(calc.hInstance,MAKEINTRESOURCE(IDD_DIALOG_ABOUT), hWnd, AboutDlgProc); + return TRUE; + case IDM_HELP_HELP: +// HtmlHelp(hWnd, HTMLHELP_PATH("/general_information.htm"), HH_DISPLAY_TOPIC, (DWORD_PTR)NULL); + return TRUE; + case IDM_VIEW_STANDARD: + calc.layout = CALC_LAYOUT_STANDARD; + calc.action = IDM_VIEW_STANDARD; + DestroyWindow(hWnd); + save_config(); + return TRUE; + case IDM_VIEW_SCIENTIFIC: + calc.layout = CALC_LAYOUT_SCIENTIFIC; + calc.action = IDM_VIEW_SCIENTIFIC; + DestroyWindow(hWnd); + save_config(); + return TRUE; + case IDM_VIEW_CONVERSION: + /* UNIMPLEMENTED */ + return TRUE; + case IDM_VIEW_HEX: + case IDM_VIEW_DEC: + case IDM_VIEW_OCT: + case IDM_VIEW_BIN: + case IDM_VIEW_DEG: + case IDM_VIEW_RAD: + case IDM_VIEW_GRAD: + case IDM_VIEW_QWORD: + case IDM_VIEW_DWORD: + case IDM_VIEW_WORD: + case IDM_VIEW_BYTE: + SendMessage(hWnd, WM_COMMAND, idm_2_idc(LOWORD(wp)), 0); + return TRUE; + case IDM_EDIT_COPY: + handle_copy_command(hWnd); + return TRUE; + case IDM_EDIT_PASTE: + if (calc.Clipboard != NULL) + break; + calc.Clipboard = ReadClipboard(); + if (calc.Clipboard != NULL) { + calc.ClipPtr = calc.Clipboard; + handle_clipboard_input(hWnd); + } + return TRUE; + case IDM_VIEW_GROUP: + calc.usesep = (calc.usesep ? FALSE : TRUE); + update_menu(hWnd); + update_lcd_display(hWnd); + save_config(); + return TRUE; + case IDC_BUTTON_CE: { + calc_number_t tmp; + rpn_zero(&tmp); + display_rpn_result(hWnd, &tmp); + } + return TRUE; + case IDC_RADIO_DEC: + case IDC_RADIO_HEX: + case IDC_RADIO_OCT: + case IDC_RADIO_BIN: +/* GNU WINDRES is bugged so I must always force radio update */ +/* (Fix for Win95/98) */ +#ifdef _MSC_VER + if (calc.base == LOWORD(wp)) + break; +#endif + calc.is_nan = FALSE; + update_radio(hWnd, LOWORD(wp)); + return TRUE; + case IDC_RADIO_DEG: + case IDC_RADIO_RAD: + case IDC_RADIO_GRAD: +/* GNU WINDRES is bugged so I must always force radio update */ +/* (Fix for Win95/98) */ +#ifdef _MSC_VER + if (calc.degr == LOWORD(wp)) + break; +#endif + calc.degr = LOWORD(wp); + calc.is_nan = FALSE; + update_menu(hWnd); + return TRUE; + case IDC_RADIO_QWORD: + case IDC_RADIO_DWORD: + case IDC_RADIO_WORD: + case IDC_RADIO_BYTE: +/* GNU WINDRES is bugged so I must always force radio update */ +/* (Fix for Win95/98) */ +#ifdef _MSC_VER + if (calc.size == LOWORD(wp)) + break; +#endif + calc.size = LOWORD(wp); + calc.is_nan = FALSE; + update_menu(hWnd); + /* + * update the content of the display + */ + convert_text2number(&calc.code); + apply_int_mask(&calc.code); + display_rpn_result(hWnd, &calc.code); + return TRUE; + case IDC_BUTTON_1: + case IDC_BUTTON_2: + case IDC_BUTTON_3: + case IDC_BUTTON_4: + case IDC_BUTTON_5: + case IDC_BUTTON_6: + case IDC_BUTTON_7: + case IDC_BUTTON_8: + case IDC_BUTTON_9: + case IDC_BUTTON_0: + case IDC_BUTTON_DOT: + case IDC_BUTTON_A: + case IDC_BUTTON_B: + case IDC_BUTTON_C: + case IDC_BUTTON_D: + case IDC_BUTTON_E: + case IDC_BUTTON_F: + calc.is_nan = FALSE; + build_operand(hWnd, LOWORD(wp)); + return TRUE; + case IDC_BUTTON_PERCENT: + case IDC_BUTTON_ADD: + case IDC_BUTTON_SUB: + case IDC_BUTTON_MULT: + case IDC_BUTTON_DIV: + case IDC_BUTTON_MOD: + case IDC_BUTTON_AND: + case IDC_BUTTON_OR: + case IDC_BUTTON_XOR: + case IDC_BUTTON_LSH: + case IDC_BUTTON_EQU: + if (calc.is_nan) break; + for (x=0; x