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
This commit is contained in:
patacongo
2007-03-01 21:05:55 +00:00
parent fb61b0b76b
commit bcd6ba97bd
52 changed files with 278 additions and 156 deletions
+12 -9
View File
@@ -81,23 +81,26 @@
**********************************************************/
/************************************************************
* printf
* Name: printf
**********************************************************/
int printf(const char *fmt, ...)
{
struct lib_stdstream_s stdstream;
va_list ap;
int ret;
/* Wrap the stdout in a stream object and let lib_vsprintf
* do the work.
*/
lib_stdstream(&stdstream, stdout);
va_start(ap, fmt);
ret= lib_vsprintf(&stdstream.public, fmt, ap);
#if CONFIG_NFILE_STREAMS > 0
ret = vfprintf(stdout, fmt, ap);
#elif CONFIG_NFILE_DESCRIPTORS > 0
ret = lib_rawvprintf(fmt, ap);
#elif defined(CONFIG_ARCH_LOWPUTC)
ret = lib_lowvprintf(fmt, ap);
#else
# warning "printf has no data sink"
#endif
va_end(ap);
return ret;
}