Mercurial > hg > Members > kono > tree_dandy2
view object.c @ 0:01387a2e419e
initial version
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 07 Dec 2010 15:39:45 +0900 |
parents | |
children | 6754fbb63ac7 |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <libxml/parser.h> #include "object.h" void init_object(OBJECT *obj) { obj->name = NULL; obj->surfaces = NULL; } void free_object(OBJECT *obj) { SURFACE *cur,*next; if (obj == NULL) { printf("obj is NULL\n"); return; } for(cur=obj->surfaces;cur;cur=next) { next = cur->next; free(cur); } free(obj->free_me); }