changeset 7010:f7d2f54008f5

[project @ 2007-10-11 17:50:34 by jwe]
author jwe
date Thu, 11 Oct 2007 17:50:34 +0000
parents b353c370a315
children 4a682c7b2bd6
files scripts/ChangeLog scripts/miscellaneous/Makefile.in scripts/miscellaneous/ismac.m scripts/miscellaneous/ispc.m scripts/miscellaneous/isunix.m src/toplev.cc
diffstat 6 files changed, 78 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Thu Oct 11 17:27:28 2007 +0000
+++ b/scripts/ChangeLog	Thu Oct 11 17:50:34 2007 +0000
@@ -1,3 +1,13 @@
+2007-10-11  Thomas Treichl  <Thomas.Treichl@gmx.net>
+
+         * toplev.cc (Foctave_config_info): Add field "mac".
+
+2007-10-11  Thomas Treichl  <Thomas.Treichl@gmx.net>
+
+	* miscellaneous/ismac.m: New function.
+	* miscellaneous/Makefile.in (SOURCES): Add it to the list.
+	* miscellaneous/ispc.m, miscellaneous/isunix.m: Doc fix.
+
 2007-10-11  Arno Onken  <asnelt@asnelt.org>
 
 	* statistics/distributions/hygernd.m: Allow size to be specified
@@ -90,7 +100,7 @@
 
 2007-10-09:  Kim Hansen  <kimhanse@gmail.com>
 
-        * general/repmat.m: Handle sparse input.  Add tests.
+	* general/repmat.m: Handle sparse input.  Add tests.
 
 2007-10-09  John W. Eaton  <jwe@octave.org>
 
@@ -128,7 +138,7 @@
 
 2007-10-06  Bill Denney  <wsloand@gmail.com>
 
