Mercurial > hg > octave-nkf
diff libinterp/corefcn/sysdep.cc @ 17851:af685269e06c
avoid symbol conflicts in display.cc
* sysdep.cc: Include display.h.
(Fhave_window_system): Move here from display.cc.
* display.cc: Don't undef Complex. Don't include defun.h.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 04 Nov 2013 23:06:48 -0500 |
parents | 175b392e91fe |
children | 7bccc182e2f7 |
line wrap: on
line diff
--- a/libinterp/corefcn/sysdep.cc +++ b/libinterp/corefcn/sysdep.cc @@ -71,6 +71,7 @@ #include "Cell.h" #include "builtins.h" #include "defun.h" +#include "display.h" #include "error.h" #include "input.h" #include "oct-obj.h" @@ -906,3 +907,17 @@ %! assert (tilde_expand ("/foo/bar"), "/foo/bar"); %! assert (tilde_expand ("foo/bar"), "foo/bar"); */ + +// 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, , , + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {} have_window_system ()\n\ +Return true if Octave a window system is available (X11, Windows,\n\ +or Apple OS X) and false otherwise.\n\ +@end deftypefn") +{ + return octave_value (display_info::display_available ()); +}