Mercurial > hg > octave-lyh
diff src/load-save.cc @ 3538:0ff7323dab8b
[project @ 2000-02-02 12:36:25 by jwe]
author | jwe |
---|---|
date | Wed, 02 Feb 2000 12:36:37 +0000 |
parents | e8fbc8c3d6d9 |
children | ab7fa5a8f23f |
line wrap: on
line diff
--- a/src/load-save.cc +++ b/src/load-save.cc @@ -297,7 +297,7 @@ while (is.get (c) && isalpha (c)) buf << c; - buf << ends; + buf << std::ends; char *tmp = buf.str (); int match = (strncmp (tmp, keyword, strlen (keyword)) == 0); delete [] tmp; @@ -314,7 +314,7 @@ while (is.get (c) && c != '\n') value << c; } - value << ends; + value << std::ends; retval = value.str (); break; } @@ -365,7 +365,7 @@ while (is.get (c) && isalpha (c)) buf << c; - buf << ends; + buf << std::ends; char *tmp = buf.str (); int match = (strncmp (tmp, keyword, strlen (keyword)) == 0); delete [] tmp; @@ -1036,7 +1036,7 @@ error ("load: file `%s' seems to be empty!", filename.c_str ()); is.clear (); - is.seekg (pos, ios::beg); + is.seekg (pos, std::ios::beg); } // Extract a matrix from a file of numbers only. @@ -1082,7 +1082,7 @@ Matrix tmp (nr, nc); if (nr < 1 || nc < 1) - is.clear (ios::badbit); + is.clear (std::ios::badbit); else { double d; @@ -1515,7 +1515,7 @@ retval = LS_BINARY; else { - file.seekg (0, ios::beg); + file.seekg (0, std::ios::beg); FOUR_BYTE_INT mopt, nr, nc, imag, len; @@ -1526,7 +1526,7 @@ else { file.clear (); - file.seekg (0, ios::beg); + file.seekg (0, std::ios::beg); char *tmp = extract_keyword (file, "name"); @@ -1631,9 +1631,9 @@ << "==== ==== ==== ====\n"; output_buf - << setiosflags (ios::left) + << setiosflags (std::ios::left) << setw (16) << tc.type_name () . c_str () - << setiosflags (ios::right) + << setiosflags (std::ios::right) << setw (7) << tc.rows () << setw (7) << tc.columns () << " "; @@ -1672,7 +1672,7 @@ if (list_only && count) { - output_buf << ends; + output_buf << std::ends; char *msg = output_buf.str (); @@ -1825,9 +1825,9 @@ { i++; - unsigned mode = ios::in; + unsigned mode = std::ios::in; if (format == LS_BINARY || format == LS_MAT_BINARY) - mode |= ios::bin; + mode |= std::ios::bin; std::ifstream file (fname.c_str (), mode); @@ -2539,9 +2539,9 @@ load_save_format format = get_default_save_format (); - unsigned mode = ios::out|ios::trunc; + unsigned mode = std::ios::out|std::ios::trunc; if (format == LS_BINARY || format == LS_MAT_BINARY) - mode |= ios::bin; + mode |= std::ios::bin; std::ofstream file (fname, mode); @@ -2706,18 +2706,18 @@ i++; - unsigned mode = ios::out; + unsigned mode = std::ios::out; if (format == LS_BINARY || format == LS_MAT_BINARY) - mode |= ios::bin; - - mode |= append ? ios::ate : ios::trunc; + mode |= std::ios::bin; + + mode |= append ? std::ios::ate : std::ios::trunc; std::ofstream file (fname.c_str (), mode); if (file) { bool write_header_info - = ((file.rdbuf ())->seekoff (0, ios::cur) == 0); + = ((file.rdbuf ())->seekoff (0, std::ios::cur) == 0); save_vars (argv, i, argc, file, save_builtins, format, save_as_floats, write_header_info);