diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/stable/formatter.cpp | 36 | ||||
-rw-r--r-- | src/stable/formatter.h | 24 | ||||
-rw-r--r-- | src/stable/string.h | 2 | ||||
-rw-r--r-- | src/unit/variant.unit | 4 |
4 files changed, 36 insertions, 30 deletions
diff --git a/src/stable/formatter.cpp b/src/stable/formatter.cpp index f8da5a1..dc83b2e 100644 --- a/src/stable/formatter.cpp +++ b/src/stable/formatter.cpp | |||
@@ -377,15 +377,15 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned char c ) | |||
377 | return f; | 377 | return f; |
378 | } | 378 | } |
379 | 379 | ||
380 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed short i ) | 380 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed short int i ) |
381 | { | 381 | { |
382 | f.ifmt<signed short>( i ); | 382 | f.ifmt<signed short int>( i ); |
383 | return f; | 383 | return f; |
384 | } | 384 | } |
385 | 385 | ||
386 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned short i ) | 386 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned short int i ) |
387 | { | 387 | { |
388 | f.ufmt<unsigned short>( i ); | 388 | f.ufmt<unsigned short int>( i ); |
389 | return f; | 389 | return f; |
390 | } | 390 | } |
391 | 391 | ||
@@ -401,27 +401,27 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned int i ) | |||
401 | return f; | 401 | return f; |
402 | } | 402 | } |
403 | 403 | ||
404 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed long i ) | 404 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed long int i ) |
405 | { | 405 | { |
406 | f.ifmt<signed long>( i ); | 406 | f.ifmt<signed long int>( i ); |
407 | return f; | 407 | return f; |
408 | } | 408 | } |
409 | 409 | ||
410 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned long i ) | 410 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned long int i ) |
411 | { | 411 | { |
412 | f.ufmt<unsigned long>( i ); | 412 | f.ufmt<unsigned long int>( i ); |
413 | return f; | 413 | return f; |
414 | } | 414 | } |
415 | 415 | ||
416 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed long long i ) | 416 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed long long int i ) |
417 | { | 417 | { |
418 | f.ifmt<signed long long>( i ); | 418 | f.ifmt<signed long long int>( i ); |
419 | return f; | 419 | return f; |
420 | } | 420 | } |
421 | 421 | ||
422 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned long long i ) | 422 | Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned long long int i ) |
423 | { | 423 | { |
424 | f.ufmt<unsigned long long>( i ); | 424 | f.ufmt<unsigned long long int>( i ); |
425 | return f; | 425 | return f; |
426 | } | 426 | } |
427 | 427 | ||
@@ -473,13 +473,13 @@ Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned char &c ) | |||
473 | return f; | 473 | return f; |
474 | } | 474 | } |
475 | 475 | ||
476 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed short &i ) | 476 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed short int &i ) |
477 | { | 477 | { |
478 | f.iparse( i, f.readToken() ); | 478 | f.iparse( i, f.readToken() ); |
479 | return f; | 479 | return f; |
480 | } | 480 | } |
481 | 481 | ||
482 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned short &i ) | 482 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned short int &i ) |
483 | { | 483 | { |
484 | f.uparse( i, f.readToken() ); | 484 | f.uparse( i, f.readToken() ); |
485 | return f; | 485 | return f; |
@@ -497,25 +497,25 @@ Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned int &i ) | |||
497 | return f; | 497 | return f; |
498 | } | 498 | } |
499 | 499 | ||
500 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed long &i ) | 500 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed long int &i ) |
501 | { | 501 | { |
502 | f.iparse( i, f.readToken() ); | 502 | f.iparse( i, f.readToken() ); |
503 | return f; | 503 | return f; |
504 | } | 504 | } |
505 | 505 | ||
506 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned long &i ) | 506 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned long int &i ) |
507 | { | 507 | { |
508 | f.uparse( i, f.readToken() ); | 508 | f.uparse( i, f.readToken() ); |
509 | return f; | 509 | return f; |
510 | } | 510 | } |
511 | 511 | ||
512 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed long long &i ) | 512 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, signed long long int &i ) |
513 | { | 513 | { |
514 | f.iparse( i, f.readToken() ); | 514 | f.iparse( i, f.readToken() ); |
515 | return f; | 515 | return f; |
516 | } | 516 | } |
517 | 517 | ||
518 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned long long &i ) | 518 | Bu::Formatter &Bu::operator>>( Bu::Formatter &f, unsigned long long int &i ) |
519 | { | 519 | { |
520 | f.uparse( i, f.readToken() ); | 520 | f.uparse( i, f.readToken() ); |
521 | return f; | 521 | return f; |
diff --git a/src/stable/formatter.h b/src/stable/formatter.h index fc430f3..ea7fac4 100644 --- a/src/stable/formatter.h +++ b/src/stable/formatter.h | |||
@@ -273,14 +273,14 @@ namespace Bu | |||
273 | Formatter &operator<<( Formatter &f, signed char c ); | 273 | Formatter &operator<<( Formatter &f, signed char c ); |
274 | Formatter &operator<<( Formatter &f, char c ); | 274 | Formatter &operator<<( Formatter &f, char c ); |
275 | Formatter &operator<<( Formatter &f, unsigned char c ); | 275 | Formatter &operator<<( Formatter &f, unsigned char c ); |
276 | Formatter &operator<<( Formatter &f, signed short i ); | 276 | Formatter &operator<<( Formatter &f, signed short int i ); |
277 | Formatter &operator<<( Formatter &f, unsigned short i ); | 277 | Formatter &operator<<( Formatter &f, unsigned short int i ); |
278 | Formatter &operator<<( Formatter &f, signed int i ); | 278 | Formatter &operator<<( Formatter &f, signed int i ); |
279 | Formatter &operator<<( Formatter &f, unsigned int i ); | 279 | Formatter &operator<<( Formatter &f, unsigned int i ); |
280 | Formatter &operator<<( Formatter &f, signed long i ); | 280 | Formatter &operator<<( Formatter &f, signed long int i ); |
281 | Formatter &operator<<( Formatter &f, unsigned long i ); | 281 | Formatter &operator<<( Formatter &f, unsigned long int i ); |
282 | Formatter &operator<<( Formatter &f, signed long long i ); | 282 | Formatter &operator<<( Formatter &f, signed long long int i ); |
283 | Formatter &operator<<( Formatter &f, unsigned long long i ); | 283 | Formatter &operator<<( Formatter &f, unsigned long long int i ); |
284 | Formatter &operator<<( Formatter &f, float flt ); | 284 | Formatter &operator<<( Formatter &f, float flt ); |
285 | Formatter &operator<<( Formatter &f, double flt ); | 285 | Formatter &operator<<( Formatter &f, double flt ); |
286 | Formatter &operator<<( Formatter &f, long double flt ); | 286 | Formatter &operator<<( Formatter &f, long double flt ); |
@@ -290,14 +290,14 @@ namespace Bu | |||
290 | Formatter &operator>>( Formatter &f, signed char &c ); | 290 | Formatter &operator>>( Formatter &f, signed char &c ); |
291 | Formatter &operator>>( Formatter &f, char &c ); | 291 | Formatter &operator>>( Formatter &f, char &c ); |
292 | Formatter &operator>>( Formatter &f, unsigned char &c ); | 292 | Formatter &operator>>( Formatter &f, unsigned char &c ); |
293 | Formatter &operator>>( Formatter &f, signed short &i ); | 293 | Formatter &operator>>( Formatter &f, signed short int &i ); |
294 | Formatter &operator>>( Formatter &f, unsigned short &i ); | 294 | Formatter &operator>>( Formatter &f, unsigned short int &i ); |
295 | Formatter &operator>>( Formatter &f, signed int &i ); | 295 | Formatter &operator>>( Formatter &f, signed int &i ); |
296 | Formatter &operator>>( Formatter &f, unsigned int &i ); | 296 | Formatter &operator>>( Formatter &f, unsigned int &i ); |
297 | Formatter &operator>>( Formatter &f, signed long &i ); | 297 | Formatter &operator>>( Formatter &f, signed long int &i ); |
298 | Formatter &operator>>( Formatter &f, unsigned long &i ); | 298 | Formatter &operator>>( Formatter &f, unsigned long int &i ); |
299 | Formatter &operator>>( Formatter &f, signed long long &i ); | 299 | Formatter &operator>>( Formatter &f, signed long long int &i ); |
300 | Formatter &operator>>( Formatter &f, unsigned long long &i ); | 300 | Formatter &operator>>( Formatter &f, unsigned long long int &i ); |
301 | Formatter &operator>>( Formatter &f, float &flt ); | 301 | Formatter &operator>>( Formatter &f, float &flt ); |
302 | Formatter &operator>>( Formatter &f, double &flt ); | 302 | Formatter &operator>>( Formatter &f, double &flt ); |
303 | Formatter &operator>>( Formatter &f, long double &flt ); | 303 | Formatter &operator>>( Formatter &f, long double &flt ); |
diff --git a/src/stable/string.h b/src/stable/string.h index 54cd2bc..131f621 100644 --- a/src/stable/string.h +++ b/src/stable/string.h | |||
@@ -1077,4 +1077,6 @@ namespace Bu | |||
1077 | typedef Bu::List<String> StringList; | 1077 | typedef Bu::List<String> StringList; |
1078 | }; | 1078 | }; |
1079 | 1079 | ||
1080 | #include "bu/formatter.h" | ||
1081 | |||
1080 | #endif | 1082 | #endif |
diff --git a/src/unit/variant.unit b/src/unit/variant.unit index 97ff1f0..1105c94 100644 --- a/src/unit/variant.unit +++ b/src/unit/variant.unit | |||
@@ -57,5 +57,9 @@ suite Variant | |||
57 | arg( i2, Fmt(2).fill('0') ); | 57 | arg( i2, Fmt(2).fill('0') ); |
58 | // sio << sio.nl << out << sio.nl; | 58 | // sio << sio.nl << out << sio.nl; |
59 | unitTest( out == "hello-stuff-32-00.odp" ); | 59 | unitTest( out == "hello-stuff-32-00.odp" ); |
60 | |||
61 | int64_t iBig = 159173777LL; | ||
62 | out = Bu::String("%1").arg( iBig ); | ||
63 | unitTest( out == "159173777" ); | ||
60 | } | 64 | } |
61 | } | 65 | } |