Changeset f842032
- Timestamp:
- Oct 19, 2023, 7:35:24 PM (11 months ago)
- Branches:
- master
- Children:
- 0803ead, 1b0184b
- Parents:
- e0dc038
- Location:
- libcfa/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/collections/string.cfa
re0dc038 rf842032 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Sep 2 12:05:57202313 // Update Count : 20 612 // Last Modified On : Wed Oct 18 21:52:09 2023 13 // Update Count : 208 14 14 // 15 15 … … 138 138 139 139 void ?|?( ifstream & in, _Istream_Sstr f ) { 140 (ifstream &)(in | f); ends( in );140 (ifstream &)(in | f); 141 141 } 142 142 -
libcfa/src/collections/string_res.cfa
re0dc038 rf842032 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Aug 14 18:06:01202313 // Update Count : 1 212 // Last Modified On : Wed Oct 18 21:54:54 2023 13 // Update Count : 15 14 14 // 15 15 … … 253 253 254 254 void ?|?( ifstream & in, string_res & this ) { 255 (ifstream &)(in | this); ends( in );255 (ifstream &)(in | this); 256 256 } 257 257 … … 297 297 298 298 void ?|?( ifstream & in, _Istream_Rstr f ) { 299 (ifstream &)(in | f); ends( in );299 (ifstream &)(in | f); 300 300 } 301 301 -
libcfa/src/fstream.cfa
re0dc038 rf842032 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Oct 17 08:38:49202313 // Update Count : 54 412 // Last Modified On : Wed Oct 18 22:05:54 2023 13 // Update Count : 549 14 14 // 15 15 … … 230 230 void nlOff( ifstream & os ) { os.nlOnOff$ = false; } 231 231 232 void ends( ifstream & is ) {}233 234 232 bool eof( ifstream & is ) { return feof( (FILE *)(is.file$) ) != 0; } 235 233 -
libcfa/src/fstream.hfa
re0dc038 rf842032 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Oct 13 13:55:21202313 // Update Count : 26 012 // Last Modified On : Wed Oct 18 20:30:12 2023 13 // Update Count : 261 14 14 // 15 15 … … 117 117 void nlOn( ifstream & ); 118 118 void nlOff( ifstream & ); 119 void ends( ifstream & );120 119 int fmt( ifstream &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) )); 121 120 ifstream & ungetc( ifstream & is, char c ); -
libcfa/src/iostream.cfa
re0dc038 rf842032 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Oct 17 20:57:05202313 // Update Count : 1 79512 // Last Modified On : Thu Oct 19 19:29:54 2023 13 // Update Count : 1800 14 14 // 15 15 … … 47 47 return os; 48 48 } // ?|? 49 OS TYPE_VOID_IMPL( bool )49 OSYPE_VOID_IMPL( bool ) 50 50 51 51 ostype & ?|?( ostype & os, char c ) { … … 784 784 return is; 785 785 } // ?|? 786 ISTYPE_VOID_IMPL( bool & )787 786 788 787 istype & ?|?( istype & is, char & c ) { … … 796 795 return is; 797 796 } // ?|? 798 ISTYPE_VOID_IMPL( char & )799 797 800 798 istype & ?|?( istype & is, signed char & sc ) { … … 802 800 return is; 803 801 } // ?|? 804 ISTYPE_VOID_IMPL( signed char & )805 802 806 803 istype & ?|?( istype & is, unsigned char & usc ) { … … 808 805 return is; 809 806 } // ?|? 810 ISTYPE_VOID_IMPL( unsigned char & )811 807 812 808 istype & ?|?( istype & is, short int & si ) { … … 814 810 return is; 815 811 } // ?|? 816 ISTYPE_VOID_IMPL( short int & )817 812 818 813 istype & ?|?( istype & is, unsigned short int & usi ) { … … 820 815 return is; 821 816 } // ?|? 822 ISTYPE_VOID_IMPL( unsigned short int & )823 817 824 818 istype & ?|?( istype & is, int & i ) { … … 826 820 return is; 827 821 } // ?|? 828 ISTYPE_VOID_IMPL( int & )829 822 830 823 istype & ?|?( istype & is, unsigned int & ui ) { … … 832 825 return is; 833 826 } // ?|? 834 ISTYPE_VOID_IMPL( unsigned int & )835 827 836 828 istype & ?|?( istype & is, long int & li ) { … … 838 830 return is; 839 831 } // ?|? 840 ISTYPE_VOID_IMPL( long int & )841 832 842 833 istype & ?|?( istype & is, unsigned long int & ulli ) { … … 844 835 return is; 845 836 } // ?|? 846 ISTYPE_VOID_IMPL( unsigned long int & )847 837 848 838 istype & ?|?( istype & is, long long int & lli ) { … … 850 840 return is; 851 841 } // ?|? 852 ISTYPE_VOID_IMPL( long long int & )853 842 854 843 istype & ?|?( istype & is, unsigned long long int & ulli ) { … … 856 845 return is; 857 846 } // ?|? 858 ISTYPE_VOID_IMPL( unsigned long long int & )859 847 860 848 #if defined( __SIZEOF_INT128__ ) … … 862 850 return (istype &)(is | (unsigned int128 &)llli); 863 851 } // ?|? 864 ISTYPE_VOID_IMPL( int128 & )865 852 866 853 istype & ?|?( istype & is, unsigned int128 & ullli ) { … … 879 866 return is; 880 867 } // ?|? 881 ISTYPE_VOID_IMPL( unsigned int128 & )882 868 #endif // __SIZEOF_INT128__ 883 869 … … 886 872 return is; 887 873 } // ?|? 888 ISTYPE_VOID_IMPL( float & )889 874 890 875 istype & ?|?( istype & is, double & d ) { … … 892 877 return is; 893 878 } // ?|? 894 ISTYPE_VOID_IMPL( double & )895 879 896 880 istype & ?|?( istype & is, long double & ld ) { … … 898 882 return is; 899 883 } // ?|? 900 ISTYPE_VOID_IMPL( long double & )901 884 902 885 istype & ?|?( istype & is, float _Complex & fc ) { … … 906 889 return is; 907 890 } // ?|? 908 ISTYPE_VOID_IMPL( float _Complex & )909 891 910 892 istype & ?|?( istype & is, double _Complex & dc ) { … … 914 896 return is; 915 897 } // ?|? 916 ISTYPE_VOID_IMPL( double _Complex & )917 898 918 899 istype & ?|?( istype & is, long double _Complex & ldc ) { … … 922 903 return is; 923 904 } // ?|? 924 ISTYPE_VOID_IMPL( long double _Complex & )925 905 926 906 istype & ?|?( istype & is, const char fmt[] ) { … … 928 908 return is; 929 909 } // ?|? 930 ISTYPE_VOID_IMPL( const char * )931 910 932 911 // manipulators … … 936 915 937 916 void ?|?( istype & is, istype & (* manip)( istype & ) ) { 938 manip( is ); ends( is );917 manip( is ); 939 918 } // ?|? 940 919 … … 980 959 return is; 981 960 } 982 ISTYPE_VOID_IMPL( _Istream_Cskip )983 961 984 962 istype & ?|?( istype & is, _Istream_Cstr f ) { … … 1070 1048 return is; 1071 1049 } // ?|? 1072 ISTYPE_VOID_IMPL( _Istream_Cstr )1073 1050 1074 1051 istype & ?|?( istype & is, _Istream_Char f ) { … … 1076 1053 return is; 1077 1054 } // ?|? 1078 ISTYPE_VOID_IMPL( _Istream_Char )1079 1055 } // distribution 1080 1056 … … 1093 1069 return is; \ 1094 1070 } /* ?|? */ \ 1095 ISTYPE_VOID_IMPL( _Istream_Manip(T) ) \1096 1071 } // distribution 1097 1072 … … 1121 1096 return is; 1122 1097 } // ?|? 1123 ISTYPE_VOID_IMPL( _Istream_Manip(float _Complex) )1124 1098 1125 1099 istype & ?|?( istype & is, _Istream_Manip(double _Complex) dc ) { … … 1132 1106 return is; 1133 1107 } // ?|? 1134 ISTYPE_VOID_IMPL( _Istream_Manip(double _Complex) )1135 1108 1136 1109 istype & ?|?( istype & is, _Istream_Manip(long double _Complex) ldc ) { … … 1143 1116 return is; 1144 1117 } // ?|? 1145 ISTYPE_VOID_IMPL( _Istream_Manip(long double _Complex) )1146 1118 } // distribution 1147 1119 -
libcfa/src/iostream.hfa
re0dc038 rf842032 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Oct 16 21:12:01202313 // Update Count : 5 7312 // Last Modified On : Wed Oct 18 21:21:20 2023 13 // Update Count : 583 14 14 // 15 15 … … 306 306 // *********************************** istream *********************************** 307 307 308 #define ISTYPE_VOID( T ) void ?|?( istype &, T )309 #define ISTYPE_VOID_IMPL( T ) \310 void ?|?( istype & is, T t ) { \311 (istype &)(is | t); ends( is ); \312 } // ?|?313 314 308 forall( istype & ) 315 309 trait basic_istream { … … 320 314 void nlOn( istype & ); // read newline 321 315 void nlOff( istype & ); // scan newline 322 void ends( istype & os ); // end of output statement323 316 int fmt( istype &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) )); 324 317 istype & ungetc( istype &, char ); … … 343 336 forall( istype & | basic_istream( istype ) ) { 344 337 istype & ?|?( istype &, bool & ); 345 ISTYPE_VOID( bool & );346 338 347 339 istype & ?|?( istype &, char & ); 348 ISTYPE_VOID( char & );349 340 istype & ?|?( istype &, signed char & ); 350 ISTYPE_VOID( signed char & );351 341 istype & ?|?( istype &, unsigned char & ); 352 ISTYPE_VOID( unsigned char & );353 342 354 343 istype & ?|?( istype &, short int & ); 355 ISTYPE_VOID( short int & );356 344 istype & ?|?( istype &, unsigned short int & ); 357 ISTYPE_VOID( unsigned short int & );358 345 istype & ?|?( istype &, int & ); 359 ISTYPE_VOID( int & );360 346 istype & ?|?( istype &, unsigned int & ); 361 ISTYPE_VOID( unsigned int & );362 347 istype & ?|?( istype &, long int & ); 363 ISTYPE_VOID( long int & );364 348 istype & ?|?( istype &, unsigned long int & ); 365 ISTYPE_VOID( unsigned long int & );366 349 istype & ?|?( istype &, long long int & ); 367 ISTYPE_VOID( long long int & );368 350 istype & ?|?( istype &, unsigned long long int & ); 369 ISTYPE_VOID( unsigned long long int & );370 351 #if defined( __SIZEOF_INT128__ ) 371 352 istype & ?|?( istype &, int128 & ); 372 ISTYPE_VOID( int128 & );373 353 istype & ?|?( istype &, unsigned int128 & ); 374 ISTYPE_VOID( unsigned int128 & );375 354 #endif // __SIZEOF_INT128__ 376 355 377 356 istype & ?|?( istype &, float & ); 378 ISTYPE_VOID( float & );379 357 istype & ?|?( istype &, double & ); 380 ISTYPE_VOID( double & );381 358 istype & ?|?( istype &, long double & ); 382 ISTYPE_VOID( long double & );383 359 384 360 istype & ?|?( istype &, float _Complex & ); 385 ISTYPE_VOID( float _Complex & );386 361 istype & ?|?( istype &, double _Complex & ); 387 ISTYPE_VOID( double _Complex & );388 362 istype & ?|?( istype &, long double _Complex & ); 389 ISTYPE_VOID( long double _Complex & );390 363 391 364 istype & ?|?( istype &, const char [] ); 392 ISTYPE_VOID( const char [] );393 365 394 366 // manipulators 395 367 istype & ?|?( istype &, istype & (*)( istype & ) ); 396 ISTYPE_VOID( istype & (*)( istype & ) );397 368 istype & nl( istype & is ); 398 369 istype & nlOn( istype & ); … … 419 390 forall( istype & | basic_istream( istype ) ) { 420 391 istype & ?|?( istype & is, _Istream_Cskip f ); 421 ISTYPE_VOID( _Istream_Cskip );422 392 } 423 393 … … 461 431 forall( istype & | basic_istream( istype ) ) { 462 432 istype & ?|?( istype & is, _Istream_Cstr f ); 463 ISTYPE_VOID( _Istream_Cstr );464 433 } 465 434 … … 474 443 forall( istype & | basic_istream( istype ) ) { 475 444 istype & ?|?( istype & is, _Istream_Char f ); 476 ISTYPE_VOID( _Istream_Char );477 445 } 478 446 … … 493 461 forall( istype & | basic_istream( istype ) ) { \ 494 462 istype & ?|?( istype & is, _Istream_Manip(T) f ); \ 495 ISTYPE_VOID( _Istream_Manip(T) ); \496 463 } // ?|? 497 464
Note: See TracChangeset
for help on using the changeset viewer.