# HG changeset patch # User jwe # Date 1192125034 0 # Node ID f7d2f54008f5efa138583bb27554d556c91f9010 # Parent b353c370a315362027e9629103f324916e517616 [project @ 2007-10-11 17:50:34 by jwe] diff -r b353c370a315 -r f7d2f54008f5 scripts/ChangeLog --- 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 + + * toplev.cc (Foctave_config_info): Add field "mac". + +2007-10-11 Thomas Treichl + + * 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 * statistics/distributions/hygernd.m: Allow size to be specified @@ -90,7 +100,7 @@ 2007-10-09: Kim Hansen - * general/repmat.m: Handle sparse input. Add tests. + * general/repmat.m: Handle sparse input. Add tests. 2007-10-09 John W. Eaton @@ -128,7 +138,7 @@ 2007-10-06 Bill Denney - * 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` @@ -196,7 +206,7 @@ 2007-10-01 David Bateman - * 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 - * 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 - * 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 @@ -366,11 +376,11 @@ 2007-08-31 Søren Hauberg - * 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 @@ -404,16 +414,16 @@ 2007-08-24 David Bateman - * 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 diff -r b353c370a315 -r f7d2f54008f5 scripts/miscellaneous/Makefile.in --- 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 \ diff -r b353c370a315 -r f7d2f54008f5 scripts/miscellaneous/ismac.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 + diff -r b353c370a315 -r f7d2f54008f5 scripts/miscellaneous/ispc.m --- 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 () diff -r b353c370a315 -r f7d2f54008f5 scripts/miscellaneous/isunix.m --- 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 () diff -r b353c370a315 -r f7d2f54008f5 src/toplev.cc --- 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;