Exemple #1
0
int stream_printf (struct stream *stream, const char *fmt, ...)
{
    va_list args;
    int ret;
    
    va_start(args, fmt); 
    ret = stream_vprintf(stream, fmt, args);
    va_end(args);

    return ret;
}
Exemple #2
0
int
console_printf(const char *fmt, ...)
{
    va_list args;
    int chars_written;

    va_start(args, fmt);

    chars_written = stream_vprintf(_get_stream(), fmt, args);
    va_end(args);

    return chars_written;
}
Exemple #3
0
void trace(uint16_t level, const char *msg, ...)
  {
  va_list args;
  va_start(args, msg);

  if (trace_stream != 0 && trace_level <= level)
    {
    // send the timestamp
    stream_printf(trace_stream, "%ld %s ", ticks(), levels[level]);
    // send the level
    stream_vprintf(trace_stream, msg, args);
    stream_puts(trace_stream, "\r\n");
    }

  platform_trace(level, msg, args);
  }
Exemple #4
0
int
console_vprintf(const char *fmt, va_list args)
{
    return stream_vprintf(_get_stream(), fmt, args);
}