~zorba-coders/zorba/llvm

« back to all changes in this revision

Viewing changes to src/api/transcode_streambuf.cpp

1. Improved catch() for unit tests.
2. Improved bpackfail() for streambufs.
3. locale template function additions.
4. Enhanced aton(). Approved: Chris Hillery, Paul J. Lucas

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
}
67
67
 
68
68
streambuf::int_type streambuf::pbackfail( int_type c ) {
69
 
  return proxy_buf_->sputbackc( traits_type::to_char_type( c ) );
 
69
  return  traits_type::eq_int_type( c, traits_type::eof() ) ?
 
70
          c : proxy_buf_->sputbackc( traits_type::to_char_type( c ) );
70
71
}
71
72
 
72
73
streambuf::int_type streambuf::uflow() {