Mercurial > octave
changeset 29417:a6ab7069a87c
Use matching format string for Fortran integers.
* oct-conf-post.in.h: Define OCTAVE_F77_INT_TYPE_FORMAT with macro for Fortran
integer formating.
* libinterp/corefcn/__pchip_deriv__.cc (F__pchip_deriv__),
liboctave/numeric/DASSL.cc (DASSL::do_integrate),
liboctave/numeric/gsvd.cc (gsvd<T>::gsvd): Use new macro in formatting
strings.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 09 Mar 2021 21:05:54 +0100 |
parents | 3f45f5b6fa7f |
children | 9245ae55b6bd |
files | libinterp/corefcn/__pchip_deriv__.cc liboctave/numeric/DASSL.cc liboctave/numeric/gsvd.cc oct-conf-post.in.h |
diffstat | 4 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/__pchip_deriv__.cc Tue Mar 09 20:15:27 2021 +0100 +++ b/libinterp/corefcn/__pchip_deriv__.cc Tue Mar 09 21:05:54 2021 +0100 @@ -85,7 +85,8 @@ k++; if (ierr < 0) - error ("__pchip_deriv__: PCHIM failed with ierr = %i", ierr); + error ("__pchip_deriv__: PCHIM failed with ierr = %" + OCTAVE_F77_INT_TYPE_FORMAT, ierr); } retval = dmat; @@ -122,7 +123,8 @@ k++; if (ierr < 0) - error ("__pchip_deriv__: DPCHIM failed with ierr = %i", ierr); + error ("__pchip_deriv__: DPCHIM failed with ierr = %" + OCTAVE_F77_INT_TYPE_FORMAT, ierr); } retval = dmat;
--- a/liboctave/numeric/DASSL.cc Tue Mar 09 20:15:27 2021 +0100 +++ b/liboctave/numeric/DASSL.cc Tue Mar 09 21:05:54 2021 +0100 @@ -232,7 +232,8 @@ else { (*current_liboctave_error_handler) - ("dassl: invalid value for maximum order: %d", maxord); + ("dassl: invalid value for maximum order: %" + OCTAVE_F77_INT_TYPE_FORMAT, maxord); integration_error = true; return retval; }
--- a/liboctave/numeric/gsvd.cc Tue Mar 09 20:15:27 2021 +0100 +++ b/liboctave/numeric/gsvd.cc Tue Mar 09 21:05:54 2021 +0100 @@ -585,8 +585,9 @@ info); if (info < 0) - (*current_liboctave_error_handler) ("*ggsvd.f: argument %d illegal", - -info); + (*current_liboctave_error_handler) + ("*ggsvd.f: argument %" OCTAVE_F77_INT_TYPE_FORMAT " illegal", + -info); else { if (info > 0)
--- a/oct-conf-post.in.h Tue Mar 09 20:15:27 2021 +0100 +++ b/oct-conf-post.in.h Tue Mar 09 21:05:54 2021 +0100 @@ -258,6 +258,12 @@ typedef OCTAVE_F77_INT_TYPE octave_f77_int_type; +#if OCTAVE_SIZEOF_F77_INT_TYPE == 8 +# define OCTAVE_F77_INT_TYPE_FORMAT PRId64 +#else +# define OCTAVE_F77_INT_TYPE_FORMAT PRId32 +#endif + #define OCTAVE_HAVE_F77_INT_TYPE 1 #if defined (__cplusplus) && ! defined (OCTAVE_THREAD_LOCAL)