Blame gnulib/asnprintf.c

Packit Service 392537
/* Formatted output to strings.
Packit Service 392537
   Copyright (C) 1999, 2002, 2006, 2009-2016 Free Software Foundation, Inc.
Packit Service 392537
Packit Service 392537
   This program is free software; you can redistribute it and/or modify
Packit Service 392537
   it under the terms of the GNU General Public License as published by
Packit Service 392537
   the Free Software Foundation; either version 3, or (at your option)
Packit Service 392537
   any later version.
Packit Service 392537
Packit Service 392537
   This program is distributed in the hope that it will be useful,
Packit Service 392537
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 392537
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 392537
   GNU General Public License for more details.
Packit Service 392537
Packit Service 392537
   You should have received a copy of the GNU General Public License along
Packit Service 392537
   with this program; if not, see <http://www.gnu.org/licenses/>.  */
Packit Service 392537
Packit Service 392537
#include <config.h>
Packit Service 392537
Packit Service 392537
/* Specification.  */
Packit Service 392537
#include "vasnprintf.h"
Packit Service 392537
Packit Service 392537
#include <stdarg.h>
Packit Service 392537
Packit Service 392537
char *
Packit Service 392537
asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
Packit Service 392537
{
Packit Service 392537
  va_list args;
Packit Service 392537
  char *result;
Packit Service 392537
Packit Service 392537
  va_start (args, format);
Packit Service 392537
  result = vasnprintf (resultbuf, lengthp, format, args);
Packit Service 392537
  va_end (args);
Packit Service 392537
  return result;
Packit Service 392537
}