Commit in rosapps/calc on MAIN
En.rc+155added 1.1
Es.rc+155added 1.1
Fr.rc+155added 1.1
It.rc+155added 1.1
Nl.rc+155added 1.1
Pt.rc+155added 1.1
Ru.rc+155added 1.1
Si.rc+156added 1.1
dialog.c+93added 1.1
dialog.h+24added 1.1
rsrc.rc+33added 1.1
stats.c+131added 1.1
stats.h+24added 1.1
winecalc.c+3785added 1.1
winecalc.h+364added 1.1
calc.rc+3-3851.5 -> 1.6
makefile+5-151.6 -> 1.7
resource.h+68-1301.5 -> 1.6
button.c-2191.2 removed
button.h-441.1 removed
main.c-2661.5 removed
main.h-521.2 removed
settings.c-1151.4 removed
settings.h-441.2 removed
+5771-1270
15 added + 6 removed + 3 modified, total 24 files
Imported WineCalc by James Briggs.

rosapps/calc
En.rc added at 1.1
diff -N En.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ En.rc	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,155 @@
+/*
+ * WineCalc (En.rc)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "windows.h"
+#include "resource.h"
+#include "winecalc.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+STRINGTABLE DISCARDABLE
+{
+   IDS_APPNAME,            "GNU Calculator"
+
+   IDS_COPYRIGHT1,         "GNU Calculator 5.0. Licensed under LGPL 2"
+   IDS_COPYRIGHT2          "Copyright 2003, James Briggs"
+   IDS_COPYRIGHT3          "San Jose, California, USA"
+   IDS_COPYRIGHT4          "james@ActionMessage.com"
+   IDS_COPYRIGHT5          "http://www.ActionMessage.com/winecalc/"
+
+   IDS_BTN_BACKSPACE,      "Backspace"
+   IDS_BTN_CLEAR_ENTRY,    "CE"
+   IDS_BTN_CLEAR_ALL,      "C"
+   IDS_BTN_MEM_CLEAR,      "MC"
+   IDS_BTN_MEM_RECALL,     "MR"
+   IDS_BTN_MEM_STORE,      "MS"
+   IDS_BTN_MEM_PLUS,       "M+"
+   IDS_BTN_MEM_STATUS_M,   "M"
+   IDS_BTN_SQRT,           "sqrt"
+   IDS_ERR_INVALID_INPUT,  "Invalid input for function."
+   IDS_ERR_DIVIDE_BY_ZERO, "Cannot divide by zero."
+   IDS_ERR_UNDEFINED,      "Result of function is undefined."
+}
+
+MAIN_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIMS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+      MENUITEM "Degrees\tF2",      ID_CALC_MS_DEGREES
+      MENUITEM "Radians\tF3",      ID_CALC_MS_RADIANS
+	  MENUITEM "Grads\tF4",        ID_CALC_MS_GRADS
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIWS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+	  MENUITEM "Qword\tF12",       ID_CALC_WS_QWORD
+	  MENUITEM "Dword\tF2",        ID_CALC_WS_DWORD
+	  MENUITEM "Word\tF3",         ID_CALC_WS_WORD
+	  MENUITEM "Byte\tF4",         ID_CALC_WS_BYTE
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+MAIN_MENU ACCELERATORS
+BEGIN
+   VK_F1, IDV_HELP,     VIRTKEY
+END
+
+DLG_ABOUT DIALOG 12,0,120,82
+CAPTION "About GNU winecalc"
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+BEGIN
+   DEFPUSHBUTTON "OK", IDOK,       42, 60, 30, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+END
+
+WHATS_THIS_MENU MENU DISCARDABLE
+{
+    POPUP "" {
+      MENUITEM "What's This?",     IDM_WHATS_THIS
+   }
+}
+
+DLG_STATS DIALOG 12,0,125,78
+CAPTION "Statistics Box"
+FONT 9, "Tahoma"
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+BEGIN
+   DEFPUSHBUTTON "&RET",  ID_STATS_RET,   4, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&LOAD", ID_STATS_LOAD, 34, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&CD"    ID_STATS_CD,   64, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "C&AD",  ID_STATS_CAD,  94, 52, 25, 13, WS_TABSTOP | WS_GROUP
+END

rosapps/calc
Es.rc added at 1.1
diff -N Es.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Es.rc	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,155 @@
+/*
+ * WineCalc (Es.rc)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "windows.h"
+#include "resource.h"
+#include "winecalc.h"
+
+LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
+
+STRINGTABLE DISCARDABLE
+{
+   IDS_APPNAME,            "GNU Calculator"
+
+   IDS_COPYRIGHT1,         "GNU Calculator 5.0. Licensed under LGPL 2"
+   IDS_COPYRIGHT2          "Copyright 2003, James Briggs"
+   IDS_COPYRIGHT3          "San Jose, California, USA"
+   IDS_COPYRIGHT4          "james@ActionMessage.com"
+   IDS_COPYRIGHT5          "http://www.ActionMessage.com/winecalc/"
+
+   IDS_BTN_BACKSPACE,      "Backspace"
+   IDS_BTN_CLEAR_ENTRY,    "CE"
+   IDS_BTN_CLEAR_ALL,      "C"
+   IDS_BTN_MEM_CLEAR,      "MC"
+   IDS_BTN_MEM_RECALL,     "MR"
+   IDS_BTN_MEM_STORE,      "MS"
+   IDS_BTN_MEM_PLUS,       "M+"
+   IDS_BTN_MEM_STATUS_M,   "M"
+   IDS_BTN_SQRT,           "sqrt"
+   IDS_ERR_INVALID_INPUT,  "Invalid input for function."
+   IDS_ERR_DIVIDE_BY_ZERO, "Cannot divide by zero."
+   IDS_ERR_UNDEFINED,      "Result of function is undefined."
+}
+
+MAIN_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIMS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+      MENUITEM "Degrees\tF2",      ID_CALC_MS_DEGREES
+      MENUITEM "Radians\tF3",      ID_CALC_MS_RADIANS
+	  MENUITEM "Grads\tF4",        ID_CALC_MS_GRADS
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIWS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+	  MENUITEM "Qword\tF12",       ID_CALC_WS_QWORD
+	  MENUITEM "Dword\tF2",        ID_CALC_WS_DWORD
+	  MENUITEM "Word\tF3",         ID_CALC_WS_WORD
+	  MENUITEM "Byte\tF4",         ID_CALC_WS_BYTE
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+MAIN_MENU ACCELERATORS
+BEGIN
+   VK_F1, IDV_HELP,     VIRTKEY
+END
+
+WHATS_THIS_MENU MENU DISCARDABLE
+{
+   POPUP "" {
+      MENUITEM "What's This?",     IDM_WHATS_THIS
+  }
+}
+
+DLG_ABOUT DIALOG 12,0,120,82
+CAPTION "About GNU winecalc"
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+BEGIN
+   DEFPUSHBUTTON "OK", IDOK,       42, 60, 30, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+END
+
+DLG_STATS DIALOG 12,0,125,78
+CAPTION "Statistics Box"
+FONT 9, "Tahoma"
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+BEGIN
+   DEFPUSHBUTTON "&RET",  ID_STATS_RET,   4, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&LOAD", ID_STATS_LOAD, 34, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&CD"    ID_STATS_CD,   64, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "C&AD",  ID_STATS_CAD,  94, 52, 25, 13, WS_TABSTOP | WS_GROUP
+END

rosapps/calc
Fr.rc added at 1.1
diff -N Fr.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Fr.rc	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,155 @@
+/*
+ * WineCalc (Fr.rc)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "windows.h"
+#include "resource.h"
+#include "winecalc.h"
+
+LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
+
+STRINGTABLE DISCARDABLE
+{
+   IDS_APPNAME,            "GNU Calculator"
+
+   IDS_COPYRIGHT1,         "GNU Calculator 5.0. Licensed under LGPL 2"
+   IDS_COPYRIGHT2          "Copyright 2003, James Briggs"
+   IDS_COPYRIGHT3          "San Jose, California, USA"
+   IDS_COPYRIGHT4          "james@ActionMessage.com"
+   IDS_COPYRIGHT5          "http://www.ActionMessage.com/winecalc/"
+
+   IDS_BTN_BACKSPACE,      "Backspace"
+   IDS_BTN_CLEAR_ENTRY,    "CE"
+   IDS_BTN_CLEAR_ALL,      "C"
+   IDS_BTN_MEM_CLEAR,      "MC"
+   IDS_BTN_MEM_RECALL,     "MR"
+   IDS_BTN_MEM_STORE,      "MS"
+   IDS_BTN_MEM_PLUS,       "M+"
+   IDS_BTN_MEM_STATUS_M,   "M"
+   IDS_BTN_SQRT,           "sqrt"
+   IDS_ERR_INVALID_INPUT,  "Invalid input for function."
+   IDS_ERR_DIVIDE_BY_ZERO, "Cannot divide by zero."
+   IDS_ERR_UNDEFINED,      "Result of function is undefined."
+}
+
+MAIN_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIMS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+      MENUITEM "Degrees\tF2",      ID_CALC_MS_DEGREES
+      MENUITEM "Radians\tF3",      ID_CALC_MS_RADIANS
+	  MENUITEM "Grads\tF4",        ID_CALC_MS_GRADS
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIWS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+	  MENUITEM "Qword\tF12",       ID_CALC_WS_QWORD
+	  MENUITEM "Dword\tF2",        ID_CALC_WS_DWORD
+	  MENUITEM "Word\tF3",         ID_CALC_WS_WORD
+	  MENUITEM "Byte\tF4",         ID_CALC_WS_BYTE
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+MAIN_MENU ACCELERATORS
+BEGIN
+   VK_F1, IDV_HELP,     VIRTKEY
+END
+
+WHATS_THIS_MENU MENU DISCARDABLE
+{
+   POPUP "" {
+      MENUITEM "What's This?",     IDM_WHATS_THIS
+  }
+}
+
+DLG_ABOUT DIALOG 12,0,120,82
+CAPTION "About GNU winecalc"
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+BEGIN
+   DEFPUSHBUTTON "OK", IDOK,       42, 60, 30, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+END
+
+DLG_STATS DIALOG 12,0,125,78
+CAPTION "Statistics Box"
+FONT 9, "Tahoma"
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+BEGIN
+   DEFPUSHBUTTON "&RET",  ID_STATS_RET,   4, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&LOAD", ID_STATS_LOAD, 34, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&CD"    ID_STATS_CD,   64, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "C&AD",  ID_STATS_CAD,  94, 52, 25, 13, WS_TABSTOP | WS_GROUP
+END

rosapps/calc
It.rc added at 1.1
diff -N It.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ It.rc	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,155 @@
+/*
+ * WineCalc (It.rc)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "windows.h"
+#include "resource.h"
+#include "winecalc.h"
+
+LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+{
+   IDS_APPNAME,            "GNU Calculator"
+
+   IDS_COPYRIGHT1,         "GNU Calculator 5.0. Licensed under LGPL 2"
+   IDS_COPYRIGHT2          "Copyright 2003, James Briggs"
+   IDS_COPYRIGHT3          "San Jose, California, USA"
+   IDS_COPYRIGHT4          "james@ActionMessage.com"
+   IDS_COPYRIGHT5          "http://www.ActionMessage.com/winecalc/"
+
+   IDS_BTN_BACKSPACE,      "Backspace"
+   IDS_BTN_CLEAR_ENTRY,    "CE"
+   IDS_BTN_CLEAR_ALL,      "C"
+   IDS_BTN_MEM_CLEAR,      "MC"
+   IDS_BTN_MEM_RECALL,     "MR"
+   IDS_BTN_MEM_STORE,      "MS"
+   IDS_BTN_MEM_PLUS,       "M+"
+   IDS_BTN_MEM_STATUS_M,   "M"
+   IDS_BTN_SQRT,           "sqrt"
+   IDS_ERR_INVALID_INPUT,  "Invalid input for function."
+   IDS_ERR_DIVIDE_BY_ZERO, "Cannot divide by zero."
+   IDS_ERR_UNDEFINED,      "Result of function is undefined."
+}
+
+MAIN_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIMS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+      MENUITEM "Degrees\tF2",      ID_CALC_MS_DEGREES
+      MENUITEM "Radians\tF3",      ID_CALC_MS_RADIANS
+	  MENUITEM "Grads\tF4",        ID_CALC_MS_GRADS
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIWS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+	  MENUITEM "Qword\tF12",       ID_CALC_WS_QWORD
+	  MENUITEM "Dword\tF2",        ID_CALC_WS_DWORD
+	  MENUITEM "Word\tF3",         ID_CALC_WS_WORD
+	  MENUITEM "Byte\tF4",         ID_CALC_WS_BYTE
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+MAIN_MENU ACCELERATORS
+BEGIN
+   VK_F1, IDV_HELP,     VIRTKEY
+END
+
+WHATS_THIS_MENU MENU DISCARDABLE
+{
+   POPUP "" {
+      MENUITEM "What's This?",     IDM_WHATS_THIS
+  }
+}
+
+DLG_ABOUT DIALOG 12,0,120,82
+CAPTION "About GNU winecalc"
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+BEGIN
+   DEFPUSHBUTTON "OK", IDOK,       42, 60, 30, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+END
+
+DLG_STATS DIALOG 12,0,125,78
+CAPTION "Statistics Box"
+FONT 9, "Tahoma"
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+BEGIN
+   DEFPUSHBUTTON "&RET",  ID_STATS_RET,   4, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&LOAD", ID_STATS_LOAD, 34, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&CD"    ID_STATS_CD,   64, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "C&AD",  ID_STATS_CAD,  94, 52, 25, 13, WS_TABSTOP | WS_GROUP
+END

rosapps/calc
Nl.rc added at 1.1
diff -N Nl.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Nl.rc	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,155 @@
+/*
+ * WineCalc (Nl.rc)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "windows.h"
+#include "resource.h"
+#include "winecalc.h"
+
+LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+{
+   IDS_APPNAME,            "GNU Calculator"
+
+   IDS_COPYRIGHT1,         "GNU Calculator 5.0. Licensed under LGPL 2"
+   IDS_COPYRIGHT2          "Copyright 2003, James Briggs"
+   IDS_COPYRIGHT3          "San Jose, California, USA"
+   IDS_COPYRIGHT4          "james@ActionMessage.com"
+   IDS_COPYRIGHT5          "http://www.ActionMessage.com/winecalc/"
+
+   IDS_BTN_BACKSPACE,      "Backspace"
+   IDS_BTN_CLEAR_ENTRY,    "CE"
+   IDS_BTN_CLEAR_ALL,      "C"
+   IDS_BTN_MEM_CLEAR,      "MC"
+   IDS_BTN_MEM_RECALL,     "MR"
+   IDS_BTN_MEM_STORE,      "MS"
+   IDS_BTN_MEM_PLUS,       "M+"
+   IDS_BTN_MEM_STATUS_M,   "M"
+   IDS_BTN_SQRT,           "sqrt"
+   IDS_ERR_INVALID_INPUT,  "Invalid input for function."
+   IDS_ERR_DIVIDE_BY_ZERO, "Cannot divide by zero."
+   IDS_ERR_UNDEFINED,      "Result of function is undefined."
+}
+
+MAIN_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIMS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+      MENUITEM "Degrees\tF2",      ID_CALC_MS_DEGREES
+      MENUITEM "Radians\tF3",      ID_CALC_MS_RADIANS
+	  MENUITEM "Grads\tF4",        ID_CALC_MS_GRADS
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIWS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+	  MENUITEM "Qword\tF12",       ID_CALC_WS_QWORD
+	  MENUITEM "Dword\tF2",        ID_CALC_WS_DWORD
+	  MENUITEM "Word\tF3",         ID_CALC_WS_WORD
+	  MENUITEM "Byte\tF4",         ID_CALC_WS_BYTE
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+MAIN_MENU ACCELERATORS
+BEGIN
+   VK_F1, IDV_HELP,     VIRTKEY
+END
+
+WHATS_THIS_MENU MENU DISCARDABLE
+{
+   POPUP "" {
+      MENUITEM "What's This?",     IDM_WHATS_THIS
+  }
+}
+
+DLG_ABOUT DIALOG 12,0,120,82
+CAPTION "About GNU winecalc"
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+BEGIN
+   DEFPUSHBUTTON "OK", IDOK,       42, 60, 30, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+END
+
+DLG_STATS DIALOG 12,0,125,78
+CAPTION "Statistics Box"
+FONT 9, "Tahoma"
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+BEGIN
+   DEFPUSHBUTTON "&RET",  ID_STATS_RET,   4, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&LOAD", ID_STATS_LOAD, 34, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&CD"    ID_STATS_CD,   64, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "C&AD",  ID_STATS_CAD,  94, 52, 25, 13, WS_TABSTOP | WS_GROUP
+END

rosapps/calc
Pt.rc added at 1.1
diff -N Pt.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Pt.rc	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,155 @@
+/*
+ * WineCalc (Pt.rc)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "windows.h"
+#include "resource.h"
+#include "winecalc.h"
+
+LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+{
+   IDS_APPNAME,            "GNU Calculator"
+
+   IDS_COPYRIGHT1,         "GNU Calculator 5.0. Licensed under LGPL 2"
+   IDS_COPYRIGHT2          "Copyright 2003, James Briggs"
+   IDS_COPYRIGHT3          "San Jose, California, USA"
+   IDS_COPYRIGHT4          "james@ActionMessage.com"
+   IDS_COPYRIGHT5          "http://www.ActionMessage.com/winecalc/"
+
+   IDS_BTN_BACKSPACE,      "Backspace"
+   IDS_BTN_CLEAR_ENTRY,    "CE"
+   IDS_BTN_CLEAR_ALL,      "C"
+   IDS_BTN_MEM_CLEAR,      "MC"
+   IDS_BTN_MEM_RECALL,     "MR"
+   IDS_BTN_MEM_STORE,      "MS"
+   IDS_BTN_MEM_PLUS,       "M+"
+   IDS_BTN_MEM_STATUS_M,   "M"
+   IDS_BTN_SQRT,           "sqrt"
+   IDS_ERR_INVALID_INPUT,  "Invalid input for function."
+   IDS_ERR_DIVIDE_BY_ZERO, "Cannot divide by zero."
+   IDS_ERR_UNDEFINED,      "Result of function is undefined."
+}
+
+MAIN_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIMS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+      MENUITEM "Degrees\tF2",      ID_CALC_MS_DEGREES
+      MENUITEM "Radians\tF3",      ID_CALC_MS_RADIANS
+	  MENUITEM "Grads\tF4",        ID_CALC_MS_GRADS
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIWS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+	  MENUITEM "Qword\tF12",       ID_CALC_WS_QWORD
+	  MENUITEM "Dword\tF2",        ID_CALC_WS_DWORD
+	  MENUITEM "Word\tF3",         ID_CALC_WS_WORD
+	  MENUITEM "Byte\tF4",         ID_CALC_WS_BYTE
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+MAIN_MENU ACCELERATORS
+BEGIN
+   VK_F1, IDV_HELP,     VIRTKEY
+END
+
+WHATS_THIS_MENU MENU DISCARDABLE
+{
+   POPUP "" {
+      MENUITEM "What's This?",     IDM_WHATS_THIS
+  }
+}
+
+DLG_ABOUT DIALOG 12,0,120,82
+CAPTION "About GNU winecalc"
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+BEGIN
+   DEFPUSHBUTTON "OK", IDOK,       42, 60, 30, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+END
+
+DLG_STATS DIALOG 12,0,125,78
+CAPTION "Statistics Box"
+FONT 9, "Tahoma"
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+BEGIN
+   DEFPUSHBUTTON "&RET",  ID_STATS_RET,   4, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&LOAD", ID_STATS_LOAD, 34, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&CD"    ID_STATS_CD,   64, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "C&AD",  ID_STATS_CAD,  94, 52, 25, 13, WS_TABSTOP | WS_GROUP
+END

rosapps/calc
Ru.rc added at 1.1
diff -N Ru.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Ru.rc	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,155 @@
+/*
+ * WineCalc (Ru.rc)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "windows.h"
+#include "resource.h"
+#include "winecalc.h"
+
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+{
+   IDS_APPNAME,            "GNU Calculator"
+
+   IDS_COPYRIGHT1,         "GNU Calculator 5.0. Licensed under LGPL 2"
+   IDS_COPYRIGHT2          "Copyright 2003, James Briggs"
+   IDS_COPYRIGHT3          "San Jose, California, USA"
+   IDS_COPYRIGHT4          "james@ActionMessage.com"
+   IDS_COPYRIGHT5          "http://www.ActionMessage.com/winecalc/"
+
+   IDS_BTN_BACKSPACE,      "Backspace"
+   IDS_BTN_CLEAR_ENTRY,    "CE"
+   IDS_BTN_CLEAR_ALL,      "C"
+   IDS_BTN_MEM_CLEAR,      "MC"
+   IDS_BTN_MEM_RECALL,     "MR"
+   IDS_BTN_MEM_STORE,      "MS"
+   IDS_BTN_MEM_PLUS,       "M+"
+   IDS_BTN_MEM_STATUS_M,   "M"
+   IDS_BTN_SQRT,           "sqrt"
+   IDS_ERR_INVALID_INPUT,  "Invalid input for function."
+   IDS_ERR_DIVIDE_BY_ZERO, "Cannot divide by zero."
+   IDS_ERR_UNDEFINED,      "Result of function is undefined."
+}
+
+MAIN_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIMS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+      MENUITEM "Degrees\tF2",      ID_CALC_MS_DEGREES
+      MENUITEM "Radians\tF3",      ID_CALC_MS_RADIANS
+	  MENUITEM "Grads\tF4",        ID_CALC_MS_GRADS
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIWS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+	  MENUITEM "Qword\tF12",       ID_CALC_WS_QWORD
+	  MENUITEM "Dword\tF2",        ID_CALC_WS_DWORD
+	  MENUITEM "Word\tF3",         ID_CALC_WS_WORD
+	  MENUITEM "Byte\tF4",         ID_CALC_WS_BYTE
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+MAIN_MENU ACCELERATORS
+BEGIN
+   VK_F1, IDV_HELP,     VIRTKEY
+END
+
+WHATS_THIS_MENU MENU DISCARDABLE
+{
+   POPUP "" {
+      MENUITEM "What's This?",     IDM_WHATS_THIS
+  }
+}
+
+DLG_ABOUT DIALOG 12,0,120,82
+CAPTION "About GNU winecalc"
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+BEGIN
+   DEFPUSHBUTTON "OK", IDOK,       42, 60, 30, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+END
+
+DLG_STATS DIALOG 12,0,125,78
+CAPTION "Statistics Box"
+FONT 9, "Tahoma"
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+BEGIN
+   DEFPUSHBUTTON "&RET",  ID_STATS_RET,   4, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&LOAD", ID_STATS_LOAD, 34, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&CD"    ID_STATS_CD,   64, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "C&AD",  ID_STATS_CAD,  94, 52, 25, 13, WS_TABSTOP | WS_GROUP
+END

rosapps/calc
Si.rc added at 1.1
diff -N Si.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Si.rc	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,156 @@
+/*
+ * WineCalc (Si.rc)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "windows.h"
+#include "resource.h"
+#include "winecalc.h"
+
+LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+{
+   IDS_APPNAME,            "GNU Calculator"
+
+   IDS_COPYRIGHT1,         "GNU Calculator 5.0. Licensed under LGPL 2"
+   IDS_COPYRIGHT2          "Copyright 2003, James Briggs"
+   IDS_COPYRIGHT3          "San Jose, California, USA"
+   IDS_COPYRIGHT4          "james@ActionMessage.com"
+   IDS_COPYRIGHT5          "http://www.ActionMessage.com/winecalc/"
+
+   IDS_BTN_BACKSPACE,      "Backspace"
+   IDS_BTN_CLEAR_ENTRY,    "CE"
+   IDS_BTN_CLEAR_ALL,      "C"
+   IDS_BTN_MEM_CLEAR,      "MC"
+   IDS_BTN_MEM_RECALL,     "MR"
+   IDS_BTN_MEM_STORE,      "MS"
+   IDS_BTN_MEM_PLUS,       "M+"
+   IDS_BTN_MEM_STATUS_M,   "M"
+   IDS_BTN_SQRT,           "sqrt"
+   IDS_ERR_INVALID_INPUT,  "Invalid input for function."
+   IDS_ERR_DIVIDE_BY_ZERO, "Cannot divide by zero."
+   IDS_ERR_UNDEFINED,      "Result of function is undefined."
+}
+
+MAIN_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIMS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+      MENUITEM "Degrees\tF2",      ID_CALC_MS_DEGREES
+      MENUITEM "Radians\tF3",      ID_CALC_MS_RADIANS
+	  MENUITEM "Grads\tF4",        ID_CALC_MS_GRADS
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+SCIWS_MENU MENU DISCARDABLE
+{
+   POPUP "&Edit" {
+      MENUITEM "&Copy Ctrl+C",     IDM_COPY
+      MENUITEM "&Paste Ctrl+V",    IDM_PASTE
+   }
+   POPUP "&View" {
+      MENUITEM "Standard",         IDM_MODE_STANDARD
+      MENUITEM "Scientific",       IDM_MODE_SCIENTIFIC
+      MENUITEM SEPARATOR
+	  MENUITEM "Hex\tF5",          ID_CALC_NS_HEX
+	  MENUITEM "Decimal\tF6",      ID_CALC_NS_DEC
+	  MENUITEM "Octal\tF7",        ID_CALC_NS_OCT
+	  MENUITEM "Binary\tF8",       ID_CALC_NS_BIN
+      MENUITEM SEPARATOR
+	  MENUITEM "Qword\tF12",       ID_CALC_WS_QWORD
+	  MENUITEM "Dword\tF2",        ID_CALC_WS_DWORD
+	  MENUITEM "Word\tF3",         ID_CALC_WS_WORD
+	  MENUITEM "Byte\tF4",         ID_CALC_WS_BYTE
+      MENUITEM SEPARATOR
+      MENUITEM "Digit Grouping",   IDM_DIGIT_GROUPING
+   }
+   POPUP "&Help" {
+      MENUITEM "Help Topics",      IDM_HELP_TOPICS
+      MENUITEM SEPARATOR
+      MENUITEM "About Calculator", IDM_ABOUT
+   }
+}
+
+MAIN_MENU ACCELERATORS
+BEGIN
+   VK_F1, IDV_HELP,     VIRTKEY
+END
+
+WHATS_THIS_MENU MENU DISCARDABLE
+{
+   POPUP "" {
+      MENUITEM "What's This?",     IDM_WHATS_THIS
+  }
+}
+
+
+DLG_ABOUT DIALOG 12,0,120,82
+CAPTION "About GNU winecalc"
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+BEGIN
+   DEFPUSHBUTTON "OK", IDOK,       42, 60, 30, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+END
+
+DLG_STATS DIALOG 12,0,125,78
+CAPTION "Statistics Box"
+FONT 9, "Tahoma"
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+BEGIN
+   DEFPUSHBUTTON "&RET",  ID_STATS_RET,   4, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&LOAD", ID_STATS_LOAD, 34, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "&CD"    ID_STATS_CD,   64, 52, 25, 13, WS_TABSTOP | WS_GROUP
+   PUSHBUTTON    "C&AD",  ID_STATS_CAD,  94, 52, 25, 13, WS_TABSTOP | WS_GROUP
+END

rosapps/calc
dialog.c added at 1.1
diff -N dialog.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dialog.c	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,93 @@
+/*
+ * WineCalc (dialog.c)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <windows.h>
+#include "dialog.h"
+#include "resource.h"
+#include "winecalc.h"
+
+extern HINSTANCE hInstance;
+
+BOOL CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
+{
+    HDC hdc;
+    PAINTSTRUCT ps;
+
+    switch( uMsg ) {
+
+    case WM_INITDIALOG:
+        SendMessage (hDlg, WM_SETFONT, (UINT)GetStockObject(DEFAULT_GUI_FONT), TRUE);
+        return TRUE;
+
+    case WM_COMMAND:
+        switch(LOWORD(wParam)) {
+              case IDOK:
+                   EndDialog( hDlg, 0 );
+                   return TRUE;
+        }
+        break;
+
+    case WM_PAINT:
+      {
+        HDC hMemDC;
+        HFONT hFont;
+        HFONT hFontOrg;
+
+        char c1[CALC_BUF_SIZE];
+        char c2[CALC_BUF_SIZE];
+        char c3[CALC_BUF_SIZE];
+        char c4[CALC_BUF_SIZE];
+        char c5[CALC_BUF_SIZE];
+
+        hdc = BeginPaint( hDlg, &ps );
+
+        hMemDC = CreateCompatibleDC( hdc );
+
+        LoadString( hInstance, IDS_COPYRIGHT1, c1, sizeof(c1));
+        LoadString( hInstance, IDS_COPYRIGHT2, c2, sizeof(c2));
+        LoadString( hInstance, IDS_COPYRIGHT3, c3, sizeof(c3));
+        LoadString( hInstance, IDS_COPYRIGHT4, c4, sizeof(c4));
+        LoadString( hInstance, IDS_COPYRIGHT5, c5, sizeof(c5));
+
+        hFont = GetStockObject(DEFAULT_GUI_FONT);
+        hFontOrg = SelectObject(hdc, hFont);
+
+        SetBkMode(hdc, TRANSPARENT);
+
+	TextOut(hdc, 10, 10, c1, strlen(c1));
+        TextOut(hdc, 10, 35, c2, strlen(c2));
+        TextOut(hdc, 10, 50, c3, strlen(c3));
+        TextOut(hdc, 10, 75, c4, strlen(c4));
+	TextOut(hdc, 10, 90, c5, strlen(c5));
+
+        SelectObject(hdc, hFontOrg);
+
+        DeleteDC( hMemDC );
+        EndPaint( hDlg, &ps );
+
+        return 0;
+      }
+      case WM_CLOSE:
+        EndDialog( hDlg, TRUE );
+        return 0;
+    }
+    return FALSE;
+}
+

rosapps/calc
dialog.h added at 1.1
diff -N dialog.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dialog.h	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,24 @@
+/*
+ * WineCalc (dialog.h)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+BOOL CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
+
+
+

rosapps/calc
rsrc.rc added at 1.1
diff -N rsrc.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ rsrc.rc	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,33 @@
+/*
+ * WineCalc (rsrc.rc)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <windows.h>
+#include "resource.h"
+
+#include "En.rc"
+#include "Es.rc"
+#include "Fr.rc"
+#include "It.rc"
+#include "Nl.rc"
+#include "Pt.rc"
+#include "Ru.rc"
+#include "Si.rc"
+
+LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL

rosapps/calc
stats.c added at 1.1
diff -N stats.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ stats.c	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,131 @@
+/*
+ * WineCalc (stats.c)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <stdio.h> // sprintf
+
+#include <windows.h>
+
+#include "stats.h"
+#include "resource.h"
+#include "winecalc.h"
+
+    HWND hWndListBox;
+
+    extern CALC calc;
+    extern HWND hWndDlgStats;
+
+BOOL CALLBACK StatsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
+{
+    HDC hdc;
+    PAINTSTRUCT ps;
+
+
+    switch( uMsg ) {
+
+    case WM_INITDIALOG:
+        hWndListBox = CreateWindow(
+            "LISTBOX",	// pointer to registered class name
+            "Listbox",	// pointer to window name
+            WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_BORDER | LBS_NOINTEGRALHEIGHT,	// window style
+                    6,	// horizontal position of window
+                    6,	// vertical position of window
+                  208,	// window width
+                   66,	// window height
+                 hDlg,	// handle to parent or owner window
+                 NULL,	// handle to menu or child-window identifier
+                 NULL,	// handle to application instance
+                 NULL 	// pointer to window-creation data
+        );
+
+		ShowWindow(hWndListBox, SW_SHOW);
+
+		SendMessage (hWndListBox, WM_SETFONT, (UINT)GetStockObject(DEFAULT_GUI_FONT), TRUE);
+
+		// SetFocus(hWndDlgStats);
+
+        return TRUE;
+
+    case WM_COMMAND:
+        switch( LOWORD( wParam ) ) {
+
+        case ID_STATS_RET:
+			SetFocus(GetParent(hDlg));
+			return 0;
+
+		case ID_STATS_LOAD:
+			{
+			   int i;
+
+			   i = SendMessage(hWndListBox, LB_GETCURSEL, 0, 0);
+                           SendMessage(hWndListBox, LB_GETTEXT,   i, (LPARAM)calc.buffer);
+			   calc_buffer_display(&calc);
+                        }
+            return 0;
+
+		case ID_STATS_CD:
+			{
+			   int i;
+
+			   i = SendMessage(hWndListBox, LB_GETCURSEL, 0, 0);
+                           SendMessage(hWndListBox, LB_DELETESTRING, i, 0);
+                           InvalidateRect(hDlg,NULL,TRUE);
+			   UpdateWindow(hDlg);
+                        }
+			return 0;
+
+		case ID_STATS_CAD:
+			SendMessage(hWndListBox, LB_RESETCONTENT, 0, 0);
+			InvalidateRect(hDlg,NULL,TRUE);
+	        UpdateWindow(hDlg);
+			return 0;
+        }
+        break;
+
+    case WM_PAINT:
+      {
+        char s[CALC_BUF_SIZE];
+        int lb_count;
+        HFONT hFont;
+        HFONT hFontOrg;
+
+        hdc = BeginPaint( hDlg, &ps );
+        hFont = GetStockObject(DEFAULT_GUI_FONT);
+        hFontOrg = SelectObject(hdc, hFont);
+
+        lb_count = SendMessage(hWndListBox, LB_GETCOUNT, 0, 0);
+        sprintf(s, "n=%d", lb_count);
+
+        SetBkMode(hdc, TRANSPARENT);
+        TextOut(hdc, 98, 121, s, strlen(s));
+        SelectObject(hdc, hFontOrg);
+        EndPaint( hDlg, &ps );
+
+        return 0;
+      }
+	case WM_CLOSE:
+        hWndDlgStats = 0;                                 // invalidate stats dialog
+        SendMessage(GetParent(hDlg), WM_CHAR, '\x13', 1); // disable stats related calculator buttons
+        DestroyWindow( hDlg );
+
+        return 0;
+    }
+    return FALSE;
+}
+

rosapps/calc
stats.h added at 1.1
diff -N stats.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ stats.h	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,24 @@
+/*
+ * WineCalc (stats.h)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+BOOL CALLBACK StatsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
+
+
+

rosapps/calc
winecalc.c added at 1.1
diff -N winecalc.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ winecalc.c	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,3785 @@
+/*
+ * WineCalc (winecalc.c)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <stdio.h> // sprintf
+#include <math.h>
+
+#include <windows.h>
+// #include <commctrl.h>
+
+#include "winecalc.h"
+#include "dialog.h"
+#include "stats.h"
+#include "resource.h"
+
+// lame M$ math library doesn't support hyp functions
+//#ifdef _MSC_VER
+#define atanh(X) atan(X)
+#define asinh(X) asin(X)
+#define acosh(X) acos(X)
+//#endif
+
+// How winecalc works
+//
+// 1. In the original calculator, numbers are "extended precision".
+//    We emulate with calcfloat (calcfloat floating point) for now.
+//    Note that recent M$ compilers 5.0 and later do not implement double float,
+//    and do not support 80-bit numbers. Max width is 64-bits.
+//
+// 2. 4 temp areas:
+//
+//    i) current edit buffer value for keystrokes
+//   ii) computed value area for last computation
+//  iii) memory area for MR, MC, MS, M+
+//   iv) formatted display buffer
+//
+// 3. Memory Store works off current buffer, not value
+//
+// 4. display limit is 32 numbers plus 10 commas plus one period = 43 characters
+//
+// 5. original calc is better called SciCalc and saves settings in win.ini:
+//
+// [SciCalc]
+// layout=1 (0 = scientific mode, 1 = basic mode)
+// UseSep=1 (0 = no digits separator, 1 = enable digits separator)
+//
+// 6. Window Menus
+//
+//    The menus know their own states, so we don't need to track them
+//    When switching to Standard Calculator Mode, number base is changed to Decimal and Trig Mode to Degrees,
+//    but Word Size Mode is unchanged
+//
+// 7. It would be nice to add command line parsing for batch files
+//
+
+// various display error messages
+
+static char err_invalid        [CALC_BUF_SIZE];
+static char err_divide_by_zero [CALC_BUF_SIZE];
+static char err_undefined      [CALC_BUF_SIZE];
+
+// calculator state is kept here
+
+CALC calc;
+
+static RECT rFiller;
+
+static int keys[CALC_NS_COUNT]['f'+1]; // note: sparse array
+
+// map from button press to calc[] index
+//  0,        ...                      9,  A,  B,  C,  D,  E,  F,FE,DMS,SIN,COS,TAN,EXP, PI
+static const int h[] = {
+    0, 0, 33, 34, 21, 22, 23, 10, 11, 12, 54, 55, 56 ,57, 58 ,59, 6, 17, 28, 39, 50, 18, 53 };
+
+// enable status of various buttons on sci mode depending on number base
+static const int btn_toggle[CALC_NS_COUNT][TOGGLE_COUNT] =
+//    0, ...                     9, A, B, C, D, E, F,FE,DMS,SIN,COS,TAN,EXP,PI
+{
+    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 },
+    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1 },
+    { 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+    { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,0 }
+};
+
+static int hms[] = { 64, 65, 66 };
+static int hws[] = { 69, 70, 71, 72 };
+
+static int sta[] = { 16, 27, 38, 49 };
+
+static HMENU menus[3];
+
+static char appname[40];
+
+static int debug;
+
+int parse(int wParam, int lParam);
+
+HWND hWndDlgStats;
+
+extern HWND hWndListBox;
+
+HINSTANCE hInstance;
+
+int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow )
+{
+    MSG msg;
+    WNDCLASS wc;
+    HWND hWnd;
+    HACCEL haccel;
+
+    char s[CALC_BUF_SIZE];
+    int r;
+
+    hInstance = hInst;
+
+    r = GetProfileString("SciCalc",
+                         "layout",
+                         "0",
+                         s,
+                         CALC_BUF_SIZE
+    );
+
+    calc.sciMode  = atoi(s);
+
+    if (calc.sciMode != 0 &&
+        calc.sciMode != 1)
+        calc.sciMode = 1; // Standard Mode
+
+    r = GetProfileString("SciCalc",
+                         "UseSep",
+                         "0",
+                         s,
+                         CALC_BUF_SIZE
+        );
+
+    calc.digitGrouping = atoi(s);
+
+    if (calc.digitGrouping != 0 &&
+        calc.digitGrouping != 1)
+        calc.digitGrouping = 1;
+
+    calc.new      = 1; // initialize struct values
+
+    if (!LoadString( hInst, IDS_APPNAME,            appname,            sizeof(appname)))
+        exit(1);
+    if (!LoadString( hInst, IDS_ERR_INVALID_INPUT,  err_invalid,        sizeof(err_invalid)))
+        exit(1);
+    if (!LoadString( hInst, IDS_ERR_DIVIDE_BY_ZERO, err_divide_by_zero, sizeof(err_divide_by_zero)))
+        exit(1);
+    if (!LoadString( hInst, IDS_ERR_UNDEFINED,      err_undefined,      sizeof(err_undefined)))
+        exit(1);
+
+    wc.style         = CS_HREDRAW | CS_VREDRAW;
+    wc.lpfnWndProc   = MainProc;
+    wc.cbClsExtra    = 0;
+    wc.cbWndExtra    = 0;
+    wc.hInstance     = hInst;
+    wc.hIcon         = LoadIcon( hInst, appname );
+    wc.hCursor       = LoadCursor( NULL, IDI_APPLICATION );
+    wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1);
+    wc.lpszMenuName  = NULL;
+    wc.lpszClassName = appname;
+
+    if (!RegisterClass(&wc)) exit(1);
+
+    hWnd = CreateWindow( appname,
+        appname,
+        WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX,
+        CW_USEDEFAULT,
+        CW_USEDEFAULT,
+        calc.sciMode ? CALC_STANDARD_WIDTH :  CALC_SCIENTIFIC_WIDTH,
+        calc.sciMode ? CALC_STANDARD_HEIGHT : CALC_SCIENTIFIC_HEIGHT,
+        NULL,
+        NULL,
+        hInst,
+        NULL );
+
+    if (!hWnd)
+        exit(1);
+
+    ShowWindow( hWnd, cmdshow );
+    UpdateWindow( hWnd );
+
+    if (!(haccel = LoadAccelerators(hInst, "MAIN_MENU")))
+        exit(1);
+
+    while( GetMessage(&msg, NULL, 0, 0) ) {
+        if (hWndDlgStats == 0 || !IsDialogMessage(hWndDlgStats, &msg)) {
+           if (!TranslateAccelerator( hWnd, haccel, &msg )) {
+              TranslateMessage( &msg );
+              DispatchMessage( &msg );
+            }
+        }
+    }
+
+    return msg.wParam;
+}
+
+LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+    HDC hdc;
+    PAINTSTRUCT ps;
+
+    switch (msg) {
+
+    case WM_CREATE:
+        calc.hInst = ((LPCREATESTRUCT) lParam)->hInstance;
+        calc.hWnd = hWnd;
+
+        InitLuts();
+        InitCalc( &calc );
+        InitMenus(calc.hInst);
+
+        if (calc.sciMode)
+            SetMenu(hWnd, menus[MENU_STD]);
+        else
+            SetMenu(hWnd, menus[MENU_SCIMS]);
+
+        calc_buffer_display(&calc);
+
+        return 0;
+
+    case WM_PAINT:
+        {
+            HDC hMemDC;
+
+            hdc = BeginPaint( hWnd, &ps );
+            hMemDC = CreateCompatibleDC( hdc );
+
+            DrawCalc( hdc, hMemDC, &ps, &calc );
+
+            DeleteDC( hMemDC );
+            EndPaint( hWnd, &ps );
+
+            return 0;
+        }
+
+    case WM_MOVE:
+        calc.pos.x = (unsigned) LOWORD(lParam);
+        calc.pos.y = (unsigned) HIWORD(lParam);
+        return 0;
+
+    case WM_DESTROY:
+        {
+            int r;
+            char s[CALC_BUF_SIZE];
+
+            sprintf(s, "%d", calc.sciMode);
+            r = WriteProfileString("SciCalc", "layout", s);
+
+            sprintf(s, "%d", calc.digitGrouping);
+            r = WriteProfileString("SciCalc", "UseSep", s);
+        }
+
+        DestroyCalc( &calc );
+        PostQuitMessage( 0 );
+        return 0;
+
+    case WM_KEYDOWN:
+        switch (wParam) {
+
+        case VK_F1:
+            calc.next = 1;
+            MessageBox(hWnd, "No Help Available", "Windows Help", MB_OK);
+            return 0;
+
+        case VK_F2: // DWORD
+
+            calc.next = 1;
+            if (!calc.sciMode) {
+                if (calc.numBase == NBASE_DECIMAL)
+                    SendMessage(hWnd, WM_COMMAND, ID_CALC_MS_DEGREES, lParam);
+                else
+                    SendMessage(hWnd, WM_COMMAND, ID_CALC_WS_DWORD, lParam);
+            }
+            return 0;
+
+        case VK_F3: // WORD
+
+            calc.next = 1;
+            if (!calc.sciMode) {
+                if (calc.numBase == NBASE_DECIMAL)
+                    SendMessage(hWnd, WM_COMMAND, ID_CALC_MS_RADIANS, lParam);
+                else
+                    SendMessage(hWnd, WM_COMMAND, ID_CALC_WS_WORD, lParam);
+            }
+            return 0;
+
+        case VK_F4: // Byte
+
+            // Grad
+            calc.next = 1;
+            if (!calc.sciMode) {
+                if (calc.numBase == NBASE_DECIMAL)
+                    SendMessage(hWnd, WM_COMMAND, ID_CALC_MS_GRADS, lParam);
+                else
+                    SendMessage(hWnd, WM_COMMAND, ID_CALC_WS_BYTE, lParam);
+            }
+            return 0;
+
+        case VK_F5: // Hex
+
+            calc.next = 1;
+            if (!calc.sciMode)
+                SendMessage(hWnd, WM_COMMAND, ID_CALC_NS_HEX, lParam);
+            return 0;
+
+        case VK_F6: // Decimal
+
+            calc.next = 1;
+            if (!calc.sciMode)
+                SendMessage(hWnd, WM_COMMAND, ID_CALC_NS_DEC, lParam);
+            return 0;
+
+        case VK_F7: // Octal
+
+            calc.next = 1;
+            if (!calc.sciMode)
+                SendMessage(hWnd, WM_COMMAND, ID_CALC_NS_OCT, lParam);
+            return 0;
+
+        case VK_F8: // Binary
+
+            calc.next = 1;
+            if (!calc.sciMode)
+                SendMessage(hWnd, WM_COMMAND, ID_CALC_NS_BIN, lParam);
+            return 0;
+
+        case VK_F12: // QWORD
+
+            calc.next = 1;
+            if (!calc.sciMode)
+                SendMessage(hWnd, WM_COMMAND, ID_CALC_WS_QWORD, lParam);
+            return 0;
+
+        case VK_F9: // +/-
+
+            if (!calc.sciMode)
+                SendMessage(hWnd, WM_CHAR, 'Z', lParam);
+            return 0;
+
+        case VK_INSERT: // Dat
+            calc.next = 1;
+            SendMessage(hWndListBox, LB_INSERTSTRING, -1, (LPARAM)calc.buffer);
+            InvalidateRect(hWndDlgStats, NULL, TRUE); // update list count at bottom edge of dialog
+            UpdateWindow(hWndDlgStats);
+            return 0;
+
+        case VK_DELETE:
+
+            calc.next = 1;
+            calc.buffer[0] = '\0';
+            calc_buffer_display(&calc);
+            return 0;
+
+        default:
+            break;
+        }
+
+        return 0;
+
+    case WM_CHAR:
+        if (debug)
+            show_debug(&calc, "Start WM_CHAR", wParam, lParam);
+
+        switch (wParam) {
+
+        case '\x13': // Ctrl+S Sta Statistics
+
+            if (hWndDlgStats) { // Statistics Box already displayed, focus but don't create another one
+                // SetFocus(hWndDlgStats);
+                // SendMessage(hWndDlgStats, WM_SETFOCUS, 0, 0);
+            }
+            else {
+                int i;
+
+                if (lParam == 1) {
+                   for (i=0;i<4;i++)
+                       EnableWindow((HWND)calc.cb[sta[i]].hBtn, FALSE);
+                }
+                else {
+                   for (i=0;i<4;i++)
+                       EnableWindow((HWND)calc.cb[sta[i]].hBtn, TRUE);
+
+                   hWndDlgStats = CreateDialog( // modeless dialog
+                      calc.hInst,  	            // handle to application instance
+                      "DLG_STATS",	            // identifies dialog box template name
+                      hWnd,	                    // handle to owner window
+                      StatsDlgProc);            // pointer to dialog box procedure
+
+                   if (!hWndDlgStats)
+                      exit(1);
+
+                   SendMessage(hWndDlgStats, WM_SETFOCUS, 0, 0);
+                }
+            }
+
+            break;
+
+        case '\x01': // Ctrl+A Ave Statistics
+        case '\x04': // Ctrl+D s Standard Deviation Statistics
+        case '\x14': // Ctrl+T Sum Statistics
+            {
+               int i;
+               int n;
+
+               char s[CALC_BUF_SIZE];
+               double val = 0L;
+               double avg = 0L;
+               double total = 0L;
+               double x[1024];
+
+               // This is all lame. Here we are querying the list control for items and calculating the total.
+               // We should have an array of intermediate results to work with to avoid roundoff errors, etc.
+
+               n = SendMessage(hWndListBox, LB_GETCOUNT, 0, 0);
+
+               for (i=0;i<n;i++) {
+                   SendMessage(hWndListBox, LB_GETTEXT,   i, (LPARAM)s);
+                   val = calc_atof(s,calc.numBase);
+                   total += val;
+                   x[i] = val;
+               }
+
+               if (LOWORD(wParam) != '\x14') // not sum only
+                  avg = total / n;
+
+               if (LOWORD(wParam == '\x04')) {   // standard deviation is sqrt(sum( xbar - x )^2 / (n-1))
+                   val = 0L;
+
+                   for (i=0;i<n;i++)
+                       val += pow(x[i] - avg, 2);
+
+                   if (calc.invMode)
+                      total = sqrt(val / n);       // complete population
+                   else
+                      total = sqrt(val / (n - 1)); // sample of population
+               }
+
+               if (LOWORD(wParam) == '\x01') // average or mean
+                   total = avg;
+
+               calc_ftoa(&calc, total, s);
+               strcpy(calc.buffer, s);
+               calc_buffer_display(&calc);
+            }
+
+            break;
+
+        case '\x03': // Ctrl+C Copy
+            {
+                int i;
+                int len;
+                char *s;
+                HGLOBAL hGlobalMemory;
+                PSTR pGlobalMemory;
+
+                if (!(len = strlen(calc.display)))
+                    return 0;
+
+                if (!(hGlobalMemory = GlobalAlloc(GHND, len + 1)))
+                    return 0;
+
+                if (!(pGlobalMemory = GlobalLock(hGlobalMemory)))
+                    return 0;
+
+                if (!(s = calc.display))
+                    return 0;
+
+                for (i = 0; i < len; i++)
+                    *pGlobalMemory++ = *s++;
+
+                GlobalUnlock(hGlobalMemory); // call GetLastError() for exception handling
+
+                if (!OpenClipboard(hWnd))
+                    return 0;
+
+                if (!EmptyClipboard())
+                    return 0;
+
+                if (!SetClipboardData(CF_TEXT, hGlobalMemory))
+                    return 0;
+
+                if (!CloseClipboard())
+                    return 0;
+            }
+            break;
+
+        case '\x16': // Ctrl+V Paste
+            {
+                char *s;
+                int c;
+                int cmd = 0;
+                int size = 0;
+                int i = 0;
+                HGLOBAL hGlobalMemory;
+                PSTR pGlobalMemory;
+
+                if (IsClipboardFormatAvailable(CF_TEXT)) {
+                    if (!OpenClipboard(hWnd))
+                        return 0;
+
+                    if (!(hGlobalMemory = GetClipboardData(CF_TEXT)))
+                        return 0;
+
+                    if (!(size = GlobalSize(hGlobalMemory)))
+                        return 0;
+
+                    if (!(s = (char *)malloc(size)))
+                        return 0;
+
+                    if (!(pGlobalMemory = GlobalLock(hGlobalMemory)))
+                        return 0;
+
+                    strcpy(s, pGlobalMemory);
+
+                    GlobalUnlock(hGlobalMemory);
+
+                    if (!CloseClipboard())
+                        return 0;
+
+                    // calc paste protocol
+                    //
+                    // :c clear memory                WM_CHAR, 0x0c
+                    // :e enable scientific notation  WM_CHAR, 'v'
+                    // :m store display in memory     WM_CHAR, 0x0d
+                    // :p add display to memory       WM_CHAR, 0x10
+                    // :q clear current calculation   WM_CHAR, '\x1b'
+                    // :r read memory into display    WM_CHAR, 0x12
+                    // \  Dat                         WM_CHAR, VK_INSERT
+                    //
+                    // parse the pasted data, validate and SendMessage it one character at a time.
+                    // it would appear wincalc does it this way (slow), although very slow appearing on Wine.
+
+                    while ((c = *s++) && (i++ < size)) {
+                        if (c == ':') {
+                            cmd = 1;
+                        }
+                        else if (c == '\\') {
+                            SendMessage(hWnd, WM_KEYDOWN, VK_INSERT, lParam);
+                        }
+                        else {
+                            if (cmd) {
+                                cmd = 0;
+
+                                switch(c) {
+                                case 'c': // clear memory
+
+                                case 'C':
+                                    SendMessage(hWnd, WM_CHAR, 0x0c, lParam);
+                                    break;
+                                case 'e': // enable scientific notation
+
+                                case 'E':
+                                    SendMessage(hWnd, WM_CHAR, 'v', lParam);
+                                    break;
+                                case 'm': // store display in memory
+
+                                case 'M':
+                                    SendMessage(hWnd, WM_CHAR, 0x0d, NUMBER_OF_THE_BEAST);
+                                    break;
+                                case 'p': // add display to memory
+
+                                case 'P':
+                                    SendMessage(hWnd, WM_CHAR, 0x10, lParam);
+                                    break;
+                                case 'q': // clear current calculation
+
+                                case 'Q':
+                                    SendMessage(hWnd, WM_CHAR, '\x1b', lParam);
+                                    break;
+                                case 'r': // read memory into display
+
+                                case 'R':
+                                    SendMessage(hWnd, WM_CHAR, 0x12, lParam);
+                                    break;
+                                default: // just eat it but complain
+
+                                    MessageBeep(0);
+                                    break;
+                                }
+                            }
+                            else {
+                                if ((calc.numBase == NBASE_HEX) &&
+                                        ((c >= '0' && c <= '9') ||
+                                        (c >= 'a' && c <= 'f') ||
+                                        (c >= 'A' && c <= 'F'))) {
+
+                                    SendMessage(hWnd, WM_CHAR, c, lParam);
+                                }
+                                else if ((calc.numBase == NBASE_DECIMAL) &&
+                                        (c >= '0' && c <= '9')) {
+                                    SendMessage(hWnd, WM_CHAR, c, lParam);
+                                }
+                                else if ((calc.numBase == NBASE_OCTAL) &&
+                                        (c >= '0' && c <= '7')) {
+                                    SendMessage(hWnd, WM_CHAR, c, lParam);
+                                }
+                                else if ((calc.numBase == NBASE_BINARY) &&
+                                        (c == '0' || c == '1')) {
+                                    SendMessage(hWnd, WM_CHAR, c, lParam);
+                                }
+                                else if (c == '.' || c == ',' ||
+                                        c == 'e' || c == 'E' ||
+                                        c == '+' || c == '-') {
+                                    SendMessage(hWnd, WM_CHAR, c, lParam);
+                                }
+                                else if (c == ' ' ||  // eat harmless trash here
+                                    c == ';' ||
+                                        c == ':') {
+                                    ;                  // noop
+                                }
+                                else {                // extra spicy trash gets noticed
+
+                                    MessageBeep(0);    // uh, beeps can get annoying. maybe rate limit.
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            break;
+        default:
+            {
+                int ret = parse(wParam, lParam);
+            }
+        } // switch WM_CHAR
+
+        calc_buffer_display(&calc);
+        return 0;
+
+    case WM_COMMAND:
+        switch(LOWORD(wParam)) {
+
+        case IDM_COPY:
+            SendMessage(hWnd, WM_CHAR, '\x03', lParam);
+            return 0;
+
+        case IDM_PASTE:
+            SendMessage(hWnd, WM_CHAR, '\x16', lParam);
+            return 0;
+
+        case IDM_MODE_STANDARD:
+            if (!calc.sciMode) {
+                int i;
+                RECT lpRect;
+
+                calc.sciMode = 1;
+                calc.trigMode = TRIGMODE_DEGREES;
+                calc.numBase  = NBASE_DECIMAL;
+
+                EnableWindow(hWnd, FALSE);
+
+
+                for (i=1;i<COUNT_MENUS;i++) {
+                    if (calc.numBase != ID_CALC_NS_DEC) {
+                        CheckMenuItem(menus[i], ID_CALC_NS_HEX, MF_UNCHECKED);
+                        CheckMenuItem(menus[i], ID_CALC_NS_DEC, MF_CHECKED);
+                        CheckMenuItem(menus[i], ID_CALC_NS_OCT, MF_UNCHECKED);
+                        CheckMenuItem(menus[i], ID_CALC_NS_BIN, MF_UNCHECKED);
+                    }
+                }
+
+                for (i=1;i<COUNT_MENUS;i++) {
+                    CheckMenuItem(menus[i], ID_CALC_MS_DEGREES, MF_CHECKED);
+                    CheckMenuItem(menus[i], ID_CALC_MS_RADIANS, MF_UNCHECKED);
+                    CheckMenuItem(menus[i], ID_CALC_MS_GRADS,   MF_UNCHECKED);
+                }
+
+                SetMenu(hWnd, menus[MENU_STD]);
+
+                // SendMessage(hWnd, WM_SIZE, SIZE_RESTORED, CALC_STANDARD_WIDTH | (CALC_STANDARD_HEIGHT << 8));
+                GetWindowRect(hWnd, &lpRect);
+                MoveWindow(hWnd, lpRect.left, lpRect.top, CALC_STANDARD_WIDTH, CALC_STANDARD_HEIGHT, TRUE);
+                DestroyCalc(&calc);
+                InitCalc(&calc);
+
+                EnableWindow(hWnd, TRUE);
+
+            }
+            return 0;
+
+        case IDM_MODE_SCIENTIFIC:
+            if (calc.sciMode) {
+                RECT lpRect;
+                calc.sciMode = 0;
+
+                EnableWindow(hWnd, FALSE);
+
+                SetMenu(hWnd, menus[MENU_SCIMS]);
+
+                GetWindowRect(hWnd, &lpRect);
+                MoveWindow(hWnd, lpRect.left, lpRect.top, CALC_SCIENTIFIC_WIDTH, CALC_SCIENTIFIC_HEIGHT, TRUE);
+                DestroyCalc(&calc);
+                InitCalc(&calc);
+
+                if (calc.invMode)
+                    SendMessage(calc.cb[67].hBtn, BM_SETCHECK, TRUE, 0);
+
+                if (calc.hypMode)
+                    SendMessage(calc.cb[68].hBtn, BM_SETCHECK, TRUE, 0);
+
+                EnableWindow(hWnd, TRUE);
+
+            }
+            return 0;
+
+        case IDM_DIGIT_GROUPING:
+            {
+                int i;
+                int n;
+
+                calc.digitGrouping = !calc.digitGrouping;
+
+                n = (calc.digitGrouping ? MF_CHECKED : MF_UNCHECKED);
+
+                for (i=0;i<COUNT_MENUS;i++)
+                    CheckMenuItem(menus[i], IDM_DIGIT_GROUPING, n);
+
+                calc_buffer_display(&calc);
+            }
+            return 0;
+
+        case IDM_HELP_TOPICS:
+            MessageBox(hWnd, "No Help Available", "Windows Help", MB_OK);
+            return 0;
+
+        case IDM_ABOUT:
+            DialogBox( calc.hInst, "DLG_ABOUT", hWnd, AboutDlgProc );
+            return 0;
+
+        case ID_CALC_NS_HEX:
+        case ID_CALC_NS_DEC:
+        case ID_CALC_NS_OCT:
+        case ID_CALC_NS_BIN:
+            {
+                int i;
+                int w = LOWORD(wParam);
+
+                if (w == ID_CALC_NS_HEX) {
+                    if (calc.numBase == NBASE_HEX)
+                        return 0;
+                    else
+                        calc.numBase = NBASE_HEX;
+                }
+                else if (w == ID_CALC_NS_DEC) {
+                    if (calc.numBase == NBASE_DECIMAL)
+                        return 0;
+                    else
+                        calc.numBase = NBASE_DECIMAL;
+                }
+                else if (w == ID_CALC_NS_OCT) {
+                    if (calc.numBase == NBASE_OCTAL)
+                        return 0;
+                    else
+                        calc.numBase = NBASE_OCTAL;
+                }
+                else if (w == ID_CALC_NS_BIN) {
+                    if (calc.numBase == NBASE_BINARY)
+                        return 0;
+                    else
+                        calc.numBase = NBASE_BINARY;
+                }
+
+                for (i=0;i<CALC_NS_COUNT;i++)
+                    SendMessage(calc.cb[60+i].hBtn, BM_SETCHECK, w == (ID_CALC_NS_HEX + i) ? 1 : 0, 0);
+
+                for (i=2;i<TOGGLE_COUNT;i++) { // skip 0 and 1, always valid
+                    if (btn_toggle[w - ID_CALC_NS_HEX ][i]) {
+                        if (!IsWindowEnabled((HWND)calc.cb[h[i]].hBtn))
+                            EnableWindow((HWND)calc.cb[h[i]].hBtn, TRUE);
+
+                    }
+                    else {
+                        if (IsWindowEnabled((HWND)calc.cb[h[i]].hBtn))
+                            EnableWindow((HWND)calc.cb[h[i]].hBtn, FALSE);
+                    }
+                }
+
+                if (w == ID_CALC_NS_DEC) {
+                    for (i=0;i<CALC_WS_COUNT;i++) {
+                        if (IsWindowEnabled((HWND)calc.cb[hws[i]].hBtn)) {
+                            ShowWindow((HWND)calc.cb[hws[i]].hBtn, SW_HIDE);
+                            EnableWindow((HWND)calc.cb[hws[i]].hBtn, FALSE);
+                        }
+                    }
+                    for (i=0;i<CALC_MS_COUNT;i++) {
+                        if (!IsWindowEnabled((HWND)calc.cb[hms[i]].hBtn)) {
+                            ShowWindow((HWND)calc.cb[hms[i]].hBtn, SW_SHOWNORMAL);
+                            EnableWindow((HWND)calc.cb[hms[i]].hBtn, TRUE);
+                        }
+                    }
+                }
+                else {
+                    for (i=0;i<CALC_MS_COUNT;i++) {
+                        if (IsWindowEnabled((HWND)calc.cb[hms[i]].hBtn)) {
+                            ShowWindow((HWND)calc.cb[hms[i]].hBtn, SW_HIDE);
+                            EnableWindow((HWND)calc.cb[hms[i]].hBtn, FALSE);
+                        }
+                    }
+                    for (i=0;i<CALC_WS_COUNT;i++) {
+                        if (!IsWindowEnabled((HWND)calc.cb[hws[i]].hBtn)) {
+                            ShowWindow((HWND)calc.cb[hws[i]].hBtn, SW_SHOWNORMAL);
+                            EnableWindow((HWND)calc.cb[hws[i]].hBtn, TRUE);
+                        }
+                    }
+                }
+
+                CheckMenuItem(menus[i], ID_CALC_MS_DEGREES,  MF_CHECKED);
+
+                for (i=1;i<COUNT_MENUS;i++) { // skip the simple Standard calculator mode
+                    CheckMenuItem(menus[i], ID_CALC_NS_HEX,     (w == ID_CALC_NS_HEX ? MF_CHECKED : MF_UNCHECKED) );
+                    CheckMenuItem(menus[i], ID_CALC_NS_DEC,     (w == ID_CALC_NS_DEC ? MF_CHECKED : MF_UNCHECKED) );
+                    CheckMenuItem(menus[i], ID_CALC_NS_OCT,     (w == ID_CALC_NS_OCT ? MF_CHECKED : MF_UNCHECKED) );
+                    CheckMenuItem(menus[i], ID_CALC_NS_BIN,     (w == ID_CALC_NS_BIN ? MF_CHECKED : MF_UNCHECKED) );
+                }
+
+                if (wParam == ID_CALC_NS_DEC) {
+                    SetMenu(hWnd, menus[MENU_SCIMS]);
+
+                }
+                else {
+                    calc.displayMode = 0;
+                    SetMenu(hWnd, menus[MENU_SCIWS]);
+                }
+            }
+            calc_buffer_display(&calc);
+
+            break;
+
+        case ID_CALC_MS_DEGREES:
+        case ID_CALC_MS_RADIANS:
+        case ID_CALC_MS_GRADS:
+            {
+                int i;
+                int w = LOWORD(wParam);
+
+                if (w == ID_CALC_MS_DEGREES)
+                    calc.trigMode = TRIGMODE_DEGREES;
+                else if (w == ID_CALC_MS_RADIANS)
+                    calc.trigMode = TRIGMODE_RADIANS;
+                else if (w == ID_CALC_MS_GRADS)
+                    calc.trigMode = TRIGMODE_GRADS;
+                else
+                    return 0;
+
+                for (i=0;i<CALC_MS_COUNT;i++)
+                    SendMessage(calc.cb[64+i].hBtn, BM_SETCHECK, w == (ID_CALC_MS_DEGREES  + i) ? 1 : 0, 0);
+
+                for (i=1;i<COUNT_MENUS;i++) { // skip the simple Standard calculator mode
+                    CheckMenuItem(menus[i], ID_CALC_MS_DEGREES, (wParam == ID_CALC_MS_DEGREES) ? MF_CHECKED : MF_UNCHECKED);
+                    CheckMenuItem(menus[i], ID_CALC_MS_RADIANS, (wParam == ID_CALC_MS_RADIANS) ? MF_CHECKED : MF_UNCHECKED);
+                    CheckMenuItem(menus[i], ID_CALC_MS_GRADS,   (wParam == ID_CALC_MS_GRADS)   ? MF_CHECKED : MF_UNCHECKED);
+                }
+            }
+
+            SetFocus(hWnd);
+            return 0;
+
+        case ID_CALC_WS_QWORD:
+        case ID_CALC_WS_DWORD:
+        case ID_CALC_WS_WORD:
+        case ID_CALC_WS_BYTE:
+            {
+                int i;
+                int w = LOWORD(wParam);
+
+                calc.wordSize = w;
+
+                for (i=0;i<CALC_WS_COUNT;i++)
+                    SendMessage(calc.cb[69+i].hBtn, BM_SETCHECK, LOWORD(wParam) == (ID_CALC_WS_QWORD  + i) ? 1 : 0, 0);
+
+                for (i=1; i<COUNT_MENUS; i++) { // skip the simple Standard calculator mode
+                    CheckMenuItem(menus[i], ID_CALC_WS_QWORD, (w == ID_CALC_WS_QWORD ? MF_CHECKED : MF_UNCHECKED) );
+                    CheckMenuItem(menus[i], ID_CALC_WS_DWORD, (w == ID_CALC_WS_DWORD ? MF_CHECKED : MF_UNCHECKED) );
+                    CheckMenuItem(menus[i], ID_CALC_WS_WORD,  (w == ID_CALC_WS_WORD  ? MF_CHECKED : MF_UNCHECKED) );
+                    CheckMenuItem(menus[i], ID_CALC_WS_BYTE,  (w == ID_CALC_WS_BYTE  ? MF_CHECKED : MF_UNCHECKED) );
+                }
+            }
+
+            SetFocus(hWnd);
+            return 0;
+
+        case ID_CALC_CB_INV:
+            if (calc.invMode)
+                calc.invMode = 0;
+            else
+                calc.invMode = 1;
+
+            SendMessage(calc.cb[67].hBtn, BM_SETCHECK, calc.invMode ? TRUE : FALSE, 0);
+            SetFocus(hWnd);
+            return 0;
+
+        case ID_CALC_CB_HYP:
+            if (calc.hypMode)
+                calc.hypMode = 0;
+            else
+                calc.hypMode = 1;
+
+            SendMessage(calc.cb[68].hBtn, BM_SETCHECK, calc.hypMode ? TRUE : FALSE, 0);
+            SetFocus(hWnd);
+            return 0;
+
+        default:
+            if (HIWORD(wParam) == BN_CLICKED) {
+
+                if (calc.err &&
+                    LOWORD(wParam) != ID_CALC_CLEAR_ENTRY &&
+                    LOWORD(wParam) != ID_CALC_CLEAR_ALL) {
+
+                    MessageBeep(0);
+                    return 0;
+                }
+                else {
+                    calc.err = 0;
+                }
+
+                switch (LOWORD(wParam)) {
+
+                case ID_CALC_ZERO:
+                case ID_CALC_ONE:
+                case ID_CALC_TWO:
+                case ID_CALC_THREE:
+                case ID_CALC_FOUR:
+                case ID_CALC_FIVE:
+                case ID_CALC_SIX:
+                case ID_CALC_SEVEN:
+                case ID_CALC_EIGHT:
+                case ID_CALC_NINE:
+                    SendMessage(hWnd, WM_CHAR, LOWORD(wParam)+'0' , lParam);
+                    break;
+
+                case ID_CALC_A:
+                    SendMessage(hWnd, WM_CHAR, 'a', lParam);
+                    break;
+
+                case ID_CALC_B:
+                    SendMessage(hWnd, WM_CHAR, 'b', lParam);
+                    break;
+
+                case ID_CALC_C:
+                    SendMessage(hWnd, WM_CHAR, 'c', lParam);
+                    break;
+
+                case ID_CALC_D:
+                    SendMessage(hWnd, WM_CHAR, 'd', lParam);
+                    break;
+
+                case ID_CALC_E:
+                    SendMessage(hWnd, WM_CHAR, 'e', lParam);
+                    break;
+
+                case ID_CALC_F:
+                    SendMessage(hWnd, WM_CHAR, 'f', lParam);
+                    break;
+
+                case ID_CALC_DECIMAL:
+                    SendMessage(hWnd, WM_CHAR, '.', lParam);
+                    break;
+
+                case ID_CALC_BACKSPACE:
+                    SendMessage(hWnd, WM_CHAR, '\b', lParam);
+                    break;
+
+                case ID_CALC_CLEAR_ENTRY:
+                    SendMessage(hWnd, WM_KEYDOWN, VK_DELETE , lParam);
+                    break;
+
+                case ID_CALC_CLEAR_ALL:
+                    SendMessage(hWnd, WM_CHAR, '\x1b', lParam);
+                    break;
+
+                case ID_CALC_MEM_CLEAR:
+                    SendMessage(hWnd, WM_CHAR, 0x0c, lParam);
+                    break;
+
+                case ID_CALC_MEM_RECALL:
+                    SendMessage(hWnd, WM_CHAR, 0x12, lParam);
+                    break;
[truncated at 1000 lines; 2789 more skipped]

rosapps/calc
winecalc.h added at 1.1
diff -N winecalc.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ winecalc.h	1 Mar 2004 23:27:02 -0000	1.1
@@ -0,0 +1,364 @@
+/*
+ * WineCalc (winecalc.h)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+//////////////////////////////////////////////////////////////////
+
+// numerics are defined here for easier porting
+
+typedef double calcfloat;
+#define FMT_DESC_FLOAT "%.32g"
+#define FMT_DESC_EXP "%.32e"
+
+#define CALC_ATOF(x) atof(x)
+
+#define CONST_PI 3.1415926535897932384626433832795
+
+/////////////////////////////////////////////////////////////////
+
+#define CALC_BUF_SIZE 128
+
+// statistics dialog dimensions
+
+#define CALC_STA_X 235
+#define CALC_STA_Y 180
+
+// sentinel for differentiating Return from Ctrl+M events
+
+#define NUMBER_OF_THE_BEAST 666
+
+#define CALC_COLOR_BLUE    0
+#define CALC_COLOR_RED     1
+#define CALC_COLOR_GRAY    2
+#define CALC_COLOR_MAGENTA 3
+
+// gray hilite on rectangle owner-drawn controls RGB(CALC_GRAY, CALC_GRAY, CALC_GRAY)
+
+#define CALC_GRAY 132
+
+// count of buttons needing special toggle states depending on number base
+
+#define TOGGLE_COUNT 23
+
+// there are 3 window menus, standard, decimal measurement system and word size menus
+
+#define COUNT_MENUS 3
+#define MENU_STD    0
+#define MENU_SCIMS  1
+#define MENU_SCIWS  2
+
+// count of buttons
+
+#define CALC_BUTTONS_STANDARD   28
+#define CALC_BUTTONS_SCIENTIFIC 73
+
+// winecalc window outer dimensions
+
+#define CALC_STANDARD_WIDTH    260
+#define CALC_STANDARD_HEIGHT   252
+#define CALC_SCIENTIFIC_WIDTH  480
+#define CALC_SCIENTIFIC_HEIGHT 310
+
+// winecalc private ids for events
+
+#define ID_CALC_ZERO         0
+#define ID_CALC_ONE          1
+#define ID_CALC_TWO          2
+#define ID_CALC_THREE        3
+#define ID_CALC_FOUR         4
+#define ID_CALC_FIVE         5
+#define ID_CALC_SIX          6
+#define ID_CALC_SEVEN        7
+#define ID_CALC_EIGHT        8
+#define ID_CALC_NINE         9
+#define ID_CALC_BACKSPACE   20
+#define ID_CALC_CLEAR_ENTRY 21
+#define ID_CALC_CLEAR_ALL   22
+#define ID_CALC_MEM_CLEAR   23
+#define ID_CALC_DIVIDE      24
+#define ID_CALC_SQRT        25
+#define ID_CALC_MEM_RECALL  26
+#define ID_CALC_MULTIPLY    27
+#define ID_CALC_PERCENT     28
+#define ID_CALC_MEM_STORE   29
+#define ID_CALC_MINUS       30
+#define ID_CALC_RECIPROCAL  31
+#define ID_CALC_MEM_PLUS    32
+#define ID_CALC_SIGN        33
+#define ID_CALC_DECIMAL     34
+#define ID_CALC_PLUS        35
+#define ID_CALC_EQUALS      36
+#define ID_CALC_STA         37
+#define ID_CALC_FE          38
+#define ID_CALC_LEFTPAREN   39
+#define ID_CALC_RIGHTPAREN  40
+#define ID_CALC_MOD         41
+#define ID_CALC_AND         42
+#define ID_CALC_OR          43
+#define ID_CALC_XOR         44
+#define ID_CALC_SUM         45
+#define ID_CALC_SIN         46
+#define ID_CALC_LOG10       47
+#define ID_CALC_LSH         48
+#define ID_CALC_NOT         49
+#define ID_CALC_S           50
+#define ID_CALC_COS         52
+#define ID_CALC_FACTORIAL   53
+#define ID_CALC_INT         54
+#define ID_CALC_DAT         55
+#define ID_CALC_TAN         56
+#define ID_CALC_SQUARE      57
+#define ID_CALC_A           58
+#define ID_CALC_B           59
+#define ID_CALC_C           60
+#define ID_CALC_D           61
+#define ID_CALC_E           62
+#define ID_CALC_F           63
+#define ID_CALC_AVE         64
+#define ID_CALC_DMS         65
+#define ID_CALC_EXP         66
+#define ID_CALC_LN          67
+#define ID_CALC_PI          68
+#define ID_CALC_CUBE        69
+#define ID_CALC_POWER       51
+
+// Number System Radio Buttons
+
+#define CALC_NS_COUNT         4
+#define ID_CALC_NS_HEX     2000
+#define ID_CALC_NS_DEC     2001
+#define ID_CALC_NS_OCT     2002
+#define ID_CALC_NS_BIN     2003
+
+#define NBASE_DECIMAL         0
+#define NBASE_BINARY          1
+#define NBASE_OCTAL           2
+#define NBASE_HEX             3
+
+#define CALC_NS_OFFSET_X     15
+#define CALC_NS_OFFSET_Y     37
+
+#define SZ_RADIO_NS_X        50
+#define SZ_RADIO_NS_Y        15
+
+#define CALC_NS_HEX_LEFT      0
+#define CALC_NS_HEX_TOP       0
+
+#define CALC_NS_DEC_LEFT     50
+#define CALC_NS_DEC_TOP       0
+
+#define CALC_NS_OCT_LEFT     98
+#define CALC_NS_OCT_TOP       0
+
+#define CALC_NS_BIN_LEFT    148
+#define CALC_NS_BIN_TOP       0
+
+// Measurement System Radio Buttons
+
+#define CALC_MS_COUNT         3
+#define ID_CALC_MS_DEGREES 2010
+#define ID_CALC_MS_RADIANS 2011
+#define ID_CALC_MS_GRADS   2012
+
+#define TRIGMODE_DEGREES      0
+#define TRIGMODE_RADIANS      1
+#define TRIGMODE_GRADS        2
+
+#define CALC_MS_OFFSET_X    225
+#define CALC_MS_OFFSET_Y     37
+
+#define SZ_RADIO_MS_X        75
+#define SZ_RADIO_MS_Y        15
+
+#define CALC_MS_DEGREES_LEFT  0
+#define CALC_MS_DEGREES_TOP   0
+
+#define CALC_MS_RADIANS_LEFT 82
+#define CALC_MS_RADIANS_TOP   0
+
+#define CALC_MS_GRADS_LEFT  162
+#define CALC_MS_GRADS_TOP     0
+
+// Inv and Hyp Checkboxes
+
+#define CALC_CB_COUNT         2
+#define ID_CALC_CB_INV     2020
+#define ID_CALC_CB_HYP     2021
+
+#define WORDSIZE_BYTE         1
+#define WORDSIZE_WORD         2
+#define WORDSIZE_DWORD        4
+#define WORDSIZE_QWORD        8
+
+#define CALC_CB_OFFSET_X     15
+#define CALC_CB_OFFSET_Y     58
+
+#define CALC_CB_INV_LEFT      0
+#define CALC_CB_INV_TOP      10
+
+#define SZ_RADIO_CB_X        50
+#define SZ_RADIO_CB_Y        14
+
+#define CALC_CB_HYP_LEFT     58
+#define CALC_CB_HYP_TOP      10
+
+// Word Size Radio Buttons
+
+#define CALC_WS_COUNT         4
+#define ID_CALC_WS_QWORD   2030
+#define ID_CALC_WS_DWORD   2031
+#define ID_CALC_WS_WORD    2032
+#define ID_CALC_WS_BYTE    2033
+
+#define CALC_WS_OFFSET_X    CALC_MS_OFFSET_X
+#define CALC_WS_OFFSET_Y    CALC_MS_OFFSET_Y
+
+#define CALC_WS_QWORD_LEFT    0
+#define CALC_WS_QWORD_TOP     0
+
+#define CALC_WS_DWORD_LEFT   57
+#define CALC_WS_DWORD_TOP     0
+
+#define CALC_WS_WORD_LEFT   120
+#define CALC_WS_WORD_TOP      0
+
+#define CALC_WS_BYTE_LEFT   175
+#define CALC_WS_BYTE_TOP      0
+
+#define SZ_RADIO_WS_X        50
+#define SZ_RADIO_WS_Y        15
+
+// drawing offsets
+
+#define CALC_EDIT_HEIGHT 20
+
+#define SZ_FILLER_X     32
+#define SZ_FILLER_Y     30
+
+#define SZ_BIGBTN_X     62
+#define SZ_BIGBTN_Y     30
+
+#define SZ_MEDBTN_X     36
+#define SZ_MEDBTN_Y     30
+
+#define MARGIN_LEFT      7
+#define MARGIN_SMALL_X   3
+#define MARGIN_SMALL_Y   3
+#define MARGIN_BIG_X   274
+#define MARGIN_STANDARD_BIG_X    11
+#define MARGIN_BIG_Y     6
+
+#define SZ_SPACER_X              11
+
+// winecalc results display area
+
+#define WDISPLAY_STANDARD_LEFT        MARGIN_LEFT + 4
+#define WDISPLAY_STANDARD_TOP         5
+#define WDISPLAY_STANDARD_RIGHT     244
+#define WDISPLAY_STANDARD_BOTTOM     24
+#define CALC_STANDARD_MARGIN_TOP     16
+
+#define WDISPLAY_SCIENTIFIC_LEFT      MARGIN_LEFT + 4
+#define WDISPLAY_SCIENTIFIC_TOP       5
+#define WDISPLAY_SCIENTIFIC_RIGHT   465
+#define WDISPLAY_SCIENTIFIC_BOTTOM   24
+#define CALC_SCIENTIFIC_MARGIN_TOP   44
+
+typedef struct tagCalcBtn {
+	int id;            // private id
+	HWND hBtn;         // button child window handle
+	char label[80];    // text on buttonface
+	int color;         // text color
+	RECT r;            // location
+	int enable;        // 1 = control enbabled, 0 = disabled
+}
+CALCBTN;
+
+typedef struct tagPos {
+	int x;
+	int y;
+}
+POS;
+
+typedef struct tagCalc {
+	HINSTANCE hInst;   // this HINSTANCE
+	HWND hWnd;         // main window's HWND
+
+	POS pos;
+	int numButtons;    // standard = 28, scientific = more
+
+	char buffer [CALC_BUF_SIZE];  // current keyboard buffer
+	char display[CALC_BUF_SIZE]; // display buffer before output
+
+	calcfloat value;   // most recent computer value
+	calcfloat memory;  // most recent stored memory value from display buffer
+	int paren;         // current parentheses level
+
+	int sciMode;       // standard = 1, scientific = 0
+	int displayMode;   // 0 = float, 1 = scientific exponential notation like 1.0e+10
+
+	char oper;         // most recent operator pushed
+	calcfloat operand; // most recent operand pushed
+	int newenter;      // track multiple =
+	int next;          // binary operation flag
+	int err;           // errror status for divide by zero, infinity, etc.
+	int init;          // starting buffer
+
+	int digitGrouping; // no separators = 0, separators = 1
+
+	int trigMode;      // degrees = 0, radians = 1, grads = 2
+	int numBase;       // 10 = decimal, 2 = binary, 8 = octal, 16 = hex
+	int wordSize;      // 1 = byte, 2 = word, 4 = dword, 8 = qword
+	int invMode;       // INV mode 0 = off, 1 = on
+	int hypMode;       // HYP mode 0 = off, 1 = on
+
+	int new;           // first time 0 = false, 1 = true
+	CALCBTN cb[80];    // enough buttons for standard or scientific mode
+}
+CALC;
+
+BOOL CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
+LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
+
+void InitLuts(void);
+void InitMenus(HINSTANCE hInst);
+
+void InitCalc (CALC *calc);
+void DestroyCalc (CALC *calc);
+
+void calc_buffer_format(CALC *calc);
+void calc_buffer_display(CALC *calc);
+char *calc_sep(char *s);
+
+void DrawCalcText (HDC hdc, HDC hMemDC, PAINTSTRUCT *ps, CALC *calc, int object, char *s);
+void CalcRect (HDC hdc, HDC hMemDC, PAINTSTRUCT *ps, CALC *calc, int object);
+void DrawCalcRectSci(HDC hdc, HDC hMemDC, PAINTSTRUCT  *ps, CALC *calc, RECT *r);
+void DrawCalc (HDC hdc, HDC hMemDC, PAINTSTRUCT  *ps, CALC *calc);
+
+void calc_setmenuitem_radio(HMENU hMenu, UINT id);
+
+void show_debug(CALC *calc, char *title, long wParam, long lParam);
+
+calcfloat calc_atof(char *s, int base);
+void calc_ftoa(CALC *calc, calcfloat r, char *buf);
+long factorial(long n);
+
+calcfloat calc_convert_to_radians(CALC *calc);
+calcfloat calc_convert_from_radians(CALC *calc);
+

rosapps/calc
calc.rc 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- calc.rc	3 Sep 2002 18:44:14 -0000	1.5
+++ calc.rc	1 Mar 2004 23:27:02 -0000	1.6
@@ -1,388 +1,6 @@
+/* Do not Make changes here */
+
 #include <windows.h>
 #include <reactos/resource.h>
 
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-#include "resource.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (Australia) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
-
-IDR_CALC_STANDARD MENU DISCARDABLE 
-BEGIN
-    POPUP "&Edit"
-    BEGIN
-        MENUITEM "&Copy\tCtrl+C",               ID_EDIT_COPY
-        MENUITEM "&Paste\tCtrl+V",              ID_EDIT_PASTE
-    END
-    POPUP "&View"
-    BEGIN
-        MENUITEM "S&tandard",                   ID_VIEW_STANDARD, CHECKED
-        MENUITEM "&Scientific",                 ID_VIEW_SCIENTIFIC
-        MENUITEM SEPARATOR
-        MENUITEM "D&igit grouping",             ID_VIEW_DIGIT_GROUPING
-    END
-    POPUP "&Help"
-    BEGIN
-        MENUITEM "&Help Topics",                ID_HELP_TOPICS
-        MENUITEM SEPARATOR
-        MENUITEM "&About Calculator",           ID_HELP_ABOUT
-    END
-END
-
-IDR_CALC_SCIENTIFIC MENU DISCARDABLE 
-BEGIN
-    POPUP "&Edit"
-    BEGIN
-        MENUITEM "&Copy\tCtrl+C",               ID_EDIT_COPY
-        MENUITEM "&Paste\tCtrl+V",              ID_EDIT_PASTE
-    END
-    POPUP "&View"
-    BEGIN
-        MENUITEM "S&tandard",                   ID_VIEW_STANDARD
-        MENUITEM "&Scientific",                 ID_VIEW_SCIENTIFIC, CHECKED
-        MENUITEM SEPARATOR
-        MENUITEM "&Hex\tF5",                    ID_VIEW_HEX
-        MENUITEM "&Decimal\tF6",                ID_VIEW_DECIMAL
-        MENUITEM "&Octal\tF7",                  ID_VIEW_OCTAL
-        MENUITEM "&Binary\tF8",                 ID_VIEW_BINARY
-        MENUITEM SEPARATOR
-        MENUITEM "D&egrees\tF2",                ID_VIEW_DEGREES
-        MENUITEM "&Radians\tF3",                ID_VIEW_RADIANS
-        MENUITEM "&Grads\tF4",                  ID_VIEW_GRADS
-        MENUITEM SEPARATOR
-        MENUITEM "D&igit grouping",             ID_VIEW_DIGIT_GROUPING
-    END
-    POPUP "&Help"
-    BEGIN
-        MENUITEM "&Help Topics",                ID_HELP_TOPICS
-        MENUITEM SEPARATOR
-        MENUITEM "&About Scientific Calculator", ID_HELP_ABOUT
-    END
-END
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_STANDARD DIALOG DISCARDABLE  0, 0, 170, 126
-STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | 
-    WS_SYSMENU
-CAPTION "ReactOS Calculator"
-MENU IDR_CALC_STANDARD
-FONT 8, "MS Sans Serif"
-BEGIN
-    CONTROL         "M+",IDC_MPLUS,"Button",BS_OWNERDRAW,5,106,
-                    23,16
-    CONTROL         "MS",IDC_MS,"Button",BS_OWNERDRAW,5,85,23,
-                    16
-    CONTROL         "MR",IDC_MR,"Button",BS_OWNERDRAW,5,65,23,
-                    16
-    CONTROL         "MC",IDC_MC,"Button",BS_OWNERDRAW,5,45,23,
-                    16
-    CONTROL         "0",IDC_0,"Button",BS_OWNERDRAW,37,106,23,
-                    16
-    CONTROL         "1",IDC_1,"Button",BS_OWNERDRAW,37,85,23,16
-    CONTROL         "4",IDC_4,"Button",BS_OWNERDRAW,37,65,23,16
-    CONTROL         "7",IDC_7,"Button",BS_OWNERDRAW,37,45,23,16
-    CONTROL         "+/-",IDC_PLUSMINUS,"Button",BS_OWNERDRAW,
-                    63,106,23,16
-    CONTROL         "2",IDC_2,"Button",BS_OWNERDRAW,63,85,23,16
-    CONTROL         "5",IDC_5,"Button",BS_OWNERDRAW,63,65,23,16
-    CONTROL         "8",IDC_8,"Button",BS_OWNERDRAW,63,45,23,16
-    CONTROL         ".",IDC_DECPOINT,"Button",BS_OWNERDRAW,89,
-                    106,23,16
-    CONTROL         "3",IDC_3,"Button",BS_OWNERDRAW,89,85,23,16
-    CONTROL         "6",IDC_6,"Button",BS_OWNERDRAW,89,65,23,16
-    CONTROL         "9",IDC_9,"Button",BS_OWNERDRAW,89,45,23,16
-    CONTROL         "+",IDC_PLUS,"Button",BS_OWNERDRAW,115,106,
-                    23,16
-    CONTROL         "-",IDC_MINUS,"Button",BS_OWNERDRAW,115,85,
-                    23,16
-    CONTROL         "*",IDC_MULTIPLY,"Button",BS_OWNERDRAW,115,
-                    65,23,16
-    CONTROL         "/",IDC_DIVIDE,"Button",BS_OWNERDRAW,115,45,
-                    23,16
-    CONTROL         "=",IDC_EQUALS,"Button",BS_OWNERDRAW,142,
-                    106,23,16
-    CONTROL         "1/x",IDC_INVERT,"Button",BS_OWNERDRAW,142,
-                    85,23,16
-    CONTROL         "%",IDC_PERCENT,"Button",BS_OWNERDRAW,142,
-                    65,23,16
-    CONTROL         "sqrt",IDC_SQRT,"Button",BS_OWNERDRAW,142,
-                    45,23,16
-    CONTROL         "C",IDC_CLEAR,"Button",BS_OWNERDRAW,126,23,
-                    39,16
-    CONTROL         "CE",IDC_CE,"Button",BS_OWNERDRAW,83,23,39,
-                    16
-    CONTROL         "Backspace",IDC_BSPACE,"Button",BS_OWNERDRAW,38,23,41,16
-    CTEXT           "M",IDC_MEMTEXT,7,23,19,16,SS_CENTERIMAGE | SS_SUNKEN
-    EDITTEXT        IDC_RESULT,7,0,157,15,ES_RIGHT | ES_AUTOHSCROLL
-END
-
-IDD_SCIENTIFIC DIALOG DISCARDABLE  0, 0, 313, 161
-STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "ReactOS Scientific Calculator"
-MENU IDR_CALC_SCIENTIFIC
-FONT 8, "MS Sans Serif"
-BEGIN
-    CONTROL         "M+",IDC_MPLUS,"Button",BS_OWNERDRAW,122,
-                    121,23,16
-    CONTROL         "MS",IDC_MS,"Button",BS_OWNERDRAW,122,101,
-                    23,16
-    CONTROL         "MR",IDC_MR,"Button",BS_OWNERDRAW,122,81,23,
-                    16
-    CONTROL         "MC",IDC_MC,"Button",BS_OWNERDRAW,122,61,23,
-                    16
-    CONTROL         "0",IDC_0,"Button",BS_OWNERDRAW,156,121,23,
-                    16
-    CONTROL         "1",IDC_1,"Button",BS_OWNERDRAW,156,101,23,
-                    16
-    CONTROL         "4",IDC_4,"Button",BS_OWNERDRAW,156,81,23,
-                    16
-    CONTROL         "7",IDC_7,"Button",BS_OWNERDRAW,156,61,23,
-                    16
-    CONTROL         "+/-",IDC_PLUSMINUS,"Button",BS_OWNERDRAW,
-                    182,121,23,16
-    CONTROL         "2",IDC_2,"Button",BS_OWNERDRAW,182,101,23,
-                    16
-    CONTROL         "5",IDC_5,"Button",BS_OWNERDRAW,182,81,23,
-                    16
-    CONTROL         "8",IDC_8,"Button",BS_OWNERDRAW,182,61,23,
-                    16
-    CONTROL         ".",IDC_DECPOINT,"Button",BS_OWNERDRAW,208,
-                    121,23,16
-    CONTROL         "3",IDC_3,"Button",BS_OWNERDRAW,208,101,23,
-                    16
-    CONTROL         "6",IDC_6,"Button",BS_OWNERDRAW,208,81,23,
-                    16
-    CONTROL         "9",IDC_9,"Button",BS_OWNERDRAW,208,61,23,
-                    16
-    CONTROL         "+",IDC_PLUS,"Button",BS_OWNERDRAW,234,121,
-                    23,16
-    CONTROL         "-",IDC_MINUS,"Button",BS_OWNERDRAW,234,101,
-                    23,16
-    CONTROL         "*",IDC_MULTIPLY,"Button",BS_OWNERDRAW,234,
-                    81,23,16
-    CONTROL         "/",IDC_DIVIDE,"Button",BS_OWNERDRAW,234,61,
-                    23,16
-    CONTROL         "=",IDC_EQUALS,"Button",BS_OWNERDRAW,260,
-                    121,23,16
-    CONTROL         "Lsh",IDC_LSH,"Button",BS_OWNERDRAW,260,101,
-                    23,16
-    CONTROL         "Or",IDC_OR,"Button",BS_OWNERDRAW,260,81,23,
-                    16
-    CONTROL         "Mod",IDC_MOD,"Button",BS_OWNERDRAW,260,61,
-                    23,16
-    CONTROL         "C",IDC_CLEAR,"Button",BS_OWNERDRAW,268,38,
-                    41,16
-    CONTROL         "CE",IDC_CE,"Button",BS_OWNERDRAW,224,38,40,
-                    16
-    CONTROL         "Backspace",IDC_BSPACE,"Button",BS_OWNERDRAW,178,38,42,16
-    CTEXT           "M",IDC_MEMTEXT,123,38,19,16,SS_CENTERIMAGE | SS_SUNKEN
-    CONTROL         "Int",IDC_INT,"Button",BS_OWNERDRAW,286,121,
-                    23,16
-    CONTROL         "Not",IDC_NOT,"Button",BS_OWNERDRAW,286,101,
-                    23,16
-    CONTROL         "Xor",IDC_XOR,"Button",BS_OWNERDRAW,286,81,
-                    23,16
-    CONTROL         "And",IDC_AND,"Button",BS_OWNERDRAW,286,61,
-                    23,16
-    CONTROL         "pi",IDC_PI,"Button",BS_OWNERDRAW,122,142,
-                    23,16
-    CONTROL         "A",IDC_A,"Button",BS_OWNERDRAW,156,142,23,
-                    16
-    CONTROL         "B",IDC_B,"Button",BS_OWNERDRAW,182,142,23,
-                    16
-    CONTROL         "C",IDC_C,"Button",BS_OWNERDRAW,208,142,23,
-                    16
-    CONTROL         "D",IDC_D,"Button",BS_OWNERDRAW,234,142,23,
-                    16
-    CONTROL         "E",IDC_E,"Button",BS_OWNERDRAW,260,142,23,
-                    16
-    CONTROL         "F",IDC_F,"Button",BS_OWNERDRAW,286,142,23,
-                    16
-    CONTROL         "cos",IDC_COS,"Button",BS_OWNERDRAW,37,121,
-                    23,16
-    CONTROL         "sin",IDC_SIN,"Button",BS_OWNERDRAW,37,101,
-                    23,16
-    CONTROL         "dms",IDC_DMS,"Button",BS_OWNERDRAW,37,81,
-                    23,16
-    CONTROL         "F-E",IDC_FE,"Button",BS_OWNERDRAW,37,61,23,
-                    16
-    CONTROL         "x^3",IDC_CUBE,"Button",BS_OWNERDRAW,63,121,
-                    23,16
-    CONTROL         "x^y",IDC_POWER,"Button",BS_OWNERDRAW,63,
-                    101,23,16
-    CONTROL         "Exp",IDC_EXP,"Button",BS_OWNERDRAW,63,81,
-                    23,16
-    CONTROL         "(",IDC_OPENBKT,"Button",BS_OWNERDRAW,63,61,
-                    23,16
-    CONTROL         "n!",IDC_BANG,"Button",BS_OWNERDRAW,89,121,
-                    23,16
-    CONTROL         "log",IDC_LOG,"Button",BS_OWNERDRAW,89,101,
-                    23,16
-    CONTROL         "ln",IDC_LN,"Button",BS_OWNERDRAW,89,81,23,
-                    16
-    CONTROL         ")",IDC_CLOSEBK,"Button",BS_OWNERDRAW,89,61,
-                    23,16
-    CONTROL         "tan",IDC_TAN,"Button",BS_OWNERDRAW,37,142,
-                    23,16
-    CONTROL         "x^2",IDC_SQUARE,"Button",BS_OWNERDRAW,63,
-                    142,23,16
-    CONTROL         "1/x",IDC_INVERT,"Button",BS_OWNERDRAW,89,
-                    142,23,16
-    CONTROL         "s",IDC_S,"Button",BS_OWNERDRAW,4,121,23,16
-    CONTROL         "Sum",IDC_SUM,"Button",BS_OWNERDRAW,4,101,
-                    23,16
-    CONTROL         "Ave",IDC_AVE,"Button",BS_OWNERDRAW,4,81,23,
-                    16
-    CONTROL         "Sta",IDC_STA,"Button",BS_OWNERDRAW,4,61,23,
-                    16
-    CONTROL         "Dat",IDC_DAT,"Button",BS_OWNERDRAW,4,142,
-                    23,16
-    CTEXT           "9",IDC_BKTTEXT,91,38,19,16,SS_CENTERIMAGE | SS_SUNKEN
-    GROUPBOX        "",IDC_INVHYP,6,34,80,22,WS_GROUP
-    CONTROL         "Inv",IDC_INV,"Button",BS_AUTOCHECKBOX,9,42,26,10
-    CONTROL         "Hyp",IDC_HYP,"Button",BS_AUTOCHECKBOX,47,41,29,10
-    GROUPBOX        "",IDC_BASE,6,13,141,22,WS_GROUP
-    CONTROL         "Hex",IDC_HEX,"Button",BS_AUTORADIOBUTTON,8,21,29,10
-    CONTROL         "Dec",IDC_DEC,"Button",BS_AUTORADIOBUTTON,42,21,29,10
-    CONTROL         "Oct",IDC_OCT,"Button",BS_AUTORADIOBUTTON,76,21,27,10
-    CONTROL         "Bin",IDC_BIN,"Button",BS_AUTORADIOBUTTON,109,21,26,10
-    GROUPBOX        "",IDC_UNITS,150,13,160,22,WS_GROUP
-    CONTROL         "Degrees",IDC_DEGREES,"Button",BS_AUTORADIOBUTTON,152,21,
-                    43,10
-    CONTROL         "Radians",IDC_RADIANS,"Button",BS_AUTORADIOBUTTON,204,21,
-                    42,10
-    CONTROL         "Grads",IDC_GRADS,"Button",BS_AUTORADIOBUTTON,255,21,35,
-                    10
-    EDITTEXT        IDC_RESULT,6,0,303,15,ES_RIGHT | ES_AUTOHSCROLL
-END
-
-
-#ifndef _MAC
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-(1) VERSIONINFO
- FILEVERSION 0,0,19,147
- PRODUCTVERSION 0,0,19,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904b0"
-        BEGIN
-            VALUE "Comments", "Absolutely no warranties whatsoever - Use at your own risk\0"
-            VALUE "CompanyName", "ReactOS Development Team\0"
-            VALUE "FileDescription", "ReactOS Calculator by Robert Dickenson\0"
-            VALUE "FileVersion", "1, 0, 0, 1\0"
-            VALUE "InternalName", "calc\0"
-            VALUE "LegalCopyright", "Copyright � 2002 Robert Dickenson\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "OriginalFilename", "calc.exe\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "ReactOS Operating System\0"
-            VALUE "ProductVersion", "0.0.19\0"
-            VALUE "SpecialBuild", "Non-versioned Development Beta Release\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0xc09, 1200
-    END
-END
-
-#endif    // !_MAC
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    IDS_APP_TITLE           "ReactOS Calculator"
-    IDS_APP_REG_KEY         "\\Calculator"
-    IDS_APP_REG_PATH        "Software\\ReactWare"
-END
-
-#endif    // English (Australia) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
+#include "rsrc.rc"

