cprintf.hh (10292:933dfb9d8279) cprintf.hh (11320:42ecb523c64a)
1/*
2 * Copyright (c) 2014 ARM Limited
3 * Copyright (c) 2002-2006 The Regents of The University of Michigan
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

64 Print(std::ostream &stream, const char *format);
65 ~Print();
66
67 int
68 get_number(int data)
69 {
70 return data;
71 }
1/*
2 * Copyright (c) 2014 ARM Limited
3 * Copyright (c) 2002-2006 The Regents of The University of Michigan
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

64 Print(std::ostream &stream, const char *format);
65 ~Print();
66
67 int
68 get_number(int data)
69 {
70 return data;
71 }
72
72
73 template <typename T>
74 int
75 get_number(const T& data)
76 {
77 return 0;
78 }
79
80 template <typename T>

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

85 process();
86
87 if (fmt.get_width) {
88 fmt.get_width = false;
89 cont = true;
90 fmt.width = get_number(data);
91 return;
92 }
73 template <typename T>
74 int
75 get_number(const T& data)
76 {
77 return 0;
78 }
79
80 template <typename T>

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

85 process();
86
87 if (fmt.get_width) {
88 fmt.get_width = false;
89 cont = true;
90 fmt.width = get_number(data);
91 return;
92 }
93
93
94 if (fmt.get_precision) {
95 fmt.get_precision = false;
96 cont = true;
97 fmt.precision = get_number(data);
98 return;
99 }
100
101 switch (fmt.format) {

--- 90 unchanged lines hidden ---
94 if (fmt.get_precision) {
95 fmt.get_precision = false;
96 cont = true;
97 fmt.precision = get_number(data);
98 return;
99 }
100
101 switch (fmt.format) {

--- 90 unchanged lines hidden ---