# HG changeset patch # User jwe # Date 1104201781 0 # Node ID e2ed74b9bfa052ce499b7f419e8d204123c49af0 # Parent b04b30d30c6696c1da04f654d3c93d375fd7b70a [project @ 2004-12-28 02:43:01 by jwe] diff -r b04b30d30c66 -r e2ed74b9bfa0 src/Makefile.in --- a/src/Makefile.in Tue Dec 28 01:59:05 2004 +0000 +++ b/src/Makefile.in Tue Dec 28 02:43:01 2004 +0000 @@ -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) diff -r b04b30d30c66 -r e2ed74b9bfa0 src/ls-oct-ascii.cc --- a/src/ls-oct-ascii.cc Tue Dec 28 01:59:05 2004 +0000 +++ b/src/ls-oct-ascii.cc Tue Dec 28 02:43:01 2004 +0000 @@ -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.