rosapps/calc
makefile 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- makefile	21 Feb 2004 09:18:57 -0000	1.6
+++ makefile	1 Mar 2004 23:27:02 -0000	1.7
@@ -6,25 +6,15 @@
 
 PATH_TO_TOP = ../../reactos
 
-WINE_MODE = yes
-
-WINE_RC = calc
-
 TARGET_TYPE = program
 
 TARGET_APPTYPE = windows
 
 TARGET_NAME = calc
 
-WINE_INCLUDE = ./
-
-TARGET_CFLAGS = -D__USE_W32API
-
-#TARGET_CFLAGS = -I$(TEST_ROOT) -DDBG -DUNICODE -D_UNICODE
-
-BASE_CFLAGS = -D_WIN32_IE=0x0400
+TARGET_CFLAGS = -D__USE_W32API -D_WIN32_IE=0x0501
 
-RCFLAGS = -D_WIN32_IE=0x0400
+TARGET_RCFLAGS = -D__USE_W32API -D_WIN32_IE=0x0501
 
 TARGET_SDKLIBS = \
 	kernel32.a \
@@ -34,9 +24,9 @@
 TARGET_GCCLIBS = comctl32
 
 TARGET_OBJECTS = \
-	settings.o \
-        button.o \
-        main.o
+	dialog.o \
+	stats.o \
+	winecalc.o
 
 include $(PATH_TO_TOP)/rules.mak
 

