Mercurial > octave-nkf
diff src/load-save.cc @ 3013:66a1cede95e7
[project @ 1997-06-02 19:35:05 by jwe]
author | jwe |
---|---|
date | Mon, 02 Jun 1997 19:41:17 +0000 |
parents | 1aeb8869e464 |
children | 38de16594cb4 |
line wrap: on
line diff
--- a/src/load-save.cc Mon Jun 02 18:58:13 1997 +0000 +++ b/src/load-save.cc Mon Jun 02 19:41:17 1997 +0000 @@ -30,6 +30,7 @@ #include <string> +#include <iomanip.h> #include <iostream.h> #include <fstream.h> #include <strstream.h> @@ -1355,17 +1356,18 @@ // Return nonzero if NAME matches one of the given globbing PATTERNS. -static int +static bool matches_patterns (const string_vector& patterns, int pat_idx, int num_pat, const string& name) { for (int i = pat_idx; i < num_pat; i++) { glob_match pattern (patterns[i]); + if (pattern.match (name)) - return 1; + return true; } - return 0; + return false; } static int @@ -1533,11 +1535,13 @@ << "type rows cols name\n" << "==== ==== ==== ====\n"; - string type = tc.type_name (); - output_buf.form ("%-16s", type.c_str ()); - output_buf.form ("%7d", tc.rows ()); - output_buf.form ("%7d", tc.columns ()); - output_buf << " "; + output_buf + << setiosflags (ios::left) + << setw (16) << tc.type_name () . c_str () + << setiosflags (ios::right) + << setw (7) << tc.rows () + << setw (7) << tc.columns () + << " "; } output_buf << name << "\n"; }