wmc: Add a copy of the strmake utility function.
diff --git a/tools/wmc/utils.c b/tools/wmc/utils.c
index 88dd45f..6f26da3 100644
--- a/tools/wmc/utils.c
+++ b/tools/wmc/utils.c
@@ -138,7 +138,6 @@
     void *res;
 
     assert(size > 0);
-    assert(size < 102400);
     res = malloc(size);
     if(res == NULL)
     {
@@ -154,7 +153,6 @@
     void *res;
 
     assert(size > 0);
-    assert(size < 102400);
     res = realloc(p, size);
     if(res == NULL)
     {
@@ -172,6 +170,25 @@
 	return strcpy(s, str);
 }
 
+char *strmake( const char* fmt, ... )
+{
+    int n;
+    size_t size = 100;
+    va_list ap;
+
+    for (;;)
+    {
+        char *p = xmalloc( size );
+        va_start( ap, fmt );
+        n = vsnprintf( p, size, fmt, ap );
+        va_end( ap );
+        if (n == -1) size *= 2;
+        else if ((size_t)n >= size) size = n + 1;
+        else return p;
+        free( p );
+    }
+}
+
 int unistrlen(const WCHAR *s)
 {
 	int n;
diff --git a/tools/wmc/utils.h b/tools/wmc/utils.h
index bef1abf..909cc99 100644
--- a/tools/wmc/utils.h
+++ b/tools/wmc/utils.h
@@ -33,6 +33,7 @@
 #define __attribute__(X)
 #endif
 
+char *strmake(const char* fmt, ...) __attribute__((__format__ (__printf__, 1, 2 )));
 int mcy_error(const char *s, ...) __attribute__((format (printf, 1, 2)));
 int xyyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
 int mcy_warning(const char *s, ...) __attribute__((format (printf, 1, 2)));