diff src/c/lacweb.c @ 180:c7a5c8e0a0e0

Cjrize EStrcat
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 11:03:35 -0400
parents 2232ab355f66
children c0ea24dcb86f
line wrap: on
line diff
--- a/src/c/lacweb.c	Sun Aug 03 10:48:36 2008 -0400
+++ b/src/c/lacweb.c	Sun Aug 03 11:03:35 2008 -0400
@@ -505,3 +505,18 @@
     }
   }
 }
+
+lw_Basis_string lw_Basis_strcat(lw_context ctx, lw_Basis_string s1, lw_Basis_string s2) {
+  int len = strlen(s1) + strlen(s2) + 1;
+  char *s;
+
+  lw_check(ctx, len);
+
+  s = ctx->heap_front;
+
+  strcpy(s, s1);
+  strcat(s, s2);
+  ctx->heap_front += len;
+
+  return s;
+}