Changeset b19b362 for libcfa/src/iostream.hfa
- Timestamp:
- May 3, 2026, 8:25:27 AM (3 days ago)
- Branches:
- master
- Children:
- c136863
- Parents:
- efa8439a
- File:
-
- 1 edited
-
libcfa/src/iostream.hfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.hfa
refa8439a rb19b362 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jan 14 21:23:53202613 // Update Count : 7 7212 // Last Modified On : Sat May 2 18:48:56 2026 13 // Update Count : 780 14 14 // 15 15 … … 193 193 unsigned char sign:1; // plus / minus sign 194 194 unsigned char pad0:1; // zero pad 195 unsigned char quote:1; // print quotes 195 196 }; 196 197 … … 224 225 _Ostream_Manip(T) & upcase( _Ostream_Manip(T) & fmt ) { if ( fmt.base == 'x' || fmt.base == 'b' ) fmt.base -= 32; /* upper case */ return fmt; } \ 225 226 _Ostream_Manip(T) & nobase( _Ostream_Manip(T) & fmt ) { fmt.flags.nobsdp = true; return fmt; } \ 226 _Ostream_Manip(T) & pad0( _Ostream_Manip(T) & fmt ) { fmt.flags.pad0 = true; return fmt; } \227 227 _Ostream_Manip(T) sign( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = CODE, { .flags.sign = true } }; } \ 228 228 _Ostream_Manip(T) & sign( _Ostream_Manip(T) & fmt ) { fmt.flags.sign = true; return fmt; } \ 229 _Ostream_Manip(T) & pad0( _Ostream_Manip(T) & fmt ) { fmt.flags.pad0 = true; return fmt; } \ 229 230 } /* distribution */ \ 230 231 forall( ostype & | basic_ostream( ostype ) ) { \ … … 288 289 _Ostream_Manip(char) oct( char c ) { return (_Ostream_Manip(char))@{ .val = c, .wd = 1, .pc = 0, .base = 'o', { .all = 0 } }; } 289 290 _Ostream_Manip(char) hex( char c ) { return (_Ostream_Manip(char))@{ .val = c, .wd = 1, .pc = 0, .base = 'x', { .all = 0 } }; } 290 _Ostream_Manip(char) wd( unsigned int wd, char c ) { return (_Ostream_Manip(char))@{ c, wd, 0, .base = 'c', { .all = 0 } }; } 291 _Ostream_Manip(char) quote( char c ) { return (_Ostream_Manip(char))@{ .val = c, .wd = 1, .pc = 0, .base = 'c', { .flags.quote = true } }; } 292 _Ostream_Manip(char) wd( unsigned int wd, char c ) { return (_Ostream_Manip(char))@{ .val = c, .wd = wd, .pc = 0, .base = 'c', { .all = 0 } }; } 291 293 _Ostream_Manip(char) & wd( unsigned int wd, _Ostream_Manip(char) & fmt ) { fmt.wd = wd; return fmt; } 292 294 _Ostream_Manip(char) & left( _Ostream_Manip(char) & fmt ) { fmt.flags.left = true; return fmt; } 293 295 _Ostream_Manip(char) & upcase( _Ostream_Manip(char) & fmt ) { if ( fmt.base == 'x' || fmt.base == 'b' ) fmt.base -= 32; /* upper case */ return fmt; } 294 296 _Ostream_Manip(char) & nobase( _Ostream_Manip(char) & fmt ) { fmt.flags.nobsdp = true; return fmt; } 297 _Ostream_Manip(char) & quote( _Ostream_Manip(char) & fmt ) { fmt.flags.quote = true; return fmt; } 295 298 } // distribution 296 299 forall( ostype & | basic_ostream( ostype ) ) { … … 305 308 _Ostream_Manip(const char *) oct( const char s[] ) { return (_Ostream_Manip(const char *))@{ .val = s, .wd = 1, .pc = 0, .base = 'o', { .all = 0 } }; } 306 309 _Ostream_Manip(const char *) hex( const char s[] ) { return (_Ostream_Manip(const char *))@{ .val = s, .wd = 1, .pc = 0, .base = 'x', { .all = 0 } }; } 307 _Ostream_Manip(const char *) wd( unsigned int wd, const char s[] ) { return (_Ostream_Manip(const char *))@{ s, wd, 0, .base = 's', { .all = 0 } }; } 308 _Ostream_Manip(const char *) wd( unsigned int wd, unsigned int pc, const char s[] ) { return (_Ostream_Manip(const char *))@{ s, .wd = wd, .pc = pc, .base = 's', { .flags.pc = true } }; } 310 _Ostream_Manip(const char *) quote( const char s[] ) { return (_Ostream_Manip(const char *))@{ .val = s, .wd = 1, .pc = 0, .base = 's', { .flags.quote = true } }; } 311 _Ostream_Manip(const char *) wd( unsigned int wd, const char s[] ) { return (_Ostream_Manip(const char *))@{ .val = s, .wd = wd, .pc = 0, .base = 's', { .all = 0 } }; } 312 _Ostream_Manip(const char *) wd( unsigned int wd, unsigned int pc, const char s[] ) { return (_Ostream_Manip(const char *))@{ .val = s, .wd = wd, .pc = pc, .base = 's', { .flags.pc = true } }; } 309 313 _Ostream_Manip(const char *) & wd( unsigned int wd, _Ostream_Manip(const char *) & fmt ) { fmt.wd = wd; return fmt; } 310 314 _Ostream_Manip(const char *) & wd( unsigned int wd, unsigned int pc, _Ostream_Manip(const char *) & fmt ) { fmt.wd = wd; fmt.pc = pc; fmt.flags.pc = true; return fmt; } 311 315 _Ostream_Manip(const char *) & left( _Ostream_Manip(const char *) & fmt ) { fmt.flags.left = true; return fmt; } 316 _Ostream_Manip(const char *) & upcase( _Ostream_Manip(const char *) & fmt ) { if ( fmt.base == 'x' || fmt.base == 'b' ) fmt.base -= 32; /* upper case */ return fmt; } 312 317 _Ostream_Manip(const char *) & nobase( _Ostream_Manip(const char *) & fmt ) { fmt.flags.nobsdp = true; return fmt; } 318 _Ostream_Manip(const char *) & quote( _Ostream_Manip(const char *) & fmt ) { fmt.flags.quote = true; return fmt; } \ 313 319 } // distribution 314 320 forall( ostype & | basic_ostream( ostype ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.