From 463c4d7193481ac27626b282ccf0ac178f029abd Mon Sep 17 00:00:00 2001
From: =?utf8?q?W=C5=82odzimierz=20Skiba?= <abx@abx.art.pl>
Date: Tue, 14 Dec 2004 21:10:15 +0000
Subject: [PATCH] wx/math.h integration

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/gtk/bitmap.cpp           | 2 +-
 src/gtk/dcclient.cpp         | 2 +-
 src/gtk/gnome/gprint.cpp     | 3 +--
 src/gtk/scrolbar.cpp         | 4 +---
 src/gtk/slider.cpp           | 4 +---
 src/gtk/spinbutt.cpp         | 4 +---
 src/gtk/spinctrl.cpp         | 4 +---
 src/gtk/textctrl.cpp         | 2 +-
 src/gtk/window.cpp           | 2 +-
 src/gtk1/bitmap.cpp          | 2 +-
 src/gtk1/dcclient.cpp        | 2 +-
 src/gtk1/gnome/gprint.cpp    | 3 +--
 src/gtk1/scrolbar.cpp        | 4 +---
 src/gtk1/slider.cpp          | 4 +---
 src/gtk1/spinbutt.cpp        | 4 +---
 src/gtk1/spinctrl.cpp        | 4 +---
 src/gtk1/textctrl.cpp        | 2 +-
 src/gtk1/window.cpp          | 2 +-
 src/mac/carbon/dcclient.cpp  | 2 +-
 src/mac/carbon/dcprint.cpp   | 2 +-
 src/mac/carbon/mpthread.cpp  | 2 +-
 src/mac/carbon/thread.cpp    | 2 +-
 src/mac/classic/dcclient.cpp | 2 +-
 src/mac/classic/dcprint.cpp  | 2 +-
 src/motif/bmpmotif.cpp       | 3 ++-
 src/motif/dcclient.cpp       | 3 +--
 src/os2/dcprint.cpp          | 2 +-
 src/os2/filedlg.cpp          | 2 +-
 src/os2/fontdlg.cpp          | 2 +-
 src/os2/msgdlg.cpp           | 2 +-
 src/palmos/colordlg.cpp      | 2 +-
 src/palmos/dcprint.cpp       | 2 +-
 src/palmos/filedlg.cpp       | 2 +-
 src/palmos/fontdlg.cpp       | 2 +-
 src/x11/bitmap.cpp           | 2 +-
 src/x11/dcclient.cpp         | 2 +-
 36 files changed, 37 insertions(+), 55 deletions(-)

diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp
index 4950f9508a..8a73768b7d 100644
--- a/src/gtk/bitmap.cpp
+++ b/src/gtk/bitmap.cpp
@@ -39,7 +39,7 @@
     #include <gdk/gdkrgb.h>
 #endif // GTK+ 2.0/1.2
 
