From 1b826605f5ab0bb680925f5e24a57b068ce2bdc5 Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Tue, 6 Oct 1998 09:33:58 +0000
Subject: [PATCH] FreeBSD patch to sckaddr.cpp; include more files in manual;
 misc

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/classes.tex |  2 +-
 docs/latex/wx/topics.tex  |  2 +-
 include/wx/msw/window.h   |  8 ++++----
 include/wx/utils.h        |  4 ++--
 src/common/docview.cpp    | 42 ++++++---------------------------------
 src/common/sckaddr.cpp    |  3 +++
 6 files changed, 17 insertions(+), 44 deletions(-)

diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex
index b6952af9c2..56b7f3fadc 100644
--- a/docs/latex/wx/classes.tex
+++ b/docs/latex/wx/classes.tex
@@ -99,7 +99,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input listbox.tex
 \input listctrl.tex
 \input listevt.tex
-%\input log.tex
+\input log.tex
 \input mask.tex
 \input mdi.tex
 \input menu.tex
diff --git a/docs/latex/wx/topics.tex b/docs/latex/wx/topics.tex
index baf92f865b..a10357aaa5 100644
--- a/docs/latex/wx/topics.tex
+++ b/docs/latex/wx/topics.tex
@@ -6,7 +6,7 @@ This chapter contains a selection of topic overviews.
 
 \input tapp.tex
 \input tlog.tex
-%\input tconfig.tex
+\input tconfig.tex
 \input tbitmap.tex
 \input tdialog.tex
 \input tfont.tex
diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h
index 252b53c7c7..21952c2721 100644
--- a/include/wx/msw/window.h
+++ b/include/wx/msw/window.h
@@ -53,7 +53,7 @@ class WXDLLEXPORT wxCursor;
 class WXDLLEXPORT wxColourMap;
 class WXDLLEXPORT wxFont;
 class WXDLLEXPORT wxMenu;
-class WXDLLEXPORT wxRectangle;
+class WXDLLEXPORT wxRect;
 class WXDLLEXPORT wxBitmap;
 class WXDLLEXPORT wxSizer;
 class WXDLLEXPORT wxList;
@@ -228,7 +228,7 @@ public:
   virtual bool PopupMenu(wxMenu *menu, int x, int y);
 
   // Send the window a refresh event
-  virtual void Refresh(bool eraseBack = TRUE, const wxRectangle *rect = NULL);
+  virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL);
 
 #if WXWIN_COMPATIBILITY
   // Set/get scroll attributes
@@ -247,7 +247,7 @@ public:
   virtual int GetScrollRange(int orient) const;
   virtual int GetScrollThumb(int orient) const;
 
-  virtual void ScrollWindow(int dx, int dy, const wxRectangle *rect = NULL);
+  virtual void ScrollWindow(int dx, int dy, const wxRect *rect = NULL);
 
   // Caret manipulation
   virtual void CreateCaret(int w, int h);