rosapps/calc
resource.h 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- resource.h	18 Jan 2004 03:28:08 -0000	1.5
+++ resource.h	1 Mar 2004 23:27:02 -0000	1.6
@@ -1,130 +1,68 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by calc.rc
-//
-#define ID_MENU_EDIT                 0
-#define ID_MENU_VIEW                 1
-#define ID_MENU_HELP                 2
-#define IDI_CALC                    100
-#define IDD_STANDARD                 101
-#define IDD_SCIENTIFIC               102
-#define IDR_CALC_STANDARD            103
-#define IDR_CALC_SCIENTIFIC          104
-#define IDS_APP_TITLE                105
-#define IDR_ACCELERATOR              106
-#define IDS_APP_REG_KEY              107
-#define IDS_APP_REG_PATH             108
-
-#define ID_EDIT_COPY                 0xE122
-#define ID_EDIT_PASTE                0xE125
-
-#define ID_BLUE_START                1000
-#define IDC_0                        1000
-#define IDC_1                        1001
-#define IDC_3                        1002
-#define IDC_2                        1003
-#define IDC_4                        1004
-#define IDC_5                        1005
-#define IDC_6                        1006
-#define IDC_7                        1007
-#define IDC_8                        1008
-#define IDC_9                        1009
-#define IDC_A                        1010
-#define IDC_B                        1011
-#define IDC_C                        1012
-#define IDC_D                        1013
-#define IDC_E                        1014
-#define IDC_F                        1015
-#define IDC_PLUSMINUS                1020
-#define IDC_DECPOINT                 1021
-#define IDC_PERCENT                  1022
-#define IDC_SQRT                     1023
-#define IDC_PI                       1024
-#define IDC_S                        1025
-#define IDC_SUM                      1026
-#define IDC_AVE                      1027
-#define IDC_STA                      1028
-#define IDC_DAT                      1029
-#define ID_BLUE_FINISH               1029
-
-#define ID_RED_START                 1036
-#define IDC_PLUS                     1036
-#define IDC_MINUS                    1037
-#define IDC_MULTIPLY                 1038
-#define IDC_DIVIDE                   1039
-#define IDC_MPLUS                    1040
-#define IDC_MS                       1041
-#define IDC_MR                       1042
-#define IDC_MC                       1043
-#define IDC_EQUALS                   1046
-#define IDC_LSH                      1047
-#define IDC_OR                       1048
-#define IDC_MOD                      1049
-#define IDC_CLEAR                    1050
-#define IDC_CE                       1051
-#define IDC_BSPACE                   1052
-#define IDC_INT                      1053
-#define IDC_NOT                      1054
-#define IDC_XOR                      1055
-#define IDC_AND                      1056
-#define ID_RED_FINISH                1056
-
-#define ID_PURPLE_START              1057
-#define IDC_COS                      1058
-#define IDC_SIN                      1059
-#define IDC_DMS                      1060
-#define IDC_FE                       1061
-#define IDC_CUBE                     1062
-#define IDC_POWER                    1063
-#define IDC_EXP                      1064
-#define IDC_OPENBKT                  1065
-#define IDC_BANG                     1066
-#define IDC_LOG                      1067
-#define IDC_LN                       1068
-#define IDC_CLOSEBK                  1069
-#define IDC_TAN                      1070
-#define IDC_SQUARE                   1071
-#define IDC_INVERT                   1072
-#define ID_PURPLE_FINISH             1072
-
-#define IDC_INV                      1078
-#define IDC_HYP                      1079
-#define IDC_HEX                      1080
-#define IDC_DEC                      1081
-#define IDC_OCT                      1082
-#define IDC_BIN                      1083
-#define IDC_DEGREES                  1084
-#define IDC_RADIANS                  1085
-#define IDC_GRADS                    1086
-#define IDC_RESULT                   1087
-
-#define IDC_MEMTEXT                  1090
-#define IDC_UNITS                    1091
-#define IDC_BASE                     1092
-#define IDC_INVHYP                   1093
-#define IDC_BKTTEXT                  1094
-
-#define ID_VIEW_STANDARD             40003
-#define ID_VIEW_SCIENTIFIC           40004
-#define ID_VIEW_DIGIT_GROUPING       40005
-#define ID_VIEW_HEX                  40006
-#define ID_VIEW_DECIMAL              40007
-#define ID_VIEW_OCTAL                40008
-#define ID_VIEW_BINARY               40009
-#define ID_VIEW_DEGREES              40010
-#define ID_VIEW_RADIANS              40011
-#define ID_VIEW_GRADS                40012
-#define ID_HELP_TOPICS               40013
-#define ID_HELP_ABOUT                40014
-
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE     109
-#define _APS_NEXT_COMMAND_VALUE      40015
-#define _APS_NEXT_CONTROL_VALUE      1095
-#define _APS_NEXT_SYMED_VALUE        101
-#endif
-#endif
+/*
+ * WineCalc (resource.h)
+ *
+ * Copyright 2003 James Briggs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/* menus */
+
+#define IDM_COPY               1001
+#define IDM_PASTE              1002
+#define IDM_MODE_STANDARD      1003
+#define IDM_MODE_SCIENTIFIC    1004
+#define IDM_DIGIT_GROUPING     1005
+#define IDM_HELP_TOPICS        1006
+#define IDM_ABOUT              1007
+#define IDM_SEPARATOR1         1008
+#define IDM_SEPARATOR2         1009
+#define IDM_SEPARATOR3         1010
+#define IDM_WHATS_THIS         1011
+
+/* strings */
+
+#define IDS_APPNAME            1100
+
+#define IDS_BTN_BACKSPACE      1101
+#define IDS_BTN_CLEAR_ENTRY    1102
+#define IDS_BTN_CLEAR_ALL      1103
+#define IDS_BTN_MEM_CLEAR      1104
+#define IDS_BTN_MEM_RECALL     1105
+#define IDS_BTN_MEM_STORE      1106
+#define IDS_BTN_MEM_PLUS       1107
+#define IDS_BTN_MEM_STATUS_M   1108
+#define IDS_BTN_SQRT           1109
+
+#define IDS_ERR_INVALID_INPUT  1120
+#define IDS_ERR_DIVIDE_BY_ZERO 1121
+#define IDS_ERR_UNDEFINED      1122
+
+#define IDS_COPYRIGHT1         1130
+#define IDS_COPYRIGHT2         1131
+#define IDS_COPYRIGHT3         1132
+#define IDS_COPYRIGHT4         1133
+#define IDS_COPYRIGHT5         1134
+
+/* keys */
+
+#define IDV_HELP                103
+
+/* stats dialog */
+
+#define ID_STATS_RET           3000
+#define ID_STATS_LOAD          3001
+#define ID_STATS_CD            3002
+#define ID_STATS_CAD           3003

