Rev 1173 | Rev 1199 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1173 | Rev 1197 | ||
---|---|---|---|
Line 66... | Line 66... | ||
66 | * @param c character to print |
66 | * @param c character to print |
67 | * @param width |
67 | * @param width |
68 | * @param flags |
68 | * @param flags |
69 | * @return number of printed characters or EOF |
69 | * @return number of printed characters or EOF |
70 | */ |
70 | */ |
71 | - | ||
72 | static int print_char(char c, int width, uint64_t flags) |
71 | static int print_char(char c, int width, uint64_t flags) |
73 | { |
72 | { |
74 | int counter = 0; |
73 | int counter = 0; |
75 | char space = ' '; |
- | |
76 | 74 | ||
77 | if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
75 | if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
78 | while (--width > 0) { /* one space is consumed by character itself hence predecrement */ |
76 | while (--width > 0) { /* one space is consumed by character itself hence predecrement */ |
79 | /* FIXME: painful slow */ |
77 | /* FIXME: painful slow */ |
80 | putchar(' '); |
78 | putchar(' '); |
Line 254... | Line 252... | ||
254 | if (flags & __PRINTF_FLAG_BIGCHARS) { |
252 | if (flags & __PRINTF_FLAG_BIGCHARS) { |
255 | putchar('B'); |
253 | putchar('B'); |
256 | } else { |
254 | } else { |
257 | putchar('b'); |
255 | putchar('b'); |
258 | } |
256 | } |
259 | written == 2; |
257 | written += 2; |
260 | break; |
258 | break; |
261 | case 8: |
259 | case 8: |
262 | putchar('o'); |
260 | putchar('o'); |
263 | written++; |
261 | written++; |
264 | break; |
262 | break; |