Mercurial > hg > octave-jordi
changeset 5103:e2ed74b9bfa0 after-gnuplot-split
[project @ 2004-12-28 02:43:01 by jwe]
author | jwe |
---|---|
date | Tue, 28 Dec 2004 02:43:01 +0000 |
parents | b04b30d30c66 |
children | b77227b1d8a8 |
files | src/Makefile.in src/ls-oct-ascii.cc |
diffstat | 2 files changed, 1 insertions(+), 66 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -513,7 +513,7 @@ @$(top_srcdir)/move-if-change $@-t $@ parse.cc : parse.y - @echo "expect 87 shift/reduce conflicts" + @echo "expect 11 shift/reduce conflicts" $(YACC) $(YFLAGS) $< @$(top_srcdir)/move-if-change y.tab.c $(@F)
--- a/src/ls-oct-ascii.cc +++ b/src/ls-oct-ascii.cc @@ -299,71 +299,6 @@ return status; } -// Match one of the elements in KEYWORDS on stream IS, placing the -// matched keyword in KW and the associated value in VALUE, -// returning TRUE if successful and FALSE otherwise. -// -// Input should look something like: -// -// [%#][ \t]*keyword[ \t]*int-value.*\n - -bool -extract_keyword (std::istream& is, const string_vector& keywords, - std::string& kw, int& value, const bool next_only) -{ - bool status = false; - kw = ""; - value = 0; - - char c; - while (is.get (c)) - { - if (c == '%' || c == '#') - { - OSSTREAM buf; - - while (is.get (c) && (c == ' ' || c == '\t' || c == '%' || c == '#')) - ; // Skip whitespace and comment characters. - - if (isalpha (c)) - buf << c; - - while (is.get (c) && isalpha (c)) - buf << c; - - buf << OSSTREAM_ENDS; - std::string tmp = OSSTREAM_STR (buf); - OSSTREAM_FREEZE (buf); - - for (int i = 0; i < keywords.length (); i++) - { - int match = (tmp == keywords[i]); - - if (match) - { - kw = keywords[i]; - - while (is.get (c) && (c == ' ' || c == '\t' || c == ':')) - ; // Skip whitespace and the colon. - - is.putback (c); - if (c != '\n') - is >> value; - if (is) - status = true; - while (is.get (c) && c != '\n') - ; // Skip to beginning of next line; - return status; - } - } - - if (next_only) - break; - } - } - return status; -} - // Extract one value (scalar, matrix, string, etc.) from stream IS and // place it in TC, returning the name of the variable. If the value // is tagged as global in the file, return TRUE in GLOBAL.