Changeset 63e129c for libcfa/src


Ignore:
Timestamp:
Jan 28, 2024, 3:56:21 PM (5 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
b771581
Parents:
baa1d5d
Message:

cleanup, fix bug for input manipulator nl

Location:
libcfa/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.cfa

    rbaa1d5d r63e129c  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Nov 15 10:51:14 2023
    13 // Update Count     : 552
     12// Last Modified On : Sun Jan 28 09:56:08 2024
     13// Update Count     : 554
    1414//
    1515
     
    209209void ?{}( ifstream & is, void * file ) with( is ) {
    210210        file$ = file;
    211         nlOnOff$ = false;
     211        nlOnOff$ = false;                                                                       // => skip newlines when reading single characters
    212212} // ?{}
    213213
  • libcfa/src/iostream.cfa

    rbaa1d5d r63e129c  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jan 27 18:02:40 2024
    13 // Update Count     : 1909
     12// Last Modified On : Sun Jan 28 11:58:54 2024
     13// Update Count     : 1917
    1414//
    1515
     
    944944        istype & nl( istype & is ) {
    945945                fmt( is, "%*[^\n]" );                                                   // ignore characters to newline
    946                 if ( ! eof( is ) && getANL$( is ) ) fmt( is, "%*c" ); // read newline
     946                if ( ! eof( is ) ) fmt( is, "%*c" );                    // read newline
    947947                return is;
    948948        } // nl
     
    11011101                return is;
    11021102        } // ?|?
    1103 
    1104         // istype & ?|?( istype & is, _Istream_Char f ) with(f) {
    1105         //      if ( ignore ) {
    1106         //              fmt( is, "%*c" );                                                       // argument variable unused
    1107         //      } else {
    1108         //              int len = -1, args = fmt( is, fmt, &c, &len );
    1109         //              if ( args != -1 && len == -1 ) throwResume ExceptionInst( missing_data );
    1110         //      } // if
    1111         //      return is;
    1112         // } // ?|?
    11131103} // distribution
    11141104
  • libcfa/src/iostream.hfa

    rbaa1d5d r63e129c  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jan 27 17:55:22 2024
    13 // Update Count     : 732
     12// Last Modified On : Sun Jan 28 11:56:29 2024
     13// Update Count     : 733
    1414//
    1515
     
    455455} // distribution
    456456
    457 // struct _Istream_Char {
    458 //      char & c;
    459 //      bool ignore;                                                                            // do not change input argument
    460 //      char fmt[7];                                                                            // \L%c\R%n\0
    461 // }; // _Istream_Char
    462 
    463 // static inline {
    464 //      _Istream_Char quoted( char & c, const char Ldelimiter = '\'', const char Rdelimiter = '\0' ) {
    465 //              return (_Istream_Char)@{ .c : c, .ignore : false,
    466 //                              fmt : { Ldelimiter, '%', 'c', (Rdelimiter == '\0' ? Ldelimiter : Rdelimiter), '%', 'n', '\0' } };
    467 //      }
    468 //      _Istream_Char ignore( char ) {
    469 //              return (_Istream_Char)@{ .c : *0p, .ignore : true };
    470 //      }
    471 //      _Istream_Char & ignore( _Istream_Char & fmt ) { fmt.ignore = true; return fmt; }
    472 // } // distribution
    473 
    474 // forall( istype & | basic_istream( istype ) ) {
    475 //      istype & ?|?( istype & is, _Istream_Char f );
    476 // }
    477 
    478457forall( T & | sized( T ) )
    479458struct _Istream_Manip {
Note: See TracChangeset for help on using the changeset viewer.