From dac2e5020dc34c236b741ff5c4591244e73f56f2 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo@andromeda>
Date: Tue, 28 Dec 2010 23:48:08 +0000
Subject: [PATCH] Rewrite of frame is complete.

---
 src/vertex.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/vertex.c b/src/vertex.c
index ccd661e..b5f8519 100644
--- a/src/vertex.c
+++ b/src/vertex.c
@@ -144,7 +144,8 @@
     if(data->neigh!=NULL)   free(data->neigh);
     if(data->tristar!=NULL) free(data->tristar);
     if(data->bond!=NULL)    free(data->bond);
-    if(data->cell!=NULL)    free(data->cell);
+//Cells are freed separately.
+ //   if(data->cell!=NULL)    free(data->cell);
     free(data);
     return TS_SUCCESS;
 }
@@ -235,11 +236,21 @@
     cvtx->data->cell=NULL;
     return TS_SUCCESS;
 }
+
+ts_bool vtx_duplicate(ts_vertex *cvtx, ts_vertex *ovtx){
+    memcpy((void *)cvtx,(void *)ovtx,sizeof(ts_vertex));
+    cvtx->data=(ts_vertex_data *)malloc(sizeof(ts_vertex_data));
+    memcpy((void *)cvtx->data,(void *)ovtx->data,sizeof(ts_vertex_data));
+    return TS_SUCCESS;
+}
+
 //TODO: needs to be done
 ts_vertex **vtx_neigh_copy(ts_vertex_list *vlist,ts_vertex *ovtx){
         return NULL;
 }
 
+
+
 ts_vertex_list *vertex_list_copy(ts_vertex_list *ovlist){
     ts_uint i;
     ts_vertex_list *vlist=(ts_vertex_list *)malloc(sizeof(ts_vertex_list));

--
Gitblit v1.9.3