Example #1
0
int
asprintf (char **buf, const char *fmt, ...)
{
  int status;
  VA_OPEN (ap, fmt);
  VA_FIXEDARG (ap, char **, buf);
  VA_FIXEDARG (ap, const char *, fmt);
  status = vasprintf (buf, fmt, ap);
  VA_CLOSE (ap);
  return status;
}
Example #2
0
static int
checkit (const char* format, ...)
{
  int result;
  VA_OPEN (args, format);
  VA_FIXEDARG (args, char *, format);

  result = _doprnt (format, args, stdout);
  VA_CLOSE (args);

  return result;
}
Example #3
0
int
snprintf (char *s, size_t n, const char *format, ...)
{
  int result;
  VA_OPEN (ap, format);
  VA_FIXEDARG (ap, char *, s);
  VA_FIXEDARG (ap, size_t, n);
  VA_FIXEDARG (ap, const char *, format);
  result = vsnprintf (s, n, format, ap);
  VA_CLOSE (ap);
  return result;
}
Example #4
0
static int ATTRIBUTE_PRINTF_3
checkit (char *s, size_t n, const char *format, ...)
{
  int result;
  VA_OPEN (ap, format);
  VA_FIXEDARG (ap, char *, s);
  VA_FIXEDARG (ap, size_t, n);
  VA_FIXEDARG (ap, const char *, format);
  result = vsnprintf (s, n, format, ap);
  VA_CLOSE (ap);
  return result;
}
Example #5
0
File: printf_m.c Project: hpc/give
errno_t
printf_m(const string_m fmt, int *count, ...){
  errno_t rv;

  if (!fmt){
    ErrorHandler("printf_m: 1st Argument NULL pointer", fmt, EINVAL);
    ERROR(EINVAL);
  }
  VA_OPEN(ap, count);
  VA_FIXEDARG(ap, const string_m, fmt);
  VA_FIXEDARG(ap, int *, count);
  rv = vprintf_m(fmt, count, ap);
  VA_CLOSE(ap);
  return rv;
}