Changeset ef346f7c


Ignore:
Timestamp:
Dec 26, 2018, 7:19:48 AM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
f498c51
Parents:
9d362a0
git-author:
Peter A. Buhr <pabuhr@…> (12/25/18 17:53:59)
git-committer:
Peter A. Buhr <pabuhr@…> (12/26/18 07:19:48)
Message:

fix ostype

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/rational.cfa

    r9d362a0 ref346f7c  
    1010// Created On       : Wed Apr  6 17:54:28 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 11 22:02:29 2018
    13 // Update Count     : 168
     12// Last Modified On : Sun Dec 23 22:56:49 2018
     13// Update Count     : 170
    1414//
    1515
     
    181181
    182182                void ?|?( ostype & os, Rational(RationalImpl) r ) {
    183                         (ostype)(os | r); if ( getANL( os ) ) nl( os );
     183                        (ostype &)(os | r); nl( os );
    184184                } // ?|?
    185185        } // distribution
  • libcfa/src/time.cfa

    r9d362a0 ref346f7c  
    1010// Created On       : Tue Mar 27 13:33:14 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 11 21:32:15 2018
    13 // Update Count     : 53
     12// Last Modified On : Sun Dec 23 22:57:48 2018
     13// Update Count     : 57
    1414//
    1515
     
    3333forall( dtype ostype | ostream( ostype ) ) {
    3434        ostype & ?|?( ostype & os, Duration dur ) with( dur ) {
    35                 (ostype)(os | tv / TIMEGRAN);                                   // print seconds
     35                (ostype &)(os | tv / TIMEGRAN);                                 // print seconds
    3636                long int ns = (tv < 0 ? -tv : tv) % TIMEGRAN;   // compute nanoseconds
    3737                if ( ns != 0 ) {                                                                // some ?
    3838                        char buf[16];
    39                         (ostype)(os | nanomsd( ns, buf ));                      // print nanoseconds
     39                        (ostype &)(os | nanomsd( ns, buf ));                    // print nanoseconds
    4040                } // if
    4141                return os;
     
    4343
    4444        void ?|?( ostype & os, Duration dur ) with( dur ) {
    45                 (ostype)(os | dur); if ( getANL( os ) ) nl( os );
     45                (ostype &)(os | dur); nl( os );
    4646        } // ?|?
    4747} // distribution
     
    150150                long int ns = (tv < 0 ? -tv : tv) % TIMEGRAN;   // compute nanoseconds
    151151                if ( ns == 0 ) {                                                                // none ?
    152                         (ostype)(os | buf);                                                     // print date/time/year
     152                        (ostype &)(os | buf);                                                   // print date/time/year
    153153                } else {
    154154                        buf[19] = '\0';                                                         // truncate to "Wed Jun 30 21:49:08"
    155155                        char buf2[16];
    156156                        nanomsd( ns, buf2 );                                            // compute nanoseconds
    157                         (ostype)(os | buf | buf2 | ' ' | &buf[20]);     // print date/time, nanoseconds and year
     157                        (ostype &)(os | buf | buf2 | ' ' | &buf[20]);   // print date/time, nanoseconds and year
    158158                } // if
    159159                return os;
     
    161161
    162162        void ?|?( ostype & os, Time time ) with( time ) {
    163                 (ostype)(os | time); if ( getANL( os ) ) nl( os );
     163                (ostype &)(os | time); nl( os );
    164164        } // ?|?
    165165} // distribution
  • tests/loopctrl.cfa

    r9d362a0 ref346f7c  
    1010// Created On       : Wed Aug  8 18:32:59 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Dec 22 09:41:15 2018
    13 // Update Count     : 77
     12// Last Modified On : Sun Dec 23 23:00:29 2018
     13// Update Count     : 79
    1414//
    1515
     
    3232S ?-=?( S & t, one_t ) { t.i -= 1; t.j -= 1; return t; }
    3333ofstream & ?|?( ofstream & os, S v ) { return os | '(' | v.i | v.j | ')'; }
    34 void & ?|?( ofstream & os, S v ) { (ofstream)(os | v); if ( getANL( os ) ) nl( os ); }
     34void & ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); }
    3535
    3636int main() {
  • tests/sum.cfa

    r9d362a0 ref346f7c  
    1111// Created On       : Wed May 27 17:56:53 2015
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Tue Dec 11 21:50:41 2018
    14 // Update Count     : 285
     13// Last Modified On : Sun Dec 23 23:00:38 2018
     14// Update Count     : 287
    1515//
    1616
     
    9393        S ?++( S & t ) { S temp = t; t += (S){1}; return temp; }
    9494        ofstream & ?|?( ofstream & os, S v ) { return os | v.i | v.j; }
    95         void ?|?( ofstream & os, S v ) { (ofstream)(os | v); if ( getANL( os ) ) nl( os ); }
     95        void ?|?( ofstream & os, S v ) { (ofstream &)(os | v); nl( os ); }
    9696
    9797        S s = (S){0}, a[size], v = { low, low };
  • tests/swap.cfa

    r9d362a0 ref346f7c  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Dec 22 16:01:33 2018
    13 // Update Count     : 75
     12// Last Modified On : Sun Dec 23 23:00:49 2018
     13// Update Count     : 77
    1414//
    1515
     
    8585        struct S { int i, j; } s1 = { 1, 2 }, s2 = { 2, 1 };
    8686        ofstream & ?|?( ofstream & os, S s ) { return os | s.i | s.j; }
    87         void ?|?( ofstream & os, S s ) { (ofstream)(os | s.i | s.j); if ( getANL( os ) ) nl( os ); }
     87        void ?|?( ofstream & os, S s ) { (ofstream &)(os | s.i | s.j); nl( os ); }
    8888        sout | "struct S\t\t" | s1 | "," | s2 | "\t\tswap " | nonl;
    8989        swap( s1, s2 );
Note: See TracChangeset for help on using the changeset viewer.