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