cprintf_formats.hh (5546:4ffc3cafba9b) cprintf_formats.hh (5756:88038cdbb9e1)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 36 unchanged lines hidden (view full) ---

45 bool blank_space;
46 bool fill_zero;
47 bool uppercase;
48 enum { dec, hex, oct } base;
49 enum { none, string, integer, character, floating } format;
50 enum { best, fixed, scientific } float_format;
51 int precision;
52 int width;
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 36 unchanged lines hidden (view full) ---

45 bool blank_space;
46 bool fill_zero;
47 bool uppercase;
48 enum { dec, hex, oct } base;
49 enum { none, string, integer, character, floating } format;
50 enum { best, fixed, scientific } float_format;
51 int precision;
52 int width;
53 bool get_precision;
54 bool get_width;
53
54 Format() { clear(); }
55
56 void clear()
57 {
58 alternate_form = false;
59 flush_left = false;
60 print_sign = false;
61 blank_space = false;
62 fill_zero = false;
63 uppercase = false;
64 base = dec;
65 format = none;
66 precision = -1;
67 width = 0;
55
56 Format() { clear(); }
57
58 void clear()
59 {
60 alternate_form = false;
61 flush_left = false;
62 print_sign = false;
63 blank_space = false;
64 fill_zero = false;
65 uppercase = false;
66 base = dec;
67 format = none;
68 precision = -1;
69 width = 0;
70 get_precision = false;
71 get_width = false;
68 }
69};
70
71template <typename T>
72inline void
73_format_char(std::ostream &out, const T &data, Format &fmt)
74{
75 using namespace std;

--- 281 unchanged lines hidden ---
72 }
73};
74
75template <typename T>
76inline void
77_format_char(std::ostream &out, const T &data, Format &fmt)
78{
79 using namespace std;

--- 281 unchanged lines hidden ---