Changeset 58fe85a for libcfa/src/iostream.hfa
- Timestamp:
- Jan 7, 2021, 3:27:00 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2b4daf2, 64aeca0
- Parents:
- 3c64c668 (diff), eef8dfb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.hfa
r3c64c668 r58fe85a 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 Feb 20 15:30:56202013 // Update Count : 3 3712 // Last Modified On : Tue Aug 11 22:16:14 2020 13 // Update Count : 350 14 14 // 15 15 … … 19 19 20 20 21 // *********************************** ostream ***********************************21 // *********************************** ostream *********************************** 22 22 23 23 … … 67 67 68 68 forall( dtype ostype | ostream( ostype ) ) { 69 ostype & ?|?( ostype &, zero_t );70 void ?|?( ostype &, zero_t );71 ostype & ?|?( ostype &, one_t );72 void ?|?( ostype &, one_t );73 74 69 ostype & ?|?( ostype &, bool ); 75 70 void ?|?( ostype &, bool ); … … 156 151 } // distribution 157 152 158 // *********************************** manipulators ***********************************153 // *********************************** manipulators *********************************** 159 154 160 155 forall( otype T ) … … 166 161 unsigned char all; 167 162 struct { 163 unsigned char neg:1; // val is negative 168 164 unsigned char pc:1; // precision specified 169 165 unsigned char left:1; // left justify … … 175 171 }; // _Ostream_Manip 176 172 177 // *********************************** integral ***********************************173 // *********************************** integral *********************************** 178 174 179 175 // See 6.7.9. 19) The initialization shall occur in initializer list order, each initializer provided for a particular … … 215 211 IntegralFMTDecl( int128, 'd' ) 216 212 IntegralFMTDecl( unsigned int128, 'u' ) 217 #endif 218 219 // *********************************** floating point ***********************************213 #endif // __SIZEOF_INT128__ 214 215 // *********************************** floating point *********************************** 220 216 221 217 // Default suffix for values with no fraction is "." … … 246 242 FloatingPointFMTDecl( long double ) 247 243 248 // *********************************** character ***********************************244 // *********************************** character *********************************** 249 245 250 246 static inline { … … 263 259 } // ?|? 264 260 265 // *********************************** C string ***********************************261 // *********************************** C string *********************************** 266 262 267 263 static inline { … … 282 278 283 279 284 // *********************************** istream ***********************************280 // *********************************** istream *********************************** 285 281 286 282 … … 314 310 istype & ?|?( istype &, unsigned int & ); 315 311 istype & ?|?( istype &, long int & ); 312 istype & ?|?( istype &, unsigned long int & ); 316 313 istype & ?|?( istype &, long long int & ); 317 istype & ?|?( istype &, unsigned long int & );318 314 istype & ?|?( istype &, unsigned long long int & ); 315 #if defined( __SIZEOF_INT128__ ) 316 istype & ?|?( istype &, int128 & ); 317 istype & ?|?( istype &, unsigned int128 & ); 318 #endif // __SIZEOF_INT128__ 319 319 320 320 istype & ?|?( istype &, float & ); … … 336 336 } // distribution 337 337 338 // *********************************** manipulators ***********************************338 // *********************************** manipulators *********************************** 339 339 340 340 struct _Istream_Cstr { … … 358 358 _Istream_Cstr excl( const char scanset[], char * s ) { return (_Istream_Cstr){ s, scanset, -1, { .flags.inex : true } }; } 359 359 _Istream_Cstr & excl( const char scanset[], _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = true; return fmt; } 360 _Istream_Cstr ignore( c onst char s[] ) { return (_Istream_Cstr)@{ s, 0p, -1, { .flags.ignore : true } }; }360 _Istream_Cstr ignore( char s[] ) { return (_Istream_Cstr)@{ s, 0p, -1, { .flags.ignore : true } }; } 361 361 _Istream_Cstr & ignore( _Istream_Cstr & fmt ) { fmt.flags.ignore = true; return fmt; } 362 362 _Istream_Cstr wdi( unsigned int w, char s[] ) { return (_Istream_Cstr)@{ s, 0p, w, { .all : 0 } }; } … … 370 370 371 371 static inline { 372 _Istream_Char ignore( const char c) { return (_Istream_Char)@{ true }; }372 _Istream_Char ignore( const char ) { return (_Istream_Char)@{ true }; } 373 373 _Istream_Char & ignore( _Istream_Char & fmt ) { fmt.ignore = true; return fmt; } 374 374 } // distribution 375 375 forall( dtype istype | istream( istype ) ) istype & ?|?( istype & is, _Istream_Char f ); 376 376 377 forall( otype T)377 forall( dtype T | sized( T ) ) 378 378 struct _Istream_Manip { 379 379 T & val; // polymorphic base-type … … 413 413 414 414 415 // *********************************** time ***********************************415 // *********************************** time *********************************** 416 416 417 417
Note:
See TracChangeset
for help on using the changeset viewer.