Mercurial > hg > octave-jordi
changeset 19345:112fc552ea22
maint: Periodic merge of gui-release to default.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 22 Nov 2014 20:20:13 -0800 |
parents | eb90f921bbc0 (current diff) 2a790328fc50 (diff) |
children | ef3d0cf7aed5 |
files | configure.ac libinterp/corefcn/error.cc libinterp/corefcn/oct-stream.cc test/io.tst |
diffstat | 5 files changed, 32 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -926,8 +926,7 @@ [FFTW3F library not found. The slower FFTPACK library will be used instead.], [fftw3.h], [fftwf_plan_dft_1d]) -## Check for the multithreaded FFTW library. -## Fallback to singlethreaded if not found or disabled +## Check command line for the option to disable multi-threaded FFTW build_fftw_threads=yes AC_ARG_ENABLE([fftw-threads], [AS_HELP_STRING([--disable-fftw-threads], @@ -937,19 +936,25 @@ fi], []) -if test $build_fftw_threads = yes; then - OCTAVE_CHECK_FFTW_THREADS(fftw3, fftw_plan_with_nthreads) - OCTAVE_CHECK_FFTW_THREADS(fftw3f, fftwf_plan_with_nthreads) -fi - -## Octave is currently unable to use FFTW unless both float -## and double versions are available. +## Octave is currently unable to use FFTW unless +## both float and double versions are available. AM_CONDITIONAL([AMCOND_HAVE_FFTW], [test -n "$FFTW3_LIBS" && test -n "$FFTW3F_LIBS"]) if test -n "$FFTW3_LIBS" && test -n "$FFTW3F_LIBS"; then AC_DEFINE(HAVE_FFTW, 1, [Define if you have both FFTW3 and FFTW3F libraries.]) +else + ## --without-fftw3 given, or one of the FFTW3 libs not installed. + ## Don't check for FFTW threads as this is now pointless. + build_fftw_threads=no +fi + +## Check for the multithreaded FFTW library. +## Fallback to singlethreaded if not found or disabled +if test $build_fftw_threads = yes; then + OCTAVE_CHECK_FFTW_THREADS(fftw3, fftw_plan_with_nthreads) + OCTAVE_CHECK_FFTW_THREADS(fftw3f, fftwf_plan_with_nthreads) fi ## Subdirectory of liboctave/cruft to build if FFTW is not found.
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -1883,6 +1883,8 @@ (settings->value ("editor/show_indent_guides",false).toBool ()); _edit_area->setIndentationsUseTabs (settings->value ("editor/indent_uses_tabs",false).toBool ()); + _edit_area->setIndentationWidth + (settings->value ("editor/indent_width",2).toInt ()); _edit_area->setTabWidth (settings->value ("editor/tab_width",2).toInt ());
--- a/libinterp/corefcn/error.cc +++ b/libinterp/corefcn/error.cc @@ -1037,7 +1037,7 @@ control will return to the top level without evaluating any more\n\ commands. This is useful for aborting from functions or scripts.\n\ \n\ -If the error message does not end with a new line character, Octave will\n\ +If the error message does not end with a newline character, Octave will\n\ print a traceback of all the function calls leading to the error. For\n\ example, given the following function definitions:\n\ \n\ @@ -1065,10 +1065,10 @@ @end group\n\ @end example\n\ \n\ -If the error message ends in a new line character, Octave will print the\n\ +If the error message ends in a newline character, Octave will print the\n\ message but will not display any traceback messages as it returns\n\ control to the top level. For example, modifying the error message\n\ -in the previous example to end in a new line causes Octave to only print\n\ +in the previous example to end in a newline causes Octave to only print\n\ a single message:\n\ \n\ @example\n\ @@ -1101,7 +1101,7 @@ which will only stop execution if an error has been found.\n\ \n\ Implementation Note: For compatibility with @sc{matlab}, escape\n\ -sequences (e.g., @qcode{\"\\n\"} => newline) are processed in @var{template}\n\ +sequences (e.g., \"\\n\" => newline) are processed in @var{template}\n\ regardless of whether @var{template} has been defined within single quotes\n\ as long as there are two or more input arguments.\n\ Use a second backslash to stop interpolation of the escape sequence (e.g.,\n\ @@ -1279,7 +1279,7 @@ workspace.\n\ \n\ Implementation Note: For compatibility with @sc{matlab}, escape\n\ -sequences (e.g., @qcode{\"\\n\"} => newline) are processed in @var{template}\n\ +sequences (e.g., \"\\n\" => newline) are processed in @var{template}\n\ regardless of whether @var{template} has been defined within single quotes\n\ as long as there are two or more input arguments.\n\ Use a second backslash to stop interpolation of the escape sequence (e.g.,\n\
--- a/libinterp/corefcn/oct-stream.cc +++ b/libinterp/corefcn/oct-stream.cc @@ -3452,6 +3452,8 @@ { if (count % nr != 0) nc = count / nr + 1; + else + nc = count / nr; if (count < nr) nr = count;
--- a/test/io.tst +++ b/test/io.tst @@ -609,3 +609,12 @@ %! assert (data, [256, 1798; 770, 3083; 1284, 3597]); %! assert (count, 6); %! fclose (id); + +%!test +%! id = tmpfile (); +%! fwrite (id, "abcd"); +%! frewind (id); +%! [data, count] = fread (id, [2, 3], "char"); +%! assert (data, [97, 99; 98, 100]); +%! assert (count, 4); +%! fclose (id);