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