Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r85d8153 r6c5d92f  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Apr 24 10:03:54 2021
    13 // Update Count     : 1329
     12// Last Modified On : Tue Apr 20 19:09:41 2021
     13// Update Count     : 1325
    1414//
    1515
     
    3636
    3737
    38 forall( ostype & | basic_ostream( ostype ) ) {
     38forall( ostype & | ostream( ostype ) ) {
    3939        ostype & ?|?( ostype & os, bool b ) {
    4040                if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
     
    294294
    295295                // last character IS spacing or opening punctuation => turn off separator for next item
    296                 int len = strlen( s );
     296                size_t len = strlen( s );
    297297                ch = s[len - 1];                                                                // must make unsigned
    298                 fmt( os, "%s", s );                                                             // fmt resets seperator, but reset it again
    299298                if ( sepPrt$( os ) && mask[ ch ] != Open && mask[ ch ] != OpenClose ) {
    300299                        sepOn( os );
     
    303302                } // if
    304303                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 );
    307305        } // ?|?
    308306        void ?|?( ostype & os, const char s[] ) {
     
    399397                return os;
    400398        } // nlOff
    401 } // distribution
    402 
    403 forall( ostype & | ostream( ostype ) ) {
     399
    404400        ostype & acquire( ostype & os ) {
    405401                acquire( os );                                                                  // call void returning
     
    449445// Default prefix for non-decimal prints is 0b, 0, 0x.
    450446#define IntegralFMTImpl( T, IFMTNP, IFMTP ) \
    451 forall( ostype & | basic_ostream( ostype ) ) { \
     447forall( ostype & | ostream( ostype ) ) { \
    452448        ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
    453449                if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) ); \
     
    543539#if defined( __SIZEOF_INT128__ )
    544540// Default prefix for non-decimal prints is 0b, 0, 0x.
    545 forall( ostype & | basic_ostream( ostype ) )
     541forall( ostype & | ostream( ostype ) )
    546542static 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 ) {
    547543        int wd = 1;                                                                                     // f.wd is never 0 because 0 implies left-pad
     
    608604
    609605#define IntegralFMTImpl128( T ) \
    610 forall( ostype & | basic_ostream( ostype ) ) { \
     606forall( ostype & | ostream( ostype ) ) { \
    611607        ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
    612608                _Ostream_Manip(uint64_t) fmt; \
     
    681677
    682678#define FloatingPointFMTImpl( T, DFMTNP, DFMTP ) \
    683 forall( ostype & | basic_ostream( ostype ) ) { \
     679forall( ostype & | ostream( ostype ) ) { \
    684680        static void eng( T &value, int & pc, int & exp10 ) { \
    685681                exp10 = lrint( floor( log10( abs( value ) ) ) ); /* round to desired precision */ \
     
    727723// *********************************** character ***********************************
    728724
    729 forall( ostype & | basic_ostream( ostype ) ) {
     725forall( ostype & | ostream( ostype ) ) {
    730726        ostype & ?|?( ostype & os, _Ostream_Manip(char) f ) {
    731727                if ( f.base != 'c' ) {                                                  // bespoke binary/octal/hex format
     
    760756// *********************************** C string ***********************************
    761757
    762 forall( ostype & | basic_ostream( ostype ) ) {
     758forall( ostype & | ostream( ostype ) ) {
    763759        ostype & ?|?( ostype & os, _Ostream_Manip(const char *) f ) {
    764760                if ( ! f.val ) return os;                                               // null pointer ?
Note: See TracChangeset for help on using the changeset viewer.