Changeset a1a1f37d for libcfa/src


Ignore:
Timestamp:
Jul 14, 2024, 6:00:32 PM (5 days ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
d796be70, eb5dbfd
Parents:
2e6b2a0
Message:

change order of ungetc parameters to harmonize with C ungetc

Location:
libcfa/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.cfa

    r2e6b2a0 ra1a1f37d  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Feb 11 20:55:45 2024
    13 // Update Count     : 580
     12// Last Modified On : Fri Jul 12 05:45:49 2024
     13// Update Count     : 581
    1414//
    1515
     
    280280} // read
    281281
    282 ifstream &ungetc( ifstream & is, char c ) {
     282ifstream &ungetc( char c, ifstream & is ) {
    283283        if ( fail( is ) ) {
    284284                abort | IO_MSG "attempt ungetc I/O on failed stream";
  • libcfa/src/fstream.hfa

    r2e6b2a0 ra1a1f37d  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Feb 11 20:35:00 2024
    13 // Update Count     : 274
     12// Last Modified On : Fri Jul 12 05:45:50 2024
     13// Update Count     : 275
    1414//
    1515
     
    118118void nlOff( ifstream & );
    119119int fmt( ifstream &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
    120 ifstream & ungetc( ifstream & is, char c );
     120ifstream & ungetc( char c, ifstream & is );
    121121bool eof( ifstream & is );
    122122
  • libcfa/src/iostream.cfa

    r2e6b2a0 ra1a1f37d  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jul  8 23:45:06 2024
    13 // Update Count     : 2018
     12// Last Modified On : Fri Jul 12 05:45:45 2024
     13// Update Count     : 2019
    1414//
    1515
     
    891891                        } // for
    892892                        if ( sign ) ullli = -ullli;
    893                 } else if ( sign ) ungetc( is, '-' );                   // return minus when no digits
     893                } else if ( sign ) ungetc( '-', is );                   // return minus when no digits
    894894                return is;
    895895        } // ?|?
     
    10691069                                // fprintf( stderr, "peek %d '%c'\n", args, peek );
    10701070                                if ( ! eof( is ) ) {                                    // can only fail at eof
    1071                                         ungetc( is, peek );
     1071                                        ungetc( peek, is );
    10721072                                        if ( ! isspace( peek ) ) throwResume ExceptionInst( cstring_length );
    10731073                                } // if
     
    10921092                                        if ( ! eof( is ) ) {
    10931093                                                if ( peek != delimiters[0] ) {
    1094                                                         ungetc( is, peek );
     1094                                                        ungetc( peek, is );
    10951095                                                        throwResume ExceptionInst( cstring_length );
    10961096                                                } // if
     
    11121112                                        // fprintf( stderr, "peek %d '%c'\n", args, peek );
    11131113                                        if ( ! eof( is ) ) {
    1114                                                 ungetc( is, peek );
     1114                                                ungetc( peek, is );
    11151115                                                if ( flags.inex ^ strchr( scanset, peek ) != 0p ) throwResume ExceptionInst( cstring_length );
    11161116                                        } // if
  • libcfa/src/iostream.hfa

    r2e6b2a0 ra1a1f37d  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul  6 11:33:31 2024
    13 // Update Count     : 758
     12// Last Modified On : Fri Jul 12 05:45:48 2024
     13// Update Count     : 759
    1414//
    1515
     
    312312        void nlOff( istype & );                                                         // scan newline
    313313        int fmt( istype &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
    314         istype & ungetc( istype &, char );
     314        istype & ungetc( char, istype & );
    315315        bool eof( istype & );
    316316        void clear( istype & );
  • libcfa/src/strstream.cfa

    r2e6b2a0 ra1a1f37d  
    1010// Created On       : Thu Apr 22 22:24:35 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 18 10:42:49 2023
    13 // Update Count     : 112
     12// Last Modified On : Fri Jul 12 05:45:47 2024
     13// Update Count     : 113
    1414//
    1515
     
    166166} // fmt
    167167
    168 istrstream &ungetc( istrstream & is, char c ) {
     168istrstream &ungetc( char c, istrstream & is ) {
    169169        // if ( ungetc( c, (FILE *)(is.file$) ) == EOF ) {
    170170        //      abort | IO_MSG "ungetc" | nl | strerror( errno );
  • libcfa/src/strstream.hfa

    r2e6b2a0 ra1a1f37d  
    1010// Created On       : Thu Apr 22 22:20:59 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 18 10:41:14 2023
    13 // Update Count     : 55
     12// Last Modified On : Fri Jul 12 05:45:48 2024
     13// Update Count     : 56
    1414//
    1515
     
    9696
    9797int fmt( istrstream &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
    98 istrstream & ungetc( istrstream &, char );
     98istrstream & ungetc( char, istrstream & );
    9999bool eof( istrstream & );
    100100
Note: See TracChangeset for help on using the changeset viewer.