@@ -668,7 +668,7 @@ public:
 
   wxRegion              m_updateRegion;
 /*
-  wxRectangle           m_updateRect;             // Bounding box for screen damage area
+  wxRect           m_updateRect;             // Bounding box for screen damage area
 #ifdef __WIN32__
   WXHRGN                m_updateRgn;                  // NT allows access to the rectangle list
 #endif
diff --git a/include/wx/utils.h b/include/wx/utils.h
index 0f60931085..46cbc9bf85 100644
--- a/include/wx/utils.h
+++ b/include/wx/utils.h
@@ -97,9 +97,9 @@ int WXDLLEXPORT wxHexToDec(char *buf);
 void WXDLLEXPORT wxDecToHex(int dec, char *buf);
 
 // Execute another program. Returns 0 if there was an error, a PID otherwise.
-long WXDLLEXPORT wxExecute(char **argv, bool Async = FALSE,
+long WXDLLEXPORT wxExecute(char **argv, bool sync = FALSE,
                            wxProcess *process = (wxProcess *) NULL);
-long WXDLLEXPORT wxExecute(const wxString& command, bool Async = FALSE,
+long WXDLLEXPORT wxExecute(const wxString& command, bool sync = FALSE,
                            wxProcess *process = (wxProcess *) NULL);
 
 #define wxSIGTERM 1
diff --git a/src/common/docview.cpp b/src/common/docview.cpp
index 2ab0f4cd24..e686d80d9b 100644
--- a/src/common/docview.cpp
+++ b/src/common/docview.cpp
@@ -46,8 +46,6 @@
 #include "wx/choicdlg.h"
 #include "wx/docview.h"
 #include "wx/printdlg.h"
-#include "wx/generic/prntdlgg.h"
-#include "wx/generic/printps.h"
 #include "wx/confbase.h"
 
 #include <stdio.h>
@@ -744,20 +742,8 @@ void wxDocManager::OnPrint(wxCommandEvent& WXUNUSED(event))
   wxPrintout *printout = view->OnCreatePrintout();
   if (printout)
   {
-    // TODO: trouble about this is that it pulls in the postscript
-    // code unecessarily
-#ifdef __WXMSW__
-    if ( wxTheApp->GetPrintMode() == wxPRINT_WINDOWS )
-    {
-      wxWindowsPrinter printer;
-      printer.Print(view->GetFrame(), printout, TRUE);
-    }
-    else
-#endif
-    {
-      wxPostScriptPrinter printer;
-      printer.Print(view->GetFrame(), printout, TRUE);
-    }
+    wxPrinter printer;
+    printer.Print(view->GetFrame(), printout, TRUE);
 
     delete printout;
   }
@@ -772,20 +758,9 @@ void wxDocManager::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
 
   wxPrintData data;
 
-#ifdef __WXMSW__
-  if ( wxTheApp->GetPrintMode() == wxPRINT_WINDOWS )
-  {
-    wxPrintDialog printerDialog(parentWin, & data);
-    printerDialog.GetPrintData().SetSetupDialog(TRUE);
-    printerDialog.ShowModal();
-  }
-  else
-#endif
-  {
-    wxGenericPrintDialog printerDialog(parentWin, & data);
-    printerDialog.GetPrintData().SetSetupDialog(TRUE);
-    printerDialog.ShowModal();
-  }
+  wxPrintDialog printerDialog(parentWin, & data);
+  printerDialog.GetPrintData().SetSetupDialog(TRUE);
+  printerDialog.ShowModal();
 }
 
 void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
@@ -799,12 +774,7 @@ void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
   {
     // Pass two printout objects: for preview, and possible printing.
     wxPrintPreviewBase *preview = (wxPrintPreviewBase *) NULL;
-#ifdef __WXMSW__
-    if ( wxTheApp->GetPrintMode() == wxPRINT_WINDOWS )
-        preview = new wxWindowsPrintPreview(printout, view->OnCreatePrintout());
-    else
-#endif
-       preview = new wxPostScriptPrintPreview(printout, view->OnCreatePrintout());
+    preview = new wxPrintPreview(printout, view->OnCreatePrintout());
 
     wxPreviewFrame *frame = new wxPreviewFrame(preview, (wxFrame *)wxTheApp->GetTopWindow(), _("Print Preview"),
 		wxPoint(100, 100), wxSize(600, 650));
diff --git a/src/common/sckaddr.cpp b/src/common/sckaddr.cpp
index 94a2fe6aec..db66326bb2 100644
--- a/src/common/sckaddr.cpp
+++ b/src/common/sckaddr.cpp
@@ -41,6 +41,9 @@
 #include <socket.h>
 #include <in.h>
 #else
+#if defined(__FreeBSD__) || defined (__NetBSD__)
+#include <sys/types.h>
+#endif
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
-- 
2.50.0

