Esempio n. 1
0
void ICACHE_FLASH_ATTR shell_printf(const char *fmt, ...)
{
    va_list args;
    va_start(args, fmt);
    xvfprintf(_z_out_cb, 0, fmt, args);
    va_end(args);
}
Esempio n. 2
0
int xfprintf(xFILE *stream, const char *fmt, ...) {
  va_list ap;
  int n;

  va_start(ap, fmt);
  n = xvfprintf(stream, fmt, ap);
  va_end(ap);
  return n;
}
Esempio n. 3
0
int xprintf(const char *fmt, ...) {
  va_list ap;
  int n;

  va_start(ap, fmt);
  n = xvfprintf(xstdout, fmt, ap);
  va_end(ap);
  return n;
}
Esempio n. 4
0
void veprintf (char *format, va_list args) {
   assert (execname != NULL);
   assert (format != NULL);
   xfflush (NULL);
   if (strstr (format, "%:") == format) {
      xfprintf (stderr, "%s: ", get_execname ());
      format += 2;
   }
   xvfprintf (stderr, format, args);
   xfflush (NULL);
}
Esempio n. 5
0
void __debugprintf (char flag, char *file, int line, const char *func,
                    char *format, ...) {
   va_list args;
   if (! is_debugflag (flag)) return;
   xfflush (NULL);
   va_start (args, format);
   xfprintf (stderr, "DEBUGF(%c): %s[%d] %s():\n",
             flag, file, line, func);
   xvfprintf (stderr, format, args);
   va_end (args);
   xfflush (NULL);
}
Esempio n. 6
0
/* If the current debug mode includes MODE, and there is a current
   debug file, then output a debug message described by FORMAT.  A
   message header is supplied, as well as a trailing newline.  */
void
m4_debug_message (m4 *context, int mode, const char *format, ...)
{
  /* Check that mode has exactly one bit set.  */
  assert (mode && (mode & (mode - 1)) == 0);
  assert (format);

  if (m4_get_debug_file (context) != NULL
      && m4_is_debug_bit (context, mode))
    {
      va_list args;

      m4_debug_message_prefix (context);
      va_start (args, format);
      xvfprintf (m4_get_debug_file (context), format, args);
      va_end (args);
      putc ('\n', m4_get_debug_file (context));
    }
}