@@ -49,6 +49,15 @@ __attribute__((format(__printf__, (one_based_format_index), (first_arg))))
49
49
# define ATTR_VPRINTF (one_based_format_index )
50
50
#endif
51
51
52
+ #ifdef ALIAS_STANDARD_FUNCTION_NAMES
53
+ # define printf printf_
54
+ # define sprintf sprintf_
55
+ # define vsprintf vsprintf_
56
+ # define snprintf snprintf_
57
+ # define vsnprintf vsnprintf_
58
+ # define vprintf vprintf_
59
+ #endif
60
+
52
61
53
62
/**
54
63
* Output a character to a custom device like UART, used by the printf() function
@@ -66,7 +75,6 @@ void _putchar(char character);
66
75
* \param format A string that specifies the format of the output
67
76
* \return The number of characters that are written into the array, not counting the terminating null character
68
77
*/
69
- #define printf printf_
70
78
int printf_ (const char * format , ...) ATTR_PRINTF (1 , 2 );
71
79
72
80
@@ -78,8 +86,6 @@ int printf_(const char* format, ...) ATTR_PRINTF(1, 2);
78
86
* \param va A value identifying a variable arguments list
79
87
* \return The number of characters that are WRITTEN into the buffer, not counting the terminating null character
80
88
*/
81
- #define sprintf sprintf_
82
- #define vsprintf vsprintf_
83
89
int sprintf_ (char * buffer , const char * format , ...) ATTR_PRINTF (2 , 3 );
84
90
int vsprintf_ (char * buffer , const char * format , va_list va ) ATTR_VPRINTF (2 );
85
91
@@ -94,8 +100,6 @@ int vsprintf_(char* buffer, const char* format, va_list va) ATTR_VPRINTF(2);
94
100
* null character. A value equal or larger than count indicates truncation. Only when the returned value
95
101
* is non-negative and less than count, the string has been completely written.
96
102
*/
97
- #define snprintf snprintf_
98
- #define vsnprintf vsnprintf_
99
103
int snprintf_ (char * buffer , size_t count , const char * format , ...) ATTR_PRINTF (3 , 4 );
100
104
int vsnprintf_ (char * buffer , size_t count , const char * format , va_list va ) ATTR_VPRINTF (3 );
101
105
@@ -106,7 +110,6 @@ int vsnprintf_(char* buffer, size_t count, const char* format, va_list va) ATTR_
106
110
* \param va A value identifying a variable arguments list
107
111
* \return The number of characters that are WRITTEN into the buffer, not counting the terminating null character
108
112
*/
109
- #define vprintf vprintf_
110
113
int vprintf_ (const char * format , va_list va ) ATTR_VPRINTF (1 );
111
114
112
115
0 commit comments