Lines Matching refs:os
162 static int expandtab( ostream &os, int off, char c, char fill1, char fill2 ) {
164 do os << fill1; // Expand the tab; Output space
167 os << fill2; // Display normal character
176 static int printline( ostream& os, const char *fname, int line,
180 os << fname << ":" << line << ": ";
186 off = expandtab(os,off,c,' ',c);
190 os << fname << ":" << line << ": ";
198 off = expandtab(os,off,*s++,' ',' ');
199 os << '^'; // Start region
203 off = expandtab(os,off,'\t','-','^');
210 off = expandtab(os,off,*s++,'-','-');
211 os << '\n'; // EOL
219 off = expandtab(os,off,*s++,'-','-');
220 if( i == len ) os << '^'; // Mark end of region
221 os << '\n'; // End of marked line
226 //std::ostream& operator<< ( std::ostream& os, FileBuffRegion &br ) {
227 ostream& operator<< ( ostream& os, FileBuffRegion &br ) {
228 if( &br == NULL ) return os; // The empty buffer region
231 brp->print(os); // Print region
234 return os; // Return final stream
242 //void FileBuffRegion::print( std::ostream& os ) {
243 void FileBuffRegion::print( ostream& os ) {
247 int len = printline( os, _bfr->_fp->_name, _line, s, skip, _length );
257 printline( os, _bfr->_fp->_name, _line+1, s2, -1, len ); // Print&underline
267 len = printline( os, _bfr->_fp->_name, _line+1, s2, -1, len ); // Line 2
269 printline( os, _bfr->_fp->_name, _line+2, s3, -1, len ); // Line 3
275 os << "...\n"; // The ellipses
283 printline( os, _bfr->_fp->_name, cline, s2, -1, len ); // Print & underline