Ignore:
Timestamp:
Feb 4, 2020, 2:03:07 PM (22 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
52142c2
Parents:
1d94116
Message:

change "const char *" to "const char []"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.cfa

    r1d94116 re3fea42  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Nov 29 06:56:46 2019
    13 // Update Count     : 355
     12// Last Modified On : Tue Feb  4 11:55:29 2020
     13// Update Count     : 356
    1414//
    1515
     
    4848void sepReset( ofstream & os, bool reset ) { os.sepDefault = reset; os.sepOnOff = os.sepDefault; }
    4949const char * sepGetCur( ofstream & os ) { return os.sepCur; }
    50 void sepSetCur( ofstream & os, const char * sepCur ) { os.sepCur = sepCur; }
     50void sepSetCur( ofstream & os, const char sepCur[] ) { os.sepCur = sepCur; }
    5151bool getNL( ofstream & os ) { return os.sawNL; }
    5252void setNL( ofstream & os, bool state ) { os.sawNL = state; }
     
    5858void ?{}( ofstream & os ) { os.file = 0; }
    5959
    60 void ?{}( ofstream & os, const char * name, const char * mode ) {
     60void ?{}( ofstream & os, const char name[], const char mode[] ) {
    6161        open( os, name, mode );
    6262} // ?{}
    6363
    64 void ?{}( ofstream & os, const char * name ) {
     64void ?{}( ofstream & os, const char name[] ) {
    6565        open( os, name, "w" );
    6666} // ?{}
     
    9191
    9292const char * sepGet( ofstream & os ) { return os.separator; }
    93 void sepSet( ofstream & os, const char * s ) {
     93void sepSet( ofstream & os, const char s[] ) {
    9494        assert( s );
    9595        strncpy( os.separator, s, sepSize - 1 );
     
    9898
    9999const char * sepGetTuple( ofstream & os ) { return os.tupleSeparator; }
    100 void sepSetTuple( ofstream & os, const char * s ) {
     100void sepSetTuple( ofstream & os, const char s[] ) {
    101101        assert( s );
    102102        strncpy( os.tupleSeparator, s, sepSize - 1 );
     
    119119} // flush
    120120
    121 void open( ofstream & os, const char * name, const char * mode ) {
     121void open( ofstream & os, const char name[], const char mode[] ) {
    122122        FILE * file = fopen( name, mode );
    123123        #ifdef __CFA_DEBUG__
     
    129129} // open
    130130
    131 void open( ofstream & os, const char * name ) {
     131void open( ofstream & os, const char name[] ) {
    132132        open( os, name, "w" );
    133133} // open
     
    141141} // close
    142142
    143 ofstream & write( ofstream & os, const char * data, size_t size ) {
     143ofstream & write( ofstream & os, const char data[], size_t size ) {
    144144        if ( fail( os ) ) {
    145145                abort | IO_MSG "attempt write I/O on failed stream";
     
    191191void ?{}( ifstream & is ) {     is.file = 0; }
    192192
    193 void ?{}( ifstream & is, const char * name, const char * mode ) {
     193void ?{}( ifstream & is, const char name[], const char mode[] ) {
    194194        open( is, name, mode );
    195195} // ?{}
    196196
    197 void ?{}( ifstream & is, const char * name ) {
     197void ?{}( ifstream & is, const char name[] ) {
    198198        open( is, name, "r" );
    199199} // ?{}
     
    215215} // eof
    216216
    217 void open( ifstream & is, const char * name, const char * mode ) {
     217void open( ifstream & is, const char name[], const char mode[] ) {
    218218        FILE * file = fopen( name, mode );
    219219        #ifdef __CFA_DEBUG__
     
    225225} // open
    226226
    227 void open( ifstream & is, const char * name ) {
     227void open( ifstream & is, const char name[] ) {
    228228        open( is, name, "r" );
    229229} // open
Note: See TracChangeset for help on using the changeset viewer.