rosapps/calc
button.c removed after 1.2
diff -N button.c
--- button.c	21 Jul 2002 18:28:26 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,219 +0,0 @@
-/*
- *  ReactOS calc
- *
- *  button.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-    
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <tchar.h>
-
-#include "resource.h"
-#include "button.h"
-
-
-COLORREF text_colour;
-COLORREF background_colour;
-COLORREF disabled_background_colour;
-COLORREF light;
-COLORREF highlight;
-COLORREF shadow;
-COLORREF dark_shadow;
-
-const COLORREF CLR_BTN_WHITE    = RGB(255, 255, 255);
-const COLORREF CLR_BTN_BLACK    = RGB(0, 0, 0);
-const COLORREF CLR_BTN_DGREY    = RGB(128, 128, 128);
-const COLORREF CLR_BTN_GREY     = RGB(192, 192, 192);
-const COLORREF CLR_BTN_LLGREY   = RGB(223, 223, 223);
-
-const int BUTTON_IN             = 0x01;
-const int BUTTON_OUT            = 0x02;
-const int BUTTON_BLACK_BORDER   = 0x04;
-
-
-void InitColours(void)
-{
-//    text_colour                = GetSysColor(COLOR_BTNTEXT);
-    text_colour                = RGB(255,0,0);
-
-    background_colour          = GetSysColor(COLOR_BTNFACE); 
-    disabled_background_colour = background_colour;
-    light                      = GetSysColor(COLOR_3DLIGHT);
-    highlight                  = GetSysColor(COLOR_BTNHIGHLIGHT);
-    shadow                     = GetSysColor(COLOR_BTNSHADOW);
-    dark_shadow                = GetSysColor(COLOR_3DDKSHADOW);
-}
-
-static void FillSolidRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clr)
-{
-    RECT rect;
-
-    SetBkColor(hDC, clr);
-    rect.left = x;
-    rect.top = y;
-    rect.right = x + cx;
-    rect.bottom = y + cy;
-    ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL);
-}
-
-void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLeft, COLORREF clrBottomRight)
-{
-    FillSolidRect(hDC, x, y, cx - 1, 1, clrTopLeft);
-    FillSolidRect(hDC, x, y, 1, cy - 1, clrTopLeft);
-    FillSolidRect(hDC, x + cx, y, -1, cy, clrBottomRight);
-    FillSolidRect(hDC, x, y + cy, cx, -1, clrBottomRight);
-}
-
-
-void DrawFilledRect(HDC hdc, LPRECT r, COLORREF colour)
-{ 
-    HBRUSH hBrush;
-
-    hBrush = CreateSolidBrush(colour);
-    FillRect(hdc, r, hBrush);
-}
-
-void DrawLine(HDC hdc, long sx, long sy, long ex, long ey, COLORREF colour)
-{ 
-    HPEN new_pen;
-    HPEN old_pen;
-
-    new_pen = CreatePen(PS_SOLID, 1, colour);
-    old_pen = SelectObject(hdc, &new_pen);
-    MoveToEx(hdc, sx, sy, NULL);
-    LineTo(hdc, ex, ey);
-    SelectObject(hdc, old_pen);
-    DeleteObject(new_pen);
-}
-
-void DrawFrame(HDC hdc, RECT r, int state)
-{ 
-    COLORREF colour;
-
-    if (state & BUTTON_BLACK_BORDER) {
-        colour = CLR_BTN_BLACK;
-        DrawLine(hdc, r.left,  r.top,       r.right, r.top, colour);   // Across top
-        DrawLine(hdc, r.left, r.top,        r.left, r.bottom, colour); // Down left
-        DrawLine(hdc, r.left, r.bottom - 1, r.right, r.bottom - 1, colour); // Across bottom
-        DrawLine(hdc, r.right - 1, r.top,   r.right - 1, r.bottom, colour); // Down right
-        InflateRect(&r, -1, -1);
-    }
-    if (state & BUTTON_OUT) {
-        colour = highlight;
-        DrawLine(hdc, r.left, r.top,        r.right, r.top, colour);    // Across top
-        DrawLine(hdc, r.left, r.top,        r.left,  r.bottom, colour); // Down left
-        colour = dark_shadow;
-        DrawLine(hdc, r.left, r.bottom - 1, r.right, r.bottom - 1, colour); // Across bottom
-        DrawLine(hdc, r.right - 1, r.top,   r.right - 1, r.bottom, colour); // Down right
-        InflateRect(&r, -1, -1);
-        colour = light;
-        DrawLine(hdc, r.left, r.top,        r.right, r.top, colour);   // Across top
-        DrawLine(hdc, r.left, r.top,        r.left, r.bottom, colour); // Down left
-        colour = shadow;
-        DrawLine(hdc, r.left, r.bottom - 1, r.right, r.bottom - 1, colour); // Across bottom
-        DrawLine(hdc, r.right - 1, r.top,   r.right - 1, r.bottom, colour); // Down right
-    }
-    if (state & BUTTON_IN) {
-        colour = dark_shadow;
-        DrawLine(hdc, r.left, r.top,        r.right, r.top, colour);   // Across top
-        DrawLine(hdc, r.left, r.top,        r.left, r.bottom, colour); // Down left
-        DrawLine(hdc, r.left, r.bottom - 1, r.right, r.bottom - 1, colour); // Across bottom
-        DrawLine(hdc, r.right - 1, r.top,   r.right - 1, r.bottom, colour); // Down right
-        InflateRect(&r, -1, -1);
-        colour = shadow;
-        DrawLine(hdc, r.left,  r.top,        r.right, r.top, colour);    // Across top
-        DrawLine(hdc, r.left,  r.top,        r.left,  r.bottom, colour); // Down left
-        DrawLine(hdc, r.left,  r.bottom - 1, r.right, r.bottom - 1, colour); // Across bottom
-        DrawLine(hdc, r.right - 1, r.top,    r.right - 1, r.bottom, colour); // Down right
-    }
-}
-
-void DrawButtonText(HDC hdc, LPRECT r, LPCTSTR Buf, COLORREF text_colour)
-{
-    COLORREF previous_colour;
-   
-    previous_colour = SetTextColor(hdc, text_colour);
-    SetBkMode(hdc, TRANSPARENT);
-    DrawText(hdc, Buf, _tcslen(Buf), r, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
-    SetTextColor(hdc, previous_colour);
-}
-
-#define bufSize 512
-
-void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) 
-{
-    HDC   hdc;
-    RECT  focus_rect, button_rect, offset_button_rect;
-    UINT  state;
-    TCHAR buffer[bufSize];
-    
-    hdc = lpDrawItemStruct->hDC;
-    state = lpDrawItemStruct->itemState;
-
-    CopyRect(&focus_rect, &lpDrawItemStruct->rcItem); 
-    CopyRect(&button_rect, &lpDrawItemStruct->rcItem); 
-
-    // Set the focus rectangle to just past the border decoration
-    focus_rect.left  += 4;
-    focus_rect.right  -= 4;
-    focus_rect.top    += 4;
-    focus_rect.bottom -= 4;
-      
-    // Retrieve the button's caption
-    GetWindowText(lpDrawItemStruct->hwndItem, buffer, bufSize);
-
-    if (state & ODS_DISABLED) {
-        DrawFilledRect(hdc, &button_rect, disabled_background_colour);
-    } else {
-        DrawFilledRect(hdc, &button_rect, background_colour);
-    }
-        
-    if (state & ODS_SELECTED) { 
-        DrawFrame(hdc, button_rect, BUTTON_IN);
-    } else {
-        if ((state & ODS_DEFAULT) || (state & ODS_FOCUS)) {
-            DrawFrame(hdc, button_rect, BUTTON_OUT | BUTTON_BLACK_BORDER);          
-        } else {
-            DrawFrame(hdc, button_rect, BUTTON_OUT);
-        }
-    }
-
-    if (state & ODS_DISABLED) {
-        offset_button_rect = button_rect;
-        OffsetRect(&offset_button_rect, 1, 1);
-        DrawButtonText(hdc, &offset_button_rect, buffer, CLR_BTN_WHITE);
-        DrawButtonText(hdc, &button_rect, buffer, CLR_BTN_DGREY);
-    } else {
-        if (lpDrawItemStruct->CtlID >= ID_RED_START && lpDrawItemStruct->CtlID <= ID_RED_FINISH) {
-            DrawButtonText(hdc, &button_rect, buffer, RGB(255,0,0));
-        } else
-        if (lpDrawItemStruct->CtlID >= ID_PURPLE_START && lpDrawItemStruct->CtlID <= ID_PURPLE_FINISH) {
-            DrawButtonText(hdc, &button_rect, buffer, RGB(0,128,128));
-        } else
-        if (lpDrawItemStruct->CtlID >= ID_BLUE_START && lpDrawItemStruct->CtlID <= ID_BLUE_FINISH) {
-            DrawButtonText(hdc, &button_rect, buffer, RGB(0,0,255));
-        } else {
-            DrawButtonText(hdc, &button_rect, buffer, text_colour);
-        }
-    }
-
-    if (state & ODS_FOCUS) {
-        DrawFocusRect(lpDrawItemStruct->hDC, (LPRECT)&focus_rect);
-    }
-} 

rosapps/calc
button.h removed after 1.1
diff -N button.h
--- button.h	16 Jul 2002 19:15:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-/*
- *  ReactOS calc
- *
- *  button.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-    
-#ifndef __BUTTON_H__
-#define __BUTTON_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-
-void InitColours(void);
-void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLeft, COLORREF clrBottomRight);
-void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __BUTTON_H__

rosapps/calc
main.c removed after 1.5
diff -N main.c
--- main.c	18 Jan 2004 03:28:08 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,266 +0,0 @@
-/*
- *  ReactOS calc
- *
- *  calc.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-    
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <shellapi.h>
-#include <tchar.h>
-
-#include "main.h"
-#include "button.h"
-#include "settings.h"
-
-
-// Global Variables:
-HINSTANCE hInst;
-HWND hDlgWnd;
-TCHAR szTitle[MAX_LOADSTRING];
-CALC_TYPES CalcType;
-HACCEL hAccel;
-
-BOOL bDigitGrouping = FALSE;
-
-/*TODO: Figure out why we are copying MFC map style programming.
-**      This pattern is difficult to maintain.
-*/
-#define BEGIN_CMD_MAP(a) switch(##a) {
-#define CMD_MAP_ENTRY(a, b) case a: b(); break;
-#define END_CMD_MAP(a) }
-
-
-BOOL OnCreate(HWND hWnd)
-{
-    HMENU   hMenu;
-    HMENU   hViewMenu;
-
-    hMenu = GetMenu(hDlgWnd);
-    hViewMenu = GetSubMenu(hMenu, ID_MENU_VIEW);
-    if (bDigitGrouping) {
-        CheckMenuItem(hViewMenu, ID_VIEW_DIGIT_GROUPING, MF_BYCOMMAND|MF_CHECKED);
-    }
-
-    //SendMessage(hDlgWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_CALC)));
-
-    // Initialize the Windows Common Controls DLL
-    //InitCommonControls();
-
-    return TRUE;
-}
-
-void OnEditCopy(void)
-{
-    SendMessage(GetDlgItem(hDlgWnd, IDC_RESULT), WM_COMMAND, MAKELONG(ID_EDIT_COPY, 0), 0);
-}
-
-void OnEditPaste(void)
-{
-    SendMessage(GetDlgItem(hDlgWnd, IDC_RESULT), WM_COMMAND, MAKELONG(ID_EDIT_PASTE, 0), 0);
-}
-
-void OnViewStandard(void)
-{
-    CalcType = STANDARD;
-    DestroyWindow(hDlgWnd);
-}
-
-void OnViewScientific(void)
-{
-    CalcType = SCIENTIFIC;
-    DestroyWindow(hDlgWnd);
-}
-
-void OnViewDigitGrouping(void)
-{
-    HMENU hMenu = GetMenu(hDlgWnd);
-    HMENU hViewMenu = GetSubMenu(hMenu, ID_MENU_VIEW);
-    bDigitGrouping = !bDigitGrouping;
-    if (bDigitGrouping) {
-        CheckMenuItem(hViewMenu, ID_VIEW_DIGIT_GROUPING, MF_BYCOMMAND|MF_CHECKED);
-    } else {
-        CheckMenuItem(hViewMenu, ID_VIEW_DIGIT_GROUPING, MF_BYCOMMAND|MF_UNCHECKED);
-    }
-}
-
-void OnViewHex(void)
-{
-}
-
-void OnViewDecimal(void)
-{
-}
-
-void OnViewOctal(void)
-{
-}
-
-void OnViewBinary(void)
-{
-}
-
-void OnViewDegrees(void)
-{
-}
-
-void OnViewRadians(void)
-{
-}
-
-void OnViewGrads(void)
-{
-}
-
-void OnHelpTopics(void)
-{
-    WinHelp(hDlgWnd, _T("calc"), HELP_CONTENTS, 0);
-}
-
-void OnHelpAbout(void)
-{
-    ShellAbout(hDlgWnd, _T("ReactOS Calculator"), _T(""), LoadIcon(hInst, MAKEINTRESOURCE(IDI_CALC)));
-}
-
-void OnButtonClick(int ButtonID)
-{
-}
-// Message handler for dialog box.
-LRESULT CALLBACK CalcWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-    switch (message) {
-    case WM_INITDIALOG:
-        hDlgWnd = hDlg;
-        InitColours();
-        return OnCreate(hDlg);
-
-    case WM_DRAWITEM: 
-        DrawItem((LPDRAWITEMSTRUCT)lParam);
-        return TRUE; 
-
-    case WM_COMMAND:
-        if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) {
-            EndDialog(hDlg, LOWORD(wParam));
-            return TRUE;
-        }
-
-        if (HIWORD(wParam) == BN_CLICKED) { 
-            switch (LOWORD(wParam)) {
-              OnButtonClick(LOWORD(wParam));
-              //case IDC_OWNERDRAW: 
-//                 // application-defined processing 
-//                 break; 
-            } 
-        } 
-            
-        //BEGIN_CMD_MAP( LOWORD(wParam) )
-		switch (LOWORD(wParam))
-		{
-            CMD_MAP_ENTRY(ID_EDIT_COPY,           OnEditCopy)
-            CMD_MAP_ENTRY(ID_EDIT_PASTE,          OnEditPaste)
-            CMD_MAP_ENTRY(ID_VIEW_STANDARD,       OnViewStandard)
-            CMD_MAP_ENTRY(ID_VIEW_SCIENTIFIC,     OnViewScientific)
-            CMD_MAP_ENTRY(ID_VIEW_DIGIT_GROUPING, OnViewDigitGrouping)
-            CMD_MAP_ENTRY(ID_VIEW_HEX,            OnViewHex)
-            CMD_MAP_ENTRY(ID_VIEW_DECIMAL,        OnViewDecimal)
-            CMD_MAP_ENTRY(ID_VIEW_OCTAL,          OnViewOctal)
-            CMD_MAP_ENTRY(ID_VIEW_BINARY,         OnViewBinary)
-            CMD_MAP_ENTRY(ID_VIEW_DEGREES,        OnViewDegrees)
-            CMD_MAP_ENTRY(ID_VIEW_RADIANS,        OnViewRadians)
-            CMD_MAP_ENTRY(ID_VIEW_GRADS,          OnViewGrads)
-            CMD_MAP_ENTRY(ID_HELP_TOPICS,         OnHelpTopics)
-            CMD_MAP_ENTRY(ID_HELP_ABOUT,          OnHelpAbout)
-		}
-        //END_CMD_MAP(0)
-        break;
-/*
-    case WM_KEYUP:
-    case WM_KEYDOWN:
-        {
-        MSG msg;
-        msg.hwnd = hDlg;
-        msg.message = message;
-        msg.wParam = wParam;
-        msg.lParam = lParam;
-//        msg.time; 
-//        msg.pt; 
-        if (TranslateAccelerator(hDlg, hAccel, &msg)) return 0;
-        }
-        break;
- */
-    case WM_NOTIFY:
-        {
-        int     idctrl;
-        LPNMHDR pnmh;
-        idctrl = (int)wParam;
-        pnmh = (LPNMHDR)lParam;
-/*
-        if ((pnmh->hwndFrom == hTabWnd) &&
-            (pnmh->idFrom == IDC_TAB) &&
-            (pnmh->code == TCN_SELCHANGE))
-        {
-            _OnTabWndSelChange();
-        }
- */
-        }
-        break;
-
-     case WM_DESTROY:
-        WinHelp(hDlgWnd, _T("regedit"), HELP_QUIT, 0);
-        return DefWindowProc(hDlg, message, wParam, lParam);
-    }
-    return 0;
-}
-
-int APIENTRY WinMain(HINSTANCE hInstance,
-                     HINSTANCE hPrevInstance,
-                     LPSTR     lpCmdLine,
-                     int       nCmdShow)
-{
-    CALC_TYPES CurrentCalcType;
-
-    // Initialize global variables
-    hInst = hInstance;
-    LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
-
-    // Load our settings from the registry
-    LoadSettings();
-
-    hAccel = LoadAccelerators(hInstance, (LPCTSTR)IDR_ACCELERATOR);
-
-    do {
-        CurrentCalcType = CalcType;
-        switch (CalcType) {
-        case HP42S:
-            break;
-        case SCIENTIFIC:
-            DialogBox(hInst, (LPCTSTR)IDD_SCIENTIFIC, NULL, (DLGPROC)CalcWndProc);
-            break;
-        case STANDARD:
-        default:
-            DialogBox(hInst, (LPCTSTR)IDD_STANDARD, NULL, (DLGPROC)CalcWndProc);
-            break;
-        }
-    } while (CalcType != CurrentCalcType);
- 
-    // Save our settings to the registry
-    SaveSettings();
-    return 0;
-}
-

