Author: iratqq
Date: Thu Apr 10 23:18:26 2008
New Revision: 5406
Modified:
trunk/COPYING
trunk/uim/uim-error.c
trunk/uim/uim.h
Log:
* COPYING, uim/uim-error.c, uim/uim.h
- Bring back r5403.
Modified: trunk/COPYING
==============================================================================
--- trunk/COPYING (original)
+++ trunk/COPYING Thu Apr 10 23:18:26 2008
@@ -132,3 +132,19 @@
[EMAIL PROTECTED]
MORIBE, Hideyuki
-----------------------------------------------------------------------------
+
+
+uim/uim-error.c(uim_asprintf) is covered by:
+-----------------------------------------------------------------------------
+Author: Tatu Ylonen <[EMAIL PROTECTED]>
+Copyright (c) 1995 Tatu Ylonen <[EMAIL PROTECTED]>, Espoo, Finland
+ All rights reserved
+Versions of malloc and friends that check their results, and never return
+failure (they call fatal if they encounter an error).
+
+As far as I am concerned, the code I have written for this software
+can be used freely for any purpose. Any derived versions of this
+software must be clearly marked as such, and if the derived work is
+incompatible with the protocol description in the RFC file, it must be
+called by a name other than "ssh" or "Secure Shell".
+-----------------------------------------------------------------------------
Modified: trunk/uim/uim-error.c
==============================================================================
--- trunk/uim/uim-error.c (original)
+++ trunk/uim/uim-error.c Thu Apr 10 23:18:26 2008
@@ -226,3 +226,19 @@
return copied;
}
+
+int
+uim_asnprintf(char **ret, const char *fmt, ...)
+{
+ va_list ap;
+ int i;
+
+ va_start(ap, fmt);
+ i = vasprintf(ret, fmt, ap);
+ va_end(ap);
+
+ if (i < 0 || *ret == NULL)
+ uim_fatal_error("asprintf() failed");
+
+ return i;
+}
Modified: trunk/uim/uim.h
==============================================================================
--- trunk/uim/uim.h (original)
+++ trunk/uim/uim.h Thu Apr 10 23:18:26 2008
@@ -926,6 +926,7 @@
void *uim_realloc(void *p, size_t size);
void *uim_calloc(size_t nmemb, size_t size);
char *uim_strdup(const char *s);
+int uim_asprintf(char **, const char *, ...);
#ifdef __cplusplus