Changes in libcfa/src/iostream.cfa [6c5d92f:85d8153]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.cfa
r6c5d92f r85d8153 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Apr 20 19:09:41202113 // Update Count : 132 512 // Last Modified On : Sat Apr 24 10:03:54 2021 13 // Update Count : 1329 14 14 // 15 15 … … 36 36 37 37 38 forall( ostype & | ostream( ostype ) ) {38 forall( ostype & | basic_ostream( ostype ) ) { 39 39 ostype & ?|?( ostype & os, bool b ) { 40 40 if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) ); … … 294 294 295 295 // last character IS spacing or opening punctuation => turn off separator for next item 296 size_t len = strlen( s );296 int len = strlen( s ); 297 297 ch = s[len - 1]; // must make unsigned 298 fmt( os, "%s", s ); // fmt resets seperator, but reset it again 298 299 if ( sepPrt$( os ) && mask[ ch ] != Open && mask[ ch ] != OpenClose ) { 299 300 sepOn( os ); … … 302 303 } // if 303 304 if ( ch == '\n' ) setNL$( os, true ); // check *AFTER* sepPrt$ call above as it resets NL flag 304 return write( os, s, len ); 305 return os; 306 // return write( os, s, len ); 305 307 } // ?|? 306 308 void ?|?( ostype & os, const char s[] ) { … … 397 399 return os; 398 400 } // nlOff 399 401 } // distribution 402 403 forall( ostype & | ostream( ostype ) ) { 400 404 ostype & acquire( ostype & os ) { 401 405 acquire( os ); // call void returning … … 445 449 // Default prefix for non-decimal prints is 0b, 0, 0x. 446 450 #define IntegralFMTImpl( T, IFMTNP, IFMTP ) \ 447 forall( ostype & | ostream( ostype ) ) { \451 forall( ostype & | basic_ostream( ostype ) ) { \ 448 452 ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \ 449 453 if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) ); \ … … 539 543 #if defined( __SIZEOF_INT128__ ) 540 544 // Default prefix for non-decimal prints is 0b, 0, 0x. 541 forall( ostype & | ostream( ostype ) )545 forall( ostype & | basic_ostream( ostype ) ) 542 546 static inline void base_128( ostype & os, unsigned int128 val, unsigned int128 power, _Ostream_Manip(uint64_t) & f, unsigned int maxdig, unsigned int bits, unsigned int cnt = 0 ) { 543 547 int wd = 1; // f.wd is never 0 because 0 implies left-pad … … 604 608 605 609 #define IntegralFMTImpl128( T ) \ 606 forall( ostype & | ostream( ostype ) ) { \610 forall( ostype & | basic_ostream( ostype ) ) { \ 607 611 ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \ 608 612 _Ostream_Manip(uint64_t) fmt; \ … … 677 681 678 682 #define FloatingPointFMTImpl( T, DFMTNP, DFMTP ) \ 679 forall( ostype & | ostream( ostype ) ) { \683 forall( ostype & | basic_ostream( ostype ) ) { \ 680 684 static void eng( T &value, int & pc, int & exp10 ) { \ 681 685 exp10 = lrint( floor( log10( abs( value ) ) ) ); /* round to desired precision */ \ … … 723 727 // *********************************** character *********************************** 724 728 725 forall( ostype & | ostream( ostype ) ) {729 forall( ostype & | basic_ostream( ostype ) ) { 726 730 ostype & ?|?( ostype & os, _Ostream_Manip(char) f ) { 727 731 if ( f.base != 'c' ) { // bespoke binary/octal/hex format … … 756 760 // *********************************** C string *********************************** 757 761 758 forall( ostype & | ostream( ostype ) ) {762 forall( ostype & | basic_ostream( ostype ) ) { 759 763 ostype & ?|?( ostype & os, _Ostream_Manip(const char *) f ) { 760 764 if ( ! f.val ) return os; // null pointer ?
Note: See TracChangeset
for help on using the changeset viewer.