diff -Nru octave-communications-1.2.3/debian/changelog octave-communications-1.2.4/debian/changelog --- octave-communications-1.2.3/debian/changelog 2021-08-15 18:50:43.000000000 +0000 +++ octave-communications-1.2.4/debian/changelog 2022-01-24 04:31:44.000000000 +0000 @@ -1,3 +1,18 @@ +octave-communications (1.2.4-1) unstable; urgency=medium + + [ Rafael Laboissière ] + * New upstream version 1.2.4 + * d/copyright: + + Reflect upstream changes + + Accentuate my family name + * d/control: Bump Standards-Version to 4.6.0 (no changes needed) + + [ Sébastien Villemot ] + * Drop extra dependency on octave-statistics. + The underlying bug has been fixed in upstream version 1.2.2. + + -- Rafael Laboissière Mon, 24 Jan 2022 01:31:44 -0300 + octave-communications (1.2.3-2) unstable; urgency=medium * Upload to unstable diff -Nru octave-communications-1.2.3/debian/control octave-communications-1.2.4/debian/control --- octave-communications-1.2.3/debian/control 2021-08-15 12:37:04.000000000 +0000 +++ octave-communications-1.2.4/debian/control 2022-01-24 04:31:44.000000000 +0000 @@ -9,12 +9,11 @@ ghostscript, gnuplot-nox, octave-signal, - octave-statistics, pkg-config, texlive, texlive-plain-generic, epstool -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Vcs-Browser: https://salsa.debian.org/pkg-octave-team/octave-communications Vcs-Git: https://salsa.debian.org/pkg-octave-team/octave-communications.git Homepage: https://octave.sourceforge.io/communications/ diff -Nru octave-communications-1.2.3/debian/copyright octave-communications-1.2.4/debian/copyright --- octave-communications-1.2.3/debian/copyright 2021-08-15 12:37:04.000000000 +0000 +++ octave-communications-1.2.4/debian/copyright 2022-01-24 04:31:44.000000000 +0000 @@ -18,7 +18,7 @@ 2011 Ferran Mesas Garcia 2012 Tony Richardson 2012 Mike Miller - 2019 Nir Krakauer + 2019, 2022 Nir Krakauer 2020 Pedro Rodriguez Torija 2020 Nicholas Jankowski 2021 The Octave Project Developers @@ -42,7 +42,7 @@ Files: debian/* Copyright: 2008 Ólafur Jens Sigurðsson 2008-2011 Thomas Weber - 2008, 2009, 2012, 2019-2021 Rafael Laboissiere + 2008, 2009, 2012, 2019-2022 Rafael Laboissière 2012 Sébastien Villemot License: GPL-3+ diff -Nru octave-communications-1.2.3/debian/.gitignore octave-communications-1.2.4/debian/.gitignore --- octave-communications-1.2.3/debian/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ octave-communications-1.2.4/debian/.gitignore 2022-01-24 04:31:44.000000000 +0000 @@ -0,0 +1,6 @@ +/files +/octave-communications*.substvars +/octave-communications/ +/octave-communications-common/ +/.debhelper/ +/debhelper-build-stamp diff -Nru octave-communications-1.2.3/debian/patches/depends-on-statistics.patch octave-communications-1.2.4/debian/patches/depends-on-statistics.patch --- octave-communications-1.2.3/debian/patches/depends-on-statistics.patch 2021-08-15 12:37:04.000000000 +0000 +++ octave-communications-1.2.4/debian/patches/depends-on-statistics.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -Description: communication now depends on the statistics package - qfuncinv() uses norminv(). - This function is no longer in Octave core since 4.4, and has moved to - the statistics package. -Author: Sébastien Villemot -Bug: https://savannah.gnu.org/bugs/index.php?54156 -Reviewed-by: Rafael Laboissière -Last-Update: 2020-01-06 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/DESCRIPTION -+++ b/DESCRIPTION -@@ -5,7 +5,7 @@ Author: various authors - Maintainer: Nir Krakauer - Title: Communications - Description: Digital Communications, Error Correcting Codes (Channel Code), Source Code functions, Modulation and Galois Fields --Depends: octave (>= 4.4), signal (>= 1.1.3) -+Depends: octave (>= 4.4), signal (>= 1.1.3), statistics - Autoload: no - License: GPLv3+ - Url: http://octave.sf.net diff -Nru octave-communications-1.2.3/debian/patches/series octave-communications-1.2.4/debian/patches/series --- octave-communications-1.2.3/debian/patches/series 2021-08-15 12:37:04.000000000 +0000 +++ octave-communications-1.2.4/debian/patches/series 2022-01-24 04:31:44.000000000 +0000 @@ -1,3 +1,2 @@ info-dir-section.patch random-seed-for-pdf-doc.patch -depends-on-statistics.patch diff -Nru octave-communications-1.2.3/DESCRIPTION octave-communications-1.2.4/DESCRIPTION --- octave-communications-1.2.3/DESCRIPTION 2021-04-02 18:45:03.000000000 +0000 +++ octave-communications-1.2.4/DESCRIPTION 2022-01-19 18:10:18.000000000 +0000 @@ -1,6 +1,6 @@ Name: communications -Version: 1.2.3 -Date: 2021-04-02 +Version: 1.2.4 +Date: 2022-01-19 Author: various authors Maintainer: Nir Krakauer Title: Communications diff -Nru octave-communications-1.2.3/NEWS octave-communications-1.2.4/NEWS --- octave-communications-1.2.3/NEWS 2021-04-02 18:45:03.000000000 +0000 +++ octave-communications-1.2.4/NEWS 2022-01-19 18:10:18.000000000 +0000 @@ -2,6 +2,10 @@ Summary of important user-visible changes for communications (next release): ------------------------------------------------------------------ +Summary of important user-visible changes for communications 1.2.4: +------------------------------------------------------------------ + + ** The communications package is now compatible with Octave 7 (bug #61566). Summary of important user-visible changes for communications 1.2.3: ------------------------------------------------------------------ diff -Nru octave-communications-1.2.3/src/aclocal.m4 octave-communications-1.2.4/src/aclocal.m4 --- octave-communications-1.2.3/src/aclocal.m4 2021-04-02 18:46:20.154320274 +0000 +++ octave-communications-1.2.4/src/aclocal.m4 2022-01-19 18:11:50.192554067 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.4 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12,9 +12,9 @@ # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29.1) -dnl +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 12 (pkg-config-0.29.2) + dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl @@ -55,7 +55,7 @@ dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.1]) +[m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -156,7 +156,7 @@ AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $1]) +AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -166,11 +166,11 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -187,7 +187,7 @@ _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full diff -Nru octave-communications-1.2.3/src/config.h.in octave-communications-1.2.4/src/config.h.in --- octave-communications-1.2.3/src/config.h.in 2021-04-02 18:46:20.962297981 +0000 +++ octave-communications-1.2.4/src/config.h.in 2022-01-19 18:11:50.660549885 +0000 @@ -26,6 +26,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OCTAVE_ERRWARN_H +/* Define if first catop function argument is const-qualified */ +#undef HAVE_OCTAVE_FIRST_CATOP_ARG_CONST + /* Define to 1 if you have the header file. */ #undef HAVE_OCTAVE_GRIPES_H diff -Nru octave-communications-1.2.3/src/configure octave-communications-1.2.4/src/configure --- octave-communications-1.2.3/src/configure 2021-04-02 18:46:20.562309016 +0000 +++ octave-communications-1.2.4/src/configure 2022-01-19 18:11:50.428551958 +0000 @@ -3774,8 +3774,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5" >&5 -$as_echo_n "checking for HDF5... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hdf5" >&5 +$as_echo_n "checking for hdf5... " >&6; } if test -n "$HDF5_CFLAGS"; then pkg_cv_HDF5_CFLAGS="$HDF5_CFLAGS" @@ -3815,7 +3815,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -3834,7 +3834,7 @@ elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -4083,6 +4083,63 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether first catop function argument is const-qualified" >&5 +$as_echo_n "checking whether first catop function argument is const-qualified... " >&6; } +if ${comm_cv_octave_first_catop_fcn_arg_const_qualified+:} false; then : + $as_echo_n "(cached) " >&6 +else + comm_save_CPPFLAGS=$CPPFLAGS + comm_save_CXXFLAGS=$CXXFLAGS + CPPFLAGS="$CPPFLAGS $HDF5_CFLAGS" + CXXFLAGS="$CXXFLAGS $comm_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + +int +main () +{ + + octave_value foobar_fcn (const octave_base_value&, + const octave_base_value&, + const Array& ra_idx); + octave::type_info::cat_op_fcn fcn = foobar_fcn; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + comm_cv_octave_first_catop_fcn_arg_const_qualified=yes +else + comm_cv_octave_first_catop_fcn_arg_const_qualified=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + CPPFLAGS=$comm_save_CPPFLAGS + CXXFLAGS=$comm_save_CXXFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $comm_cv_octave_first_catop_fcn_arg_const_qualified" >&5 +$as_echo "$comm_cv_octave_first_catop_fcn_arg_const_qualified" >&6; } +if test $comm_cv_octave_first_catop_fcn_arg_const_qualified = yes; then + +$as_echo "#define HAVE_OCTAVE_FIRST_CATOP_ARG_CONST 1" >>confdefs.h + +fi + ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF diff -Nru octave-communications-1.2.3/src/configure.ac octave-communications-1.2.4/src/configure.ac --- octave-communications-1.2.3/src/configure.ac 2021-04-02 18:45:03.000000000 +0000 +++ octave-communications-1.2.4/src/configure.ac 2022-01-19 18:10:18.000000000 +0000 @@ -252,5 +252,30 @@ AC_DEFINE([HAVE_OCTAVE_BASE_VALUE_PRINT_CONST],[1],[Define if octave_base_value::print is const-qualified]) fi +AC_CACHE_CHECK([whether first catop function argument is const-qualified], + [comm_cv_octave_first_catop_fcn_arg_const_qualified], + [comm_save_CPPFLAGS=$CPPFLAGS + comm_save_CXXFLAGS=$CXXFLAGS + CPPFLAGS="$CPPFLAGS $HDF5_CFLAGS" + CXXFLAGS="$CXXFLAGS $comm_CXXFLAGS" + AC_LANG_PUSH(C++) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + ]], [[ + octave_value foobar_fcn (const octave_base_value&, + const octave_base_value&, + const Array& ra_idx); + octave::type_info::cat_op_fcn fcn = foobar_fcn; + ]])], + [comm_cv_octave_first_catop_fcn_arg_const_qualified=yes], + [comm_cv_octave_first_catop_fcn_arg_const_qualified=no]) + AC_LANG_POP(C++) + CPPFLAGS=$comm_save_CPPFLAGS + CXXFLAGS=$comm_save_CXXFLAGS]) +if test $comm_cv_octave_first_catop_fcn_arg_const_qualified = yes; then + AC_DEFINE([HAVE_OCTAVE_FIRST_CATOP_ARG_CONST],[1],[Define if first catop function argument is const-qualified]) +fi + AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff -Nru octave-communications-1.2.3/src/galois-ops.h octave-communications-1.2.4/src/galois-ops.h --- octave-communications-1.2.3/src/galois-ops.h 2021-04-02 18:45:03.000000000 +0000 +++ octave-communications-1.2.4/src/galois-ops.h 2022-01-19 18:10:18.000000000 +0000 @@ -40,11 +40,19 @@ #endif #if ! defined (CATOPDECL) -# define CATOPDECL(name, a1, a2) \ +# if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST) +# define CATOPDECL(name, a1, a2) \ + static octave_value \ + CONCAT2(oct_catop_, name) (const octave_base_value& a1, \ + const octave_base_value& a2, \ + const Array& ra_idx) +# else +# define CATOPDECL(name, a1, a2) \ static octave_value \ CONCAT2(oct_catop_, name) (octave_base_value& a1, \ const octave_base_value& a2, \ const Array& ra_idx) +# endif #endif // Override the operator and function definition defines from Octave @@ -124,7 +132,24 @@ return new octave_galois (f (v1.t1 ## _value (), v2.matrix_value ())); \ } -#define DEFCATOP_G_FN(name, t1, t2, f) \ +#if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST) +# define DEFCATOP_G_FN(name, t1, t2, f) \ + CATOPDECL (name, a1, a2) \ + { \ + CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \ + return new octave_galois (f (v1.t1 ## _value (), v2.t2 ## _value (), \ + ra_idx)); \ + } + +#define DEFCATOP_G_METHOD(name, t1, t2, f) \ + CATOPDECL (name, a1, a2) \ + { \ + CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \ + return new octave_galois (v1.t1 ## _value (). f (v2.t2 ## _value (), \ + ra_idx)); \ + } +#else +# define DEFCATOP_G_FN(name, t1, t2, f) \ CATOPDECL (name, a1, a2) \ { \ CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \ @@ -139,6 +164,7 @@ return new octave_galois (v1.t1 ## _value (). f (v2.t2 ## _value (), \ ra_idx)); \ } +#endif #define INSTALL_G_CATOP(t1, t2, f) INSTALL_CATOP (t1, t2, f) diff -Nru octave-communications-1.2.3/src/genqamdemod.cc octave-communications-1.2.4/src/genqamdemod.cc --- octave-communications-1.2.3/src/genqamdemod.cc 2021-04-02 18:45:03.000000000 +0000 +++ octave-communications-1.2.4/src/genqamdemod.cc 2022-01-19 18:10:18.000000000 +0000 @@ -79,28 +79,23 @@ { // Complex-valued input & constellation ComplexMatrix x (args(0).complex_matrix_value ()); ComplexColumnVector constellation (args(1).complex_vector_value ()); - if (!error_state) + for (i = 0;i < nr1;i++) { - for (i = 0;i < nr1;i++) + for (j = 0;j < nc1;j++) { - for (j = 0;j < nc1;j++) + tmp1 = abs (x(i,j)-constellation(0)); + y(i,j) = 0; + for (m = 1;m < M;m++) { - tmp1 = abs (x(i,j)-constellation(0)); - y(i,j) = 0; - for (m = 1;m < M;m++) + tmp2 = abs (x(i,j)-constellation(m)); + if (tmp2 < tmp1) { - tmp2 = abs (x(i,j)-constellation(m)); - if (tmp2 < tmp1) - { - y(i,j) = m; - tmp1 = tmp2; - } + y(i,j) = m; + tmp1 = tmp2; } } } } - else - print_usage (); } else { diff -Nru octave-communications-1.2.3/src/gf.cc octave-communications-1.2.4/src/gf.cc --- octave-communications-1.2.3/src/gf.cc 2021-04-02 18:45:03.000000000 +0000 +++ octave-communications-1.2.4/src/gf.cc 2022-01-19 18:10:18.000000000 +0000 @@ -180,55 +180,50 @@ galois m = ((const octave_galois&) a.get_rep ()).galois_value (); int k = b.nint_value (); - if (! error_state) - { - int nr = m.rows (); - int nc = m.columns (); + int nr = m.rows (); + int nc = m.columns (); - if (nr == 0 || nc == 0) - retval = new octave_galois (m); - else if (nr == 1 || nc == 1) + if (nr == 0 || nc == 0) + retval = new octave_galois (m); + else if (nr == 1 || nc == 1) + { + int roff = 0; + int coff = 0; + if (k > 0) { - int roff = 0; - int coff = 0; - if (k > 0) - { - roff = 0; - coff = k; - } - else if (k < 0) - { - k = -k; - roff = k; - coff = 0; - } + roff = 0; + coff = k; + } + else if (k < 0) + { + k = -k; + roff = k; + coff = 0; + } - if (nr == 1) - { - int n = nc + k; - galois r (n, n, 0, m.m (), m.primpoly ()); - for (int i = 0; i < nc; i++) - r (i+roff, i+coff) = m (0, i); - retval = new octave_galois (r); - } - else - { - int n = nr + k; - galois r (n, n, 0, m.m (), m.primpoly ()); - for (int i = 0; i < nr; i++) - r (i+roff, i+coff) = m (i, 0); - retval = new octave_galois (r); - } + if (nr == 1) + { + int n = nc + k; + galois r (n, n, 0, m.m (), m.primpoly ()); + for (int i = 0; i < nc; i++) + r (i+roff, i+coff) = m (0, i); + retval = new octave_galois (r); } else { - galois r = m.diag (k); - if (r.numel () > 0) - retval = new octave_galois (r); + int n = nr + k; + galois r (n, n, 0, m.m (), m.primpoly ()); + for (int i = 0; i < nr; i++) + r (i+roff, i+coff) = m (i, 0); + retval = new octave_galois (r); } } else - OCTAVE__ERR_WRONG_TYPE_ARG ("gdiag", a); + { + galois r = m.diag (k); + if (r.numel () > 0) + retval = new octave_galois (r); + } } return retval; } @@ -390,27 +385,23 @@ \ int dim = (nargin == 1 ? -1 : args(1).int_value (true) - 1); \ \ - if (! error_state) \ + if (dim <= 1 && dim >= -1) \ { \ - if (dim <= 1 && dim >= -1) \ + if (galois_type_loaded && (arg.type_id () == \ + octave_galois::static_type_id ())) \ { \ - if (galois_type_loaded && (arg.type_id () == \ - octave_galois::static_type_id ())) \ - { \ - galois tmp = ((const octave_galois&)arg.get_rep ()).galois_value (); \ + galois tmp = ((const octave_galois&)arg.get_rep ()).galois_value (); \ \ - if (! error_state) \ - retval(0) = new octave_galois (tmp.FCN (dim)); \ - } \ - else \ - { \ - OCTAVE__ERR_WRONG_TYPE_ARG (#FCN, arg); \ - return retval; \ - } \ + retval(0) = new octave_galois (tmp.FCN (dim)); \ } \ else \ - error (#FCN ": invalid dimension argument = %d", dim + 1); \ + { \ + OCTAVE__ERR_WRONG_TYPE_ARG (#FCN, arg); \ + return retval; \ + } \ } \ + else \ + error (#FCN ": invalid dimension argument = %d", dim + 1); \ } \ else \ print_usage (); \ @@ -1017,32 +1008,29 @@ return retval; } - if (! error_state) - { - galoisLU fact (m); + galoisLU fact (m); - switch (nargout) - { - case 0: - case 1: - case 2: - { - // While we don't have sparse galois matrices converting the - // permutation matrix to a full matrix is the best we can do. - Matrix P = Matrix (fact.P ()); - galois L = P.transpose () * fact.L (); - retval(1) = new octave_galois (fact.U ()); - retval(0) = new octave_galois (L); - } - break; - - case 3: - default: - retval(2) = fact.P (); - retval(1) = new octave_galois (fact.U ()); - retval(0) = new octave_galois (fact.L ()); - break; - } + switch (nargout) + { + case 0: + case 1: + case 2: + { + // While we don't have sparse galois matrices converting the + // permutation matrix to a full matrix is the best we can do. + Matrix P = Matrix (fact.P ()); + galois L = P.transpose () * fact.L (); + retval(1) = new octave_galois (fact.U ()); + retval(0) = new octave_galois (L); + } + break; + + case 3: + default: + retval(2) = fact.P (); + retval(1) = new octave_galois (fact.U ()); + retval(0) = new octave_galois (fact.L ()); + break; } return retval; @@ -1104,21 +1092,18 @@ return retval; } - if (! error_state) - { - int info; - double rcond = 0.0; + int info; + double rcond = 0.0; - galois result = m.inverse (info, 1); + galois result = m.inverse (info, 1); - if (nargout > 1) - retval(1) = rcond; + if (nargout > 1) + retval(1) = rcond; - retval(0) = new octave_galois (result); + retval(0) = new octave_galois (result); - if (nargout < 2 && info == -1) - warning ("inverse: matrix singular to machine precision, rcond = %g", rcond); - } + if (nargout < 2 && info == -1) + warning ("inverse: matrix singular to machine precision, rcond = %g", rcond); return retval; } diff -Nru octave-communications-1.2.3/src/op-gm-s.cc octave-communications-1.2.4/src/op-gm-s.cc --- octave-communications-1.2.3/src/op-gm-s.cc 2021-04-02 18:45:03.000000000 +0000 +++ octave-communications-1.2.4/src/op-gm-s.cc 2022-01-19 18:10:18.000000000 +0000 @@ -68,7 +68,11 @@ DEFCATOP (gm_s, galois, scalar) { +#if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST) + CAST_BINOP_ARGS (const octave_galois&, const octave_scalar&); +#else CAST_BINOP_ARGS (octave_galois&, const octave_scalar&); +#endif return new octave_galois (v1.galois_value (). concat (v2.matrix_value (), ra_idx)); } diff -Nru octave-communications-1.2.3/src/op-s-gm.cc octave-communications-1.2.4/src/op-s-gm.cc --- octave-communications-1.2.3/src/op-s-gm.cc 2021-04-02 18:45:03.000000000 +0000 +++ octave-communications-1.2.4/src/op-s-gm.cc 2022-01-19 18:10:18.000000000 +0000 @@ -81,7 +81,11 @@ DEFCATOP (s_gm, scalar, galois) { +#if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST) + CAST_BINOP_ARGS (const octave_scalar&, const octave_galois&); +#else CAST_BINOP_ARGS (octave_scalar&, const octave_galois&); +#endif return new octave_galois (concat (v1.matrix_value (), v2.galois_value (), ra_idx)); } diff -Nru octave-communications-1.2.3/src/ov-galois.cc octave-communications-1.2.4/src/ov-galois.cc --- octave-communications-1.2.3/src/ov-galois.cc 2021-04-02 18:45:03.000000000 +0000 +++ octave-communications-1.2.4/src/ov-galois.cc 2022-01-19 18:10:18.000000000 +0000 @@ -208,8 +208,7 @@ panic_impossible (); } - if (! error_state) - retval = retval.next_subsref (type, idx, skip); + retval = retval.next_subsref (type, idx, skip); return retval; } @@ -427,14 +426,9 @@ case 2: { idx_vector i = idx (0).index_vector (); + idx_vector j = idx (1).index_vector (); - if (! error_state) - { - idx_vector j = idx (1).index_vector (); - - if (! error_state) - gval.assign (i, j, rhs); - } + gval.assign (i, j, rhs); } break; @@ -442,8 +436,7 @@ { idx_vector i = idx (0).index_vector (); - if (! error_state) - gval.assign (i, rhs); + gval.assign (i, rhs); } break; @@ -597,7 +590,7 @@ Matrix m (dv(0), dv(1)); double *re = m.fortran_vec (); read_doubles (is, re, X_CAST (save_type, tmp), dv.numel (), swap, fmt); - if (error_state || ! is) + if (! is) return false; gval = galois (m, mord, prim);