diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-01 21:05:55 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-01 21:05:55 +0000 |
commit | 08680a039b6ffc922731d9a1cfdff20ef204dbba (patch) | |
tree | 25bb704377c624f2d63c4bb5ad1df332d44aa78a /nuttx/lib/lib_rawprintf.c | |
parent | 129dd27cc4deb042d2f88c65927adc49c338756d (diff) | |
download | px4-nuttx-08680a039b6ffc922731d9a1cfdff20ef204dbba.tar.gz px4-nuttx-08680a039b6ffc922731d9a1cfdff20ef204dbba.tar.bz2 px4-nuttx-08680a039b6ffc922731d9a1cfdff20ef204dbba.zip |
This creates a 8051 build that can run in 24Kb of RAM
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@26 42af7a65-404d-4744-a932-0658087f49c3
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; } |