* Print one character. * * @param c Character to be printed. * @param ps Output method. * @return Number of characters printed. */
| 108 | * @return Number of characters printed. |
| 109 | */ |
| 110 | static int printf_putchar(int c, struct printf_spec *ps) |
| 111 | { |
| 112 | char ch = c; |
| 113 | |
| 114 | return ps->write(&ch, 1, ps->data); |
| 115 | } |
| 116 | |
| 117 | /* Print spaces for padding. Ignores negative counts. */ |
| 118 | static int print_spaces(int count, struct printf_spec *ps) |