示例#1
0
int lib_rawvprintf(const char *fmt, va_list ap)
{
#if CONFIG_NFILE_DESCRIPTORS > 0

  struct lib_rawoutstream_s rawoutstream;

  /* Wrap the stdout in a stream object and let lib_vsprintf
   * do the work.
   */

  lib_rawoutstream(&rawoutstream, 1);
  return lib_vsprintf(&rawoutstream.public, fmt, ap);

#elif defined(CONFIG_ARCH_LOWPUTC)

  struct lib_outstream_s stream;

  /* Wrap the low-level output in a stream object and let lib_vsprintf
   * do the work.
   */

  lib_lowoutstream((FAR struct lib_outstream_s *)&stream);
  return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, ap);

#else
  return 0;
#endif
}
示例#2
0
int lib_lowvprintf(const char *fmt, va_list ap)
{
  struct lib_outstream_s stream;

  /* Wrap the stdout in a stream object and let lib_vsprintf
   * do the work.
   */

  lib_lowoutstream((FAR struct lib_outstream_s *)&stream);
  return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, ap);
}
示例#3
0
static inline int lowvsyslog_internal(FAR const IPTR char *fmt, va_list ap)
{
  struct lib_outstream_s stream;

  /* Wrap the stdout in a stream object and let lib_vsprintf do the work. */

#ifdef CONFIG_SYSLOG
  lib_syslogstream((FAR struct lib_outstream_s *)&stream);
#else
  lib_lowoutstream((FAR struct lib_outstream_s *)&stream);
#endif
  return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, ap);
}