diff options
Diffstat (limited to 'nuttx/lib/lib_rawprintf.c')
-rw-r--r-- | nuttx/lib/lib_rawprintf.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/nuttx/lib/lib_rawprintf.c b/nuttx/lib/lib_rawprintf.c index 537777665..9b65f5a8a 100644 --- a/nuttx/lib/lib_rawprintf.c +++ b/nuttx/lib/lib_rawprintf.c @@ -57,44 +57,53 @@ * Global Function Prototypes ************************************************************/ -/********************************************************** +/************************************************************ * Global Constant Data - **********************************************************/ + ************************************************************/ /************************************************************ * Global Variables ************************************************************/ -/********************************************************** +/************************************************************ * Private Constant Data - **********************************************************/ + ************************************************************/ /************************************************************ * Private Variables - **********************************************************/ + ************************************************************/ /************************************************************ * Global Functions - **********************************************************/ + ************************************************************/ /************************************************************ - * lib_rawprintf - **********************************************************/ + * Aame: lib_rawvprintf + ************************************************************/ -int lib_rawprintf(const char *fmt, ...) +int lib_rawvprintf(const char *fmt, va_list ap) { struct lib_rawstream_s rawstream; - va_list ap; - int ret; /* Wrap the stdout in a stream object and let lib_vsprintf * do the work. */ lib_rawstream(&rawstream, 1); + return lib_vsprintf(&rawstream.public, fmt, ap); +} + +/************************************************************ + * Name: lib_rawprintf + ************************************************************/ + +int lib_rawprintf(const char *fmt, ...) +{ + va_list ap; + int ret; va_start(ap, fmt); - ret= lib_vsprintf(&rawstream.public, fmt, ap); + ret= lib_rawvprintf(fmt, ap); va_end(ap); return ret; } |