Changeset fd4d301 for libcfa/src


Ignore:
Timestamp:
Apr 29, 2020, 8:55:45 AM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
c7978c0
Parents:
c680a4b
Message:

more work on manipulators for int128 numbers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    rc680a4b rfd4d301  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Apr 26 20:31:36 2020
    13 // Update Count     : 985
     12// Last Modified On : Wed Apr 29 07:44:02 2020
     13// Update Count     : 994
    1414//
    1515
     
    479479                                fmt( os, "0%c", f.base ); \
    480480                        } /* if */ \
    481                         int shift = (bits - 1) / 4 * 4; /* floor( bits - 1, 4 ) */ \
     481                        int shift = floor( bits - 1, 4 ); \
    482482                        typeof( f.val ) temp = f.val; \
    483483                        fmt( os, "%s", shortbin[(temp >> shift) & 0xf] ); \
     
    599599                                                fmt.wd = 0; \
    600600                                                /* if ( fmt2.val > 1 && fmt.flags.pc && fmt.pc > 0 ) fmt.pc -= 1; */ \
    601                                                 /* printf( "L %llo %llo %llo %llo %d %d '%c' %x\n", msig, lsig, fmt.val, fmt2.val, fmt.wd, fmt.pc, fmt.base, fmt.all ); */ \
     601                                                /* printf( "L %llo %llo %llo %d %d '%c' %x %llo %d %d '%c' %x\n", msig, lsig, fmt.val, fmt.wd, fmt.pc, fmt.base, fmt.all, fmt2.val, fmt2.wd, fmt2.pc, fmt2.base, fmt2.all ); */ \
    602602                                                (ostype &)(os | fmt | "" | fmt2); \
    603603                                                sepOff( os ); \
     
    605605                                                int msigd = ceiling( high1( fmt.val ), 3 ) + 1; \
    606606                                                fmt2.wd = f.wd - (fmt.pc > msigd ? fmt.pc : msigd) - 1; \
    607                                                 if ( fmt2.wd < 21 ) fmt2.wd = 21; \
     607                                                if ( (int)fmt2.wd < 21 ) fmt2.wd = 21; /* cast deals with negative value */ \
    608608                                                fmt2.flags.pc = true; fmt2.pc = 21; \
    609609                                        } else { \
     
    612612                                                /*if ( ! fmt.flags.nobsdp && fmt.pc < fmt.wd ) fmt.wd -= 1;*/ \
    613613                                                fmt2.wd = 1; \
    614                                                 /* printf( "R %llo %llo %llo %llo %d %d '%c' %x\n", msig, lsig, fmt.val, fmt2.val, fmt.wd, fmt.pc, fmt.base, fmt.all ); */ \
     614                                                /* printf( "R %llo %llo %llo %d %d '%c' %x %llo %d %d '%c' %x\n", msig, lsig, fmt.val, fmt.wd, fmt.pc, fmt.base, fmt.all, fmt2.val, fmt2.wd, fmt2.pc, fmt2.base, fmt2.all ); */ \
    615615                                                (ostype &)(os | fmt | "" | fmt2); \
    616616                                                sepOff( os ); \
Note: See TracChangeset for help on using the changeset viewer.