[CALC] Improve headers inclusion.
[reactos.git] / base / applications / calc / calc.h
index 8b0c0c3..afbc813 100644 (file)
@@ -1,12 +1,14 @@
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <winuser.h>
-#include <wingdi.h>
-#include <winreg.h>
+#ifndef __CALC_H__
+#define __CALC_H__
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
 #include <tchar.h>
-//#include <stdio.h>
-//#include <string.h>
+#include <commctrl.h>
+#include <shellapi.h>
+
+#include <stdio.h>
+#include <string.h>
 #include <math.h>
 #include <float.h>
 #include <malloc.h>
@@ -24,8 +26,9 @@
 #define WM_HANDLE_FROM      (WM_APP+6)
 #define WM_HANDLE_TO        (WM_APP+7)
 
+/* GNU MULTI-PRECISION LIBRARY support */
 #ifdef ENABLE_MULTI_PRECISION
-#include <mpfr.h>
+#include "mpfr.h"
 
 #ifndef MPFR_DEFAULT_RND
 #define MPFR_DEFAULT_RND mpfr_get_default_rounding_mode ()
@@ -44,7 +47,7 @@
 #define IDC_STATIC  ((DWORD)-1)
 #endif
 
-#define CALC_VERSION        TEXT("1.11")
+#define CALC_VERSION        _T("1.12")
 
 #define MAX_CALC_SIZE       256
 
@@ -160,12 +163,11 @@ typedef struct {
 
 extern calc_t calc;
 
-//
-#define CALC_E      2.7182818284590452354
-
-#define CALC_PI_2   1.57079632679489661923
-#define CALC_PI     3.14159265358979323846
-#define CALC_3_PI_2 4.71238898038468985769
+/* IEEE constants */
+#define CALC_E      2.718281828459045235360
+#define CALC_PI_2   1.570796326794896619231
+#define CALC_PI     3.141592653589793238462
+#define CALC_3_PI_2 4.712388980384689857694
 #define CALC_2_PI   6.283185307179586476925
 
 #define MODIFIER_INV    0x01
@@ -173,14 +175,9 @@ extern calc_t calc;
 #define NO_CHAIN        0x04
 
 void apply_int_mask(calc_number_t *a);
-#ifdef ENABLE_MULTI_PRECISION
-void validate_rad2angle(calc_number_t *c);
-void validate_angle2rad(calc_number_t *c);
-#else
+#ifndef ENABLE_MULTI_PRECISION
 __int64 logic_dbl2int(calc_number_t *a);
 double logic_int2dbl(calc_number_t *a);
-double validate_rad2angle(double a);
-double validate_angle2rad(calc_number_t *c);
 #endif
 void rpn_sin(calc_number_t *c);
 void rpn_cos(calc_number_t *c);
@@ -212,7 +209,9 @@ void rpn_exp10(calc_number_t *c);
 void rpn_ln(calc_number_t *c);
 void rpn_log(calc_number_t *c);
 void rpn_ave(calc_number_t *c);
+void rpn_ave2(calc_number_t *c);
 void rpn_sum(calc_number_t *c);
+void rpn_sum2(calc_number_t *c);
 void rpn_s(calc_number_t *c);
 void rpn_s_m1(calc_number_t *c);
 void rpn_dms2dec(calc_number_t *c);
@@ -238,3 +237,5 @@ INT_PTR CALLBACK AboutDlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp);
 void ConvExecute(HWND hWnd);
 void ConvAdjust(HWND hWnd, int n_cat);
 void ConvInit(HWND hWnd);
+
+#endif /* __CALC_H__ */