Changeset fe1b6a4 for src/libcfa


Ignore:
Timestamp:
Mar 23, 2017, 5:20:33 PM (9 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
231f01c, f20dffa
Parents:
1ca52db (diff), 578b637 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/libcfa
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/Makefile.am

    r1ca52db rfe1b6a4  
    3535         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $<
    3636
    37 EXTRA_FLAGS = -g -Wall -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@
     37EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@
    3838
    3939AM_CCASFLAGS = @CFA_FLAGS@
  • src/libcfa/Makefile.in

    r1ca52db rfe1b6a4  
    305305AUTOMAKE_OPTIONS = subdir-objects
    306306lib_LIBRARIES = $(am__append_1) $(am__append_2)
    307 EXTRA_FLAGS = -g -Wall -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@
     307EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@
    308308AM_CCASFLAGS = @CFA_FLAGS@
    309309headers = limits stdlib math iostream fstream iterator rational assert \
  • src/libcfa/fstream.c

    r1ca52db rfe1b6a4  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar 22 16:17:21 2017
    13 // Update Count     : 221
     12// Last Modified On : Thu Mar 23 08:20:41 2017
     13// Update Count     : 226
    1414//
    1515
     
    2929#define IO_MSG "I/O error: "
    3030
     31void ?{}( ofstream * this, void * file, _Bool sepDefault, _Bool sepOnOff, const char * separator, const char * tupleSeparator ) {
     32        this->file = file;
     33        this->sepDefault = sepDefault;
     34        this->sepOnOff = sepOnOff;
     35        sepSet( this, separator );
     36        sepSetCur( this, sepGet( this ) );
     37        sepSetTuple( this, tupleSeparator );
     38}
     39
    3140_Bool sepPrt( ofstream * os ) { return os->sepOnOff; }
    3241void sepOn( ofstream * os ) { os->sepOnOff = 1; }
     
    8392                exit( EXIT_FAILURE );
    8493        } // if
    85         os->file = file;
    86         sepOff( os );
    87         sepSet( os, " " );
     94        ?{}( os, file, 1, 0, " ", ", " );
    8895} // open
    8996
     
    125132} // fmt
    126133
    127 void ?{}( ofstream * this, void * file, _Bool sepDefault, _Bool sepOnOff, const char * separator, const char * tupleSeparator ) {
    128         this->file = file;
    129         this->sepDefault = sepDefault;
    130         this->sepOnOff = sepOnOff;
    131         sepSet( this, separator );
    132         sepSetCur( this, sepGet( this ) );
    133         sepSetTuple( this, tupleSeparator );
    134 }
    135 
    136134static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), 1, 0, " ", ", " };
    137135ofstream *sout = &soutFile;
  • src/libcfa/iostream.c

    r1ca52db rfe1b6a4  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar 22 17:46:06 2017
    13 // Update Count     : 359
     12// Last Modified On : Thu Mar 23 08:20:40 2017
     13// Update Count     : 367
    1414//
    1515
     
    201201forall( dtype ostype, otype T, ttype Params | ostream( ostype ) | writeable( T ) | { ostype * ?|?( ostype *, Params ); } )
    202202ostype * ?|?( ostype * os, T arg, Params rest ) {
    203         forall( ttype Params ) ostype * prtTuple( T arg, Params rest ) {
    204                 os | arg;                                                                               // print first argument
    205                 os | rest;                                                                              // print remaining arguments
    206                 return os;
    207         } // prtTuple
    208203        sepSetCur( os, sepGetTuple( os ) );                                     // switch to tuple separator
    209         prtTuple( arg, rest );                                                          // recursively print tuple
     204        os | arg;                                                                                       // print first argument
     205        os | rest;                                                                                      // print remaining arguments
    210206        sepSetCur( os, sepGet( os ) );                                          // switch to regular separator
    211207        return os;
     
    223219        os | '\n';
    224220        flush( os );
    225         sepOff( os );
     221        sepOff( os );                                                                           // prepare for next line
    226222        return os;
    227223} // endl
Note: See TracChangeset for help on using the changeset viewer.