Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r6a33e40 r0c51f9ad  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 19 08:15:53 2022
    13 // Update Count     : 1352
     12// Last Modified On : Mon Jan 17 16:38:32 2022
     13// Update Count     : 1349
    1414//
    1515
     
    205205        ostype & ?|?( ostype & os, float f ) {
    206206                if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
    207                 PrintWithDP( os, "%'g", f );
     207                PrintWithDP( os, "%g", f );
    208208                return os;
    209209        } // ?|?
     
    214214        ostype & ?|?( ostype & os, double d ) {
    215215                if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
    216                 PrintWithDP( os, "%'.*lg", d, DBL_DIG );
     216                PrintWithDP( os, "%.*lg", d, DBL_DIG );
    217217                return os;
    218218        } // ?|?
     
    223223        ostype & ?|?( ostype & os, long double ld ) {
    224224                if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
    225                 PrintWithDP( os, "%'.*Lg", ld, LDBL_DIG );
     225                PrintWithDP( os, "%.*Lg", ld, LDBL_DIG );
    226226                return os;
    227227        } // ?|?
     
    233233                if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
    234234//              os | crealf( fc ) | nonl;
    235                 PrintWithDP( os, "%'g", crealf( fc ) );
    236                 PrintWithDP( os, "%'+g", cimagf( fc ) );
     235                PrintWithDP( os, "%g", crealf( fc ) );
     236                PrintWithDP( os, "%+g", cimagf( fc ) );
    237237                fmt( os, "i" );
    238238                return os;
     
    245245                if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
    246246//              os | creal( dc ) | nonl;
    247                 PrintWithDP( os, "%'.*lg", creal( dc ), DBL_DIG );
    248                 PrintWithDP( os, "%'+.*lg", cimag( dc ), DBL_DIG );
     247                PrintWithDP( os, "%.*lg", creal( dc ), DBL_DIG );
     248                PrintWithDP( os, "%+.*lg", cimag( dc ), DBL_DIG );
    249249                fmt( os, "i" );
    250250                return os;
     
    257257                if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) );
    258258//              os | creall( ldc ) || nonl;
    259                 PrintWithDP( os, "%'.*Lg", creall( ldc ), LDBL_DIG );
    260                 PrintWithDP( os, "%'+.*Lg", cimagl( ldc ), LDBL_DIG );
     259                PrintWithDP( os, "%.*Lg", creall( ldc ), LDBL_DIG );
     260                PrintWithDP( os, "%+.*Lg", cimagl( ldc ), LDBL_DIG );
    261261                fmt( os, "i" );
    262262                return os;
     
    282282                }; // mask
    283283
    284           if ( s == 0p ) { fmt( os, "%s", "0p" ); return os; } // null pointer
    285284          if ( s[0] == '\0' ) { sepOff( os ); return os; } // null string => no separator
    286285
     
    694693                if ( ! f.flags.pc ) memcpy( &fmtstr, DFMTNP, sizeof(DFMTNP) ); \
    695694                else memcpy( &fmtstr, DFMTP, sizeof(DFMTP) ); \
    696                 int star = 5;                                                                   /* position before first '*' */ \
     695                int star = 4;                                                                   /* position before first '*' */ \
    697696\
    698697                /* Insert flags into spaces before '*', from right to left. */ \
     
    700699                if ( f.flags.sign ) { fmtstr[star] = '+'; star -= 1; } \
    701700                if ( f.flags.pad0 ) { fmtstr[star] = '0'; star -= 1; } \
    702                 fmtstr[star] = '\''; star -= 1;                                 /* locale */ \
    703701                fmtstr[star] = '%'; \
    704702\
     
    718716} // distribution
    719717
    720 FloatingPointFMTImpl( double,      "      * ",  "      *.* " )
    721 FloatingPointFMTImpl( long double, "      *L ", "      *.*L " )
     718FloatingPointFMTImpl( double, "     * ", "     *.* " )
     719FloatingPointFMTImpl( long double, "     *L ", "     *.*L " )
    722720
    723721// *********************************** character ***********************************
Note: See TracChangeset for help on using the changeset viewer.