Changes in / [381132b:6437ce4]


Ignore:
Files:
1 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r381132b r6437ce4  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Jul  5 08:14:07 2020
    13 // Update Count     : 1063
     12// Last Modified On : Mon Jul  6 08:49:48 2020
     13// Update Count     : 1064
    1414//
    1515
     
    674674                base_128( os, val / power, power, f, maxdig, bits, cnt + 1 ); // recursive
    675675                f.val = val % power;
    676                 if ( cnt == 1 && f.flags.left ) { wd = f.wd; f.wd = maxdig; } // copy f.wd across printing of middle value
     676                if ( cnt == 1 && f.flags.left ) { wd = f.wd; f.wd = maxdig; } // copy f.wd and reset for printing middle chunk
    677677                (ostype &)(os | f);
    678678                if ( cnt == 1 ) {
    679                         if ( f.flags.left ) { wd -= maxdig; f.wd = wd < 0 ? 1 : wd; }
     679                        if ( f.flags.left ) { wd -= maxdig; f.wd = wd < 0 ? 1 : wd; } // update and restore f.wd for printing end chunk
    680680                        sepOff( os );                                                           // no seperator between chunks
    681681                } // if
    682         } else {
     682        } else {                                                                                        // print start chunk
    683683                f.val = val;
    684684                // f.pc is unsigned => use wd
     
    693693                        if ( cnt != 0 ) {                                                       // value >= 2^64 ?
    694694                                unsigned int dig, bs = 0;
    695                                 // compute size of prefix base and digits
     695                                // compute size of prefix digits and base
    696696                                if ( f.base == 'd' || f.base == 'u' ) { // no base prefix
    697697                                        dig = ceil( log10( f.val ) );           // use floating-point
     
    717717                (ostype &)(os | f);
    718718
     719                // remaining middle and end chunks are padded with 0s on the left
    719720                if ( ! f.flags.left ) { f.flags.pad0 = true; f.flags.pc = false; } // left pad with 0s
    720721                else { f.pc = maxdig; f.flags.pc = true; }              // left pad with precision
     722
    721723                if ( cnt != 0 ) sepOff( os );                                   // no seperator between chunks
    722                 f.wd = wd;
    723                 f.flags.sign = false;                                                   // no +/- sign
    724                 f.flags.nobsdp = true;                                                  // no base prefix
     724                f.wd = wd;                                                                              // reset f.wd for next chunk
     725                f.flags.sign = false;                                                   // no leading +/- sign
     726                f.flags.nobsdp = true;                                                  // no leading base prefix
    725727        } // if
    726728} // base_128
  • src/Parser/ParseNode.h

    r381132b r6437ce4  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Feb  7 17:56:02 2020
    13 // Update Count     : 891
     12// Last Modified On : Mon Jul  6 09:33:32 2020
     13// Update Count     : 892
    1414//
    1515
     
    8686class InitializerNode : public ParseNode {
    8787  public:
    88         InitializerNode( ExpressionNode *, bool aggrp = false,  ExpressionNode * des = nullptr );
     88        InitializerNode( ExpressionNode *, bool aggrp = false, ExpressionNode * des = nullptr );
    8989        InitializerNode( InitializerNode *, bool aggrp = false, ExpressionNode * des = nullptr );
    9090        InitializerNode( bool isDelete );
  • tests/copyfile.cfa

    r381132b r6437ce4  
    1010// Created On       : Fri Jun 19 13:44:05 2020
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jun 19 17:58:03 2020
    13 // Update Count     : 4
     12// Last Modified On : Sun Jul  5 11:27:43 2020
     13// Update Count     : 5
    1414//
    1515
     
    2222
    2323        try {
    24                 choose ( argc ) {
     24                choose ( argc ) {                                                               // terminate if command-line errors
    2525                  case 2, 3:
    2626                        open( in, argv[1] );                                            // open input file first as output creates file
    2727                        if ( argc == 3 ) open( out, argv[2] );          // do not create output unless input opens
    2828                  case 1: ;                                                                             // use default files
    29                   default:
     29                  default:                                                                              // wrong number of options
    3030                        exit | "Usage" | argv[0] | "[ input-file (default stdin) [ output-file (default stdout) ] ]";
    3131                } // choose
Note: See TracChangeset for help on using the changeset viewer.