Module Name: src Committed By: joerg Date: Tue Apr 30 00:31:56 UTC 2013
Modified Files: src/external/bsd/atf/dist/atf-c++/detail: parser.hpp Log Message: It is unclear whether cin is guaranteed to buffer the last input character of a get() for ungetch() to work. Prefer putback() to make it work with current implementations of cin in libc++. Tracked as http://llvm.org/bugs/show_bug.cgi?id=15867 with test case. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/atf/dist/atf-c++/detail/parser.hpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/atf/dist/atf-c++/detail/parser.hpp diff -u src/external/bsd/atf/dist/atf-c++/detail/parser.hpp:1.1.1.2 src/external/bsd/atf/dist/atf-c++/detail/parser.hpp:1.2 --- src/external/bsd/atf/dist/atf-c++/detail/parser.hpp:1.1.1.2 Mon Jan 16 22:36:46 2012 +++ src/external/bsd/atf/dist/atf-c++/detail/parser.hpp Tue Apr 30 00:31:56 2013 @@ -259,7 +259,7 @@ tokenizer< IS >::next(void) t = token(m_lineno, m_text_type, text); quoted = true; } else { - m_is.unget(); + m_is.putback(ch); done = true; } } else { @@ -271,13 +271,13 @@ tokenizer< IS >::next(void) t = token(m_lineno, (*idelim).second, std::string("") + ch); else - m_is.unget(); + m_is.putback(ch); } else if (ch == '\n') { done = true; if (text.empty()) t = token(m_lineno, m_nl_type, "<<NEWLINE>>"); else - m_is.unget(); + m_is.putback(ch); } else if (m_skipws && (ch == ' ' || ch == '\t')) { if (!text.empty()) done = true;