-        * general/__splinen__.m, general/isscalar.m, general/rat.m,
+	* general/__splinen__.m, general/isscalar.m, general/rat.m,
 	strings/dec2base.m: Use numel(x) instead of prod(size(x)).
 
 2007-10-06  Francesco Potorti`  <Potorti@isti.cnr.it>
@@ -196,7 +206,7 @@
 
 2007-10-01  David Bateman  <dbateman@free.fr>
 
-        * linear-algebra/norm.m: Inline the isvector(x) calculation for
+	* linear-algebra/norm.m: Inline the isvector(x) calculation for
 	speed with small vectors.
 	* pkg/pkg.m (archprefix): Set using octave_config_info("libexecdir") 
 	rather than OCTAVE_HOME().
@@ -298,20 +308,20 @@
 
 2007-09-06  David Bateman  <dbateman@free.fr>
 
-        * general/celldisp.m: New function.
-        * general/Makefile.in (SOURCES): Add celldisp.m.
-        * miscellaneous/swapbytes.m: New function.
-        * miscellaneous/gzip.m: New function.
-        * miscellaneous/Makefile.in (SOURCES): Add swapbytes.m and gzip.m.
+	* general/celldisp.m: New function.
+	* general/Makefile.in (SOURCES): Add celldisp.m.
+	* miscellaneous/swapbytes.m: New function.
+	* miscellaneous/gzip.m: New function.
+	* miscellaneous/Makefile.in (SOURCES): Add swapbytes.m and gzip.m.
 
 2007-09-05  David Bateman  <dbateman@free.fr>
 
-        * general/structfun.m: New function.
-        * general/Makefile.in (SOURCES): Add it to sources.
-        * miscellaneous/run.m: New function.
-        * miscellaneous/Makefile.in (SOURCES): Add it to sources.
-        * statistics/base/mode.m: New function.
-        * statistics/base//Makefile.in (SOURCES): Add it to sources.
+	* general/structfun.m: New function.
+	* general/Makefile.in (SOURCES): Add it to sources.
+	* miscellaneous/run.m: New function.
+	* miscellaneous/Makefile.in (SOURCES): Add it to sources.
+	* statistics/base/mode.m: New function.
+	* statistics/base//Makefile.in (SOURCES): Add it to sources.
 
 2007-09-05  John W. Eaton  <jwe@octave.org>
 
@@ -366,11 +376,11 @@
 
 2007-08-31  Søren Hauberg  <hauberg@gmail.com>
 
-        * polynomial/polygcd.m: Better layout of example.
-        * polynomial/compan.m: Remove unnecessary check.
-        * polynomial/roots.m: Added example to help text.
-        * polynomial/polyderiv.m: Change 'polyder' to 'polyderiv' in help text.
-        * polynomial/poly.m: Added example to help text.
+	* polynomial/polygcd.m: Better layout of example.
+	* polynomial/compan.m: Remove unnecessary check.
+	* polynomial/roots.m: Added example to help text.
+	* polynomial/polyderiv.m: Change 'polyder' to 'polyderiv' in help text.
+	* polynomial/poly.m: Added example to help text.
 
 2007-08-30  John W. Eaton  <jwe@octave.org>
 
@@ -404,16 +414,16 @@
 
 2007-08-24  David Bateman  <dbateman@free.fr>
 
-        * geometry/convhull.m, geometry/delaunay.m, geometry/delaunay3.m, 
+	* geometry/convhull.m, geometry/delaunay.m, geometry/delaunay3.m, 
         geometry/griddata.m, geometry/voronoi.m, geometry/voronoin.m: New 
         functions ported from octave-forge.
-        * geometry/delaunayn.m, geometry/dsearch.m, geometry/dsearchn.m,
+	* geometry/delaunayn.m, geometry/dsearch.m, geometry/dsearchn.m,
         geometry/griddata3.m, geometry/griddatan.m, geometry/trimesh.m, 
         geometry/triplot.m, geometry/tsearchn.m:
         New functions.
-        * geometry/voronoi.m: Remove duplicate edges from Voronoi diagram.
-        * geometry/Makefile.in (SOURCES): Add functions above.
-        * configure.in (AC_CONFIG_FILES): Add new file geometry/Makefile.
+	* geometry/voronoi.m: Remove duplicate edges from Voronoi diagram.
+	* geometry/Makefile.in (SOURCES): Add functions above.
+	* configure.in (AC_CONFIG_FILES): Add new file geometry/Makefile.
         
 2007-08-23  John W. Eaton  <jwe@octave.org>
 
--- a/scripts/miscellaneous/Makefile.in	Thu Oct 11 17:27:28 2007 +0000
+++ b/scripts/miscellaneous/Makefile.in	Thu Oct 11 17:50:34 2007 +0000
@@ -24,7 +24,7 @@
   compare_versions.m computer.m copyfile.m cputime.m \
   delete.m dir.m doc.m dos.m dump_prefs.m \
   fileattrib.m fileparts.m flops.m fullfile.m getfield.m gunzip.m \
-  gzip.m inputname.m ispc.m isunix.m license.m list_primes.m ls.m \
+  gzip.m inputname.m ismac.m ispc.m isunix.m license.m list_primes.m ls.m \
   ls_command.m menu.m mex.m mexext.m mkoctfile.m movefile.m \
   news.m orderfields.m pack.m paren.m parseparams.m \
   run.m semicolon.m setfield.m single.m substruct.m swapbytes.m tar.m \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/miscellaneous/ismac.m	Thu Oct 11 17:50:34 2007 +0000
@@ -0,0 +1,35 @@
+## Copyright (C) 2007 Thomas Treichl
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, write to the Free
+## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} ismac ()
+## Return 1 if Octave is running on a Mac OS X system and 0 otherwise.
+## @seealso{ispc, isunix}
+## @end deftypefn
+
+function retval = ismac ()
+
+  if (nargin == 0)
+    retval = octave_config_info ("mac");
+  else
+    print_usage ();
+  endif
+
+endfunction
+
--- a/scripts/miscellaneous/ispc.m	Thu Oct 11 17:27:28 2007 +0000
+++ b/scripts/miscellaneous/ispc.m	Thu Oct 11 17:50:34 2007 +0000
@@ -20,6 +20,7 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} ispc ()
 ## Return 1 if Octave is running on a Windows system and 0 otherwise.
+## @seealso{ismac, isunix}
 ## @end deftypefn
 
 function retval = ispc ()
--- a/scripts/miscellaneous/isunix.m	Thu Oct 11 17:27:28 2007 +0000
+++ b/scripts/miscellaneous/isunix.m	Thu Oct 11 17:50:34 2007 +0000
@@ -20,6 +20,7 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} isunix ()
 ## Return 1 if Octave is running on a Unix-like system and 0 otherwise.
+## @seealso{ismac, ispc}
 ## @end deftypefn
 
 function retval = isunix ()
--- a/src/toplev.cc	Thu Oct 11 17:27:28 2007 +0000
+++ b/src/toplev.cc	Thu Oct 11 17:50:34 2007 +0000
@@ -921,6 +921,7 @@
 	}
 
       bool unix_system = true;
+      bool macos_system = false;
       bool windows_system = false;
 
 #if defined (WIN32)
@@ -930,7 +931,12 @@
 #endif
 #endif
 
+#if defined (__APPLE__) && defined (__MACH__)
+      mac_system = true;
+#endif
+
       m.assign ("unix", octave_value (unix_system));
+      m.assign ("mac", octave_value (mac_system));
       m.assign ("windows", octave_value (windows_system));
 
       initialized = true;