Rev 2927 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2927 | Rev 4691 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
35 | #include <io/printf_core.h> |
35 | #include <io/printf_core.h> |
36 | #include <stdio.h> |
36 | #include <stdio.h> |
37 | #include <stdio.h> |
- | |
38 | 37 | ||
39 | /** Print formatted text. |
38 | /** Print formatted text. |
- | 39 | * |
|
- | 40 | * @param stream Output stream |
|
40 | * @param fmt format string |
41 | * @param fmt Format string |
- | 42 | * |
|
41 | * \see For more details about format string see printf_core. |
43 | * \see For more details about format string see printf_core. |
- | 44 | * |
|
42 | */ |
45 | */ |
43 | int printf(const char *fmt, ...) |
46 | int fprintf(FILE *stream, const char *fmt, ...) |
44 | { |
47 | { |
45 | int ret; |
- | |
46 | va_list args; |
48 | va_list args; |
47 | - | ||
48 | va_start(args, fmt); |
49 | va_start(args, fmt); |
49 | 50 | ||
50 | ret = vprintf(fmt, args); |
51 | int ret = vfprintf(stream, fmt, args); |
51 | 52 | ||
52 | va_end(args); |
53 | va_end(args); |
- | 54 | ||
- | 55 | return ret; |
|
- | 56 | } |
|
53 | 57 | ||
- | 58 | /** Print formatted text to stdout. |
|
- | 59 | * |
|
- | 60 | * @param fmt Format string |
|
- | 61 | * |
|
- | 62 | * \see For more details about format string see printf_core. |
|
- | 63 | * |
|
- | 64 | */ |
|
- | 65 | int printf(const char *fmt, ...) |
|
- | 66 | { |
|
- | 67 | va_list args; |
|
- | 68 | va_start(args, fmt); |
|
- | 69 | ||
- | 70 | int ret = vprintf(fmt, args); |
|
- | 71 | ||
- | 72 | va_end(args); |
|
- | 73 | ||
54 | return ret; |
74 | return ret; |
55 | } |
75 | } |
56 | 76 | ||
57 | /** @} |
77 | /** @} |
58 | */ |
78 | */ |