Mercurial > octave
changeset 23455:73ff72d3d603
maint: Eliminate <cfloat.h> header from libinterp files
* __contourc__.cc, __qp__.cc, data.cc, graphics.cc, load-save.cc, ls-hdf5.cc,
ls-mat-ascii.cc, ls-mat4.cc, ls-mat5.cc, ls-oct-binary.cc, ls-oct-text.h,
mappers.cc, mex.cc, pr-output.cc, sysdep.cc, variables.h, xnorm.cc, __glpk__.cc:
Remove "#include <cfloat>". Add "#include <limits>" if necessary. Remove
redundant #includes. Alphabetize #includes.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 28 Apr 2017 11:38:39 -0700 |
parents | 30b6eccd6708 |
children | a62ffdf1f432 |
files | libinterp/corefcn/__contourc__.cc libinterp/corefcn/__qp__.cc libinterp/corefcn/data.cc libinterp/corefcn/graphics.cc libinterp/corefcn/load-save.cc libinterp/corefcn/ls-hdf5.cc libinterp/corefcn/ls-mat-ascii.cc libinterp/corefcn/ls-mat4.cc libinterp/corefcn/ls-mat5.cc libinterp/corefcn/ls-oct-binary.cc libinterp/corefcn/ls-oct-text.h libinterp/corefcn/mappers.cc libinterp/corefcn/mex.cc libinterp/corefcn/pr-output.cc libinterp/corefcn/sysdep.cc libinterp/corefcn/variables.h libinterp/corefcn/xnorm.cc libinterp/dldfcn/__glpk__.cc |
diffstat | 18 files changed, 55 insertions(+), 103 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/__contourc__.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/__contourc__.cc Fri Apr 28 11:38:39 2017 -0700 @@ -36,13 +36,10 @@ # include "config.h" #endif -#include <cfloat> - -#include "quit.h" +#include <limits> #include "defun.h" -#include "error.h" -#include "ovl.h" +#include "ov.h" // FIXME: this looks like trouble... static Matrix this_contour;
--- a/libinterp/corefcn/__qp__.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/__qp__.cc Fri Apr 28 11:38:39 2017 -0700 @@ -24,7 +24,9 @@ # include "config.h" #endif -#include <cfloat> +#include <cmath> + +#include <limits> #include "chol.h" #include "svd.h"
--- a/libinterp/corefcn/data.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/data.cc Fri Apr 28 11:38:39 2017 -0700 @@ -27,21 +27,21 @@ # include "config.h" #endif -#include <sys/types.h> - -#include <cfloat> +#include <cstddef> +#include <cstdint> #include <ctime> +#include <algorithm> +#include <limits> #include <string> #include "lo-ieee.h" #include "lo-math.h" +#include "mx-base.h" #include "oct-base64.h" +#include "oct-binmap.h" #include "oct-time.h" -#include "str-vec.h" #include "quit.h" -#include "mx-base.h" -#include "oct-binmap.h" #include "Cell.h" #include "defun.h"
--- a/libinterp/corefcn/graphics.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/graphics.cc Fri Apr 28 11:38:39 2017 -0700 @@ -25,10 +25,13 @@ #endif #include <cctype> -#include <cfloat> +#include <cmath> +#include <cstdint> #include <cstdlib> #include <algorithm> +#include <iostream> +#include <limits> #include <list> #include <map> #include <set>
--- a/libinterp/corefcn/load-save.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/load-save.cc Fri Apr 28 11:38:39 2017 -0700 @@ -28,17 +28,17 @@ # include "config.h" #endif -#include <cfloat> #include <cstring> -#include <cctype> #include <fstream> #include <iomanip> #include <iostream> +#include <list> #include <sstream> #include <string> #include "byte-swap.h" +#include "dMatrix.h" #include "data-conv.h" #include "file-ops.h" #include "file-stat.h" @@ -70,7 +70,6 @@ #include "utils.h" #include "variables.h" #include "version.h" -#include "dMatrix.h" #include "ls-hdf5.h" #include "ls-mat-ascii.h"
--- a/libinterp/corefcn/ls-hdf5.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/ls-hdf5.cc Fri Apr 28 11:38:39 2017 -0700 @@ -28,11 +28,8 @@ #if defined (HAVE_HDF5) -#include <cfloat> -#include <cstring> #include <cctype> -#include <fstream> #include <iomanip> #include <iostream> #include <limits>
--- a/libinterp/corefcn/ls-mat-ascii.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/ls-mat-ascii.cc Fri Apr 28 11:38:39 2017 -0700 @@ -24,17 +24,15 @@ # include "config.h" #endif -#include <cfloat> -#include <cstring> #include <cctype> -#include <fstream> #include <iomanip> #include <iostream> #include <sstream> #include <string> #include "byte-swap.h" +#include "dMatrix.h" #include "data-conv.h" #include "file-ops.h" #include "glob-match.h" @@ -43,28 +41,24 @@ #include "oct-env.h" #include "oct-time.h" #include "quit.h" -#include "str-vec.h" #include "Cell.h" #include "defun.h" #include "error.h" -#include "errwarn.h" #include "interpreter.h" #include "lex.h" #include "load-save.h" #include "ls-ascii-helper.h" #include "ls-mat-ascii.h" -#include "ovl.h" #include "oct-map.h" #include "ov-cell.h" +#include "ov.h" #include "pager.h" #include "pt-exp.h" #include "sysdep.h" -#include "unwind-prot.h" #include "utils.h" #include "variables.h" #include "version.h" -#include "dMatrix.h" static std::string get_mat_data_input_line (std::istream& is)
--- a/libinterp/corefcn/ls-mat4.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/ls-mat4.cc Fri Apr 28 11:38:39 2017 -0700 @@ -24,36 +24,32 @@ # include "config.h" #endif -#include <cfloat> -#include <cstring> -#include <cctype> - -#include <fstream> #include <iomanip> #include <iostream> #include <string> -#include <vector> #include "byte-swap.h" +#include "dMatrix.h" +#include "dSparse.h" #include "data-conv.h" #include "file-ops.h" #include "glob-match.h" #include "lo-mappers.h" #include "mach-info.h" #include "oct-env.h" +#include "oct-locbuf.h" #include "oct-time.h" #include "quit.h" -#include "str-vec.h" -#include "oct-locbuf.h" +#include "ls-mat4.h" #include "Cell.h" #include "defun.h" #include "error.h" #include "errwarn.h" #include "load-save.h" -#include "ovl.h" #include "oct-map.h" #include "ov-cell.h" +#include "ovl.h" #include "pager.h" #include "pt-exp.h" #include "sysdep.h" @@ -61,10 +57,7 @@ #include "utils.h" #include "variables.h" #include "version.h" -#include "dMatrix.h" -#include "dSparse.h" -#include "ls-mat4.h" // Read LEN elements of data from IS in the format specified by // PRECISION, placing the result in DATA. If SWAP is TRUE, swap @@ -139,9 +132,8 @@ // If mopt is nonzero and the byte order is swapped, mopt will be // bigger than we expect, so we swap bytes. // -// If mopt is zero, it means the file was written on a little endian -// machine, and we only need to swap if we are running on a big endian -// machine. +// If mopt is zero, it means the file was written on a little endian machine, +// and we only need to swap if we are running on a big endian machine. // // Gag me.
--- a/libinterp/corefcn/ls-mat5.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/ls-mat5.cc Fri Apr 28 11:38:39 2017 -0700 @@ -26,58 +26,55 @@ # include "config.h" #endif -#include <cfloat> #include <cstring> -#include <cctype> - -#include <fstream> + #include <iomanip> #include <iostream> +#include <limits> #include <sstream> #include <string> #include <vector> #include "byte-swap.h" +#include "dMatrix.h" #include "data-conv.h" #include "file-ops.h" +#include "file-stat.h" #include "glob-match.h" #include "lo-mappers.h" #include "mach-info.h" #include "oct-env.h" +#include "oct-locbuf.h" #include "oct-time.h" #include "quit.h" #include "str-vec.h" -#include "file-stat.h" -#include "oct-locbuf.h" #include "Cell.h" #include "call-stack.h" +#include "defaults.h" #include "defun.h" #include "error.h" #include "errwarn.h" -#include "load-save.h" +#include "interpreter-private.h" +#include "interpreter.h" #include "load-path.h" -#include "ovl.h" +#include "load-save.h" +#include "ls-mat5.h" +#include "ls-utils.h" #include "oct-map.h" #include "ov-cell.h" #include "ov-class.h" #include "ov-fcn-inline.h" +#include "ov.h" +#include "ovl.h" #include "pager.h" +#include "parse.h" #include "pt-exp.h" #include "sysdep.h" -#include "interpreter-private.h" -#include "interpreter.h" #include "unwind-prot.h" #include "utils.h" #include "variables.h" #include "version.h" -#include "dMatrix.h" - -#include "ls-utils.h" -#include "ls-mat5.h" - -#include "parse.h" -#include "defaults.h" #if defined (HAVE_ZLIB) # include <zlib.h>
--- a/libinterp/corefcn/ls-oct-binary.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/ls-oct-binary.cc Fri Apr 28 11:38:39 2017 -0700 @@ -24,15 +24,8 @@ # include "config.h" #endif -#include <cfloat> -#include <cstring> -#include <cctype> - -#include <fstream> -#include <iomanip> #include <iostream> #include <string> -#include <vector> #include "byte-swap.h" #include "data-conv.h" @@ -41,30 +34,23 @@ #include "lo-mappers.h" #include "mach-info.h" #include "oct-env.h" +#include "oct-locbuf.h" #include "oct-time.h" -#include "quit.h" -#include "str-vec.h" -#include "oct-locbuf.h" -#include "Cell.h" #include "defun.h" #include "error.h" #include "errwarn.h" #include "load-save.h" -#include "ovl.h" -#include "oct-map.h" +#include "ls-oct-binary.h" +#include "ls-utils.h" #include "ov-cell.h" +#include "ov.h" #include "pager.h" #include "pt-exp.h" #include "sysdep.h" -#include "unwind-prot.h" #include "utils.h" #include "variables.h" #include "version.h" -#include "dMatrix.h" - -#include "ls-utils.h" -#include "ls-oct-binary.h" // Extract one value (scalar, matrix, string, etc.) from stream IS and // place it in TC, returning the name of the variable. If the value
--- a/libinterp/corefcn/ls-oct-text.h Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/ls-oct-text.h Fri Apr 28 11:38:39 2017 -0700 @@ -25,8 +25,7 @@ #include "octave-config.h" -#include <cfloat> - +#include <limits> #include <sstream> #include <string>
--- a/libinterp/corefcn/mappers.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/mappers.cc Fri Apr 28 11:38:39 2017 -0700 @@ -26,7 +26,6 @@ #endif #include <cctype> -#include <cfloat> #include "lo-ieee.h" #include "lo-specfun.h"
--- a/libinterp/corefcn/mex.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/mex.cc Fri Apr 28 11:38:39 2017 -0700 @@ -24,18 +24,20 @@ # include "config.h" #endif -#include <cfloat> -#include <csetjmp> #include <cstdarg> #include <cstdlib> #include <cstring> #include <cctype> +#include <limits> +#include <map> #include <set> +#include <string> #include "f77-fcn.h" #include "lo-ieee.h" #include "oct-locbuf.h" +#include "quit.h" #include "Cell.h" #include "call-stack.h"
--- a/libinterp/corefcn/pr-output.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/pr-output.cc Fri Apr 28 11:38:39 2017 -0700 @@ -24,12 +24,10 @@ # include "config.h" #endif -#include <cfloat> -#include <cstdio> -#include <cstring> - #include <iomanip> #include <iostream> +#include <limits> +#include <list> #include <sstream> #include <string> @@ -43,7 +41,6 @@ #include "mach-info.h" #include "oct-cmplx.h" #include "quit.h" -#include "str-vec.h" #include "Cell.h" #include "defun.h"
--- a/libinterp/corefcn/sysdep.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/sysdep.cc Fri Apr 28 11:38:39 2017 -0700 @@ -24,11 +24,8 @@ # include "config.h" #endif -#include <cfloat> #include <cstddef> -#include <cstdio> -#include <cstdlib> -#include <cstring> +//#include <cstdlib> #include <iostream> #include <string> @@ -67,7 +64,6 @@ #include "lo-math.h" #include "mach-info.h" #include "oct-env.h" -#include "quit.h" #include "unistd-wrappers.h" #include "unsetenv-wrapper.h"
--- a/libinterp/corefcn/variables.h Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/variables.h Fri Apr 28 11:38:39 2017 -0700 @@ -38,14 +38,12 @@ class tree_identifier; } -#include <cfloat> - #include <limits> #include <string> #include "lo-ieee.h" -#include "ov.h" +//#include "ov.h" #include "ov-builtin.h" #include "symtab.h"
--- a/libinterp/corefcn/xnorm.cc Fri Apr 28 13:52:02 2017 -0400 +++ b/libinterp/corefcn/xnorm.cc Fri Apr 28 11:38:39 2017 -0700 @@ -26,16 +26,11 @@ # include "config.h" #endif -#include <cassert> -#include <cfloat> -#include <cmath> - #include "oct-norm.h" -#include "error.h" +#include "errwarn.h" +#include "ov.h" #include "xnorm.h" -#include "ov.h" -#include "errwarn.h" octave_value xnorm (const octave_value& x, const octave_value& p) {