From 3b23ee2703a28a1b46bbd3eb4835b05ae321de29 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 4 Mar 2007 15:23:22 +0000 Subject: Add capability to manager memory in discontiguous regions. git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@35 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/lib/lib_rawprintf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'nuttx/lib/lib_rawprintf.c') diff --git a/nuttx/lib/lib_rawprintf.c b/nuttx/lib/lib_rawprintf.c index 9b65f5a8a..fa2f5a63e 100644 --- a/nuttx/lib/lib_rawprintf.c +++ b/nuttx/lib/lib_rawprintf.c @@ -83,6 +83,8 @@ int lib_rawvprintf(const char *fmt, va_list ap) { +#if CONFIG_NFILE_DESCRIPTORS > 0 + struct lib_rawstream_s rawstream; /* Wrap the stdout in a stream object and let lib_vsprintf @@ -91,6 +93,21 @@ int lib_rawvprintf(const char *fmt, va_list ap) lib_rawstream(&rawstream, 1); return lib_vsprintf(&rawstream.public, fmt, ap); + +#elif defined(CONFIG_ARCH_LOWPUTC) + + struct lib_stream_s stream; + + /* Wrap the stdout in a stream object and let lib_vsprintf + * do the work. + */ + + lib_lowstream(&stream); + return lib_vsprintf(&stream, fmt, ap); + +#else + return 0; +#endif } /************************************************************ -- cgit v1.2.3