| 146 | } |
| 147 | |
| 148 | int printf_add_to_buffer(char *buffer, char c, int &idx, const int BUF_LEN) |
| 149 | { |
| 150 | int counter = 0; |
| 151 | |
| 152 | buffer[idx] = c; |
| 153 | ++idx; |
| 154 | |
| 155 | if (idx == BUF_LEN) |
| 156 | { |
| 157 | buffer[idx] = '\0'; |
| 158 | counter = stdio.print(buffer); |
| 159 | idx = 0; |
| 160 | } |
| 161 | |
| 162 | return counter; |
| 163 | } |
| 164 | |
| 165 | int printf(const char *const fmt, ...) |
| 166 | { |