rosapps/calc
main.h removed after 1.2
diff -N main.h
--- main.h	16 Jul 2002 21:54:17 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
-/*
- *  ReactOS calc
- *
- *  main.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-    
-#ifndef __MAIN_H__
-#define __MAIN_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-
-#include "resource.h"
-
-
-#define MAX_LOADSTRING 100
-
-typedef enum _CALC_TYPES { STANDARD, SCIENTIFIC, HP42S, OTHER } CALC_TYPES;
-
-extern HINSTANCE hInst;
-extern HWND hDlgWnd;
-extern TCHAR szTitle[];
-extern CALC_TYPES CalcType;
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __MAIN_H__

rosapps/calc
settings.c removed after 1.4
diff -N settings.c
--- settings.c	21 Jul 2002 18:28:26 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,115 +0,0 @@
-/*
- *  ReactOS calc
- *
- *  settings.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-    
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <tchar.h>
-#include <assert.h>
-#define ASSERT assert
-    
-#include "main.h"
-#include "settings.h"
-
-
-BOOL CheckResult(LONG error)
-{
-    if (error != ERROR_SUCCESS) {
-    	PTSTR msg;
-    	if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
-	    	0, error, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PTSTR)&msg, 0, NULL))
-		    MessageBox(NULL, msg, szTitle, MB_ICONERROR | MB_OK);
-    	else
-	    	MessageBox(NULL, _T("Error"), szTitle, MB_ICONERROR | MB_OK);
-    	LocalFree(msg);
-        return FALSE;
-    }
-    return TRUE;
-}
-
-static BOOL CreateRegistryPath(LPTSTR szRegPath, int nMaxLen)
-{
-    LPTSTR pRegPath = szRegPath;
-
-    // Initialise registry path string from application PATH and KEY resources
-    int nLength = LoadString(hInst, IDS_APP_REG_PATH, szRegPath, nMaxLen);
-    nLength += LoadString(hInst, IDS_APP_REG_KEY, szRegPath + nLength, nMaxLen - nLength);
-    ASSERT(nLength < (nMaxLen - 1));
-    szRegPath[nLength] = _T('\\');
-
-    // walk the registry path string creating the tree if required
-    while ((pRegPath = _tcschr(pRegPath, _T('\\')))) {
-        LONG  result;
-        HKEY  hKey = NULL;
-        *pRegPath = _T('\0');
-        // Open (or create) the key
-        result = RegCreateKeyEx(HKEY_CURRENT_USER, szRegPath, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
-        if (!CheckResult(result)) return FALSE;
-        RegCloseKey(hKey);
-        *pRegPath = _T('\\');
-        pRegPath = pRegPath + 1;
-    }
-    szRegPath[nLength] = _T('\0');
-    return TRUE;
-}
-
-void LoadSettings(void)
-{
-    TCHAR szRegPath[MAX_LOADSTRING];
-
-    HKEY  hKey;
-    DWORD dwSize;
-    LONG  result;
-
-    if (!CreateRegistryPath(szRegPath, MAX_LOADSTRING)) return;
-
-    // Open the key
-    result = RegOpenKeyEx(HKEY_CURRENT_USER, szRegPath, 0, KEY_READ, &hKey);
-    if (!CheckResult(result)) return;
-
-    // Read the settings
-    dwSize = sizeof(CALC_TYPES);
-    result = RegQueryValueEx(hKey, _T("Preferences"), NULL, NULL, (LPBYTE)&CalcType, &dwSize);
-
-    // Close the key
-    RegCloseKey(hKey);
-}
-
-void SaveSettings(void)
-{
-    TCHAR szRegPath[MAX_LOADSTRING];
-    HKEY hKey = NULL;
-    LONG result;
-
-    if (!CreateRegistryPath(szRegPath, MAX_LOADSTRING)) return;
-
-    // Open the key
-    result = RegOpenKeyEx(HKEY_CURRENT_USER, szRegPath, 0, KEY_WRITE, &hKey);
-    if (!CheckResult(result)) return;
-
-    // Save the settings
-    result = RegSetValueEx(hKey, _T("Preferences"), 0, REG_DWORD, (LPBYTE)&CalcType, sizeof(CALC_TYPES));
-    if (!CheckResult(result)) goto abort;
-
-abort:
-    // Close the key
-    RegCloseKey(hKey);
-}

rosapps/calc
settings.h removed after 1.2
diff -N settings.h
--- settings.h	16 Jul 2002 21:54:17 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-/*
- *  ReactOS calc
- *
- *  settings.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-    
-#ifndef __SETTINGS_H__
-#define __SETTINGS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-
-BOOL CheckResult(LONG error);
-void LoadSettings(void);
-void SaveSettings(void);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __SETTINGS_H__
CVSspam 0.2.8