[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS shishi/gl
From: |
shishi-commit |
Subject: |
CVS shishi/gl |
Date: |
Thu, 02 Dec 2004 04:09:47 +0100 |
Update of /home/cvs/shishi/gl
In directory dopio:/tmp/cvs-serv2118/gl
Modified Files:
Makefile.am
Added Files:
xasprintf.c xvasprintf.c xvasprintf.h
Log Message:
Add.
--- /home/cvs/shishi/gl/Makefile.am 2004/12/02 01:51:42 1.52
+++ /home/cvs/shishi/gl/Makefile.am 2004/12/02 03:09:47 1.53
@@ -9,7 +9,7 @@
#
# Generated by gnulib-tool.
# Invoked as: gnulib-tool --import
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl
--m4-base=gl/m4 --libtool alloca alloca-opt allocsa base64 error extensions
getaddrinfo getdate getdomainname gethostname getline getopt getpass getsubopt
gettext gettime gettimeofday mktime progname readlink realloc restrict setenv
stdbool strcase strchrnul strdup strndup strnlen strtok_r timegm time_r
timespec vasnprintf vasprintf xalloc xgetdomainname xgethostname xreadlink
xsize xstrndup
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl
--m4-base=gl/m4 --libtool alloca alloca-opt allocsa base64 error extensions
getaddrinfo getdate getdomainname gethostname getline getopt getpass getsubopt
gettext gettime gettimeofday mktime progname readlink realloc restrict setenv
stdbool strcase strchrnul strdup strndup strnlen strtok_r timegm time_r
timespec vasnprintf vasprintf xalloc xgetdomainname xgethostname xreadlink
xsize xstrndup xvasprintf
AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
@@ -258,6 +258,12 @@
## end gnulib module xstrndup
+## begin gnulib module xvasprintf
+
+libgnu_la_SOURCES += xvasprintf.h xvasprintf.c xasprintf.c
+
+## end gnulib module xvasprintf
+
# Makefile.am ends here
--- /home/cvs/shishi/gl/xasprintf.c 2004/12/02 03:09:47 NONE
+++ /home/cvs/shishi/gl/xasprintf.c 2004/12/02 03:09:47 1.1
/* vasprintf and asprintf with out-of-memory checking.
Copyright (C) 1999, 2002-2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "xvasprintf.h"
char *
xasprintf (const char *format, ...)
{
va_list args;
char *result;
va_start (args, format);
result = xvasprintf (format, args);
va_end (args);
return result;
}
--- /home/cvs/shishi/gl/xvasprintf.c 2004/12/02 03:09:47 NONE
+++ /home/cvs/shishi/gl/xvasprintf.c 2004/12/02 03:09:47 1.1
/* vasprintf and asprintf with out-of-memory checking.
Copyright (C) 1999, 2002-2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "xvasprintf.h"
#include <errno.h>
#include "vasprintf.h"
#include "xalloc.h"
char *
xvasprintf (const char *format, va_list args)
{
char *result;
if (vasprintf (&result, format, args) < 0)
{
if (errno == ENOMEM)
xalloc_die ();
return NULL;
}
return result;
}
--- /home/cvs/shishi/gl/xvasprintf.h 2004/12/02 03:09:47 NONE
+++ /home/cvs/shishi/gl/xvasprintf.h 2004/12/02 03:09:47 1.1
/* vasprintf and asprintf with out-of-memory checking.
Copyright (C) 2002-2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _XVASPRINTF_H
#define _XVASPRINTF_H
/* Get va_list. */
#include <stdarg.h>
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
# define __printf__ printf
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Write formatted output to a string dynamically allocated with malloc().
If the memory allocation succeeds, store the address of the string in
*RESULT and return the number of resulting bytes, excluding the trailing
NUL. Upon [ENOMEM] memory allocation error, call xalloc_die.
On some other error
- [EOVERFLOW] resulting string length is > INT_MAX,
- [EINVAL] invalid format string,
- [EILSEQ] error during conversion between wide and multibyte characters,
return NULL. */
extern char *xasprintf (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
extern char *xvasprintf (const char *format, va_list args)
__attribute__ ((__format__ (__printf__, 1, 0)));
#ifdef __cplusplus
}
#endif
#endif /* _XVASPRINTF_H */
- CVS shishi/gl, shishi-commit, 2004/12/01
- CVS shishi/gl, shishi-commit, 2004/12/01
- CVS shishi/gl,
shishi-commit <=
- CVS shishi/gl, shishi-commit, 2004/12/01
- CVS shishi/gl, shishi-commit, 2004/12/17
- CVS shishi/gl, shishi-commit, 2004/12/18
- CVS shishi/gl, shishi-commit, 2004/12/18
- CVS shishi/gl, shishi-commit, 2004/12/19
- CVS shishi/gl, shishi-commit, 2004/12/24