Example #1
0
uint32_t quan::user_in_avail()
{
   if ( &get_istream() == &std::cin){
      return 1;
   }else{
      return get_istream().rdbuf()->in_avail();
   }
}
                std::string get_magic_cookie( const std::string & src, bool AsFile )
                {
                        if( src.empty() ) return src;
                        typedef std::auto_ptr<std::istream> AP;
                        AP is( get_istream( src, AsFile ) );
                        return is.get()
				? get_magic_cookie( *is )
				: "";
                }
Example #3
0
int PHRQ_io::
getc(void)
{
	if (std::istream* is = get_istream())
	{
		int n = is->get();
		if (n == 13 && is->peek() == 10)
		{
			n = is->get();
		}
		return n;
	}
	return EOF;
}
Example #4
0
char quan::user_get()
{
   char ch;
   get_istream().get(ch);
   return ch;
}