Blame lib/snprintf.h

Packit 022b05
/*
Packit 022b05
 * Copyright (c) 1995-1999 Kungliga Tekniska Högskolan
Packit 022b05
 * (Royal Institute of Technology, Stockholm, Sweden).
Packit 022b05
 * All rights reserved.
Packit 022b05
 * 
Packit 022b05
 * Redistribution and use in source and binary forms, with or without
Packit 022b05
 * modification, are permitted provided that the following conditions
Packit 022b05
 * are met:
Packit 022b05
 * 
Packit 022b05
 * 1. Redistributions of source code must retain the above copyright
Packit 022b05
 *    notice, this list of conditions and the following disclaimer.
Packit 022b05
 * 
Packit 022b05
 * 2. Redistributions in binary form must reproduce the above copyright
Packit 022b05
 *    notice, this list of conditions and the following disclaimer in the
Packit 022b05
 *    documentation and/or other materials provided with the distribution.
Packit 022b05
 * 
Packit 022b05
 * 3. Neither the name of the Institute nor the names of its contributors
Packit 022b05
 *    may be used to endorse or promote products derived from this software
Packit 022b05
 *    without specific prior written permission.
Packit 022b05
 * 
Packit 022b05
 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
Packit 022b05
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 022b05
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit 022b05
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
Packit 022b05
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 022b05
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit 022b05
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit 022b05
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit 022b05
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit 022b05
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit 022b05
 * SUCH DAMAGE.
Packit 022b05
 */
Packit 022b05
Packit 022b05
#include <config.h>
Packit 022b05
Packit 022b05
#include <sys/types.h>
Packit 022b05
#include <stdarg.h>
Packit 022b05
#include <stdio.h>
Packit 022b05
Packit 022b05
#ifndef HAVE_SNPRINTF
Packit 022b05
extern int snprintf (char *str, size_t sz, const char *format, ...);
Packit 022b05
#endif
Packit 022b05
Packit 022b05
#ifndef HAVE_VSNPRINTF
Packit 022b05
extern int vsnprintf (char *str, size_t sz, const char *format, va_list args);
Packit 022b05
#endif
Packit 022b05
Packit 022b05
extern int asprintf (char **ret, const char *format, ...);
Packit 022b05
Packit 022b05
extern int asnprintf (char **ret, size_t max_sz, const char *format, ...);
Packit 022b05
Packit 022b05
extern int vasprintf (char **ret, const char *format, va_list args);
Packit 022b05
Packit 022b05
extern int vasnprintf (char **ret, size_t max_sz, const char *format,
Packit 022b05
		       va_list args);
Packit 022b05