changeset 24442:98a03a1097b4

move have_window_system function from sysdep.cc to display.cc * display.cc (Fhave_window_system): Move here from sysdep.cc.
author John W. Eaton <jwe@octave.org>
date Thu, 21 Dec 2017 12:13:04 -0500
parents 9fbb5de78ec7
children 92f0d6013ddd
files libinterp/corefcn/display.cc libinterp/corefcn/sysdep.cc
diffstat 2 files changed, 14 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/display.cc	Thu Dec 21 03:45:09 2017 -0800
+++ b/libinterp/corefcn/display.cc	Thu Dec 21 12:13:04 2017 -0500
@@ -27,8 +27,11 @@
 #include "singleton-cleanup.h"
 
 #include "cdisplay.h"
+#include "defun.h"
 #include "display.h"
 #include "error.h"
+#include "ov.h"
+#include "ovl.h"
 
 namespace octave
 {
@@ -74,3 +77,14 @@
     return retval;
   }
 }
+
+DEFUN (have_window_system, , ,
+       doc: /* -*- texinfo -*-
+@deftypefn {} {} have_window_system ()
+Return true if a window system is available (X11, Windows, or Apple OS X)
+and false otherwise.
+@seealso{isguirunning}
+@end deftypefn */)
+{
+  return ovl (octave::display_info::display_available ());
+}
--- a/libinterp/corefcn/sysdep.cc	Thu Dec 21 03:45:09 2017 -0800
+++ b/libinterp/corefcn/sysdep.cc	Thu Dec 21 12:13:04 2017 -0500
@@ -69,7 +69,6 @@
 #include "builtin-defun-decls.h"
 #include "Cell.h"
 #include "defun.h"
-#include "display.h"
 #include "error.h"
 #include "errwarn.h"
 #include "input.h"
@@ -949,18 +948,3 @@
 %!   assert (get_home_directory (), getenv ("HOME"));
 %! endif
 */
-
-// This function really belongs in display.cc, but including defun.h in
-// that file results in conflicts with symbols from headers that are
-// needed for X11 and Carbon functions.
-
-DEFUN (have_window_system, , ,
-       doc: /* -*- texinfo -*-
-@deftypefn {} {} have_window_system ()
-Return true if a window system is available (X11, Windows, or Apple OS X)
-and false otherwise.
-@seealso{isguirunning}
-@end deftypefn */)
-{
-  return ovl (octave::display_info::display_available ());
-}