diff files.c @ 7:b8167949474a

make places work better
author David A. Holland
date Sun, 19 Dec 2010 19:08:24 -0500
parents 0601b6e8e53d
children 97243badae69
line wrap: on
line diff
--- a/files.c	Sun Dec 19 18:55:51 2010 -0500
+++ b/files.c	Sun Dec 19 19:08:24 2010 -0500
@@ -184,6 +184,32 @@
 	scratchplace_inuse = false;
 }
 
+struct place *
+place_create(void)
+{
+	struct place *p;
+
+	p = domalloc(sizeof(*p));
+	place_setnowhere(p);
+	return p;
+}
+
+struct place *
+place_clone(const struct place *op)
+{
+	struct place *p;
+
+	p = domalloc(sizeof(*p));
+	*p = *op;
+	return p;
+}
+
+void
+place_destroy(struct place *p)
+{
+	free(p);
+}
+
 void
 place_setnowhere(struct place *p)
 {