-#include <math.h>
+#include "wx/math.h"
 
 extern void gdk_wx_draw_bitmap     (GdkDrawable  *drawable,
                           GdkGC               *gc,
diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp
index cfd61fc9ce..7ae955a594 100644
--- a/src/gtk/dcclient.cpp
+++ b/src/gtk/dcclient.cpp
@@ -27,7 +27,7 @@
 
 #include "wx/gtk/win_gtk.h"
 
-#include <math.h>               // for floating-point functions
+#include "wx/math.h" // for floating-point functions
 
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp
index c761a15e96..9be9ac7d62 100644
--- a/src/gtk/gnome/gprint.cpp
+++ b/src/gtk/gnome/gprint.cpp
@@ -22,8 +22,7 @@
 
 #if wxUSE_LIBGNOMEPRINT
 
-#include "math.h"
-
+#include "wx/math.h"
 #include "wx/fontutil.h"
 #include "wx/printdlg.h"
 #include "wx/gtk/private.h"
diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp
index f2d26ced1d..af054a217c 100644
--- a/src/gtk/scrolbar.cpp
+++ b/src/gtk/scrolbar.cpp
@@ -20,9 +20,7 @@
 #include "wx/scrolbar.h"
 
 #include "wx/utils.h"
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp
index bcd260ad6e..740a202322 100644
--- a/src/gtk/slider.cpp
+++ b/src/gtk/slider.cpp
@@ -19,9 +19,7 @@
 #if wxUSE_SLIDER
 
 #include "wx/utils.h"
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
diff --git a/src/gtk/spinbutt.cpp b/src/gtk/spinbutt.cpp
index 4ac29c9c25..c11142163f 100644
--- a/src/gtk/spinbutt.cpp
+++ b/src/gtk/spinbutt.cpp
@@ -21,9 +21,7 @@
 #if wxUSE_SPINBTN
 
 #include "wx/utils.h"
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp
index 18e8e0dff2..10aa930138 100644
--- a/src/gtk/spinctrl.cpp
+++ b/src/gtk/spinctrl.cpp
@@ -22,9 +22,7 @@
 #include "wx/utils.h"
 
 #include "wx/textctrl.h"    // for wxEVT_COMMAND_TEXT_UPDATED
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp
index d91d2bf5f1..3aeaa60599 100644
--- a/src/gtk/textctrl.cpp
+++ b/src/gtk/textctrl.cpp
@@ -26,7 +26,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
-#include <math.h>               // for fabs
+#include "wx/math.h"
 
 #include "wx/gtk/private.h"
 #include <gdk/gdkkeysyms.h>
diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp
index ad92e20c40..32fdde9a84 100644
--- a/src/gtk/window.cpp
+++ b/src/gtk/window.cpp
@@ -56,7 +56,7 @@
     #include "wx/thread.h"
 #endif
 
-#include <math.h>
+#include "wx/math.h"
 #include <ctype.h>
 
 #include "wx/gtk/private.h"
diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp
index 4950f9508a..8a73768b7d 100644
--- a/src/gtk1/bitmap.cpp
+++ b/src/gtk1/bitmap.cpp
@@ -39,7 +39,7 @@
     #include <gdk/gdkrgb.h>
 #endif // GTK+ 2.0/1.2
 
-#include <math.h>
+#include "wx/math.h"
 
 extern void gdk_wx_draw_bitmap     (GdkDrawable  *drawable,
                           GdkGC               *gc,
diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp
index cfd61fc9ce..7ae955a594 100644
--- a/src/gtk1/dcclient.cpp
+++ b/src/gtk1/dcclient.cpp
@@ -27,7 +27,7 @@
 
 #include "wx/gtk/win_gtk.h"
 
-#include <math.h>               // for floating-point functions
+#include "wx/math.h" // for floating-point functions
 
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
diff --git a/src/gtk1/gnome/gprint.cpp b/src/gtk1/gnome/gprint.cpp
index c761a15e96..9be9ac7d62 100644
--- a/src/gtk1/gnome/gprint.cpp
+++ b/src/gtk1/gnome/gprint.cpp
@@ -22,8 +22,7 @@
 
 #if wxUSE_LIBGNOMEPRINT
 
-#include "math.h"
-
+#include "wx/math.h"
 #include "wx/fontutil.h"
 #include "wx/printdlg.h"
 #include "wx/gtk/private.h"
diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp
index f2d26ced1d..af054a217c 100644
--- a/src/gtk1/scrolbar.cpp
+++ b/src/gtk1/scrolbar.cpp
@@ -20,9 +20,7 @@
 #include "wx/scrolbar.h"
 
 #include "wx/utils.h"
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp
index bcd260ad6e..740a202322 100644
--- a/src/gtk1/slider.cpp
+++ b/src/gtk1/slider.cpp
@@ -19,9 +19,7 @@
 #if wxUSE_SLIDER
 
 #include "wx/utils.h"
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
diff --git a/src/gtk1/spinbutt.cpp b/src/gtk1/spinbutt.cpp
index 4ac29c9c25..c11142163f 100644
--- a/src/gtk1/spinbutt.cpp
+++ b/src/gtk1/spinbutt.cpp
@@ -21,9 +21,7 @@
 #if wxUSE_SPINBTN
 
 #include "wx/utils.h"
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
diff --git a/src/gtk1/spinctrl.cpp b/src/gtk1/spinctrl.cpp
index 18e8e0dff2..10aa930138 100644
--- a/src/gtk1/spinctrl.cpp
+++ b/src/gtk1/spinctrl.cpp
@@ -22,9 +22,7 @@
 #include "wx/utils.h"
 
 #include "wx/textctrl.h"    // for wxEVT_COMMAND_TEXT_UPDATED
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp
index d91d2bf5f1..3aeaa60599 100644
--- a/src/gtk1/textctrl.cpp
+++ b/src/gtk1/textctrl.cpp
@@ -26,7 +26,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
-#include <math.h>               // for fabs
+#include "wx/math.h"
 
 #include "wx/gtk/private.h"
 #include <gdk/gdkkeysyms.h>
diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp
index ad92e20c40..32fdde9a84 100644
--- a/src/gtk1/window.cpp
+++ b/src/gtk1/window.cpp
@@ -56,7 +56,7 @@
     #include "wx/thread.h"
 #endif
 
-#include <math.h>
+#include "wx/math.h"
 #include <ctype.h>
 
 #include "wx/gtk/private.h"
diff --git a/src/mac/carbon/dcclient.cpp b/src/mac/carbon/dcclient.cpp
index 07d0f431fc..59657f38f5 100644
--- a/src/mac/carbon/dcclient.cpp
+++ b/src/mac/carbon/dcclient.cpp
@@ -19,7 +19,7 @@
 #include "wx/window.h"
 #include "wx/toplevel.h"
 #include "wx/settings.h"
-#include <math.h>
+#include "wx/math.h"
 #include "wx/mac/private.h"
 
 //-----------------------------------------------------------------------------
diff --git a/src/mac/carbon/dcprint.cpp b/src/mac/carbon/dcprint.cpp
index e875cb0387..85bc466970 100644
--- a/src/mac/carbon/dcprint.cpp
+++ b/src/mac/carbon/dcprint.cpp
@@ -25,7 +25,7 @@
 
 #include "wx/dcprint.h"
 #include "wx/msgdlg.h"
-#include <math.h>
+#include "wx/math.h"
 #include "wx/mac/uma.h"
 #include "wx/mac/private/print.h"
 
diff --git a/src/mac/carbon/mpthread.cpp b/src/mac/carbon/mpthread.cpp
index c3711fd1a3..7eeabfa7a3 100755
--- a/src/mac/carbon/mpthread.cpp
+++ b/src/mac/carbon/mpthread.cpp
@@ -40,7 +40,7 @@
 #else
 #include <DriverServices.h>
 #include <Multiprocessing.h>
-#include <math.h>
+#include "wx/math.h"
 #endif
 #include "wx/mac/uma.h"
 #endif
diff --git a/src/mac/carbon/thread.cpp b/src/mac/carbon/thread.cpp
index 6c477b3685..6809af50f6 100644
--- a/src/mac/carbon/thread.cpp
+++ b/src/mac/carbon/thread.cpp
@@ -40,7 +40,7 @@
 #else
 #include <DriverServices.h>
 #include <Multiprocessing.h>
-#include <math.h>
+#include "wx/math.h"
 #endif
 #include "wx/mac/uma.h"
 #endif
diff --git a/src/mac/classic/dcclient.cpp b/src/mac/classic/dcclient.cpp
index f28c6dc576..2718f6ce9b 100644
--- a/src/mac/classic/dcclient.cpp
+++ b/src/mac/classic/dcclient.cpp
@@ -18,7 +18,7 @@
 #include "wx/region.h"
 #include "wx/window.h"
 #include "wx/toplevel.h"
-#include <math.h>
+#include "wx/math.h"
 #include "wx/mac/private.h"
 
 //-----------------------------------------------------------------------------
diff --git a/src/mac/classic/dcprint.cpp b/src/mac/classic/dcprint.cpp
index e875cb0387..85bc466970 100644
--- a/src/mac/classic/dcprint.cpp
+++ b/src/mac/classic/dcprint.cpp
@@ -25,7 +25,7 @@
 
 #include "wx/dcprint.h"
 #include "wx/msgdlg.h"
-#include <math.h>
+#include "wx/math.h"
 #include "wx/mac/uma.h"
 #include "wx/mac/private/print.h"
 
diff --git a/src/motif/bmpmotif.cpp b/src/motif/bmpmotif.cpp
index e588d19a87..d0f70c18c4 100644
--- a/src/motif/bmpmotif.cpp
+++ b/src/motif/bmpmotif.cpp
@@ -37,7 +37,8 @@
 #if wxHAVE_LIB_XPM
     #include <X11/xpm.h>
 #endif
-#include <math.h>
+
+#include "wx/math.h"
 
 Pixmap XCreateInsensitivePixmap( Display *display, Pixmap pixmap );
 
diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp
index 97cfb8a329..0b0941a8e7 100644
--- a/src/motif/dcclient.cpp
+++ b/src/motif/dcclient.cpp
@@ -49,8 +49,7 @@
 #include "wx/app.h"
 #include "wx/image.h"
 #include "wx/log.h"
-
-#include <math.h>
+#include "wx/math.h"
 
 #ifdef __VMS__
 #pragma message disable nosimpint
diff --git a/src/os2/dcprint.cpp b/src/os2/dcprint.cpp
index 7497cdee96..fc49df9d04 100644
--- a/src/os2/dcprint.cpp
+++ b/src/os2/dcprint.cpp
@@ -19,6 +19,7 @@
 
 #ifndef WX_PRECOMP
 #include "wx/app.h"
+#include "wx/math.h"
 #endif
 
 #include "wx/string.h"
@@ -26,7 +27,6 @@
 #include "wx/window.h"
 #include "wx/os2/private.h"
 #include "wx/dcprint.h"
-#include "math.h"
 
 #if wxUSE_PRINTING_ARCHITECTURE
 
diff --git a/src/os2/filedlg.cpp b/src/os2/filedlg.cpp
index 0fa360c0d4..efaec2a6c9 100644
--- a/src/os2/filedlg.cpp
+++ b/src/os2/filedlg.cpp
@@ -23,6 +23,7 @@
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/app.h"
+    #include "wx/math.h"
 #endif
 
 #define INCL_PM
@@ -30,7 +31,6 @@
 
 #include "wx/os2/private.h"
 
-#include <math.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/src/os2/fontdlg.cpp b/src/os2/fontdlg.cpp
index c2b6091965..e6794d8d40 100644
--- a/src/os2/fontdlg.cpp
+++ b/src/os2/fontdlg.cpp
@@ -18,6 +18,7 @@
 #include "wx/defs.h"
 #include "wx/utils.h"
 #include "wx/dialog.h"
+#include "wx/math.h"
 #endif
 
 #include "wx/fontdlg.h"
@@ -29,7 +30,6 @@
 #include "wx/os2/private.h"
 #include "wx/cmndata.h"
 
-#include <math.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/src/os2/msgdlg.cpp b/src/os2/msgdlg.cpp
index 8aaa2313cc..740978ee80 100644
--- a/src/os2/msgdlg.cpp
+++ b/src/os2/msgdlg.cpp
@@ -23,11 +23,11 @@
 #include "wx/dialog.h"
 #include "wx/app.h"
 #include "wx/msgdlg.h"
+#include "wx/math.h"
 #endif
 
 #include "wx/os2/private.h"
 
-#include <math.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/src/palmos/colordlg.cpp b/src/palmos/colordlg.cpp
index 9720f46368..b94f9f7684 100644
--- a/src/palmos/colordlg.cpp
+++ b/src/palmos/colordlg.cpp
@@ -40,6 +40,7 @@
     #include "wx/frame.h"
     #include "wx/dialog.h"
     #include "wx/msgdlg.h"
+    #include "wx/math.h"
 #endif
 
 #if wxUSE_COLOURDLG && !defined(__SMARTPHONE__)
@@ -48,7 +49,6 @@
 #include "wx/colordlg.h"
 #include "wx/cmndata.h"
 
-#include <math.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/src/palmos/dcprint.cpp b/src/palmos/dcprint.cpp
index 6462bbeef5..c3be3f4588 100644
--- a/src/palmos/dcprint.cpp
+++ b/src/palmos/dcprint.cpp
@@ -33,6 +33,7 @@
     #include "wx/log.h"
     #include "wx/window.h"
     #include "wx/dcmemory.h"
+    #include "wx/math.h"
 #endif
 
 #if wxUSE_PRINTING_ARCHITECTURE
@@ -44,7 +45,6 @@
 #endif
 
 #include "wx/dcprint.h"
-#include "math.h"
 
 // ----------------------------------------------------------------------------
 // wxWin macros
diff --git a/src/palmos/filedlg.cpp b/src/palmos/filedlg.cpp
index 747b6377de..c59ee9b1ba 100644
--- a/src/palmos/filedlg.cpp
+++ b/src/palmos/filedlg.cpp
@@ -38,11 +38,11 @@
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/app.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/palmos/private.h"
 
-#include <math.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/src/palmos/fontdlg.cpp b/src/palmos/fontdlg.cpp
index 37f38b4a65..b527472714 100644
--- a/src/palmos/fontdlg.cpp
+++ b/src/palmos/fontdlg.cpp
@@ -34,6 +34,7 @@
     #include "wx/defs.h"
     #include "wx/utils.h"
     #include "wx/dialog.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/fontdlg.h"
@@ -42,7 +43,6 @@
 #include "wx/cmndata.h"
 #include "wx/log.h"
 
-#include <math.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/src/x11/bitmap.cpp b/src/x11/bitmap.cpp
index 10f3bc41e9..1b5cff4135 100644
--- a/src/x11/bitmap.cpp
+++ b/src/x11/bitmap.cpp
@@ -41,7 +41,7 @@ bool wxGetImageFromDrawable(GR_DRAW_ID drawable, int srcX, int srcY, int width,
 #include "wx/wfstream.h"
 #endif
 #endif
-#include <math.h>
+#include "wx/math.h"
 
 //-----------------------------------------------------------------------------
 // wxMask
diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp
index 1f7200e9cc..8cbaf34a0d 100644
--- a/src/x11/dcclient.cpp
+++ b/src/x11/dcclient.cpp
@@ -23,7 +23,7 @@
 
 #include "wx/x11/private.h"
 
-#include <math.h>
+#include "wx/math.h"
 
 #if wxUSE_UNICODE
 #include "glib.h"
-- 
2.47.2