Ignore:
Timestamp:
Jan 10, 2019, 3:50:34 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
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:
d97c3a4
Parents:
aeb8f70 (diff), 08222c7 (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.
git-author:
Aaron Moss <a3moss@…> (01/10/19 14:46:09)
git-committer:
Aaron Moss <a3moss@…> (01/10/19 15:50:34)
Message:

Merge remote-tracking branch 'plg/master' into deferred_resn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.cfa

    raeb8f70 re99e43f  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 10 18:19:40 2018
    13 // Update Count     : 284
     12// Last Modified On : Mon Dec 24 18:33:38 2018
     13// Update Count     : 304
    1414//
    1515
     
    2020#include <stdarg.h>                                                                             // varargs
    2121#include <string.h>                                                                             // strlen
    22 #include <stdbool.h>                                                                    // true/false
    2322#include <float.h>                                                                              // DBL_DIG, LDBL_DIG
    2423#include <complex.h>                                                                    // creal, cimag
     
    2726#define IO_MSG "I/O error: "
    2827
    29 void ?{}( ofstream & os, void * file, bool sepDefault, bool sepOnOff, const char * separator, const char * tupleSeparator ) {
     28void ?{}( ofstream & os, void * file, bool sepDefault, bool sepOnOff, bool nlOnOff, bool prt, const char * separator, const char * tupleSeparator ) {
    3029        os.file = file;
    3130        os.sepDefault = sepDefault;
    3231        os.sepOnOff = sepOnOff;
     32        os.nlOnOff = nlOnOff;
     33        os.prt = prt;
    3334        sepSet( os, separator );
    3435        sepSetCur( os, sepGet( os ) );
     
    4445bool getNL( ofstream & os ) { return os.sawNL; }
    4546void setNL( ofstream & os, bool state ) { os.sawNL = state; }
     47bool getANL( ofstream & os ) { return os.nlOnOff; }
     48bool getPrt( ofstream & os ) { return os.prt; }
     49void setPrt( ofstream & os, bool state ) { os.prt = state; }
    4650
    4751// public
     
    7276} // sepEnable
    7377
     78void nlOn( ofstream & os ) { os.nlOnOff = true; }
     79void nlOff( ofstream & os ) { os.nlOnOff = false; }
     80
    7481const char * sepGet( ofstream & os ) { return os.separator; }
    7582void sepSet( ofstream & os, const char * s ) {
     
    103110        } // if
    104111        #endif // __CFA_DEBUG__
    105         (os){ file, true, false, " ", ", " };
     112        (os){ file, true, false, true, false, " ", ", " };
    106113} // open
    107114
     
    143150        va_end( args );
    144151
     152        setPrt( os, true );                                                                     // called in output cascade
    145153        sepReset( os );                                                                         // reset separator
    146154        return len;
    147155} // fmt
    148156
    149 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), true, false, " ", ", " };
     157static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), true, false, true, false, " ", ", " };
    150158ofstream & sout = soutFile;
    151 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_), true, false, " ", ", " };
     159static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_), true, false, true, false, " ", ", " };
    152160ofstream & serr = serrFile;
    153161
Note: See TracChangeset for help on using the changeset viewer.