aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/yat2m.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/yat2m.c b/doc/yat2m.c
index 0e368fc..15f7f76 100644
--- a/doc/yat2m.c
+++ b/doc/yat2m.c
@@ -396,6 +396,17 @@ xstrdup (const char *string)
return p;
}
+static char *
+mystpcpy (char *a,const char *b)
+{
+ while( *b )
+ *a++ = *b++;
+ *a = 0;
+
+ return (char*)a;
+}
+
+
/* Helper for xstrconcat and strconcat. */
static char *
do_strconcat (int xmode, const char *s1, va_list arg_ptr)
@@ -418,7 +429,7 @@ do_strconcat (int xmode, const char *s1, va_list arg_ptr)
needed++;
buffer = xmode? xmalloc (needed) : malloc (needed);
for (p = buffer, argc=0; argv[argc]; argc++)
- p = stpcpy (p, argv[argc]);
+ p = mystpcpy (p, argv[argc]);
return buffer;
}