Changes in / [381132b:6437ce4]
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.cfa
r381132b r6437ce4 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Jul 5 08:14:07202013 // Update Count : 106 312 // Last Modified On : Mon Jul 6 08:49:48 2020 13 // Update Count : 1064 14 14 // 15 15 … … 674 674 base_128( os, val / power, power, f, maxdig, bits, cnt + 1 ); // recursive 675 675 f.val = val % power; 676 if ( cnt == 1 && f.flags.left ) { wd = f.wd; f.wd = maxdig; } // copy f.wd a cross printing of middle value676 if ( cnt == 1 && f.flags.left ) { wd = f.wd; f.wd = maxdig; } // copy f.wd and reset for printing middle chunk 677 677 (ostype &)(os | f); 678 678 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 680 680 sepOff( os ); // no seperator between chunks 681 681 } // if 682 } else { 682 } else { // print start chunk 683 683 f.val = val; 684 684 // f.pc is unsigned => use wd … … 693 693 if ( cnt != 0 ) { // value >= 2^64 ? 694 694 unsigned int dig, bs = 0; 695 // compute size of prefix base and digits695 // compute size of prefix digits and base 696 696 if ( f.base == 'd' || f.base == 'u' ) { // no base prefix 697 697 dig = ceil( log10( f.val ) ); // use floating-point … … 717 717 (ostype &)(os | f); 718 718 719 // remaining middle and end chunks are padded with 0s on the left 719 720 if ( ! f.flags.left ) { f.flags.pad0 = true; f.flags.pc = false; } // left pad with 0s 720 721 else { f.pc = maxdig; f.flags.pc = true; } // left pad with precision 722 721 723 if ( cnt != 0 ) sepOff( os ); // no seperator between chunks 722 f.wd = wd; 723 f.flags.sign = false; // no +/- sign724 f.flags.nobsdp = true; // no base prefix724 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 725 727 } // if 726 728 } // base_128 -
src/Parser/ParseNode.h
r381132b r6437ce4 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Feb 7 17:56:02 202013 // Update Count : 89 112 // Last Modified On : Mon Jul 6 09:33:32 2020 13 // Update Count : 892 14 14 // 15 15 … … 86 86 class InitializerNode : public ParseNode { 87 87 public: 88 InitializerNode( ExpressionNode *, bool aggrp = false, 88 InitializerNode( ExpressionNode *, bool aggrp = false, ExpressionNode * des = nullptr ); 89 89 InitializerNode( InitializerNode *, bool aggrp = false, ExpressionNode * des = nullptr ); 90 90 InitializerNode( bool isDelete ); -
tests/copyfile.cfa
r381132b r6437ce4 10 10 // Created On : Fri Jun 19 13:44:05 2020 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 19 17:58:03 202013 // Update Count : 412 // Last Modified On : Sun Jul 5 11:27:43 2020 13 // Update Count : 5 14 14 // 15 15 … … 22 22 23 23 try { 24 choose ( argc ) { 24 choose ( argc ) { // terminate if command-line errors 25 25 case 2, 3: 26 26 open( in, argv[1] ); // open input file first as output creates file 27 27 if ( argc == 3 ) open( out, argv[2] ); // do not create output unless input opens 28 28 case 1: ; // use default files 29 default: 29 default: // wrong number of options 30 30 exit | "Usage" | argv[0] | "[ input-file (default stdin) [ output-file (default stdout) ] ]"; 31 31 } // choose
Note: See TracChangeset
for help on using the changeset viewer.