Changeset 30548de for libcfa/src/iostream.hfa
- Timestamp:
- Apr 11, 2025, 6:39:45 PM (6 months ago)
- Branches:
- master
- Children:
- a514fed
- Parents:
- a800a19
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.hfa
ra800a19 r30548de 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Oct 13 10:49:40 202413 // Update Count : 76 512 // Last Modified On : Fri Apr 11 18:11:25 2025 13 // Update Count : 766 14 14 // 15 15 … … 420 420 // Restrict nesting of input manipulators to those combinations that make sense. 421 421 422 struct _Istream_Cquote d{422 struct _Istream_Cquote { 423 423 _Istream_Cwidth cstr; 424 }; // _Istream_Cquote d424 }; // _Istream_Cquote 425 425 426 426 struct _Istream_Cstr { … … 441 441 f.delimiters[0] = delimiter; f.delimiters[1] = '\0'; f.flags.delimiter = true; return (_Istream_Cstr &)f; 442 442 } 443 _Istream_Cquote d quoted( char & ch, const char Ldelimiter = '\'', const char Rdelimiter = '\0' ) {444 return (_Istream_Cquote d)@{ { .s = &ch, { {.delimiters = { Ldelimiter, Rdelimiter, '\1' }}, .wd = 1, {.flags.rwd = true} } } };443 _Istream_Cquote quote( char & ch, const char Ldelimiter = '\'', const char Rdelimiter = '\0' ) { 444 return (_Istream_Cquote)@{ { .s = &ch, { {.delimiters = { Ldelimiter, Rdelimiter, '\1' }}, .wd = 1, {.flags.rwd = true} } } }; 445 445 } 446 _Istream_Cquote d & quoted( _Istream_Cwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {446 _Istream_Cquote & quote( _Istream_Cwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) { 447 447 f.delimiters[0] = Ldelimiter; f.delimiters[1] = Rdelimiter; f.delimiters[2] = '\0'; 448 return (_Istream_Cquote d&)f;448 return (_Istream_Cquote &)f; 449 449 } 450 450 _Istream_Cstr & incl( const char scanset[], _Istream_Cwidth & f ) { f.scanset = scanset; f.flags.inex = false; return (_Istream_Cstr &)f; } … … 452 452 _Istream_Cstr ignore( const char s[] ) { return (_Istream_Cstr)@{ { .s = (char *)s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } } }; } 453 453 _Istream_Cstr & ignore( _Istream_Cwidth & f ) { f.flags.ignore = true; return (_Istream_Cstr &)f; } 454 _Istream_Cquote d & ignore( _Istream_Cquoted & f ) { f.cstr.flags.ignore = true; return (_Istream_Cquoted&)f; }454 _Istream_Cquote & ignore( _Istream_Cquote & f ) { f.cstr.flags.ignore = true; return (_Istream_Cquote &)f; } 455 455 _Istream_Cstr & ignore( _Istream_Cstr & f ) { f.cstr.flags.ignore = true; return (_Istream_Cstr &)f; } 456 456 } // distribution … … 458 458 forall( istype & | basic_istream( istype ) ) { 459 459 istype & ?|?( istype & is, _Istream_Cskip f ); 460 istype & ?|?( istype & is, _Istream_Cquote df );460 istype & ?|?( istype & is, _Istream_Cquote f ); 461 461 istype & ?|?( istype & is, _Istream_Cstr f ); 462 462 static inline istype & ?|?( istype & is, _Istream_Cwidth f ) { return is | *(_Istream_Cstr *)&f; }
Note:
See TracChangeset
for help on using the changeset viewer.