Rev 6429 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6429 | Rev 6433 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include |
1 | #include |
2 | #include |
2 | #include |
3 | #include |
3 | #include |
- | 4 | #include |
|
Line 4... | Line 5... | ||
4 | 5 | ||
5 | int printf(const char *format, ...) |
6 | int printf(const char *format, ...) |
- | 7 | { |
|
- | 8 | va_list arg; |
|
- | 9 | va_start(arg, format); |
|
- | 10 | ||
- | 11 | return vprintf(format, arg); |
|
- | 12 | } |
|
- | 13 | ||
- | 14 | ||
- | 15 | int vprintf ( const char * format, va_list arg ) |
|
6 | { |
16 | { |
7 | int i = 0; |
17 | int i = 0; |
8 | int printed_simbols = 0; |
- | |
9 | va_list arg; |
18 | int printed_simbols = 0; |
Line 10... | Line -... | ||
10 | char *s; |
- | |
11 | - | ||
12 | va_start(arg,format); |
19 | char *s; |
Line 13... | Line 20... | ||
13 | 20 | ||
14 | i=con_init_console_dll(); |
21 | i=con_init_console_dll(); |
15 | 22 | ||
16 | if (i==0) |
23 | if (i == 0) |
17 | { |
24 | { |
18 | s=malloc(4096); |
25 | s = malloc(4096); |
19 | printed_simbols=format_print(s,4096,format,arg); |
26 | printed_simbols = format_print(s, 4096, format, arg); |
- | 27 | con_write_string(s, printed_simbols); |
|
20 | con_write_string(s, printed_simbols); |
28 | free(s); |
21 | free(s); |
29 | } |
22 | } |
- |